Yoko

All sides of Injection
It is currently 2025-12-30 08:09:31

All times are UTC+02:00




Post new topic  This topic is locked, you cannot edit posts or make further replies.  [ 24 posts ]  Go to page 1 2 Next
Author Message
PostPosted: 2005-02-28 21:21:22 
Offline

Joined: 2005-01-27 09:10:39
Posts: 53
Code:
sub reagents()
UO.Print("Script by Aza(c)")
UO.Exec("set finddistance 2")
UO.Exec("set distance 2")
VAR i
DIM Reg[5]
Reg [0]=0x18E9 ;Nightshade
Reg [1]=0x0000 ;Blood Moss
Reg [2]=0x18E5 ;Mandrake
Reg [3]=0x18E9 ;Ginseng
Reg [4]=0x0000 ;Garlic

while true
 For i=0 to 4
   UO.Findtype(Reg[i],-1,1)
   If UO.FindCount()> 0 then
   UO.Print("Start harvestering")
    while not UO.InJournal("You put") or UO.InJournal("You must wait") or UO.InJournal("That is")
     UO.Print("Harvestering "+UO.GetGraphic('finditem'))
     UO.Useobject('finditem')
     UO.Ignore('finditem')
     wait(2000)
    wend
wend
end sub


Несколько проблем: почему то не работает ,сет , может ли быть такое что дев ету функцию запретил?
Почему скрипт не реагирует на условие
while not UO.InJournal("You put") or UO.InJournal("You must wait") or UO.InJournal("That is") и после заданных фраз все равно продолжает етот цикл выполнять.. ?
Играю на мидле


Top
   
 
 Post subject:
PostPosted: 2005-03-01 01:01:31 
Offline
Junior Expert

Joined: 2004-09-18 15:12:06
Posts: 138
Попробуй использовать такую форму:
Code:
UO.Set("finddistance", "2")
UO.Set("distance", "2")

Девелопер тут совершенно не при чём. (Кстати а как ты определил, что set не работает?)
Условие цикла должно выглядеть так:
Code:
while not (UO.InJournal("You put") or UO.InJournal("You must wait") or UO.InJournal("That is")) 

После этого цикла должно стоять UO.DeleteJournal().


Top
   
 
 Post subject:
PostPosted: 2005-03-01 09:53:59 
Offline

Joined: 2005-01-27 09:10:39
Posts: 53
определил так
раньше при юзе сет дистанс писалось
distance set =2 в клиенте
а теперь нет

кстати и просто когда в клиенте пишешь ,set finddistance 2 он не реагирует никак
и после етого пытаетса поюзать реги которые за два километра от меня находятса..


Top
   
 
 Post subject:
PostPosted: 2005-03-01 09:58:43 
Offline

Joined: 2005-01-27 09:10:39
Posts: 53
все равно не реагирует на условия цикла
как будто их нету вообще


Top
   
 
 Post subject:
PostPosted: 2005-03-01 10:04:26 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
zolupo wrote:
определил так
раньше при юзе сет дистанс писалось
distance set =2 в клиенте
а теперь нет

кстати и просто когда в клиенте пишешь ,set finddistance 2 он не реагирует никак
и после етого пытаетса поюзать реги которые за два километра от меня находятса..
Чтобы писалось "distance set =2 в клиенте" поставь в main галочку Verbose menu....


Top
   
 
 Post subject:
PostPosted: 2005-03-01 10:08:58 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
zolupo wrote:
все равно не реагирует на условия цикла
как будто их нету вообще
Гы... непонятное условие, скажи по русски что оно должно делать?... по скрипту видно если в паке есть объект из массива.... то если в журнале кака-ято мура.... надо юзать найденный обьект.... и что дальше?


Top
   
 
 Post subject:
PostPosted: 2005-03-01 10:35:33 
Offline

Joined: 2005-01-27 09:10:39
Posts: 53
по скрипту он ищет объекты заданых типов из масивав радиусе 2 тайла вокруг
если нашел - юзает пока не появитса фраза из условия

а трабл в том что когда фраза появляетса - он продолжает юзать


Top
   
 
 Post subject:
PostPosted: 2005-03-01 10:36:06 
Offline

Joined: 2005-01-27 09:10:39
Posts: 53
дальше он ищет следующий объект и юзает его


Top
   
 
 Post subject:
PostPosted: 2005-03-01 10:49:16 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
тогда
Code:
UO.DeleteJournal()
while not UO.InJournal("You put") or not UO.InJournal("You must wait") or not UO.InJournal("That is")


Top
   
 
 Post subject:
PostPosted: 2005-03-01 12:43:19 
Offline

Joined: 2005-01-27 09:10:39
Posts: 53
Code:
sub reagents()
UO.Print("Script by Aza(c)")
UO.Set("distance", "2")
UO.Set("finddistance", "2")
VAR i
DIM Reg[4]
Reg [0]=0x18E5 ;Nightshade
Reg [1]=0x0000 ;Blood Moss
Reg [2]=0x18DF ;Mandrake
Reg [3]=0x18E9 ;Ginseng
Reg [4]=0x0000 ;Garlic

while true
 For i=0 to 4
   UO.Findtype(Reg[i],-1,1)
   If UO.FindCount()> 0 then
   UO.Print("Start harvestering")
    Repeat
    UO.DeleteJournal()
     UO.Print("Harvestering "+UO.GetGraphic('finditem'))
     UO.Useobject('finditem')
     UO.Ignore('finditem')
     wait(2000)
    Until UO.InJournal("You put") or UO.InJournal("You must wait")
   endif
 next
