Code: Select all
;==================================
; Script Name: Aids & Pots
; Author: Fleona
; Version: 2.0.1
; Client Tested with: 4.0.6a (should work for all)
; EUO version tested with: 1.42
; Shard OSI /
; Revision Date: 3/4/11
; Public Release: 1/14/08
; Global Variables Used: n/a
; Purpose: Auto Use Bandaids+++
;==================================
set %pottype GHpots ;GCpots="Use Greater Cure" GHpots="Use Greater Heal"
set %hp_limit 70 ;set health to use pots at
set %stamina_DF 50 ;set stamina lost for divine fury
set %aids_delay 3 ;increase for lag, 0-3 is ideal
set %peace_delay 100
;-------Setup weapon speicals-----------------
; delete ";" from beginning of next line, run script, then put ";" back.. u are ready
;gosub setupWepSpecials
;-------DO NOT EDIT BELOW THIS----------------
;initiate Variables
set #LPC 75
set %AutoDF Off ; On/Off
set %AutoPot Off ; On/Off
set %AutoPeace Off ; On/Off
set %wepAbility Off
set %aids_timer #SCNT2
set %pot_timer #SCNT2
set %peace_timer #SCNT2
set %aid_type ZLF
set %Gheal_pot UUF
set %Gcure_pot NUF
set %instr PGP_MQF_LQF_PRF_QRF_NRF
set #MENUBUTTON 0
set %active 4860358_5386718_5384662_4336061 ;
gosub showEUOMenu1
;-------MainLoop begins here--------------
_Mainloop:
onhotkey 1 alt
gosub togwepAbilityPrimary
onhotkey 2 alt
gosub togwepAbilitySecondary
onhotkey 3 alt
gosub togwepAbilityOff
if #MENUBUTTON <> 0
gosub #MENUBUTTON
if #CHARGHOST = yes || H in #CHARSTATUS
goto _Mainloop
if #HITS < #MAXHITS || C in #CHARSTATUS
gosub aids
if %AutoPot = On
gosub %pottype
if %AutoPeace = On
gosub peace
if %wepAbility <> Off && #MANA >= 40
{
if %wepAbility = Primary
gosub prime
else
gosub secondary
}
if %AutoDF = On
gosub autoDF
if #MENUBUTTON = CLOSED
halt
goto _Mainloop
;-------MainLoop ends here----------------
;===========SUBS==============================
;---------------------------------
sub aids
set %timeleft %aids_timer - #SCNT2
;if C in #CHARSTATUS && %timeleft < 15 && %timeleft > 5
;gosub CureSelf
if #SCNT2 <= %aids_timer
return
finditem %aid_type C_ , #BACKPACKID
if #FINDKIND < 0
return
event macro 1 0 [bandself
set %delay_calc ( ( 1225 - ( #DEX * 5 ) ) / 10 ) + %aids_delay
set %aids_timer #SCNT2 + %delay_calc
return
;---------------------------------
sub togAutoPot
if %Autopot = On
set %Autopot Off
else
set %Autopot On
menu delete togAutoPot
menu Button togAutoPot 8 8 45 21 Pot %Autopot
set #menubutton 0
return
;---------------------------------
sub GHpots
if #SCNT2 <= %pot_timer
return
if #HITS > %hp_limit
return
finditem %Gheal_pot C_ , #BACKPACKID
if #FINDKIND = -1
return
set %potid #FINDID
if C in #CHARSTATUS
gosub CureSelf
;wait 5
;event macro 24 2
wait 5
set #LOBJECTID %potid
event macro 17 0
set %pot_timer #SCNT2 + 130
return
;---------------------------------
sub GCpots
if #SCNT2 <= %pot_timer
return
if #HITS > %hp_limit
return
if C notin #CHARSTATUS
return
finditem %Gcure_pot C_ , #BACKPACKID
if #FINDKIND = -1
return
set %potid #FINDID
;event macro 24 2
wait 10
set #LOBJECTID %potid
event macro 17 0
set %pot_timer #SCNT2 + 5
return
;---------------------------------
sub togAutoPeace
if %AutoPeace = On
set %AutoPeace Off
else
set %AutoPeace On
menu delete togAutoPeace
menu Button togAutoPeace 8 33 100 21 Peace %AutoPeace
set #menubutton 0
return
;---------------------------------
sub peace
if #SCNT2 <= %peace_timer
return
finditem %instr C_ , #BACKPACKID
if #FINDKIND <> 0
return
set #LOBJECTID #FINDID
event macro 17 0
wait1
event macro 13 9
target 2s
event macro 23 0
set %peace_timer #SCNT2 + %peace_delay
return
;---------------------------------
sub togAutoDF
if %AutoDF = On
set %AutoDF Off
else
set %AutoDF On
menu delete togAutoDF
menu Button togAutoDF 60 8 45 21 DF %AutoDF
set #menubutton 0
return
;---------------------------------
sub autoDF
set %staminaloss #MAXSTAM - #STAMINA
if %staminaloss <= %stamina_DF || #HITS < 60 || #MANA < 50
return
event macro 15 205 [cs divinefury
wait 10
return
;---------------------------------
sub togwepAbilityOff
set %wepAbility Off
set #menubutton 0
event ExMsg #charID 3 0 %wepAbility
wait 2
return
;---------------------------------
sub togwepAbilityPrimary
set %wepAbility Primary
set #menubutton 0
event ExMsg #charID 3 0 %wepAbility
wait 2
return
;---------------------------------
sub togwepAbilitySecondary
set %wepAbility Secondary
set #menubutton 0
event ExMsg #charID 3 0 %wepAbility
wait 2
return
;---------------------------------
sub prime
if #MANA < 40
return
savePix 980 629 1
;savePix 980 672 1 edited line
wait 2
if #PIXCOL notin %active
event macro 35 0
return
;---------------------------------
sub secondary
if #MANA < 40
return
savePix 980 629 1
wait 2
if #PIXCOL notin %active
event macro 36 0
return
;---------------------------------
sub CureSelf
event macro 15 10 ;cure=10 cbfire=201
target 15
event macro 23 0
wait 2
return
;---------------------------------
sub showEUOMenu1
menu Clear
menu Window Title ~
menu Window Transparent 75
menu Window Color black
menu Window Size 80 85
menu Font Name MS Sans Serif
menu Font Transparent #false
menu Font Align left
menu Font Size 8
menu Font Color white
menu Font Style
menu Font BGColor Green
menu Button togAutoPot 8 8 45 21 Pot %Autopot
menu Button togAutoDF 60 8 45 21 DF %AutoDF
menu Button togAutoPeace 8 33 100 21 Peace %AutoPeace
menu Button togwepAbilityOff 8 58 30 21 Off
menu Button togwepAbilityPrimary 43 58 30 21 Prm
menu Button togwepAbilitySecondary 76 58 30 21 2nd
menu Show 720 0
menu HideEUO
return
;---------------------------------
sub setupWepSpecials
event macro 8 14
while #CONTKIND <> AIUC
{
event macro 8 14
wait 2s
}
while #CONTPOSX <> 200 && #CONTPOSY <> 200
{
contpos 200 200
wait 2s
}
click 440 325 g
wait 10
click 1000 690 mc
wait 10
click 440 370 g
wait 10
click 1000 647 mc
halt
return