AutoIt (sorry need more help XD)

07/31/2009 02:22 emofishcake#1
This is a part of my script, when my chi = my max chi, the script makes the AOE key go down... however im having problems making the AOE key be released once my chi is below 1900 :S any ideas?

While $CHI = $ChiMax
AOEA ()
While $CHI < 1900
AOEB ()
Wend
Wend


Func AOEA ()
WinActive("TwelveSky2")
Send ("Q" down)
sleep (1)
EndFunc


Func AOEB ()
WinActive("TwelveSky2")
Send ("Q" up)
Sleep (1)
EndFunc
07/31/2009 02:32 strikeraid#2
you might be stuck in a loop. once in a loop you can't get out until while *whatever here* is false.
Your ("Q" down) is wrong. SHould be ("{q down}")
You should make ur aoe button 1 function running under a loop.

global $chimax = 2500

while 1
send("{q down}")
sleep(200)
send("{q up}")
If $chimax < 1900 then
exitloop
wend

not sure if 1900 needs to be written as "1900" I usually test and check. i forget about quotes alot. LOL.

obviously you're going to have to get the "current MP" address instead of max MP. probably need 2 variables also.
07/31/2009 02:40 emofishcake#3
cheers striker =] ill test out what u sed!!
07/31/2009 02:43 strikeraid#4
by making write out that script gave me a wild idea for a bot. LOL. i feel so drained reading all this C++ coding. don't think i can learn C++ as fast as i did autoit. and i've only mastered like 40% of autoit. -.- and that might even be an exaggeration.
07/31/2009 02:52 emofishcake#5
loool ur doing well considering u started not too long ago =D
u feel good when it works tho XD
alsoo wat does the term global stand for??
07/31/2009 02:56 strikeraid#6
It means like throughout your entire script. so if for example you have a second function and you don't specify the $maxchi variable, it will use the global value.

more on that here:

[Only registered and activated users can see links. Click Here To Register...]
08/01/2009 08:53 tri407tiny#7
Quote:
Func botbabby()
While $CHI > ($ChiMax *.50) ;50%
AOEA()
wend
While $CHI < ($ChiMax * .50) ;50%
ChiPill()
wend
While $HP > ($HPMAX * .90)
HPpill()
wend
endfunc

Func AOEA ()
WinActive("TwelveSky2")
Send ("Q")
sleep (1)
EndFunc


Func Chipill ()
WinActive("TwelveSky2")
Send ("W" )
Sleep (1)
EndFunc

Func HPpill ()
WinActive("TwelveSky2")
Send ("W" )
Sleep (1)
EndFunc

While 1
botbabby()
wend
-tri407tiny
08/01/2009 09:03 strikeraid#8
you totally gave him a new script. >.< lol. you're only supposed to help partially so he can learn the rest. hahah jk. nice one.
08/01/2009 09:04 tri407tiny#9
Opps, Ehh sorry, got caried away haha
08/01/2009 15:46 Zacko7#10
Well, he's probably happy now. xD
08/01/2009 19:25 Omicron08#11
Where can i learn to code this way? D oyou know any sites that have iformation of scripting like this? I want to make a bot that will Buff, pick up loot, and AoE. or just have someone give me one ^^. anyways, where can i learn this?
08/01/2009 19:30 strikeraid#12
you can google Autoit. maybe even "autoit tutorials"
08/01/2009 20:17 Zacko7#13
Quote:
Originally Posted by strikeraid View Post
you can google Autoit. maybe even "autoit tutorials"
[Only registered and activated users can see links. Click Here To Register...]