Re: [EasyUO] Weapon Ability Rearm-er
Posted: Thu Mar 15, 2012 3:00 am

Code: Select all
; Script: Ability Rearm-er
; Author: Devlin
; Current Version: 2.0
; Purpose: Will reactivate Primary/Secondary
; abilities, as well as Counter Attack. Works if
; you switch weapon types.
;
; Setup: Change the hotkeys below to your Prim/Sec
; Ability Macros. A walkthru then appears upon startup.
set %Prim F1 ; Change to Primary Ability hotkey
set %Sec F2 ; Change to Secondary Ability hotkey
set %mana 25 ; This number represents when the script
; will stop reactivating abilities due to
; a lack of mana. If you have low LMC/Mana Leech
; you may want to raise this number slightly.
; Do not raise it above 40
set %min #minDmg
set %max #maxDmg
; DO NOT EDIT BENEATH THIS LINE OR BAD THINGS WILL HAPPEN
; ------------------------------------------------
if *Save = 1
{
display YesNo Do you want to use your previously saved settings?
if #dispres = No
gosub Setup
}
else
{
gosub Setup
}
gosub Settings
loop1:
wait 10
if #charGhost = NO
{
repeat
{
if ( Abs ( %min - #minDmg ) > 15 ) || ( ( %max <> #maxDmg ) > 15 )
{
gosub Settings
set %min #minDmg
set %max #maxDmg
}
onhotkey %Sec
{
goto loop2:
}
gosub Prim
;gosub Count ; Remove to stop Counter Attack ( 1 of 2 )
}
until #mana <= ( %mana + 3 )
{
event sysmessage You are out of Mana!
wait 3s
}
}
else
{
wait 10s
goto loop1:
}
goto loop1:
loop2:
wait 10
if #charGhost = NO
{
repeat
{
if ( Abs ( %min - #minDmg ) > 15 ) || ( ( %max <> #maxDmg ) > 15 )
{
gosub Settings
set %min #minDmg
set %max #maxDmg
}
onhotkey %Prim
{
goto loop1:
}
gosub Sec
;gosub Count ; Remove to stop Counter Attack ( 2 of 2 )
}
until #mana <= ( %mana + 3 )
{
event sysmessage You are out of Mana!
wait 3s
}
}
else
{
wait 10s
goto loop2:
}
goto loop2:
sub Settings
savePix *PrimX *PrimY 1
savePix *SecX *SecY 2
savePix *CountX *CountY 3
return
sub Setup
display Please Move your Mouse over the Primary Ability Icon. You have 3 seconds to do so.
wait 3s
set *PrimX #CURSORX
set *PrimY #CURSORY
display Please Move your Mouse over the Secondary Ability Icon. You have 3 seconds to do so.
wait 3s
set *SecX #CURSORX
set *SecY #CURSORY
display Please Move your Mouse over the Counter Attack Ability Icon. You have 3 seconds to do so.
wait 3s
set *CountX #CURSORX
set *CountY #CURSORY
display The script is now ready to run. To switch which ability is active, simply press your hotkey for that ability (You may need to hold it down for half a second). Counter Attack will always be active.
return
sub Prim
cmppix 1 t
event macro 35 0
return
sub Sec
cmppix 2 t
event macro 36 0
return
sub Count
cmppix 3 t
event macro 15 148
wait 10
return
Code: Select all
; Script: Ability Rearm-er
; Author: Devlin
; Current Version: 3.2
; Purpose: Rearms Prim/Sec Abilities, Momenum Strike and Counter Attack
; Read instructions in Forums -> Coding Talk
;
; Setup: Change hotkeys beneath this to yours.
; Adjust mana as needed. To enable Counter Atk
; Ctrl+F "CSG" and follow the comments instructions
; For Quick Setup, Ctrl+F QSG then edit 3 spots.
set %Prim F6 ; Change to Primary Ability hotkey
set %Sec F8 ; Change to Secondary Ability hotkey
set %MS F7 ; Change to MS Ability hotkey
set %Sub Prim ; Don't touch this.
set %mana 25 ; This number represents when the script
; will pause and wait for mana.
; If you have low LMC/Mana Leech
; you may want to raise this number
; slightly. Do not raise it above 40.
; --------------------------------------------------
; Edit below ONLY for Quick Setup/Counter Atk
; --------------------------------------------------
;
; -----------------------------------------
; Quick Setup ONLY (QSG 1 of 3)
; Remove from "if *Save" to "gosub Setup"
; -----------------------------------------
if *Save = 1
{
display YesNo Do you want to use your previously saved settings?
if #dispres = No
gosub Setup
}
else
{
gosub Setup
}
; ----------------------------------------
; Quick Setup ONLY
; Remove text between QSG 1 of 3 and here
; ----------------------------------------
set %min #minDmg
set %max #maxDmg
gosub Settings
loop:
wait 15
if #charGhost = NO
{
repeat
{
if ( Abs ( %min - #minDmg ) > 15 ) || ( ( %max <> #maxDmg ) > 15 )
{
wait 10
gosub Settings
set %min #minDmg
set %max #maxDmg
}
gosub %Sub ; Remove the ";" in front of
wait 5 ; gosub Count for Counter Atk
; gosub Count ; (CSG Setup)
onhotkey %Prim
{
set %Sub Prim
}
onhotkey %Sec
{
set %Sub Sec
}
onhotkey %MS
{
set %Sub MS
}
until #mana <= %mana
{
event sysmessage Mana!
wait 2s
}
}
else
{
wait 10
goto loop:
}
goto loop:
sub Prim
cmppix 1 t
event macro 35 0
return
sub Sec
cmppix 2 t
event macro 36 0
return
sub MS
cmppix 3 t
event macro 15 150
wait 5
if there_are_no_valid in #sysmsg
{ ; MSG Setup
event macro 35 0 ; Change this line as needed
wait 25 ; Primary - event macro 35 0
} ; Secondary - event macro 36 0
return
sub Count
cmppix 4 f
event macro 15 148
return
;----------------------------------------------
; Quick Setup (QSG 2 of 3)
; You must manually edit coordinates beneath
;----------------------------------------------
sub Settings ; Change these to the format
savePix *PrimX *PrimY 1 ; #CURSORX #CURSORY 1
savePix *SecX *SecY 2 ; #CURSORX #CURSORY 2
savePix *MSX *MSY 3 ; #CURSORX #CURSORY 3
savePix *CountX *CountY 4 ; #CURSORX #CURSORY 4
set *Save 1 ; To find the cursor coords,
return ; goto "Other Stuff" to the right
; and hover over the icons.
;
; ----------------------------------------------
; Remove all text beneath for Quick Setup (QSG 3 of 3)
; ----------------------------------------------
sub Setup
display Please Move your Mouse over the Primary Ability Icon. You have 3 seconds to do so.
wait 5s
set *PrimX #CURSORX
set *PrimY #CURSORY
display Please Move your Mouse over the Secondary Ability Icon. You have 3 seconds to do so.
wait 5s
set *SecX #CURSORX
set *SecY #CURSORY
display Please Move your Mouse over the Momentum Strike Ability Icon. You have 3 seconds to do so.
wait 5s
set *MSX #CURSORX
set *MSY #CURSORY
display Please Move your Mouse over the Counter Attack Ability Icon. You have 3 seconds to do so. If you aren't using Counter Attack... Just hit okay/wait. Doesn't really matter.
wait 5s
set *CountX #CURSORX
set *CountY #CURSORY
display The script is now ready to run. To switch which ability is active, simply press your hotkey for that ability (You may need to hit it twice)
return
Code: Select all
set %sub2 Play
Code: Select all
set %sub2 hold