Sign in to follow this  
Followers 0
gojupiter

Help me, iniread() function

3 posts in this topic

Hi everybody,

I get stuck with that stupid, the function read() does not work :D

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
HotKeySet("{F5}", "chay")
HotKeySet("{F6}", "ngung")
HotKeySet("{F7}", "reset")
global $r = 0
Global $imbue_t =0, $t0 =0, $t1 =0, $t2 =0, $t3 =0, $t4 =0, $t5 =0, $t6 =0, $t7 =0, $t8 =0, $t9 =0, $b1=0,$b2=0,$b3=0,$b4=0,$b5=0,$b6=0,$b7=0,$b8=0,$b9=0
Opt("TrayMenuMode", 1)
$GUI = GUICreate("ZSZC Autoclick", 415, 280)
GUICtrlCreateGroup("Skill", 5, 10, 405, 80)
GUICtrlCreateLabel("F", 30, 35, 48, 17)
$ff_skill = GUICtrlCreateCombo("", 45, 30, 44, 22)
GUICtrlSetData($ff_skill, "F1|F2|F3|F4")
GUICtrlCreateLabel("Skills", 105, 35, 48, 17)
$initial = GUICtrlCreateCombo("", 132, 30, 44, 22)
GUICtrlSetData($initial, "0|1|2|3|4|5|6|7|8|9")
GUICtrlCreateLabel("to", 183, 35, 48, 17)
$final = GUICtrlCreateCombo("", 200, 30, 44, 22)
GUICtrlSetData($final, "0|1|2|3|4|5|6|7|8|9")
GUICtrlCreateLabel("Imbue", 15, 62, 48, 17)
$imbu = GUICtrlCreateCombo("", 45, 57, 44, 22)
GUICtrlSetData($imbu, "0|1|2|3|4|5|6|7|8|9|x")
GUICtrlCreateLabel("Imbue's timer", 115, 62, 100, 17)
$imbu_t = GUICtrlCreateInput("", 180, 57, 55, 22)
GUICtrlCreateGroup("Buff ", 5, 96, 405, 125)
GUICtrlCreateLabel("F", 30, 111, 48, 17)
$ff_buff = GUICtrlCreateCombo("", 45, 108, 44, 22)
GUICtrlSetData($ff_buff, "F1|F2|F3|F4")
GUICtrlCreateLabel("Buff 1", 15, 135, 48, 17)
$bb1 = GUICtrlCreateInput("", 45, 130, 55, 22)
GUICtrlCreateLabel("Buff 2", 115, 135, 48, 17)
$bb2 = GUICtrlCreateInput("", 145, 130, 55, 22)
GUICtrlCreateLabel("Buff 3", 215, 135, 48, 17)
$bb3 = GUICtrlCreateInput("", 245, 130, 55, 22)
GUICtrlCreateLabel("Buff 4", 15, 162, 48, 17)
$bb4 = GUICtrlCreateInput("", 45, 160, 55, 22)
GUICtrlCreateLabel("Buff 5", 115, 162, 48, 17)
$bb5 = GUICtrlCreateInput("", 145, 160, 55, 22)
GUICtrlCreateLabel("Buff 6", 215, 162, 48, 17)
$bb6 = GUICtrlCreateInput("", 245, 160, 55, 22)
GUICtrlCreateLabel("Buff 7", 15, 189, 48, 17)
$bb7 = GUICtrlCreateInput("", 45, 190, 55, 22)
GUICtrlCreateLabel("Buff 8", 115, 189, 48, 17)
$bb8 = GUICtrlCreateInput("", 145, 190, 55, 22)
GUICtrlCreateLabel("Buff 9", 215, 189, 48, 17)
$bb9 = GUICtrlCreateInput("", 245, 190, 55, 22)
GUICtrlCreateLabel("F5: start       F6: stop        F7: reset buff", 35, 230)
GUICtrlCreateLabel("© GoJupiter 2011", 280, 250)
GUISetState(@SW_SHOW)
read()
Func chay()
$r=1
write()
EndFunc
Func ngung()
$r=0
EndFunc
Func reset()
$t0 =0
$t1 =0
$t2 =0
$t3 =0
$t4 =0
$t5 =0
$t6 =0
$t7 =0
$t8 =0
$t9 =0
EndFunc
Func write()
  IniWrite("Autoclick.cfg", "Config", "Imbue", GUICtrlRead($imbu))
  IniWrite("Autoclick.cfg", "Config", "Imbue_t", GUICtrlRead($imbu_t))
  IniWrite("Autoclick.cfg", "Config", "Buff1", GUICtrlRead($bb1))
  IniWrite("Autoclick.cfg", "Config", "Buff2", GUICtrlRead($bb2))
  IniWrite("Autoclick.cfg", "Config", "Buff3", GUICtrlRead($bb3))
  IniWrite("Autoclick.cfg", "Config", "Buff4", GUICtrlRead($bb4))
  IniWrite("Autoclick.cfg", "Config", "Buff5", GUICtrlRead($bb5))
  IniWrite("Autoclick.cfg", "Config", "Buff6", GUICtrlRead($bb6))
  IniWrite("Autoclick.cfg", "Config", "Buff7", GUICtrlRead($bb7))
  IniWrite("Autoclick.cfg", "Config", "Buff8", GUICtrlRead($bb8))
  IniWrite("Autoclick.cfg", "Config", "Buff9", GUICtrlRead($bb9))
  IniWrite("Autoclick.cfg", "Config", "f_buff", GUICtrlRead($ff_buff))
  IniWrite("Autoclick.cfg", "Config", "f_skill", GUICtrlRead($ff_skill))
  IniWrite("Autoclick.cfg", "Config", "ini", GUICtrlRead($initial))
  IniWrite("Autoclick.cfg", "Config", "fin", GUICtrlRead($final))
