Yoko

All sides of Injection
It is currently 2025-10-18 05:51:17

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Script Help
PostPosted: 2009-06-04 17:22:22 
Offline

Joined: 2009-06-04 17:14:16
Posts: 2
Приветствую. Помогите довести до ума скрипт на прокачку Stealth:


Code:
sub Stealth()

UO.Print('Качаем Stealth')
while uo.life > 0

   UO.Useskill('Hiding')
   wait( 3000 )
      If uo.InJournal('Вы успешно спрятались') then
         UO.Useskill('Stealth')
         wait (3000)
         Proverka()
      Else
         wait (1000)
      Endif
         
wend

endsub


sub Proverka()
      If UO.InJournal('Вы сами себя раскрыли') then!') then
         wait(100)
      Else
         UO.bandageself()
         wait(50)
         uo.say(chr(27))
         wait(50)
      Endif
endsub


Первый скрипт, так что не бейте :) чтобы не ходить сделал использование бинтов и отмену их соответственно.
Получается, что он почему то игнорирует If и делает все подряд.


Top
   
 Post subject:
PostPosted: 2009-06-04 17:27:03 
Offline

Joined: 2009-06-04 17:14:16
Posts: 2
добавил сверху uo.deletejournal(), вроде получше стал работать :)


Top
   
 Post subject:
PostPosted: 2009-06-05 07:55:53 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Интересная конструкция. Делетжурнал надо использовать так как ты делаешь проверку по журналу А скрипт ищет во всем журнале.

начало цикла
делжур
действие
проверка сообщения
конец цикла

У нас на шарде качается простым юзом скилл. Вот так:

Code:
sub Stealth()
   While uo.SkillVal('Stealth') < 1000
         uo.DeleteJournal()
         uo.Useskill('Stealth')
         LastTimer = uo.Timer()
         repeat
            wait(500)
         until uo.InJournal('seem|hidden|Вам не|revealed') or uo.Timer() > LastTimer + 200
   Wend
end sub


Стоит таймер так как проверка на журнал все таки не очень надежная.


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

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


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:  
cron
Powered by phpBB® Forum Software © phpBB Limited