Yoko

All sides of Injection
It is currently 2024-04-16 06:18:19

All times are UTC+02:00




Post new topic  Reply to topic  [ 13 posts ] 
Author Message
PostPosted: 2012-02-14 21:18:49 
Offline

Joined: 2012-02-14 21:13:20
Posts: 7
вот скрипт, когда не может затаймить хорсу номер 4, крашится клиент. Помогите решить проблему.

Code:
sub taming()
VAR Y,i
DIM horse[4]
horse[1] = "0x00cc"
horse[2] = "0x00e4"
horse[3] = "0x00e2"
horse[4] = "0x00c8"
UO.ServerPrint("All release")
start:
UO.Exec("ignorereset")
For i=1 to 4
While UO.CountGround(horse[i])>0
tam(horse[i])
Wend
NEXT
goto start
end sub

sub tam(X)
VAR Y
nacalo:
Y = 0
UO.Canceltarget()
UO.Waittargetground(X)
UO.Useskill("Taming")
UO.DeleteJournal()
While not UO.InJournal("It seems to accept you as master") and not UO.InJournal("You fail to tame the creature") and not UO.InJournal("remembers you") and Y < 40
Y = Y + 1
Wait(500)
Wend
If UO.InJournal("You fail to tame the creature") then
goto nacalo
End if
UO.ServerPrint("All release")
UO.Ignore("lasttarget")
UO.Print(STR(UO.CountGround(0x00E2)+UO.CountGround(0x00E4)+UO.CountGround(0x00C8)+UO.CountGround(0x00CC))+" losadok ne tamilosj")
end sub


Top
   
PostPosted: 2012-02-15 01:35:16 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
Code:
sub taming()
    VAR i
    DIM horse[4]
        horse[0] = "0x00cc"
        horse[1] = "0x00e4"
        horse[2] = "0x00e2"
        horse[3] = "0x00c8"
    UO.ServerPrint("All release")
    while true
        UO.ignorereset()
        For i = 0 to 3
            While UO.CountGround(horse[i])>0
                tam(horse[i])
            Wend
        NEXT
        wait(100) ; !!!
    wend
end sub

sub tam(X)
    VAR Time
    repeat
        UO.Canceltarget()
        UO.Waittargetground(X)
        UO.Useskill("Taming")
        UO.DeleteJournal()
        Time = UO.Timer()
        repeat
            Wait(100)
        until not UO.InJournal("It seems to accept you as master|You fail to tame the creature|remembers you") or Time + 200 <= UO.Timer()
    until UO.InJournal("You fail to tame the creature")
    UO.ServerPrint("All release")
    UO.Ignore("lasttarget")
    UO.Print(STR(UO.CountGround(0x00E2)+UO.CountGround(0x00E4)+UO.CountGround(0x00C8)+UO.CountGround(0x00CC))+" losadok ne tamilosj")
end sub


Last edited by ZeroDX on 2012-02-15 13:33:20, edited 1 time in total.

Top
   
PostPosted: 2012-02-15 02:12:19 
Offline

Joined: 2012-02-14 21:13:20
Posts: 7
не помогло :(


Top
   
PostPosted: 2012-02-15 13:33:48 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
Обновил пред. пост


Top
   
PostPosted: 2012-02-15 15:50:31 
Offline

Joined: 2012-02-14 21:13:20
Posts: 7
как то странно таймить стал. Но в итоге все равно вылетает. Может есть скрипт на тайминг понадежнее? С которым можешь поделиться :roll:
Таймить н-нное кол-во лошадей, без посоха и кормежки. Главное цикличность.


Top
   
PostPosted: 2012-02-15 15:54:04 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
я качал вот так, но на толпе однотипных животных.

Code:
sub AnimalTaming()
   VAR n=1, corpse
   var animal1 = '0x00D0' #тип животного
   UO.Set('quiet','0')
   uo.ignorereset()
   uo.warmode('0')
   Repeat
      uo.Set('finddistance', 8)
      uo.FindType(animal1, -1, 'ground')
      if uo.FindCount()>0 then
         uo.warmode(0)
         UO.DeleteJournal()
         UO.DeleteJournal()
         UO.WaitTargetObject('finditem') 
         UO.Useskill('Animal Taming')
         repeat
            wait(100)
         until UO.InJournal('fail|It seems|already|rememb|creature') or uo.GetX('finditem')==0
         If Uo.InJournal('It seems|already|creature') Then
            UO.Hide('finditem')
            UO.Ignore('finditem')
            uo.say('all release')
         endif
      else
         uo.ignorereset()
         UO.Msg(".resync")
         wait(500)
         eat()
      endif
      wait(500)
   Until uo.Dead()
end sub
Sub eat()
   var havka      = '0x097B', LastTimer
   REPEAT
      UO.DeleteJournal()
      LastTimer=UO.Timer()
      UO.findtype(havka,-1,'backpack')
      If UO.FindCount() > 0 Then
         UO.Useobject('finditem')
         wait(200)
      Else
         UO.Print( 'кончилась рыба' )
         return 0
      end if
   Until UO.InJournal("stuffed!|think|found|Вы ничего не можете") OR UO.Timer()>LastTimer+200
end sub

Скрипты в принципе одинаковые.

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


Top
   
PostPosted: 2012-02-15 16:04:05 
Offline

Joined: 2012-02-14 21:13:20
Posts: 7
странно, но вылетел и этот. Играю на ultima.pp.ru


Top
   
PostPosted: 2012-02-15 19:25:23 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
1) у вас разрешены вообще инжект скрипты?
2) ваши админы не запретили отпускать притамленных существ на волю?
3) когда именно именно вылетает клиент и как?
PS галка TWI включена должна быть в закладке MAIN инжекта

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


Top
   
PostPosted: 2012-02-15 19:47:54 
Offline

Joined: 2012-02-14 21:13:20
Posts: 7
1. нет, но все пользуются
2. можно, но они запоминают на время
3. вылетает походу когда затаймится хорса и переключается на другую.
п.с. галка стоит


Top
   
PostPosted: 2012-02-16 05:17:48 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
попробуй инжект другой версии. Ну или какой-нибудь альтернативный клиент уо с поддержкой паскаля и питона :roll:


Top
   
PostPosted: 2012-03-01 18:43:51 
Offline

Joined: 2012-02-14 21:13:20
Posts: 7
выяснил почему вылетало. У меня камень с 4 ядрами, и после того, как я поставил клиент с инжектом на 1 ядро - перестало вылетать


Top
   
PostPosted: 2012-03-01 22:26:22 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
:wink:

кто-то когда-то тут со мной спорил что скрипт может просто так вылетать (причем какой то простой пылесос с пола).
Оказалось что до фига левых галочек, не настроен на 2-х ядерный проц, клиент без пониженной нагрузки и параллельно работало еще 3 окна, да и в скрипте было в 8 строках 4 ошибки...

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


Top
   
PostPosted: 2012-03-02 20:05:09 
Offline

Joined: 2012-02-14 21:13:20
Posts: 7
Mirage wrote:

клиент без пониженной нагрузки

вот тут поподробнее пжл :)


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

All times are UTC+02:00


Who is online

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