EndFunc
func read()
  $imbu = IniRead("Autoclick.cfg", "Config", "Imbue", GUICtrlRead($imbu))
  $imbu_t = IniRead("Autoclick.cfg", "Config", "Imbue_t", GUICtrlRead($imbu_t))
  $bb1 = IniRead("Autoclick.cfg", "Config", "Buff1", GUICtrlRead($bb1))
  $bb2 = IniRead("Autoclick.cfg", "Config", "Buff2", GUICtrlRead($bb2))
  $bb3 = IniRead("Autoclick.cfg", "Config", "Buff3", GUICtrlRead($bb3))
  $bb4 =IniRead("Autoclick.cfg", "Config", "Buff4", GUICtrlRead($bb4))
  $bb5 = IniRead("Autoclick.cfg", "Config", "Buff5", GUICtrlRead($bb5))
  $bb6 = IniRead("Autoclick.cfg", "Config", "Buff6", GUICtrlRead($bb6))
  $bb7= IniRead("Autoclick.cfg", "Config", "Buff7", GUICtrlRead($bb7))
  $bb8= IniRead("Autoclick.cfg", "Config", "Buff8", GUICtrlRead($bb8))
  $bb9= IniRead("Autoclick.cfg", "Config", "Buff9", GUICtrlRead($bb9))
  $ff_buff= IniRead("Autoclick.cfg", "Config", "f_buff", GUICtrlRead($ff_buff))
  $ff_skill= IniRead("Autoclick.cfg", "Config", "f_skill", GUICtrlRead($ff_skill))
  $initial= IniRead("Autoclick.cfg", "Config", "ini", GUICtrlRead($initial))
  $final= IniRead("Autoclick.cfg", "Config", "fin", GUICtrlRead($final))
