Nero Posted April 6, 2008 Posted April 6, 2008 Hi, I wanted to create a bot that casted shadow bolt (2.5 seconds castingtime) constantly when I press F6, and when I press F7 It will pause the Shadow Bolt spam, and and cast my Dot's (Curse Of Shadow(instant), Corruption(instant), SiphonLife(Instant), UnstableAffliction(1,5sec)), then continue the Shadow bolt spam.' And last I need a button that closes the bot. Here's what Ive got so far: expandcollapse popup;WinWaitActive("World of Warcraft") ;--Hotkeys HotKeySet("{F6}", "Start") HotKeySet("{F7}", "Dots") HotKeySet("{F8}", "TogglePause") HotKeySet("{F9}", "ExitBot") ;--Hotkeys end ;--Includes #Include <Misc.au3> ;--Includes End MsgBox(0, "Dps-bot Hotkeys", "F6 = Play Bot" & @CRLF & "F7 = Dots" & @CRLF & "F8 = Pause Bot" & @CRLF & "F9 = Exit Bot") While 1 sleep(10) WEnd ;--Shadowbolt start (2,5sec) TogglePause() Func start() HotKeySet("{F8}") HotKeySet("{F8}", "TogglePause") While 1 Sleep(2500) send(2) start() Wend EndFunc ;--Curse Of Shadow(instant), Corruption(instant), SiphonLife(Instant), UnstableAffliction(1,5sec) func Dots() while 1 sleep(50) sleep(50) Send("+5") sleep(1450) send("{1}") sleep(1500) send("{2}") sleep(1500) send("{3}") sleep(1500) send("{4}") sleep(50) send("+1") sleep(50) WEnd EndFunc func TogglePause() HotKeySet("{F8}") HotKeySet("{F8}", "Start") while sleep(100) WEnd EndFunc func ExitBot() While 1 Exit wend EndFunc My problem here is that I can't get the pause function to work while I start the Dots. Take note that this is my first time coding in AutoIT, however I've got some experience from visual basic.
d4rk Posted April 6, 2008 Posted April 6, 2008 (edited) Global $Paused HotKeySet("{delete}","pause") Func pause() $Paused = NOT $Paused While $Paused sleep(100) WEnd EndFunc Edited April 6, 2008 by d4rk [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys
Nero Posted April 6, 2008 Author Posted April 6, 2008 Maybe Im using it wrong, but I get a error message: $PAused = Not $Paused $Paused = NOT ^ERROR Error: Variable used without being declared.
Developers Jos Posted April 6, 2008 Developers Posted April 6, 2008 Maybe Im using it wrong, but I get a error message: $PAused = Not $Paused $Paused = NOT ^ERROR Error: Variable used without being declared.Wild guess: You don't have this at the top of your script: Global $Paused SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Nero Posted April 6, 2008 Author Posted April 6, 2008 I din't put it all the way on the top, but now I did. and it worked, thanks everything seems to work now! ty <3
Nero Posted April 6, 2008 Author Posted April 6, 2008 I din't put it all the way on the top, but now I did. and it worked, thanks everything seems to work now! ty <3
Nero Posted April 6, 2008 Author Posted April 6, 2008 Ok, Ive gotten another problem with it now: Func start() Pause() While 1 Sleep(2500) send(2) Wend EndFunc this enables the pause before it starts to cast, so I always need to disable the pause then it starts to cast... is there however a way to do something like "While not $paused"?
FreeFry Posted April 6, 2008 Posted April 6, 2008 Ok, Ive gotten another problem with it now: Func start() Pause() While 1 Sleep(2500) send(2) Wend EndFunc this enables the pause before it starts to cast, so I always need to disable the pause then it starts to cast... is there however a way to do something like "While not $paused"? Try While not $paused
Nero Posted April 6, 2008 Author Posted April 6, 2008 I did, but I dint get it to work, thats why i Posted it however, I've worked my way around it. So, as far as I consern the bot is complete and perfect for my use ^^ (it turned out better than I imagined it would O_O)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now