tried your suggestion in many various syntaxs, but it looks like the problem still exists -- it's performing things like ::exitapp and ::reload AFTER the last stack call (e.g. it wont exitapp/reload until it's had a 'complete' freakout), and then it will roll onto other hotkeys snippets that were pressed during the freakout, in chronological order. What I need is something that can break from a loop being executed by another method/function mid loop... kind of like an external/global ::while command. Trying your reload idea made me painfully aware i cant utalize several of my brute force ::exitapp methods either
I'm beginning to assume I need to embed a termination-clause WITHIN every lengthy function.
This time i included my whole script, lengthy as it is, to see if anything is preventing other functions from working properly
P.S. now im thinking the optimal strategy might be doing something like having a <break> function statement at the beginning of all lengthy functions. Again i would need some syntax help but i was thinking the psuedocode would be something like the following:
This is kind of a crappy brute force method, but i have a strong suspicion with enough tinkering I could implement that loop termination clause successfully, but again, I would love to have a global command to affect all functions at once with a single keystroke (during a call stack) to cause a break. The following is my full script in its entirety (obviously disregard the f11 key at the bottom)
Code: Select all
;---------------------------------------------------------------------------------------------------
#maxThreadsPerHotkey, 2
setKeyDelay, 50, 50
setMouseDelay, 50
autoclicker = 1
toggleswitch = 0
f10::ExitApp
;=======================Number pad shortcuts=================
;keypad 0 - bomb
Numpad0::
Send, {f7}
Sleep, 250
send, {6}{7}{8}
Send, {f5}
return
;keypad 1 - atk buff
Numpad1::
Send, {f8}
Sleep, 250
send, 1
Send, {f5}
return
;keypad 2 - def buff
Numpad2::
Send, {f8}
Sleep, 250
send, 2
Send, {f5}
return
;keypad 3 - cloak
Numpad3::
Send, {f7}
Sleep, 250
send, 5
Send, {f5}
return
;keypad 4 - heal fountain
Numpad4::
Send, {f8}
Sleep, 250
send, 4
Send, {f5}
return
;keypad 5 - Nulberry
Numpad5::
Send, {f8}
Sleep, 250
send, 5
Send, {f5}
return
;keypad 6 - canteen
Numpad6::
send, e
sleep, 750
send, e
sleep, 750
send, {Down}
sleep, 750
send, e
sleep, 750
send, e
sleep, 750
click, R
return
;keypad 7 - trap
Numpad7::
Send, {f8}
Sleep, 250
send, 7
Send, {f5}
return
;keypad 8 - tranq ammo
Numpad8::
Send, {f7}
Sleep, 250
send, 1
Send, {f5}
return
;keypad 9 - SOS
Numpad9::
Send, {f8}
Sleep, 250
send, 3
sleep, 250
send, e
send, 250
Send, {f5}
return
;keypad Enter - heal pot
NumpadEnter::
Send, {f8}
Sleep, 250
send, 6
Send, {f5}
return
;get ammo
NumpadDot::
send, e
sleep, 750
click, 190, 129
sleep, 750
send, {f3}
sleep, 750
send, e
sleep, 750
send, e
sleep, 750
send, {esc}
sleep, 750
send, {esc}
sleep, 750
send, {esc}
return
;get ammo tent
NumpadMult::
send, e
sleep, 2500
send, {Down}
sleep, 500
send, e
sleep, 500
send, e
sleep, 500
send, {f3}
sleep, 500
send, e
sleep, 500
send, e
sleep, 500
send, {esc}
sleep, 500
send, {esc}
sleep, 500
send, {esc}
sleep, 500
send, {esc}
return
;Make pierce Ammo
NumpadSub::
Send, {f6}
Sleep, 250
Loop 30
if getKeyState("LShift", "P")
send, +1
else
send, 1
Send, {f5}
return
;Make sticking Ammo
NumpadAdd::
Send, {f6}
Sleep, 250
Loop 30
if getKeyState("LShift", "P")
send, +2
else
send, 2
Loop 9
if getKeyState("LShift", "P")
send, +3
else
send, 3
Send, {f5}
return
;==============================Set and Forget Auto Clickers==========================
;Auto Clicker Routine (R KEY)
f1::
RepeatKey2 := !RepeatKey2
If RepeatKey2 {
SoundBeep
SetTimer, SendTheKey2, 60
}
Else {
SetTimer, SendTheKey2, Off
SoundBeep
SoundBeep
}
Return
SendTheKey2:
send, r
Return
;Auto Clicker Routine (E KEY)
end::
RepeatKey := !RepeatKey
If RepeatKey {
SoundBeep
SetTimer, SendTheKey, 60
}
Else {
SetTimer, SendTheKey, Off
SoundBeep
SoundBeep
}
Return
SendTheKey:
if getKeyState("LShift", "P")
send, +e
else
send, e
Return
;==============================Hold Auto Clickers==========================
;Auto Clicker Toggle
F4::
if (autoclicker = 1) {
autoclicker = 0
SoundBeep
SoundBeep
}
else {
autoclicker = 1
SoundBeep
}
return
;Auto Clicker Routine (LEFT MOUSE)
$~lbutton::
while ((getKeyState("lbutton", "P")) & (autoclicker = 1))
{
send, {lbutton}
sleep, 1
}
return
;Auto Clicker Routine (SPACE KEY)
$~Space::
while ((getKeyState("Space", "P")) & (autoclicker = 1))
{
send, {Space}
sleep, 1
}
return
;enter jewel farm event
pgdn::
;start
send, e
;post a new quest
click, 200, 133
sleep, 2000
;events
click, 613, 420
sleep, 1000
;the greatest jagras
click, 293, 300
sleep, 200
;this will dissapear if u get a DC
;multiplayer options
click, 433, 393
sleep, 200
;select camp
click, 497, 303
sleep, 200
;accept
click, 600, 323
sleep, 6000
;go
send, {tab}
sleep, 2000
;multiplayer
;goes away if u get DC'ed
send, {space}
sleep, 200
;accept
send, e
return
;exit to headquarters
pgup::
send, {esc}
sleep, 300
click, 170, 147
sleep, 200
click, 200, 236
sleep, 200
click, 583, 400
sleep, 12250
click, 1040, 373
sleep, 200
click, 1040, 278
sleep, 2000
click, 966, 273
sleep, 200
click, 576, 570
sleep, 2000
send, e
return
f11::
Reload
ExitApp
return