EndFunc
while 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
  $imbue = GUICtrlRead($imbu)
  $imbue_t = GUICtrlRead($imbu_t)
  $b1 = GUICtrlRead($bb1)
  $b2 = GUICtrlRead($bb2)
  $b3 = GUICtrlRead($bb3)
  $b4 = GUICtrlRead($bb4)
  $b5 = GUICtrlRead($bb5)
  $b6 = GUICtrlRead($bb6)
  $b7 = GUICtrlRead($bb7)
  $b8 = GUICtrlRead($bb8)
  $b9 = GUICtrlRead($bb9)
  $ini = GUICtrlRead($initial)
  $fin = GUICtrlRead($final)
  $f_buff = GUICtrlRead($ff_buff)
  $f_skill = GUICtrlRead($ff_skill)
   local $b[9] =[$b1,$b2,$b3,$b4,$b5,$b6,$b7,$b8,$b9]
   local $t[9] =[$t1,$t2,$t3,$t4,$t5,$t6,$t7,$t8,$t9]
while $r=1
  for $i = 1 to 9
   If ($b[$i-1] * 1000+3000) < TimerDiff($t[$i-1]) And ($b[$i-1] <> 0) Then
    if $f_buff = "F1" then
     ControlSend("SRO_Client", "", "", "{F1}")
    EndIf
    if $f_buff = "F2" then
     ControlSend("SRO_Client", "", "", "{F2}")
    EndIf
    if $f_buff = "F3" then
     ControlSend("SRO_Client", "", "", "{F3}")
    EndIf
    if $f_buff = "F4" then
     ControlSend("SRO_Client", "", "", "{F4}")
    EndIf
    Sleep(1000)
    ControlSend("SRO_Client", "", "", $i)
    Sleep(1000)
    if $f_skill = "F1" then
     ControlSend("SRO_Client", "", "", "{F1}")
    EndIf
    if $f_skill = "F2" then
     ControlSend("SRO_Client", "", "", "{F2}")
    EndIf
    if $f_skill = "F3" then
     ControlSend("SRO_Client", "", "", "{F3}")
    EndIf
    if $f_skill = "F4" then
     ControlSend("SRO_Client", "", "", "{F4}")
    EndIf
    $t[$i-1] = TimerInit()
   EndIf
  Next
      
  If $r = 1 and ($imbue_t * 1000)< TimerDiff($t0) And ($imbue_t <> "") Then
   ControlSend("SRO_Client", "", "", $imbue)
   $t0 = TimerInit()
  EndIf
  If $r = 1 Then
   For $u = $ini To $fin
    ControlSend("SRO_Client", "", "", $u)
    Sleep(500)
   Next
  EndIf
WEnd
WEnd

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Sorry, my last post is wrong, plz dont care it.

func read()
  $imbu = IniRead("Autoclick.cfg", "Config", "Imbue", GUICtrlRead($imbu))
  $imbu_t = IniRead("Autoclick.cfg", "Config", "Imbue_t", GUICtrlRead($imbu_t))
  $bb1 = IniRead("Autoclick.cfg", "Config", "Buff1", GUICtrlRead($bb1))
  $bb2 = IniRead("Autoclick.cfg", "Config", "Buff2", GUICtrlRead($bb2))
  $bb3 = IniRead("Autoclick.cfg", "Config", "Buff3", GUICtrlRead($bb3))
  $bb4 =IniRead("Autoclick.cfg", "Config", "Buff4", GUICtrlRead($bb4))
  $bb5 = IniRead("Autoclick.cfg", "Config", "Buff5", GUICtrlRead($bb5))
  $bb6 = IniRead("Autoclick.cfg", "Config", "Buff6", GUICtrlRead($bb6))
  $bb7= IniRead("Autoclick.cfg", "Config", "Buff7", GUICtrlRead($bb7))
  $bb8= IniRead("Autoclick.cfg", "Config", "Buff8", GUICtrlRead($bb8))
  $bb9= IniRead("Autoclick.cfg", "Config", "Buff9", GUICtrlRead($bb9))
  $ff_buff= IniRead("Autoclick.cfg", "Config", "f_buff", GUICtrlRead($ff_buff))
  $ff_skill= IniRead("Autoclick.cfg", "Config", "f_skill", GUICtrlRead($ff_skill))
  $initial= IniRead("Autoclick.cfg", "Config", "ini", GUICtrlRead($initial))
  $final= IniRead("Autoclick.cfg", "Config", "fin", GUICtrlRead($final))
EndFunc
Edited by Jos

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0