Yoko

All sides of Injection
It is currently 2025-10-15 10:47:05

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2011-04-18 10:14:18 
Offline

Joined: 2011-03-04 05:58:46
Posts: 15
Code:
var cont='0x4003D4C0'
var ns='0x0F88'
var bottle='0x0F0E'
var colorpoison='0x0998'
var dagger='0x402348CE'

sub main()
uo.cancelmenu()
uo.automenu('What sort of potion do you want to','(last)')
uo.useobject(cont)
wait(500)
while not uo.dead()
checkns()
checkbottles()
alchemypoison()
poisondagger()
wend
endsub

Sub checkns()
uo.findtype(ns,'-1','backpack')
if uo.getquantity('finditem')<=10 then
uo.findtype(ns,'-1',cont)
if uo.findcount() then
  uo.moveitem('finditem','100','backpack')
  wait(500)
endif
endif
endsub

Sub checkbottles()
uo.findtype(bottle,'0x0000','backpack')
if uo.getquantity('finditem')<=10 then
uo.findtype(bottle,'-1',cont)
if uo.findcount() then
  uo.moveitem('finditem','100','backpack')
  wait(500)
endif
endif
endsub

Sub alchemypoison()
uo.deletejournal()
uo.usetype(ns)
repeat
Wait(50)
until UO.InJournal("You put the") OR UO.InJournal("You toss the failed")
endsub

Sub poisondagger()
UO.FindType(bottle,colorpoison,'backpack')
if uo.findcount() then
uo.deletejournal()
uo.waittargetobject(dagger,'finditem')
uo.useskill('Poisoning')
repeat
  wait(50)
until UO.InJournal("You fail to apply") OR UO.InJournal("You apply the poison")
endif
end sub


Помогите разобраться... Почему скрипт работает не стабильно. Т.е. когда реги заканчиваются, он добирает их и не варит... Если кликнуть но нсу 2 раза - начинает дальше варить - снова добирает регов и встает скрипт.


Top
   
PostPosted: 2011-04-18 12:19:42 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Code:
var cont='0x4003D4C0'
var ns='0x0F88'
var bottle='0x0F0E'
var colorpoison='0x0998'
var dagger='0x402348CE'
var msg = 'put the|toss the failed'
var msg2 = 'You fail to apply|You apply the poison'
var LastTimer
sub main()
   uo.cancelmenu()
   uo.automenu('What sort of potion do you want to','(last)')
   uo.useobject(cont)
   wait(500)
   while not uo.dead()
      checkns()
      checkbottles()
      alchemypoison()
      poisondagger()
   wend
endsub
Sub checkns()
   if uo.count(ns)<=10 then ; если в паке меньше или равно 10 регов - добираем
      uo.findtype(ns,'-1',cont)
      if uo.findcount() then
         uo.moveitem('finditem','100','backpack')
         wait(500)
      endif
   endif
endsub
Sub checkbottles()
   if uo.count(bottle)<1 then ; если в паке меньше 1 бутылки - добираем
      uo.findtype(bottle,'-1',cont)
      if uo.findcount() then
         uo.moveitem('finditem','100','backpack')
         wait(500)
      endif
   endif
endsub
Sub alchemypoison()
   UO.DeleteJournal()
   LastTimer=UO.Timer()
   uo.usetype(ns)
   repeat
      wait(100)
   until UO.InJournal( msg ) or UO.Timer()>LastTimer+300
endsub
Sub poisondagger()
   UO.FindType(bottle,colorpoison,'backpack')
   if uo.findcount() then
      uo.deletejournal()
      LastTimer=UO.Timer()
      uo.waittargetobject(dagger,'finditem')
      uo.useskill('Poisoning')
      repeat
         wait(100)
      until UO.InJournal(msg2) or UO.Timer()>LastTimer+300
   endif
end sub

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Last edited by Mirage on 2011-04-18 16:14:08, edited 2 times in total.

Top
   
PostPosted: 2011-04-18 15:06:26 
Offline

Joined: 2011-03-04 05:58:46
Posts: 15
Сейчас не пойсонит и не берет бутылки. Если добрать в ручную, вот что получается:

>>You put the Poison in your pack.
To what do you wish to apply the poison?
What poison do you want to use?
Targetting Cabcelled.


Top
   
PostPosted: 2011-04-18 16:18:27 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Поправил сообщение.
Проверь на своем шарде тип пустой бутылки и тип бутылки с ядом. Если у тебя они одинаковые (по скрипту судя одинаковые) значит должно работать.
Либо добавляй
var poison ='0x0F0A'
и исправляй
Sub poisondagger()
UO.FindType(poison,colorpoison,'backpack') ; <----poison вместо bottle

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
PostPosted: 2011-04-18 22:26:56 
Offline

Joined: 2011-03-04 05:58:46
Posts: 15
Шард Dragon World. Тип одинаковый ну :) Убежал на работу, как проверю - отпишусь.


Top
   
PostPosted: 2011-04-19 03:16:43 
Offline

Joined: 2011-03-04 05:58:46
Posts: 15
Все работает - Спасибо :) Только не пойму, почему как алхимию докачал он начал варить гретпойсоны... Мне простые надо :)

Как я понял, надо тут исправить ? А вот только что ... )
Code:
Sub alchemypoison()
   UO.DeleteJournal()
   LastTimer=UO.Timer()
   uo.usetype(ns)
   repeat
      wait(100)
   until UO.InJournal( msg ) or UO.Timer()>LastTimer+110
endsub


Top
   
PostPosted: 2011-04-19 06:36:13 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
uo.automenu('What sort of potion do you want to','(last)')
варит последнее в меню зелье
легкий яд|яд|сильный яд|смертельный яд
тебе нужно либо first либо 1 ставить вместо last

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
PostPosted: 2011-04-19 07:21:32 
Offline

Joined: 2011-03-04 05:58:46
Posts: 15
Спасибо тебе большое. Поставил 2, и варит что нужно :)


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 0 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