Code:
; ======================================
; CHANGE THESE FOR SCRIPT STARTUP VALUES
; CHANGE THESE FOR SCRIPT STARTUP VALUES
; CHANGE THESE FOR SCRIPT STARTUP VALUES
; CHANGE THESE FOR SCRIPT STARTUP VALUES
; CHANGE THESE FOR SCRIPT STARTUP VALUES
; ======================================
Teleport = Kalle
MyName = BMJ
TradeMessage = Selling Amulet for 1 bbow!
; =========================
; DO NOT CHANGE ANYTHING BELOW THIS LINE
; DO NOT CHANGE ANYTHING BELOW THIS LINE
; DO NOT CHANGE ANYTHING BELOW THIS LINE
; DO NOT CHANGE ANYTHING BELOW THIS LINE
; =========================
TradeMessageToggle = 0
HotkeyStatus = Enabled
; Prompt to disable all hotkeys. Placement is important; we want to be able ti disable hotkeys from any window
F12::
MsgBox, 4, Disable?, Would you like to disable all hotkeys? Yes = Disabled, No = Enable. Currently: %HotkeyStatus%
IfMsgBox Yes
HotkeyStatus = Disabled
IfMsgBox No
HotkeyStatus = Enabled
return
; Any hotkeys below this line will only work in a flash player window
; NOTE: If you are not using a flash projector, comment out the line below by putting a ; in front of it.
; NOTE: If you do comment it out, F5 F6 and F7 will not work.
#IfWinActive Adobe Flash Player 11
; Quick teleport. OHSHIT moments
MButton::
if HotkeyStatus = Enabled
{
SendInput {raw}/teleport %Teleport%
Send {Enter}
}
return
; When you type plz, it changes it to /tutorial.
:*b:plz::/tutorial{Enter}
; Top left button on keyboard, toggles pause
`::
if HotkeyStatus = Enabled
{
SendInput {raw}/pause
Send {Enter}
}
return
; =========================
;
; FX KEY SCRIPTS
;
; =========================
; Heal please!
F1::
if HotkeyStatus = Enabled
{
Send {Enter}
SendInput {raw}Heal please!
Send {Enter}
}
return
; Ocean trench message
F2::
if HotkeyStatus = Enabled
{
Send {Enter}
SendInput {raw}He lives and reigns and conquers the world
Send {Enter}
}
return
; Send trade/spam message, changing the last part so it is always visible
F3::
if HotkeyStatus = Enabled
{
if TradeMessageToggle = 0
{
Send {Enter}
SendInput {raw}%TradeMessage%
Send {Enter}
TradeMessageToggle = 1
}
else if TradeMessageToggle = 1
{
Send {Enter}
SendInput {raw}%TradeMessage%.
Send {Enter}
TradeMessageToggle = 2
}
else if TradeMessageToggle = 2
{
Send {Enter}
SendInput {raw}%TradeMessage%..
Send {Enter}
TradeMessageToggle = 0
}
}
return
; Send trade to yourself (from a mule, for instance)
F4::
if HotkeyStatus = Enabled
{
SendInput {raw}/trade %MyName%
Send {Enter}
}
return
; Select all items in trade, then accept
F5::
if HotkeyStatus = Enabled
{
XValue := 630
YValue := 350
OffsetX := 45
OffsetY := 100
Iteration := 0
NewRow := 0
MouseMove, %XValue%, %Yvalue%, 0
Loop, 8
{
LoopTrade(XValue, YValue, Iteration, OffsetX, OffsetY, NewRow)
}
}
return
; Withdraw all items from vault
F6::
if HotkeyStatus = Enabled
{
XValue := 630
YValue := 575
OffsetX := 45
OffsetY := 100
Iteration := 0
NewRow := 0
MouseMove, %XValue%, %Yvalue%, 0
Loop, 8
{
LoopWithdraw(XValue, YValue, Iteration, OffsetX, OffsetY, NewRow)
}
}
return
; Select all items in a trade and accept
F7::
if HotkeyStatus = Enabled
{
XValue := 630
YValue := 475
OffsetX := 45
OffsetY := 100
Iteration := 0
NewRow := 0
MouseMove, %XValue%, %Yvalue%, 0
Loop, 8
{
LoopDeposit(XValue, YValue, Iteration, OffsetX, OffsetY, NewRow)
}
}
return
; Low Quality
F8::
if HotkeyStatus = Enabled
{
Send {Alt}
SendInput {raw}VQL
}
return
; Change your name, for use with F4
F9::
if HotkeyStatus = Enabled
{
OldName = %MyName%
InputBox, MyName, Change Name, What is your character's name? This is used for sending /trade when pressing F4. Current name: %OldName%
if ErrorLevel
MyName = %OldName%
}
return
; Change trade/spam message
F10::
if HotkeyStatus = Enabled
{
OldMessage = %TradeMessage%
InputBox, TradeMessage, Change Message, What do you want your new message to be? Current message: %OldMessage%
if ErrorLevel
TradeMessage = %OldMessage%
}
return
; Change quick teleport. Cancel = keeps previous
F11::
if HotkeyStatus = Enabled
{
PrevTeleport = %Teleport%
InputBox, Teleport, Change Teleport, Who do you want to have as a safe teleport? "%Teleport%" is current.
if ErrorLevel
Teleport = %PrevTeleport%
}
return
; ================
;
; FUNCTIONS
; DO NOT MODIFY
;
; ================
LoopWithdraw(ByRef x, ByRef y, ByRef iter, ByRef offsetX, ByRef offsetY, ByRef newRow)
{
Send {LButton down}
y := y - offsetY
Sleep 250
MouseMove, %x%, %y%, 0
Send {LButton up}
Sleep 250
iter := iter + 1
if iter = 4
{
newRow := 1
}
if newRow = 1
{
y := y + 45
x := x - 45 - 45 - 45 - 45
newRow := 0
}
x := x + offsetX
y := y + offsetY
MouseMove, %x%, %y%, 0
}
LoopDeposit(ByRef x, ByRef y, ByRef iter, ByRef offsetX, ByRef offsetY, ByRef newRow)
{
Send {LButton down}
y := y + offsetY
Sleep 250
MouseMove, %x%, %y%, 0
Send {LButton up}
Sleep 250
iter := iter + 1
if iter = 4
{
newRow := 1
}
if newRow = 1
{
y := y + 45
x := x - 45 - 45 - 45 - 45
newRow := 0
}
x := x + offsetX
y := y - offsetY
MouseMove, %x%, %y%, 0
}
LoopTrade(ByRef x, ByRef y, ByRef iter, ByRef offsetX, ByRef offsetY, ByRef newRow)
{
Send {LButton down}
Send {LButton up}
iter := iter + 1
if iter = 4
{
newRow := 1
}
if newRow = 1
{
y := y + 45
x := x - 45 - 45 - 45 - 45
newRow := 0
}
if iter = 8
{
y := y + 225
MouseMove, %x%, %y%, 0
Sleep 3000
Send {LButton down}
Send {LButton up}
}
else
{
x := x + offsetX
MouseMove, %x%, %y%, 0
}
}
Let me know if you have any issues and I will help correct them!