Code:
sub MyScript()
While UO.Mana > 0
If UO.Mana < 22 Then ; <---
Uo.useskill('Meditation')
wait(40000)
Else
Uo.useskill('Spirit Speak')
wait(5000)
If uo.injournal("you fail to communicate with the netherworld.") then
wait(5000)
Uo.useskill('Spirit Speak')
wait(2000)
repeat ; <---
If Uo.Injournal("You Contact The Netherworld") Then
UO.WaitTargetObject('self')
UO.Cast('Dispel')
wait(5000)
Uo.DeleteJournal()
If Uo.Injournal("You Are Already In Contact With The Netherworld") Then
UO.WaitTargetObject('self')
UO.Cast('Dispel')
wait(5000)
Uo.DeleteJournal()
repeat ; <---
Endif
Endif
Endif
Endif
Wend
endsub
Almost all the cycles are written not correctly.
Indentation should match.
Code:
sub Magery()
Var LastTimer, i
DIM Fruits[4]
Fruits[1] = '0x09D0'
Fruits[2] = '0x171F'
Fruits[3] = '0x0994'
Fruits[4] = '0x0EED'
WHILE NOT UO.Dead()
UO.DeleteJournal()
If UO.Mana<100 Then
While UO.Mana<UO.Int
UO.DeleteJournal()
wait(100)
Uo.WarMode('0')
UO.Useskill('Meditation')
If UO.InJournal("must wait") Then
Wait(500)
End If
Repeat
wait(100)
until UO.InJournal("You are|You lose|must wait")
Wend
Endif
While UO.Mana==UO.Int AND UO.GA>0 AND UO.GS>0 AND UO.MR>0
UO.DeleteJournal()
LastTimer=UO.Timer()
UO.WaitTargetTile('400', STR( UO.GetX( 'self' )), STR( UO.GetY( 'self' )), STR( UO.GetZ( 'self' )))
UO.Cast('Create Food')
repeat
wait(100)
until UO.InJournal("fizzles") or UO.Mana<UO.Int or UO.Timer()>LastTimer+30
For i=1 To 4
UO.FindType( Fruits[i], -1, 'ground' )
If UO.FindCount() > 0 Then
uo.moveitem('finditem',-1,'0x401F21EF')
Wait( 200 )
Endif
Next
Wend
WEND
end sub