salter Posted September 15, 2006 Share Posted September 15, 2006 (edited) hi im having troubles with the buff timers which are supposed to send the key every however much time the user has set, i thought i had it right but they dont seem to be working. So if you could help me out that would be great Heres my script: expandcollapse popupDim $BuffTimer1 = 455 ;Set the time to use buff 1(hotkey7).(in seconds) Dim $BuffTimer2 = 530 ;Set the time to use buff 2(hotkey8).(in seconds) Dim $BuffTimer3 = 620 ;Set the time to use buff 3(hotkey9).(in seconds) Dim $BuffTimer4 = 480 ;Set the time to use buff 4(hotkey0).(in seconds) ;----------------------------------------------------------------------------------------------------------------- ; Script Start ToolTip("ArchBot is ready press the Home key to start and the End key to stop ", 2, 0) Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 0) Hotkeyset("{HOME}","start") Hotkeyset("{END}","stop") $stop = 1 Func start() If Not WinExists("AlefClient") Then ToolTip("Start ArchLord First ", 2, 0) MsgBox(0, "ArchBot", "Archlord must be Running.") Exit EndIf WinActivate ( 'AlefClient' ) $timer1 = TimerStart() $timer3 = TimerStart() $timer4 = TimerStart() $timer5 = TimerStart() $timer6 = TimerStart() Sleep ( 150 ) $timer1 = TimerStart() $timer3 = TimerStart() $timer4 = TimerStart() $timer5 = TimerStart() $timer6 = TimerStart() ToolTip("ArchBot ", 0, 0) Sleep(150) $stop = 0 If $stop = 0 Then While 1 Search() Fight() getitems() WEnd Else Sleep(1000) EndIf EndFunc Func Search() While 1 ToolTip("Searching ", 2, 0) send("{LSHIFT down}") Sleep(Random(40, 55)) send("{Tab}") Sleep(Random(900, 1070)) send("{LSHIFT up}") Sleep(Random(450, 520)) $var = PixelGetColor(424, 25) If $var = 0xD63839 then Send("3") ExitLoop Else Sleep(Random(70, 120)) Send("{LEFT}") Sleep(Random(70, 120)) Send("{LEFT}") EndIf WEnd EndFunc Func Fight() ToolTip("Fighting ", 2, 0) $timer2 = TimerStart() Sleep(Random(450, 600)) While PixelGetColor(424, 25) = 0xD63839 if timerdiff($timer2) > 15 * 1000 then return Sleep(Random(100, 200)) WEnd Sleep(Random(95, 135)) EndFunc Func Getitems() ToolTip("Getting Items ", 2, 0) Sleep(Random(100, 180)) $var = PixelGetColor(19, 32) If $var = 0xA32728 then Sleep(Random(100, 180)) Else Sleep(Random(300, 350)) Send("{SPACE}") Sleep(Random(250, 380)) MouseMove (456,776) Sleep(Random(100, 180)) MouseMove (234,897) Sleep(Random(300, 350)) Send("{SPACE}") Sleep(Random(350, 380)) Send("{SPACE}") sleep(50) EndIf EndFunc Func Buff1() ToolTip("Buffing ", 2, 0) If $BuffTimer1 > 1 Then Sleep(Random(150,250)) Send("7") Sleep(Random(1500,1800)) Else Sleep(Random(100,200)) EndIf EndFunc Func Buff2() ToolTip("Buffing ", 2, 0) If $BuffTimer2 > 1 Then Sleep(Random(150,250)) Send("8") Sleep(Random(1500,1800)) Else Sleep(Random(100,200)) EndIf EndFunc Func Buff3() ToolTip("Buffing ", 2, 0) If $BuffTimer3 > 1 Then Sleep(Random(150,250)) Send("9") Sleep(Random(1500,1800)) Else Sleep(Random(100,200)) EndIf EndFunc Func Buff4() ToolTip("Buffing ", 2, 0) If $BuffTimer4 > 1 Then Sleep(Random(150,250)) Send("0") Sleep(Random(1500,1800)) Else Sleep(Random(100,200)) EndIf EndFunc Func Check() ToolTip("Checking ", 2, 0) If WinExists("AlefClient") Then Sleep(200) Else MouseMove(740, 478) Sleep(1000) Run ( "C:\Program Files\Codemasters\Archlord\Archlord.Exe" ) Sleep(4500) MouseClick("left") Sleep(Random(20000, 25000)) Send($Username) Sleep(Random(3000,6000)) Send("{TAB}") Sleep(2000) Send($Password) Sleep(Random(3000,6000)) Send("{ENTER}") Sleep(Random(9800, 10900)) MouseMove($ServerCoord1,$ServerCoord2) Sleep(Random(400, 800)) MouseClick("left") Sleep(Random(260, 340)) MouseClick("left") Sleep(Random(260, 340)) Send("{ENTER}") Sleep(Random(10000, 11000)) MouseMove($CharCoord1,$CharCoord2) Sleep(Random(500, 700)) MouseClick("left") Sleep(Random(260, 320)) MouseClick("left") Sleep(Random(260, 320)) Send("{ENTER}") Sleep(Random(11500, 13000)) Send("{UP}") Sleep(Random(160, 200)) Send("{UP}") Sleep(Random(160, 200)) Send("{UP}") Sleep(Random(160, 200)) Send("{UP}") Sleep(Random(160, 200)) Send("{{NUMPADSUB}") Sleep(Random(160, 200)) Send("{{NUMPADSUB}") Sleep(Random(160, 200)) Send("{{NUMPADSUB}") Sleep(Random(160, 200)) Send("{{NUMPADSUB}") Sleep(Random(160, 200)) Send("{{NUMPADSUB}") Sleep(Random(160, 200)) Send("{{NUMPADSUB}") Sleep(Random(160, 200)) EndIf EndFunc Func stop() Exit EndFunc ;crash timer $timer1 = timerinit() While 1 if timerdiff($timer1) > $CrashTimer * 60000 then Check() $timer1 = timerStart() endif WEnd ;buff timer1 $timer3 = timerinit() While 1 if timerdiff($timer3) > $BuffTimer1 * 1000 then Buff1() $timer3 = timerStart() endif WEnd ;buff timer 2 $timer4 = timerinit() While 1 if timerdiff($timer4) > $BuffTimer2 * 1000 then Buff2() $timer4 = timerStart() endif WEnd ;buff timer3 $timer5 = timerinit() While 1 if timerdiff($timer5) > $BuffTimer3 * 1000 then Buff3() $timer5 = timerStart() endif WEnd ;buff timer 4 $timer6 = timerinit While 1 if timerdiff($timer6) > $BuffTimer4 * 1000 then Buff4() $timer6 = timerStart() endif WEnd Edited September 15, 2006 by salter Link to comment Share on other sites More sharing options...
salter Posted September 15, 2006 Author Share Posted September 15, 2006 bump anyone know what to do i thought i did it right and my timer1 that checks if the game crashed or not works i think but the buffs dont. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 15, 2006 Share Posted September 15, 2006 for one your randoms, should add a ,1 at the end cuz sleep i dont think can handle decimal integers and the 1 flag tells it to round it to 0s place Sleep(Random(160, 200,1)) Link to comment Share on other sites More sharing options...
salter Posted September 15, 2006 Author Share Posted September 15, 2006 o ok didnt know that, but i cant figure out why my buff timers are not working Link to comment Share on other sites More sharing options...
Bert Posted September 15, 2006 Share Posted September 15, 2006 what game is this bot for? The Vollatran project  My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
salter Posted September 15, 2006 Author Share Posted September 15, 2006 (edited) ArchLord, can you help? Edited September 15, 2006 by salter Link to comment Share on other sites More sharing options...
Don N Posted September 15, 2006 Share Posted September 15, 2006 What exactly is wrong with your "buff timers", are the buff functions not sending the value? Does the tool tip ever come up? That way you know the function is even called. _____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper Link to comment Share on other sites More sharing options...
salter Posted September 16, 2006 Author Share Posted September 16, 2006 the function isnt being called at all Link to comment Share on other sites More sharing options...
madmax Posted January 16, 2007 Share Posted January 16, 2007 What exactly is wrong with your "buff timers", are the buff functions not sending the value? Does the tool tip ever come up? That way you know the function is even called.That is because your timediff is not greater than your $bufftime * 1000 Link to comment Share on other sites More sharing options...
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