Jump to content

Pause


Recommended Posts

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:

;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.

Link to comment
Share on other sites

Global $Paused

HotKeySet("{delete}","pause")
Func pause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
    WEnd

EndFunc

Edited 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

Link to comment
Share on other sites

  • Developers

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.
  :)

Link to comment
Share on other sites

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"?

Link to comment
Share on other sites

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 :)
Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...