Sign in to follow this  
Followers 0
gui529

Help me with this function

4 posts in this topic

#1 ·  Posted (edited)

Hey This is part of a code i have for a bot i bee making for Archlord...but im stuck somewhere..I would like the funcs PAGEUP / PAGEDOWN not to interfear the Func TogglePause()...in other words...being able to run Func Togglelvlup() and Func Togglelvldown() without effecting Func TogglePause()...anyone have any ideas?

Local $timer1, $timer2, $timer3
Global $UnPaused, $UnBuff
HotKeySet("{PAUSE}", "TogglePause") 
HotKeySet("{END}", "Terminate")
HotKeySet("{HOME}", "Autobuff")
HotKeySet("^{PGUP}", "Togglelvlup") 
HotKeySet("^{PGDN}", "Togglelvldown")
HotKeySet("{INSERT}", "Options")

$GameTitle = "Archlord"

;==============SET TIMER FOR MONSTER!!======
Func Togglelvlup()
    $MonsterKill = $MonsterKill + 1
    While 1
    ToolTip(  $MonsterKill & "  Kill monster cooldown. Press Pause twice To resume GuiBot", 0, 0,"",0,4)
    WEnd
EndFunc

Func Togglelvldown()
    $MonsterKill = $MonsterKill - 1
    While 1
    ToolTip(  $MonsterKill & "  Kill monster cooldown. Press Pause twice To resume GuiBot", 0, 0,"",0,4)
    WEnd
EndFunc
;===============START BOT & PAUSE and UNPAUSE=======
Func TogglePause() 
    $UnPaused = NOT $UnPaused 
ControlSend($GameTitle, "", "", "{f10}")      ;===========NOT WORKING
If $UnPaused Then Call ("Prebuff")

    While $UnPaused
call ("Attack")
call("Pickup") 
call ("Rebuff")
wend
endfunc


EndFunc
Edited by gui529

Share this post


Link to post
Share on other sites



First off you have the EndFunc in the wrong spot. Just to get it to work right you need to place that last EndFunc above the Func TogglePause(). I can see this isn't the whole script which you are showing us


0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Share this post


Link to post
Share on other sites

o ya, i just mis copied and paste...the thing is...the script runs fine is just that i cant figure out a way to run the functions without interfering the Func TogglePause()

Share this post


Link to post
Share on other sites

First you should either declare Pause as False or True so you have it at something. Can we get a more clearer picture of the whole script?


0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Share this post


Link to post
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
Sign in to follow this  
Followers 0