Code:
sub rezist()
VAR NS='0x0F88' ; type Nighshade.
VAR GA='0x0F7A' ; type Black Pears.
VAR Sunduk='0x40075B93' ; ID sunduka.
var manka='0000' ; tip manki
var cvet='0000' ; cvet manki
var botle='0000' ; tip pustoi bytulki
var cbotle='0000' ; cvet pustoi botle
uo.useobject(Sunduk)
while NOT UO.Dead()
UO.DeleteJournal()
while UO.Mana>=10
uo.waittargetobject('laststatus')
UO.Cast('Magic Arrow')
wait(2000)
uo.findtype(NS,-1,'backpack')
if uo.getquantity('finditem')<=3 then
uo.findtype(NS,-1,Sunduk)
uo.moveitem('finditem','500','backpack')
wait(700)
endif
uo.findtype(GA,-1,'backpack')
if uo.getquantity('finditem')<=3 then
uo.findtype(GA,-1,Sunduk)
uo.moveitem('finditem','500','backpack')
wait(700)
endif
if uo.mana<=20 then
uo.findtype(manka,cvet,'ground')
if uo.findcount() then
uo.useobject('finditem')
endif
endif
uo.findtype(botle,cbotle,'backpack')
if uo.getquantity('finditem')>=10 then
uo.moveitem('finditem','all','ground')
wait(700)
endif
wend
while not uo.injournal("at peace")
uo.deletejournal()
uo.useskill('Meditation')
while not uo.injournal("You lose") and not uo.injournal("You are")
wait(100)
wend
wend
while uo.mana<>uo.int
wait(1000)
wend
wend
end sub