Code: Select all
Sub autoheal()
## Writen by acdes - sedca@msn.com
var bandages = '0x0E21'
var t = '0'
var Enemy = '0x00000000'
UO.Print( "AuToHeaL is now A c T i V a T e D" )
uo.deletejournal()
While not UO.dead()
If NOT UO.InJournal( 'is attacking you' ) AND NOT UO.GetQuantity('lastcorpse') AND (uo.Life < (UO.STR-150)) then #OR uo.poisoned() and (uo.Life < (UO.STR-100)) then
If UO.Targeting() then
UO.CancelTarget()
wait(100)
EndIf
checklag()
#uo.findtype('0x0E20','0x0000','backpack')
#If uo.findcount() > 0 then
#uo.waittargettype('0x0B42',"-1")
#uo.useobject("finditem")
#wait(750)
#UO.Print(' You have ' + Str( UO.Count( bandages ) ) + ' Bandages' )
#else
UO.Bandageself()
wait(500)
if uo.injournal("You must") then
uo.deletejournal()
uo.ignore('lastcorpse')
t = 0
repeat
t = t + 1
wait(10)
Until UO.InJournal( 'is attacking you' ) OR UO.GetQuantity('lastcorpse') AND (UO.GetDistance('lastcorpse') <= 2) OR t > 300
checklag()
UO.Bandageself()
wait(500)
#uo.ignorereset()
endif
t = 0
repeat
t = t + 1
wait(10)
Until UO.InJournal( 'is attacking you' ) OR UO.GetQuantity('lastcorpse') AND (UO.GetDistance('lastcorpse') <= 2) OR t > 600
#endif
else
If NOT UO.InJournal( 'is attacking you' ) AND UO.GetQuantity('lastcorpse') AND UO.GetDistance('lastcorpse') <= 2 then
checklag()
loot()
#uo.exec('resend')
wait(100)
If UO.Targeting() then
UO.CancelTarget()
wait(100)
EndIf
checklag()
uo.findtype('0x2006',"-1",'ground')
if uo.findcount() > 0 then
UO.WaitTargetGround('0x2006',"-1")
UO.Say(".sac")
wait(500)
endif
if uo.injournal("see the target") then
#uo.exec('resend')
wait(500)
#uo.deletejournal("see the target")
checklag()
uo.findtype('0x2006',"-1",'ground')
if uo.findcount() > 0 then
UO.WaitTargetGround('0x2006',"-1")
UO.Say(".sac")
#wait(500)
endif
uo.ignore('lastcorpse')
repeat
t = t + 1
wait(10)
Until UO.InJournal( 'is attacking you' ) OR (t > 600) OR UO.GetQuantity('lastcorpse') AND (UO.GetDistance('lastcorpse') <= 2) AND uo.findcount() == 1
endif
else
If UO.InJournal( 'is attacking you' ) then
Enemy=UO.JournalSerial(UO.InJournal( 'is attacking you' )-1)
UO.Attack(Enemy)
UO.DeleteJournal( 'is attacking you' )
uo.deletejournal()
repeat
t = t + 1
wait(10)
Until UO.InJournal( 'is attacking you' ) OR UO.GetQuantity('lastcorpse') AND (UO.GetDistance('lastcorpse') <= 2) OR (t > 650)
else
t = 0
repeat
t = t + 1
wait(10)
Until UO.InJournal( 'is attacking you' ) OR UO.GetQuantity('lastcorpse') AND (UO.GetDistance('lastcorpse') <= 2) OR t > 650
EndIf
EndIf
EndIf
# uo.ignorereset()
wait(100)
wend
End Sub
Code: Select all
sub loot()
## written by acdes - sedca@msn.com
Dim loot[22]
loot[0] = '0x0EED' ; gold
loot[1] = '0x0F3F' ; arrows
loot[2] = '0x0EF0' ; slots
loot[3] = '0x097A' ; windgems/godstears
loot[4] = '0x14EB' ; maps
loot[5] = '0x0DF2' ; wand
loot[6] = '0x0DF3' ; wand
loot[7] = '0x0DF4' ; wand
loot[8] = '0x0DF5' ; wand
loot[9] = '0x0F13' ; tickets
loot[10] = '0x1410' ; platemail arms
loot[11] = '0x1411' ; platemail legs
loot[12] = '0x1412' ; a plate helm
loot[13] = '0x1413' ; platemail gorget
loot[14] = '0x1414' ; platemail gloves
loot[15] = '0x1415' ; platemail
loot[16] = '0x1B76' ; a heater shield
loot[17] = '0x13FE' ; a katana
loot[18] = '0x1078' ; hides
loot[19] = '0x19B7' ;ore 1 peace
loot[20] = '0x19BA' ;ore 2 peaces
loot[21] = '0x19B8' ;ore 3 peaces
loot[22] = '0x1BD1' ; feathers
var g,h,i,j,k,l,m,n,o,p,q
var cutem = 0
If UO.Targeting() then
UO.CancelTarget()
EndIf
UO.SetReceivingContainer("catch")
i = 15
h = 205
FOR j = 0 To 17
UO.FindType(loot[j],"-1",'ground')
If UO.FindCount() > 0 then
UO.Grab(0, "finditem")
Wait(i)
UO.FindType(loot[j],"-1",'ground')
endIf
next
UO.FindType('0x0E75','0x0000',"ground")
If UO.FindCount() > 0 then
UO.AddObject("BPackg","finditem")
UO.Ignore("finditem")
UO.UseObject("BPackg")
Wait(i)
FOR m = 0 TO 21
UO.FindType(loot[m],"-1","BPackg","ground")
While UO.FindCount() > 0
UO.Grab(0, "finditem")
#UO.Print("Found in a Backpack on the ground "+str(UO.FindCount()))
Wait(i)
UO.FindType(loot[m],"-1","BPackg","ground")
Wend
next
EndIf
If UO.GetQuantity('lastcorpse') then
UO.UseObject("lastcorpse")
wait(h)
If cutem==1 then
uo.deletejournal()
#UO.SetArm('temp')
#wait(100)
#UO.Arm('2') ; Right handed bladed weapon use ",setarm 2"
#Wait(250)
UO.WaitTargetObject('lastcorpse')
UO.UseObject(UO.Objatlayer("Rhand"))
repeat
wait(100)
until uo.injournal("You carve away")
#UO.Arm('temp')
EndIf
FOR n = 0 TO 22
UO.FindType(loot[n],"-1","lastcorpse")
While UO.FindCount() > 0
If loot[n] == '0x1078' then ; leather
g = 0
repeat
g = g + 1
UO.WaitTargetObject("finditem")
UO.UseType("0x0F9E") ; sissors
UO.Print("the hides have been cut")
wait(500)
until uo.injournal("You put") OR g >= 2
uo.deletejournal( 'You put' )
uo.deletejournal( ' You carve away ' )
UO.Print(' You have ' + Str( UO.Count('0x1067','0x0000') ) + ' Leathers' )
Else
UO.Grab(0, "finditem")
wait(i)
UO.FindType(loot[n],"-1","lastcorpse")
Wend
EndIf
next
If cutem==1 then
UO.FindType('0x0E42',"-1","lastcorpse") ;Wooden Chest
If UO.FindCount() > 0 then
repeat
UO.AddObject("WC","finditem")
wait(100)
UO.Ignore("finditem")
UO.UseObject("WC")
Wait(h)
FOR o = 0 TO 21
UO.FindType(loot[o],"-1","WC","lastcorpse")
While UO.FindCount() > 0
UO.Grab(0, "finditem")
#UO.Print("Found in a Wooden Chest "+str(UO.FindCount()))
Wait(i)
UO.FindType(loot[o],"-1","WC","lastcorpse")
Wend
UO.FindType( '0x0E75',"-1","WC","lastcorpse" )
if uo.findcount() > 0 then
UO.MoveItem( 'finditem', -1, "lastcorpse" )
wait(i)
endif
UO.FindType( '0x0E76',"-1","WC","lastcorpse" )
if uo.findcount() > 0 then
UO.MoveItem( 'finditem', -1, "lastcorpse" )
wait(i)
endif
next
UO.FindType('0x0E42',"-1","lastcorpse") ;Wooden Chest
until uo.findcount() == 0
EndIf
UO.FindType('0x09AB',"-1","lastcorpse") ;Metal Chest
If UO.FindCount() > 0 then
Repeat
UO.AddObject("MC","finditem")
wait(100)
UO.Ignore("finditem")
UO.UseObject("MC")
Wait(h)
FOR p = 0 TO 21
UO.FindType(loot[p],"-1","MC","lastcorpse")
While UO.FindCount() > 0
UO.Grab(0, "finditem")
#UO.Print("Found in a Metal Chest "+str(UO.FindCount()))
Wait(i)
UO.FindType(loot[p],"-1","MC","lastcorpse")
Wend
UO.FindType( '0x0E75',"-1","MC","lastcorpse" )
if uo.findcount() > 0 then
UO.MoveItem( 'finditem', -1, "lastcorpse" )
wait(i)
endif
UO.FindType( '0x0E76',"-1","MC","lastcorpse" )
if uo.findcount() > 0 then
UO.MoveItem( 'finditem', -1, "lastcorpse" )
wait(i)
endif
next
UO.FindType('0x09AB',"-1","lastcorpse") ;Metal Chest
until uo.findcount() == 0
EndIf
UO.FindType('0x0E40',"-1","lastcorpse") ;Metal gold Chest
If UO.FindCount() > 0 then
repeat
UO.AddObject("MgC","finditem")
wait(100)
UO.Ignore("finditem")
UO.UseObject("MgC")
Wait(h)
FOR q = 0 TO 21
UO.FindType(loot[q],"-1","MgC","lastcorpse")
While UO.FindCount() > 0
UO.Grab(0, "finditem")
#UO.Print("Found in a Metal gold Chest "+str(UO.FindCount()))
Wait(i)
UO.FindType(loot[q],"-1","MgC","lastcorpse")
Wend
UO.FindType( '0x0E75',"-1","MgC","lastcorpse" )
if uo.findcount() > 0 then
UO.MoveItem( 'finditem', -1, "lastcorpse" )
wait(i)
endif
UO.FindType( '0x0E76',"-1","MgC","lastcorpse" )
if uo.findcount() > 0 then
UO.MoveItem( 'finditem', -1, "lastcorpse" )
wait(i)
endif
next
UO.FindType('0x0E40',"-1","lastcorpse") ;Metal gold Chest
until uo.findcount() == 0
EndIf
endif
UO.FindType('0x0E75',"-1","lastcorpse") ;Backpack
If UO.FindCount() > 0 then
repeat
UO.AddObject("BP","finditem")
wait(100)
UO.Ignore("finditem")
UO.UseObject("BP")
Wait(h)
FOR l = 0 TO 21
UO.FindType(loot[l],"-1","BP","lastcorpse")
While UO.FindCount() > 0
UO.Grab(0, "finditem")
#UO.Print("Found in a Backpack "+str(UO.FindCount()))
Wait(i)
UO.FindType(loot[l],"-1","BP","lastcorpse")
Wend
UO.FindType( '0x0E76',"-1","BP","lastcorpse" )
if uo.findcount() > 0 then
UO.MoveItem( 'finditem', -1, "lastcorpse" )
wait(h)
endif
next
UO.FindType('0x0E75',"-1","lastcorpse") ;Backpack
until uo.findcount() == 0
EndIf
UO.FindType('0x0E76',"-1","lastcorpse") ;Bag
If UO.FindCount() > 0 then
repeat
UO.AddObject("Bag","finditem")
wait(100)
UO.Ignore("finditem")
UO.UseObject("Bag")
Wait(h)
UO.WaitTargetObject("Bag")
UO.Exec('emptycontainer 10')
UO.FindType('0x0E76',"-1","lastcorpse") ;Bag
until uo.findcount() == 0
EndIf
EndIf
wait(i)
UO.FindType('0x0F0E','0x0000',"lastcorpse") ;Bottles
If UO.FindCount() > 0 then
UO.Grab(0, "finditem")
EndIf
UO.UnsetReceivingContainer()
End Sub
Code: Select all
sub sac()
## Writen by acdes - sedca@msn.com
If UO.Targeting() then
UO.CancelTarget()
EndIf
uo.ignorereset()
UO.WaitTargetGround('0x2006',"-1")
UO.Say(".sac")
wait(100)
end sub
so far I haven't had any major problems, a minor glitch pending lag via server response times and distance (some monsters it simply sacs if you have to walk up to them) I had it super fast but was causeing errors on the server so I slowed it down. (just a little

