Приостановка скрипта

Materials, references, tutorials

Moderators: Murderator+, Murderator

Post Reply
ligeon
Posts: 3
Joined: 2005-07-11 00:42:39

Приостановка скрипта

Post by ligeon »

Code: Select all

sub main()
while not uo.dead()

if uo.mana < uo.int-30 then
uo.useskill('Meditation')
repeat
wait(1000)
until uo.mana < uo.int
else

uo.waittargetself()
uo.cast('Invisibility')
repeat
uo.deletejournal()
wait(100)
until uo.injournal("fizzles") or uo.hidden()
hungry()
endif
wend
end sub


sub hungry()
var i
UO.ServerPrint(".hungry")
Wait(500)
i=UO.LastMessage()
If i=="You aren't hungry at all" Then
uo.usetype("0x097B")
Wait(1500)
EndIf
end sub


По не понятным причинам действия чара просто останавливаются. Подскажите, в чём проблема!? =\
Mirage
Posts: 2802
Joined: 2009-05-28 09:58:28
Location: Иваново
Contact:

Re: Приостановка скрипта

Post by Mirage »

1)

Code: Select all

sub main()
   while not uo.dead()
      if uo.mana < uo.int-30 then
         uo.useskill('Meditation')
         repeat
            wait(1000)
         until uo.mana < uo.int
      else
         uo.waittargetself()
         uo.cast('Invisibility')
         uo.deletejournal()
         repeat
            wait(100)
         until uo.injournal("fizzles") or uo.hidden()
         hungry()
      endif
   wend
end sub
sub hungry()
   var i
   UO.ServerPrint(".hungry")
   Wait(500)
   i=UO.LastMessage()
   If i=="You aren't hungry at all" Then
      uo.usetype("0x097B")
      Wait(1500)
   EndIf
end sub

2)если тебе не удается войти в медитацию или тебе ее сбивают то виснет вот тут:

Code: Select all

         repeat
            wait(1000)
         until uo.mana < uo.int
Post Reply