Yoko

All sides of Injection
It is currently 2024-03-29 16:30:08

All times are UTC+02:00




Post new topic  Reply to topic  [ 14 posts ] 
Author Message
 Post subject: нужна помощь
PostPosted: 2014-05-12 13:29:49 
Offline

Joined: 2006-07-10 21:25:52
Posts: 11
sub poison()
UO.DeleteJournal()
while NOT UO.Dead('lasttarget') and NOT UO.Dead('self')
if not uo.poisoned('lasttarget') then
uo.press(114) #F3
UO.print("poison")
while not UO.InJournal('Your precise strike has increased the level of the poison by 1')
Wait(100)
wend
UO.print("!!!!!!!!!!!") #flag
else
if uo.poisoned('lasttarget') then
uo.press(113) #F2
UO.print("ignore")
While not UO.InJournal('Your attack penetrates their armor!')
Wait(100)
Wend
endif
endif
wend
end sub
вот скрипт суть если цель под пойзоном нажимаем ф2, это абилка армор игнор, если пойзона нет то нажимаем ф3, ибилка пойзон, но проблема есть он юзает абилку пойзон и все, поидее если цель не под пойзоном он юзает абилку пойзон и ждет записи вот в этой строке
while not UO.InJournal('Your precise strike has increased the level of the poison by 1')
Wait(100)
wend
если эта запись есть, то он должен проходить дальше, но он не проходит.


Top
   
PostPosted: 2014-05-12 14:38:53 
Offline

Joined: 2011-05-23 00:33:30
Posts: 949
C while-ами такое бывает, их вообще не использую в скриптах, предпочитаю repeat. Проверяемое сообщение должно быть с учетом регистра, поэтому нужные сообщения лучше скопировать из журнала в скрипт.
Code:
sub Poison()
   repeat
      uo.deletejournal()
      if uo.poisoned("lasttarget") then
         uo.press(113)
         uo.print("Ignore")
         repeat
            wait(100)
         until uo.injournal("Your attack penetrates their armor!")
      else
         uo.press(114)
         uo.print("Poison")
         repeat
            wait(100)
         until uo.injournal("Your precise strike has increased the level of the poison by 1")
      end if
   until uo.dead()
end sub

_________________
CodeSweeper


Top
   
PostPosted: 2014-05-12 14:41:39 
Offline

Joined: 2006-07-10 21:25:52
Posts: 11
а как копировать из журнала?


Top
   
PostPosted: 2014-05-12 14:44:38 
Offline

Joined: 2011-05-23 00:33:30
Posts: 949
Сделай нужные действия чтобы требуемые сообщения появились в игре, потом в клиенте напиши ,showjournal 100 или, если новый инжект то _showjournal 100. Откроется окно с сообщениям сервера в текстовом виде и от туда копируй что нужно.

_________________
CodeSweeper


Top
   
PostPosted: 2014-05-12 14:45:27 
Offline

Joined: 2006-07-10 21:25:52
Posts: 11
СПасибо уже разобрался, буду дальше пилить скрипт, если что-то не выйдет отпишусь))


Top
   
PostPosted: 2014-05-12 15:05:32 
Offline

Joined: 2006-07-10 21:25:52
Posts: 11
Проблема была в том, что в журнал клилоки записываються))) теперь есть еще одна проблема:если при включенной абилке ты попадаешь в паринг, то она вырубаеться. пробовал решить это сл. способом:
Code:
sub Poison()
   repeat
      uo.deletejournal()
      if uo.poisoned("lastattack") then
         ignore:
         uo.press(113)
         uo.print("Ignore")
         repeat
          if  uo.injournal("cliloc# 0x103114") goto ignore
            wait(100)
         until uo.injournal("cliloc# 0x102CEC")
      else
      poison:
         uo.press(114)
         uo.print("Poison")
         repeat
         if  uo.injournal("cliloc# 0x103114") goto poison
            wait(100)
         until uo.injournal("cliloc# 0x102CF0")
      end if
   until uo.dead()
end sub

но выдает парсер эрор. Все решилось)) я просто забыл синтаксис.


Top
   
PostPosted: 2014-05-12 15:11:23 
Offline

Joined: 2011-05-23 00:33:30
Posts: 949
И для справки - UO.Dead('lasttarget') бесполезно, uo.dead работает только на себя.

_________________
CodeSweeper


Top
   
PostPosted: 2014-05-12 15:25:48 
Offline

