Yoko

All sides of Injection
It is currently 2025-11-05 13:27:49

All times are UTC+02:00




Post new topic  Reply to topic  [ 16 posts ] 
Author Message
PostPosted: 2006-03-21 19:27:34 
Offline

Joined: 2006-03-21 18:13:24
Posts: 4
Code:
sub heal()    
VAR X=0
repeat
   if uo.life < 90 then
   uo.unequip("Rhand")
   while uo.life < uo.str
      uo.exec("bandageself")
      uo.deletejournal()
      while not (X == 60 or uo.injournal("backpack") or uo.injournal ("reach that") or uo.injournal("current state") or uo.injournal("barely") or uo.injournal("mummy") or uo.injournal("target info"))
         wait(100)
         X=X+1
         if uo.injournal("reach that") or uo.injournal("current state") or uo.injournal("target info") then
            wait(1000)
         endif
         if uo.stamina < 65 then
            uo.usetype("0x0F0B") ;drink refresh potion
         endif
      wend
   X=0
   wend
      uo.deletejournal()
      uo.usetype("0x1B7B") ;sheild
      uo.usetype("0x143C") ;sword
   endif
wait(100)
until uo.dead()
end sub


Хочу сделать, чтобы скрипт действовал только когда есть бинтики, а то когда их нету он постоянно пытается их найти и наступает полный ужас :) И ещё хочу чтобы была какая-то задержка при лечении..
Спасибо


Top
   
 Post subject:
PostPosted: 2006-03-21 20:40:23 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
 uo.FindType(band,-1,'backpack')
 if uo.Count('finditem') > 0 then
    uo.bandageself()
 end if


Top
   
 Post subject:
PostPosted: 2006-03-21 21:05:44 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
ну Троцкий извас скриптер... Может ты забудишь про это?;)
Code:
 uo.FindType(band,-1,'backpack') 
 if uo.Count('finditem') > 0 then
    uo.bandageself()
 end if

это же шедевр...
Code:
if uo.Count(band) > 0 then 
    uo.bandageself()
 end if


Top
   
 Post subject:
PostPosted: 2006-03-21 22:14:05 
Offline

Joined: 2006-03-21 18:13:24
Posts: 4
Из меня то уж скриптер точно никакой :)) Так что дайте мне готовенький скриптик уже, а то я щас налеплю что-то плохое чувствую ;(


Top
   
 Post subject:
PostPosted: 2006-03-22 10:20:59 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Проверку на наличие бинтов вставил, а задержка там итак есть - он ждет, пока не увидит нужного сообщения в журнале.

Code:
sub heal()    
VAR X=0
repeat
   if uo.life < 90 and (uo.count(band) > 0) then
   uo.unequip("Rhand")
   while uo.life < uo.str
      uo.exec("bandageself")
      uo.deletejournal()
      while not (X == 60 or uo.injournal("backpack") or uo.injournal ("reach that") or uo.injournal("current state") or uo.injournal("barely") or uo.injournal("mummy") or uo.injournal("target info"))
         wait(100)
         X=X+1
         if uo.injournal("reach that") or uo.injournal("current state") or uo.injournal("target info") then
            wait(1000)
         endif
         if uo.stamina < 65 then
            uo.usetype("0x0F0B") ;drink refresh potion
         endif
      wend
   X=0
   wend
      uo.deletejournal()
      uo.usetype("0x1B7B") ;sheild
      uo.usetype("0x143C") ;sword
   endif
wait(100)
until uo.dead()
end sub


Top
   
 Post subject:
PostPosted: 2006-03-22 11:52:44 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Grin wrote:
ну Троцкий извас скриптер... Может ты забудишь про это?;)
Code:
 uo.FindType(band,-1,'backpack') 
 if uo.Count('finditem') > 0 then
    uo.bandageself()
 end if

это же шедевр...
Code:
if uo.Count(band) > 0 then 
    uo.bandageself()
 end if


тоже неплохой вариант %)


Top
   
 Post subject:
PostPosted: 2006-03-22 11:55:51 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
Это самый простой... А твой так вообще работать не будет;)


Top
   
 Post subject:
PostPosted: 2006-03-22 12:10:52 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
не звезди. будет всё работать


Top
   
 Post subject:
PostPosted: 2006-03-22 12:13:42 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
Проверь;)))


Top
   
 Post subject:
PostPosted: 2006-03-22 13:24:16 
Offline

Joined: 2006-03-21 18:13:24
Posts: 4
flake wrote:
Проверку на наличие бинтов вставил, а задержка там итак есть - он ждет, пока не увидит нужного сообщения в журнале.

Code:
sub heal()    
VAR X=0
repeat
   if uo.life < 90 and (uo.count(band) > 0) then
   uo.unequip("Rhand")
   while uo.life < uo.str
      uo.exec("bandageself")
      uo.deletejournal()
      while not (X == 60 or uo.injournal("backpack") or uo.injournal ("reach that") or uo.injournal("current state") or uo.injournal("barely") or uo.injournal("mummy") or uo.injournal("target info"))
         wait(100)
         X=X+1
         if uo.injournal("reach that") or uo.injournal("current state") or uo.injournal("target info") then
            wait(1000)
         endif
         if uo.stamina < 65 then
            uo.usetype("0x0F0B") ;drink refresh potion
         endif
      wend
   X=0
   wend
      uo.deletejournal()
      uo.usetype("0x1B7B") ;sheild
      uo.usetype("0x143C") ;sword
   endif