please read: reading is fundamental!
this script is cutomized for my server... we have level systems and stat caps of 4000 thus if need be you may have to edit the (UO.Str-100) for your servers stat caps
Code: Select all
If UO.poisoned() or UO.Life < (UO.Str-100) Then
use "setarm 2" equpied with a righthanded bladed wepon for the cutting
use "addobject catch" for the recieveing container.
auto shuts off pending death.
also note for spells I shut off this script so target won't interfere
example
Code: Select all
sub protect()
var t
uo.deletejournal()
uo.exec('terminate autoheal')
uo.arm(1)
uo.usetype('0x20F6') ; etheral ride
uo.dress(0)
UO.UseType('0x1414','0x07CF') ;empathy gloves
if uo.targeting() then
uo.CancelTarget()
end if
UO.cast('Reactive','self')
wait(500)
if NOT uo.injournal("line of sight") then
t = 0
repeat
wait(100)
t = t + 1
until UO.injournal("fizzles") or t > 16
endif
uo.deletejournal()
UO.cast('Protection','self')
wait(500)
if NOT uo.injournal("line of sight") then
t = 0
repeat
wait(100)
t = t + 1
until UO.injournal("fizzles") or t > 26
endif
If UO.Life < UO.str then
uo.findtype('0x0E20','0x0000','backpack')
If uo.findcount() > 0 then
uo.waittargettype('0x0B42',"-1")
uo.useobject("finditem")
wait(500)
endif
uo.bandageself()
wait(500)
Endif
uo.deletejournal()
UO.cast('Bless','self')
wait(500)
if NOT uo.injournal("line of sight") then
t = 0
repeat
wait(100)
t = t + 1
until UO.injournal("fizzles") or t > 40
endif
UO.exec('exec autoheal')
end sub
the only real big problems I am having is when sphere glitches so you may want to slow down the loot script I added a bunch of checklag() to help and tweaked my spells so upon a fizzle there is no gap ("wait(####)") to wait for
enjoy!
*edit = SO FAR SO GEWD! THE AUTOHEAL ISN"T CRASHING ME - may need a few tweaks