Yoko

All sides of Injection
It is currently 2025-11-23 13:11:31

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2009-12-04 09:20:26 
Offline

Joined: 2004-12-30 16:47:14
Posts: 24
Чар не всегда берёт реги из сундука
Quote:
sub Poison()
VAR Exit=0, LastTimer, TryToPoison
while Exit<>1
UO.DeleteJournal()

UO.FindType('0x0F0E',-1,'backpack') ; bottle
if uo.count('0x0F0E')<10 then
UO.FindType('0x0F0E','0x0000','0x4005b307') ; bottle, container
wait(1000)
UO.Grab('100','finditem')
wait(100)
Endif
UO.FindType('0x0F88','0x0000','backpack') ; NS
if uo.count('0x0F88')<10 then
UO.FindType('0x0F88','0x0000','0x4005b307'); NS, container
wait(1000)
UO.Grab('700','finditem')
wait(500)
Endif
LastTimer=UO.Timer()
UO.WaitMenu('What','(last)') ; menu
UO.UseType(0x0F88) ; NightShade

while NOT UO.InJournal("You put") AND NOT UO.InJournal("You toss the failed")
wait(500)
wend

If UO.InJournal("You toss the failed") then
repeat
wait(100)
until UO.Timer()>=LastTimer+100 ;time to make sword
Else
TryToPoison=1
repeat
UO.FindType('0x0F0E','0x0998','my')
If UO.GetQuantity('finditem')>0 then
UO.UseSkill('Poisoning')
UO.WaitTargetObject('0x404adcc1','finditem') ; sword
; UO.UseSkill('Poisoning')
wait(4000)
Else
TryToPoison=0
Endif
EndIf
UO.UseSkill('Spirit Speak')
wait(3000)
wend
end sub


Top
   
 Post subject:
PostPosted: 2009-12-04 10:05:11 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
скрипт топором деланный.
1) проверка на while Exit<>1 накой черт если она в скрипте не учитывается? То же самое про TryToPoison вообще тут не используется.
2)UO.FindType перед uo.count('0x0F0E') делать не надо - оно и так ищет
3)UO.Grab('100','finditem') устаревшая команда. Лучше мувом пользоваться
4)какоето неереально накидывание циклов и проверок if while repeat...

Приведи в порядок скрипт, проставь отступы, избавься от ненужного. Скрипт станет на половину кароче и работоспособнее.

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


Top
   
 Post subject:
PostPosted: 2009-12-04 10:09:50 
Offline

Joined: 2004-12-30 16:47:14
Posts: 24
Mirage wrote:
Приведи в порядок скрипт, проставь отступы, избавься от ненужного. Скрипт станет на половину кароче и работоспособнее.


да если б я знал как его исправить то не писал бы здесь, исправь пожалуйсто


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: No registered users and 3 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