I finished the script, anyone want test? I'm upgrading my a hardy simple heal 1.0 for 2.0, for allow fact bandage i tested it here on atl, it seen work, i created an YES\NO for use or don't use faction bandies.
;=========================================================================;
; Script Name: A HardY Simple Bandage Healer ;
; Author: A HardY ;
; Version: 2.0 ;
; Shard OSI/FS: OSI/FS ;
; Revision Date: 29-nov-2011 ;
; Purpose: Auto Heal with bandages using ;
; Journal timer ; ;
;=========================================================================;
;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 %faction Any_curses_on_you_have_been_lifted
set %warnonlow 0
set %warnamount 10
set %Factiontime #scnt
set %Factionbandage NO ; yes / no
;==========================================================================
; 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
}
;==========================================================================
; 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
;==========================================================================
finditem ZLF C
if #findkind <> -1
{
for #findindex 1 #findcnt
{
if #scnt > %Factiontime && %Factionbandage = YES
{
event Property #findID
set %factband #findstack , #spc , Enchanted , #spc ,
if %factband in #property
{
set #lobjectid #findid
event macro 17 0
target 1s
event macro 23 0
; set %Factiontime #scnt + 12
} ; if %factband in #property
} ;if #scnt > %Factiontime
else
{
event Property #findID
set %factband #findstack , #spc , Clean , #spc ,
if %factband in #property
{
set #lobjectid #findid
event macro 17 0
target 1s
event macro 23 0
} ; if %factband in #property
} ; Else
} ; for #findindex 1 #findcnt
} ; if #findkind <> -1
if ( %warnonlow = 1 && %warnamount >= #findstack )
{
event ExMsg #lobjectID 3 38 Low on bandaids!
}
wait 1
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 ( %faction in #journal )
{
set %Factiontime #scnt + 14
if ( : notin #journal )
{
goto start
}
}
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
;==========================================================================
; End of File
;==========================================================================
I know the script is a lot confused atm, is because i just "Upgrade" from my old one, but i will start make it more clean.
I don't know why sometimes (rare cases) it try heal on a loop.