;=========================================================================;
; Script Name: A HardY Simple Bandage Healer ;
; Author: A HardY ;
; Version: 1.2 ;
; Shard OSI/FS: OSI/FS ;
; Revision Date: 23-nov-2009 ;
; Purpose: Auto Heal with bandages using ;
; Journal timer and easy pot system ;
;=========================================================================;
;*****Changelog*******
;1.2 - Fixed some bugs, i put a lighteen check psn way.
;*****credits*******
;Mega-thanks to UOcoders. You inspired me \o/.
;*******************
;You need The statusbar open or it don't work.
;You only need Bands to work, it will search when you lose hp, become bleed,
;and will heal yourself.
;************************
;==========================================================================
;Set Variables
;==========================================================================
set %started You_begin_applying_the_bandages
set %healed You_finish_applying_the_bandages
set %failed You_apply_the_bandages
set %nulled You_heal_what_little_damage_your
set %nodam That_being_is_not_damaged
set %bleed The_bleeding_wounds_have
set %warnonlow 0
set %warnamount 10
set %pots off
;==========================================================================
; Check for Logged in, Status Bar and DMC
;==========================================================================
checkingame:
if ( #cliLogged = 0 )
{
wait 1
goto checkingame
}
if ( DMC notin #opts )
{
display ok ERROR!$
+This script requires "Don't move cursor" enabled!$
+Enable this option in the EasyUO Tools menu and$
+restart the script.$
halt
}
wait 2s
if ( #MAXHITS = N/A )
{
event macro 8 2
}
;==========================================================================
;Start the script
;==========================================================================
start:
wait 1
if ( #hits = #maxhits && c notin #charstatus && #charghost = NO )
{
goto start
}
;==========================================================================
;Check Psn and other things
;==========================================================================
if ( %pots = on && C in #charStatus )
{
findItem NUF C_ , #backpackID
set #lobjectID #findID
set #ltargetKind 1
event macro 17 0
wait 5
goto start
}
;==========================================================================
; Death Support
; If dead, wait to be rezzed, then start over.
;==========================================================================
if ( #charghost = YES )
{
stilldead:
if ( #charghost = NO )
{
goto start
}
wait 1
goto stilldead
}
;==========================================================================
; Begin the act of bandaging self
; If enabled, warn user if low on bandages
;==========================================================================
set %jstart #jIndex
finditem ZLF C
if ( #findkind = 0 )
{
set #lobjectid #findid
event macro 17 0
target 1s
event macro 23 0
if ( %warnonlow = 1 && %warnamount >= #findstack )
{
event ExMsg #lobjectID 3 38 Low on bandaids!
}
wait 1
gosub checknoti
goto didwestart
}
;==========================================================================
; If no bandages found, wait for more to arrive
; If enabled, warn user of no bandages
;==========================================================================
if ( %warnonlow = 1 )
{
event ExMsg #charID 3 38 Out of Bandages!
}
startlooking:
finditem ZLF C
if ( #findkind = 0 )
{
goto start
}
;==========================================================================
; The everpresent check-for-death routine
if ( #charghost = YES )
{
goto start
}
;==========================================================================
wait 1
goto startlooking
;==========================================================================
; Check the journal to ensure we started healing
; #jIndex provides dynamic 1-way searching
;==========================================================================
didwestart:
wait 1
set %jend #jIndex
for %r %jstart %jend
{
scanjournal %r
if ( %started in #journal && :__ notin #journal )
{
set %failsafe #SCNT + 13
set %jstart #jIndex
goto areyoudoneyet
}
}
;==========================================================================
; The everpresent check-for-death routine
if ( #charghost = YES )
{
goto start
}
;==========================================================================
;If we failed to start healing, start over
goto start
;==========================================================================
; Healing started, start checking if we are done healing.
; Search in both directions
;==========================================================================
areyoudoneyet:
set %now #SCNT
;==========================================================================
; The everpresent check-for-death routine
if ( #charghost = YES )
{
goto start
}
;==========================================================================
wait 1
set %jend #jIndex
for %r %jstart %jend
{
scanJournal %r
if ( %healed in #journal %failed in #journal %nulled in #journal %nodam in #journal %bleed in #journal )
{
if ( : notin #journal )
{
goto start
}
}
}
;if we have been healing for more than 12 seconds, break out of the loop.
;added to guard against against possible looping bug
if ( %now > %failsafe )
{
goto start
}
;If not done, keep checking
goto areyoudoneyet
;==========================================================================
;Subroutines
;==========================================================================
; SubRoutine to check if notoriety gump was displayed because of user or
;script error. If it was then cancel it.
sub checknoti
wait 15
if ( #contsize = 178_108 && #contname = YesNo_gump )
{
set %notix #contposx + 60
set %notiy #contposy + 86
click %notix %notiy
}
return
;==========================================================================
; End of File
;==========================================================================
Devido a questoes de padronização postei ele em inglês, afinal criar script em ptb nunca da em nada ;x
0 comentários:
Postar um comentário