Yoko

All sides of Injection
It is currently 2024-03-28 22:03:59

All times are UTC+02:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
 Post subject: AutoCure
PostPosted: 2013-09-08 15:00:12 
Offline

Joined: 2013-09-08 12:05:46
Posts: 4
Подскажите что не так в скрипте, почему не работает?

sub AUTO_Cure()
while not uo.dead()
If uo.Poisoned() > 0 Then
If uo.Count('0x0F07') > 0 Then
uo.unequip('Rhand','0x401A4B7C')
wait(700)
repeat
If uo.Count('0x0F07') < 1 Then
goto a
EndIf
uo.usetype(0x0F07)
wait(700)
until uo.Poisoned() < 1
a:
uo.equip('Rhand','0x401A4B7C')
wait(700)
Else
Wait(40)
EndIf
EndIf
wend
end sub


Last edited by John Bosoy on 2013-09-09 12:25:45, edited 1 time in total.

Top
   
 Post subject: Re: AutoCure
PostPosted: 2013-09-08 15:29:31 
Offline
User avatar

Joined: 2013-05-28 13:13:02
Posts: 149
Код нужно оформлять вот так, тогда у людей будет намного больше желания помогать тебе
Code:
sub AUTO_Cure()
   while not uo.dead()
      If uo.Poisoned() > 0 Then
         If uo.Count('0x0F07') > 0 Then
            uo.unequip('Rhand','0x401A4B7C')
            wait(700)
            repeat
               If uo.Count('0x0F07') < 1 Then
                  goto a
               EndIf
               uo.usetype(0x0F07)
               wait(700)
            until uo.Poisoned() < 1
            a:
            uo.equip('Rhand','0x401A4B7C')
            wait(700)
         Else
            Wait(40)
         EndIf
      EndIf
   wend
end sub

_________________
Русский Сервер Ultima Online High Seas Adventures
Legendary


Top
   
 Post subject: Re: AutoCure
PostPosted: 2013-09-08 15:35:37 
Offline

Joined: 2013-09-08 12:05:46
Posts: 4
RL_ka wrote:
Код нужно оформлять вот так, тогда у людей будет намного больше желания помогать тебе
Code:
sub AUTO_Cure()
   while not uo.dead()
      If uo.Poisoned() > 0 Then
         If uo.Count('0x0F07') > 0 Then
            uo.unequip('Rhand','0x401A4B7C')
            wait(700)
            repeat
               If uo.Count('0x0F07') < 1 Then
                  goto a
               EndIf
               uo.usetype(0x0F07)
               wait(700)
            until uo.Poisoned() < 1
            a:
            uo.equip('Rhand','0x401A4B7C')
            wait(700)
         Else
            Wait(40)
         EndIf
      EndIf
   wend
end sub

Буду знать!)


Top
   
 Post subject: Re: AutoCure
PostPosted: 2013-09-09 12:30:27 
Offline

Joined: 2013-09-08 12:05:46
Posts: 4
Помогите пожалуйста.


Top
   
 Post subject: Re: AutoCure
PostPosted: 2013-09-09 12:54:42 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
А что не так?
Паузы не хватает в цикле да не понятно для чего скачек на a: сделан.

Code:
sub AUTO_Cure()
   while not uo.dead()
      If uo.Poisoned() and uo.Count('0x0F07') Then
         uo.unequip('Rhand','0x401A4B7C')
         wait(700)
         while uo.Poisoned() or uo.Count('0x0F07')
            uo.usetype(0x0F07)
            wait(700)
         wend
         uo.equip('Rhand','0x401A4B7C')
         wait(700)
      EndIf
      Wait(100)
   wend
end sub

Разумеется это будет работать если тип бутылки и ID оружия указаны верно.

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


Top
   
 Post subject: Re: AutoCure
PostPosted: 2013-09-09 21:35:01 
Offline

Joined: 2013-09-08 12:05:46
Posts: 4
Code:
sub drink_cure()
   while not uo.dead()
      While UO.Poisoned()
         If uo.Count('0x0F07') > 0 Then
            uo.unequip('Lhand',0x40106d68)
            wait(600)
            uo.usetype(0x0f07)
            wait(600)
            uo.equip('Lhand',0x40106d68)
            wait(600)
         Else
            Wait(40)
         EndIf
      wend
   wend
end sub


Code:
sub drink_cure()
   while not uo.dead()
      If UO.Poisoned() and uo.Count('0x0F07') > 0 Then       
            uo.unequip('Lhand',0x40106d68)
            wait(600)
            uo.usetype(0x0f07)
            wait(600)
            uo.equip('Lhand',0x40106d68)
            wait(600)
         Else
            Wait(40)
      EndIf
   wend
end sub


не работают оба...


Top
   
 Post subject: Re: AutoCure
PostPosted: 2013-09-09 23:22:28 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Бида.
А мой у меня работает. Если все правильно прописать.

PS ну так ты опять у себя одни и теже ошибки допускаешь. Зачем спрашивать если не слушаешь что говорят?

Напиши на бумаге по русски последовательно действия которые ты хочешь чтобы скрипт делал и посмотри что ты ваяешь. Зачем цикл в цикле? Почему нет паузы если условия не выполняются? В общем в уроки в уроки...

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


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

All times are UTC+02:00


Who is online

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