Joined: 2006-07-10 21:25:52
Posts: 11
Code:
sub Poison()
   repeat
      uo.deletejournal()
      if uo.poisoned("lastattack") then
         ignore:
         uo.press(113)
         uo.print("Ignore")
         repeat
            if  uo.injournal("cliloc# 0x103114") then goto ignore
               wait(50)
            endif
         until uo.injournal("cliloc# 0x102CEC")
      else
         poison:
         uo.press(114)
         uo.print("Poison")
         repeat
            if  uo.injournal("cliloc# 0x103114") then goto poison
               wait(50)
            endif 
         until uo.injournal("cliloc# 0x102CF0")
      end if
   until uo.dead()
end sub

вот последний вариант скрипта, но иногда вылетает с парсер эрор. Из-за чего может быть?


Top
   
PostPosted: 2014-05-12 15:39:25 
Offline

Joined: 2011-05-23 00:33:30
Posts: 949
Потому что задержки в циклах нет, и меньше 100 ставить не желательно, да и смысла нет особого. Твой скрипт
Code:
         repeat
            if  uo.injournal("cliloc# 0x103114") then если есть условие то делаем то что после if иначе пропускаем все тело.
               goto poison
               wait(50)
            endif
         until uo.injournal("cliloc# 0x102CF0")

По этому правильно будет, поправь во всех частях скрипта
Code:
         repeat
            if  uo.injournal("cliloc# 0x103114") then если есть условие то делаем то что после if иначе пропускаем все тело.
               goto poison
                 else
               wait(100)
            endif
         until uo.injournal("cliloc# 0x102CF0")

_________________
CodeSweeper


Top
   
PostPosted: 2014-05-12 15:47:23 
Offline

Joined: 2006-07-10 21:25:52
Posts: 11
спасибо буду тестить)


Top
   
PostPosted: 2014-05-12 16:22:40 
Offline

Joined: 2006-07-10 21:25:52
Posts: 11
Code:
sub Poison()
   repeat
      uo.deletejournal()
      if uo.poisoned("lastattack") then
         ignore:
         uo.press(113)
         uo.print("Ignore")
         repeat
            if  uo.injournal("cliloc# 0x103114") then goto ignore
            else
               wait(100)
            endif
         until uo.injournal("cliloc# 0x102CEC")
      else
         poison:
         uo.press(114)
         uo.print("Poison")
         repeat
            if  uo.injournal("cliloc# 0x103114") then goto poison
            else
               wait(100)
            endif 
         until uo.injournal("cliloc# 0x102CF0")
      end if
   until uo.dead()
end sub

иногда в 9,10,19,20 строках вылетает парсер эрор, куда можно еще задержки понаставлять? или это не из-за этого?


Top
   
PostPosted: 2014-05-12 17:05:46 
Offline

Joined: 2011-05-23 00:33:30
Posts: 949
Пробуй. И инжект скачай свежий если у тебя не такой http://rghost.ru/53116301
Code:
sub Poison()
   repeat
      uo.deletejournal()
      if uo.poisoned("lastattack") then
         uo.press(113)
         uo.print("Ignore")
         repeat
            wait(100)
         until uo.injournal("cliloc# 0x102CEC") or uo.injournal("cliloc# 0x103114")
      else
         uo.press(114)
         uo.print("Poison")
         repeat
            wait(100)
         until uo.injournal("cliloc# 0x102CF0") or uo.injournal("cliloc# 0x103114")
      end if
   until uo.dead()
end sub

_________________
CodeSweeper


Top
   
PostPosted: 2014-05-12 17:17:45 
Offline

Joined: 2006-07-10 21:25:52
Posts: 11
Ошибка оказывается выскакивала тогда, когда не хватало маны на абилку) вставил проверки и ошибка вроде-как пропала. Можно еще вопрос как можно проверить наличие оружия в руке?


Top
   
PostPosted: 2014-05-12 17:25:26 
Offline

Joined: 2011-06-11 19:54:23
Posts: 820
Faint wrote:
Code:
            if  uo.injournal("cliloc# 0x103114") then goto ignore 
            else
               wait(100)
            endif
Такое работать не будет.

Code:
            if  uo.injournal("cliloc# 0x103114") then
               goto ignore
            else
               wait(100)
            endif
Такое - может быть.

Faint wrote:
Можно еще вопрос как можно проверить наличие оружия в руке?
uo.ObjAtLayer(Layer)

Допустим
Code:
if uo.ObjAtLayer('Rhand') then
   uo.print('В правой руке что-то есть')
else
   uo.print('В правой руке пусто.')
endif


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 16 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited