Need help with script

08/23/2009 15:07 sb0t#1
Okay, let me first try to explain what im planning to do:
In PvP its pretty useful to switch between different Weapon Sets (i.e. 40/40, Def-Set, Prot, Heal, vs. Fire etc.)
Now what im trying to do is making makros for each of my Keyboard-Numbers using specific Skills.

This is what i did so far:

Code:
HotKeySet("{1}","Rejuvenation")

while 1
	sleep(20)
WEnd

func Rejuvenation()
	Send("{F4}")
	sleep(20)
	Send("{1}")
	sleep(20)
	Send("{F2}")
EndFunc
So when i press "1" it should instead press F4 (my 40/40 Set), then press 1 to actually cast my skill, then finally switch back to F2 (my Def-Set). Somehow it seems to loop. Id appreciate if you could help me out. Im sure you guys can manage this. :handsdown::handsdown::handsdown:
08/23/2009 15:13 Rosemarie Lein#2
Code:
HotKeySet("{1}","Rejuvenation")

while 1
	sleep(20)
WEnd

func Rejuvenation()
	Send("{F4}")
	sleep(20)
	Send("{1}")
	sleep(20)
	Send("{F2}")
	[B]Sleep(500)[/B]
EndFunc
?
08/23/2009 15:19 sb0t#3
Ah think i got the problem but i have no idea how to fix that.
In my script button 1 has to be pushed again and i guess thats what causes my infinite loop. Any ideas?
08/23/2009 15:20 kknb#4
btw you cant switch your set while you are casting, the skill would be interrupted.
08/23/2009 15:22 sb0t#5
ofcause i want cast the skill when set is already switched. i think thats the main idea of my script.
08/23/2009 15:25 kknb#6
no this wont work, if you push the key "1" then your char directly cast skill 1 and your script together.
08/23/2009 15:29 sb0t#7
is there a way to disable keys and instead only run the makro?
08/23/2009 17:06 buFFy!#8
BlockInput(1)
08/23/2009 18:29 sb0t#9
at which point of my script do i have to include that toggle?
08/23/2009 18:29 kknb#10
if you block the key then you cant push it, that means your script wont start ;)


i think this should work.

Code:
HotKeySet("{1}","Rejuvenation")

while 1
	sleep(20)
WEnd

func Rejuvenation()
	Send("{F4}")
	sleep(20)
	HotKeySet("{1}")
	sleep(50)
	Send("{1}")
	sleep(2000) ;casttime
	Send("{F2}")
	Sleep(500)
	HotKeySet("{1}","Rejuvenation")
EndFunc
08/23/2009 18:41 sb0t#11
i love you :D tyvm