Code:
#==============================================================
# ExplodeHim() - drop to laststatus char bomb and detonated
# first dropped bomb
#
# Journal has been deleted!!!
#--------------------------------------------------------------
sub ExplodeHim()
VAR i, pack='0x400E49F8',FirstBomb, FirstFlag=1, CountEX
VAR ExHP=20 ; 1 bomb hits
CountEX=INT(UO.GetHP('laststatus')/ExHP+0.99)
UO.Print(STR(CountEX)+" explodov nado :)")
For i=1 to CountEX
UO.FindType('0x0F0D','0x0B99',pack)
If UO.GetQuantity('finditem') Then
If FirstFlag Then
FirstFlag=0
FirstBomb='finditem'
Endif
CheckLag()
UO.Drop('1',STR(UO.GetX('laststatus')),STR(UO.GetY('laststatus')),STR(UO.GetZ('laststatus')),'finditem')
wait(400)
Else
UO.Print("Explosives not found!")
EndIf
Next
UO.Cast('Magic Arrow',FirstBomb)
end sub