Подскажите, что неверно :)

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Black Horse
Posts: 60
Joined: 2004-04-23 19:58:03

Подскажите, что неверно :)

Post by Black Horse »

Есть скрипт: используем топор по координатам, если в ответ выдаётся определённое сообщение, то чар должен сделать шаг. Проблема в том, что он его не делает. На мой взгляд, в скрипте всё логично :)

Code: Select all

sub main()
      var mx=uo.GetX()
       var my=uo.GetY()
         while not uo.weight > 400
            mx=uo.GetX()
             my=uo.GetY()

             UO.DeleteJournal()
             wait(200)
             uo.exec("waittargettile 3277 "+str(mx+1)+" "+str(my-1)+" 0")
             wait(200)
             UO.usetype('0x0F43') 
   
            if UO.InJournal("there are") or UO.InJournal("That's") or UO.InJournal("Try chopping a tree") then
            UO.Press(33, 1, 100)
            endif
         
            wait(4000)
         wend
         
         Kon2:
         recallDom2()
         UO.DeleteJournal()
         wait(5000)
         if UO.InJournal("fizzles") then
            goto Kon2
         endif
   
      viklad()
      
end sub   
Black Horse
Posts: 60
Joined: 2004-04-23 19:58:03

Post by Black Horse »

попробовал новую модификацию :) Теперь останавливается после @The are no logs left here to chop@

Code: Select all

sub main()
      var mx=uo.GetX()
       var my=uo.GetY()
         
         while not uo.weight > 400
            mx=uo.GetX()
             my=uo.GetY()
            
            repeat
                uo.exec("waittargettile 3277 "+str(mx+1)+" "+str(my-1)+" 0")
                wait(200)
                UO.usetype('0x0F43') 
                UO.DeleteJournal()
                  repeat
                      wait(100)
                   until UO.InJournal("there are") or UO.InJournal("That's") or UO.InJournal("Try chopping a tree") or UO.InJournal("put")
            until UO.InJournal("there are") or UO.InJournal("That's") or UO.InJournal("Try chopping a tree")
            
            UO.Press(33, 1, 100)
         wend
         
         Kon2:
         recallDom2()
         UO.DeleteJournal()
         wait(5000)
         if UO.InJournal("fizzles") then
            goto Kon2
         endif
   
      viklad()
      
end sub   
Black Horse
Posts: 60
Joined: 2004-04-23 19:58:03

Post by Black Horse »

ё-прст... Кто мог подумать, что всё дело в большой букве "T" в сообщении "there are" ... Всё, спасибо, я сам разобрался.
Post Reply