wend
end sub


вот маленько доработал, кое чо забытое добавил
но теперь он почему то вообще левые типы ищет, которых я не задавал в массиве


Top
   
 
 Post subject:
PostPosted: 2005-03-01 12:47:14 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
Мдя... непонимаю я твоего скрипта.... юзать реги на полу? нафиг ...


Top
   
 
 Post subject:
PostPosted: 2005-03-01 12:56:42 
Offline

Joined: 2005-01-27 09:10:39
Posts: 53
ето не реги на полу юзать а кусты регов
короче лажу какуюто замутил дев наш теперь реги выращиваютса
а ето скрипт на сборку


Top
   
 
 Post subject:
PostPosted: 2005-03-01 13:04:32 
Offline
Junior Expert

Joined: 2004-09-18 15:12:06
Posts: 138
Я сам давно собирался написать скрипт на сбор регов. Если сегодня будет время -- напишу.


Top
   
 
 Post subject:
PostPosted: 2005-03-01 13:10:54 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
Попробуй...
Code:
sub GrabReagents()
var n
Dim Reg[6]
Reg[0] = 5
Reg[1] = UO.NS ;Nightshade
Reg[2] = UO.BM ;Blood Moss
Reg[3] = UO.MR ;Mandrake
Reg[4] = UO.GI ;Ginseng
Reg[5] = UO.GA ;Garlic
UO.Set('finddistance','3')
   For n = 1 TO Reg[0]
      REPEAT
         UO.FindType(Reg[n],'-1','1')
            If UO.FindCount() Then
               UO.UseObject('finditem')
               UO.DeleteJournal()
                  REPEAT
                     Wait(500)
                  Until UO.InJournal("You put") or UO.InJournal("You can't")
            End If
      Until UO.FindCount()==0 or UO.Dead()
   Next
UO.Print("Done!")
end sub


Last edited by 666Man666 on 2005-03-01 15:27:38, edited 1 time in total.

Top
   
 
 Post subject:
PostPosted: 2005-03-01 15:12:58 
Offline

Joined: 2005-01-27 09:10:39
Posts: 53
твой ищет также левые объекты
а когда находит вообще 0 действия


Top
   
 
 Post subject:
PostPosted: 2005-03-01 15:20:52 
Offline
Junior Expert
User avatar

Joined: 2004-11-13 00:43:55
Posts: 474
Location: Киберзадроцк
zolupo wrote:
твой ищет также левые объекты
а когда находит вообще 0 действия
Конешно ишет левые объекты, потаму, что какой-то "умник" забил в массив всякую пургу...
Code:
Reg[1] = '0x18E5' ;Nightshade 
Reg[2] = '0x0000' ;Blood Moss
Reg[3] = '0x18DF' ;Mandrake
Reg[4] = '0x18E9' ;Ginseng
Reg[5] = '0x0000' ;Garlic


Top
   
 
 Post subject:
PostPosted: 2005-03-01 15:59:04 
Offline
Junior Expert

Joined: 2004-09-18 15:12:06
Posts: 138
Выкроил время. Написал-таки скрипт. Получилось что-то вроде этого:
Code:
sub HarvestReagents()
  var numReagents = 2
  dim reagentsTypes[2]
  reagentsTypes[0] = 0x18E9 # Wild Ginseng
  reagentsTypes[1] = 0x18E1 # Wild Garlic

  var i
  var lastTimer

  UO.Set("distance", "2")
  UO.Set("finddistance", "2")

  UO.DeleteJournal()

  while true
    for i = 0 to numReagents -1
      UO.FindType(reagentsTypes[i], -1, "ground")
      while UO.FindCount() > 0
        UO.UseObject("finditem")

        lastTimer = UO.Timer()

        repeat
          wait(100)
        until UO.InJournal("You put") || UO.InJournal("You must wait") || UO.InJournal("That is too far away") || UO.Timer() > lastTimer + 200
        UO.DeleteJournal()

        UO.Ignore("finditem")

        UO.FindType(reagentsTypes[i], -1, "ground")
      wend
    next
    wait(1000)
  wend
end sub


Top
   
 
 Post subject:
PostPosted: 2005-03-01 17:39:13 
Offline

Joined: 2005-01-27 09:10:39
Posts: 53
папа:)


ПС
dim reagentsTypes[4]
reagentsTypes[0] = 0x18E9 # Wild Ginseng
reagentsTypes[1] = 0x18E1 # Wild Garlic
reagentsTypes[2] = 0x18DF # Mandrake
reagentsTypes[3] = 0x18E5 # Nightshade


Top
   
 
 Post subject:
PostPosted: 2005-03-01 23:37:41 
Offline
Junior Expert

Joined: 2004-09-18 15:12:06
Posts: 138
zolupo wrote:
папа:)

Э... в каком смысле?


Top
   
 
 Post subject:
PostPosted: 2005-03-02 09:54:19 
Offline

Joined: 2005-01-27 09:10:39
Posts: 53
otec injekta :)


Top
   
 
Display posts from previous:  Sort by  
Post new topic  This topic is locked, you cannot edit posts or make further replies.  [ 24 posts ]  Go to page 1 2 Next

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


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