Yoko

All sides of Injection
It is currently 2026-03-16 15:54:29

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2008-12-11 13:15:29 
Offline

Joined: 2008-12-11 12:42:37
Posts: 1
Функция: Цель, произнесшая слово "Обкаст!" , подвергается обкасту ;)
Код скрипта:
Code:
sub main()
            while 1
            var target
   if uo.injournal("Обкаст!") then
   target=uo.getserial(UO.journalserial(uo.injournal('Обкаст!')-1))
            uo.deletejournal()
   cast()
   endif
   wend
end sub

sub cast()
   while uo.mana < uo.int
   uo.msg("Ждите, я медитирую!")
      meditation1:
   uo.useskill("Meditation")
   if uo.injournal("focus concentration.") then
   wait(11000)
   goto meditation1
   endif
   wait(5000)
   wend   
   uo.msg("Стой ровно, начинаю кастовать!")
   repeat
   uo.exec("cast Dispel target")
   wait(5000)
   until uo.injournal("been wiped")
       {далее список блоков с кастами}
end sub


Проблема = invalid object target и далее invalid serial index.
Если мана не полная, он медитирует, как только завершает медитацию , далее возникает "проблема".
Если к примеру вставить в функции cast() строку
uo.say("Обкастовываю цель"+uo.journalserial(target)) , то выводится сообщение с его серийным номером , то есть как понимаю, цель замечена и определена .Подскажите пожалуйста в чем ошибка.
P.S: Поисковиком пользовался, нужного обьяснения не нашел , м.б плохо искал =\


Top
   
 Post subject:
PostPosted: 2008-12-11 20:54:19 
Offline

Joined: 2007-01-31 12:15:24
Posts: 25
Попробуй этот
Code:
sub main()
   var jrnl, i, p_len = 5
   var phrase = "каст"
   DIM players[6]
   
   players[0] = '0x01AE21DA'; Smiter
   players[1] = '0x00B380AC'; Malvin
   players[2] = '0x0051D929'; Eagle
   players[3] = '0x016F1491'; Pixel
   players[4] = '0x0050E47B'; Baron fon tarkin

repeat
      jrnl = uo.inJournal(phrase);
      if jrnl then
         for i=0 to p_len-1
            if uo.journalserial(jrnl-1) == players[i] then
            obkast.do(uo.journalserial(jrnl-1))
endif
         next
         uo.setjournalline(jrnl-1, '')
      endif
      wait(200)
   until false
   uo.DeleteJournal()
end sub

Sub obkast.do(serial)
   uo.cast('Protection', serial)
   Wait(2000)
   uo.cast('Bless', serial)
   wait(500)
   uo.DeleteJournal()
end sub


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited