Code:
sub PolymorphInDaemon()
VAR NeedManaToPolymorph = 24
VAR LastMana
UO.DeleteJournal()
while not uo.dead()
if UO.Mana >= NeedManaToPolymorph then
UO.WaitMenu('What do you want to polymorph','Daemon')
UO.Cast('Polymorph')
LastMana = UO.Mana
while (UO.Mana >= LastMana) and not UO.InJournal("You lack")
wait(100)
wend
wait(500)
endif
while UO.Life < UO.STR
UO.DeleteJournal()
UO.BandageSelf()
repeat
wait(100)
until UO.InJournal("You put the bloody|barely help|need healing")
wend
while UO.Mana < UO.INT
UO.UseSkill('Meditation')
wait(5000)
wend
if UO.InJournal("You lack") then
UO.Print("Нет реагентов для полиморфа")
UO.Print("Скрипт выключен")
return
endif
wend
endsub