wait(100)
until uo.dead()
end sub


При загрузке выдает: Line 4: Variable undefined - BAND...
Что делать?


Top
   
 Post subject:
PostPosted: 2006-03-22 13:54:27 
Offline
Expert!
User avatar

Joined: 2006-02-07 08:51:40
Posts: 1348
Location: г. Старый Оскол
Maryssa wrote:
flake wrote:
Проверку на наличие бинтов вставил, а задержка там итак есть - он ждет, пока не увидит нужного сообщения в журнале.

Code:
sub heal()    
VAR X=0
repeat
   if uo.life < 90 and (uo.count(band) > 0) then
   uo.unequip("Rhand")
   while uo.life < uo.str
      uo.exec("bandageself")
      uo.deletejournal()
      while not (X == 60 or uo.injournal("backpack") or uo.injournal ("reach that") or uo.injournal("current state") or uo.injournal("barely") or uo.injournal("mummy") or uo.injournal("target info"))
         wait(100)
         X=X+1
         if uo.injournal("reach that") or uo.injournal("current state") or uo.injournal("target info") then
            wait(1000)
         endif
         if uo.stamina < 65 then
            uo.usetype("0x0F0B") ;drink refresh potion
         endif
      wend
   X=0
   wend
      uo.deletejournal()
      uo.usetype("0x1B7B") ;sheild
      uo.usetype("0x143C") ;sword
   endif
wait(100)
until uo.dead()
end sub


При загрузке выдает: Line 4: Variable undefined - BAND...
Что делать?



Вставь тип бинтов:

Code:
sub heal()    
VAR X=0
VAR band=0x0E21 # Тип бинтов на ДРВ
repeat
   if uo.life < 90 and (uo.count(band) > 0) then
   uo.unequip("Rhand")
   while uo.life < uo.str
      uo.exec("bandageself")
      uo.deletejournal()
      while not (X == 60 or uo.injournal("backpack") or uo.injournal ("reach that") or uo.injournal("current state") or uo.injournal("barely") or uo.injournal("mummy") or uo.injournal("target info"))
         wait(100)
         X=X+1
         if uo.injournal("reach that") or uo.injournal("current state") or uo.injournal("target info") then
            wait(1000)
         endif
         if uo.stamina < 65 then
            uo.usetype("0x0F0B") ;drink refresh potion
         endif
      wend
   X=0
   wend
      uo.deletejournal()
      uo.usetype("0x1B7B") ;sheild
      uo.usetype("0x143C") ;sword
   endif
wait(100)
until uo.dead()
end sub


Если на ДРВ то 0x0E21


Top
   
 Post subject:
PostPosted: 2006-03-22 14:00:43 
Offline

Joined: 2005-08-19 16:12:23
Posts: 182
You Must Die wrote:
не звезди. будет всё работать

Небудит, каунт работает с типом и цветом, а не с объектом. Вот гетквантити с обьектом.
Зы: нашел с кем спорить :)


Top
   
 Post subject:
PostPosted: 2006-03-22 14:32:55 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
SLAK wrote:
You Must Die wrote:
не звезди. будет всё работать

Небудит, каунт работает с типом и цветом, а не с объектом. Вот гетквантити с обьектом.
Зы: нашел с кем спорить :)


а мы че ищем мля?
Code:
band = ' Type of bandages' 
-не лезь не в свои дела, и тести прежде чем высказываться


2ToGrin - тебе как, видео записать и отослать? -Проверено. Работает, проверяй теперь у себя сам, лол мля


Top
   
 Post subject:
PostPosted: 2006-03-22 15:49:04 
Offline

Joined: 2005-08-19 16:12:23
Posts: 182
You Must Die wrote:
Code:
 uo.FindType(band,-1,'backpack')
 if uo.Count('finditem') > 0 then
    uo.bandageself()
 end if

Здеся
uo.count('finditem') - и есть ошибка, ты загнал значения объекта, а не типа!!!
ЗЫ: проспись :D


Top
   
 Post subject:
PostPosted: 2006-03-22 15:52:36 
Offline
Expert!
User avatar

Joined: 2006-02-07 08:51:40
Posts: 1348
Location: г. Старый Оскол
SLAK wrote:
You Must Die wrote:
Code:
 uo.FindType(band,-1,'backpack')
 if uo.Count('finditem') > 0 then
    uo.bandageself()
 end if

Здеся
uo.count('finditem') - и есть ошибка, ты загнал значения объекта, а не типа!!!
ЗЫ: проспись :D


Типы, объекты... не буровьте, вот, и все работает:

Code:
uo.FindType(band,-1,'backpack')
 if UO.GetQuantity('finditem') > 0 then
    uo.bandageself()
 end if


Top
   
 Post subject:
PostPosted: 2006-03-22 16:19:27 
Offline

Joined: 2006-03-21 18:13:24
Posts: 4
Спасибо, вроде все работает так как и я хотела


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

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited