Yoko
http://forum.yoko.com.ua/

Хочется немного исправить скриптик...
http://forum.yoko.com.ua/viewtopic.php?f=20&t=7073
Page 1 of 1

Author:  Maryssa [ 2006-03-21 19:27:34 ]
Post subject:  Хочется немного исправить скриптик...

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


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

Author:  Scripts Writer [ 2006-03-21 20:40:23 ]
Post subject: 

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

Author:  Grin [ 2006-03-21 21:05:44 ]
Post subject: 

ну Троцкий извас скриптер... Может ты забудишь про это?;)
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

Author:  Maryssa [ 2006-03-21 22:14:05 ]
Post subject: 

Из меня то уж скриптер точно никакой :)) Так что дайте мне готовенький скриптик уже, а то я щас налеплю что-то плохое чувствую ;(

Author:  flake [ 2006-03-22 10:20:59 ]
Post subject: 

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

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

Author:  Scripts Writer [ 2006-03-22 11:52:44 ]
Post subject: 

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


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

Author:  Grin [ 2006-03-22 11:55:51 ]
Post subject: 

Это самый простой... А твой так вообще работать не будет;)

Author:  Scripts Writer [ 2006-03-22 12:10:52 ]
Post subject: 

не звезди. будет всё работать

Author:  Grin [ 2006-03-22 12:13:42 ]
Post subject: 

Проверь;)))

Author:  Maryssa [ 2006-03-22 13:24:16 ]
Post subject: 

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...
Что делать?

Author:  Kynep [ 2006-03-22 13:54:27 ]
Post subject: 

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

Author:  SLAK [ 2006-03-22 14:00:43 ]
Post subject: 

You Must Die wrote:
не звезди. будет всё работать

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

Author:  Scripts Writer [ 2006-03-22 14:32:55 ]
Post subject: 

SLAK wrote:
You Must Die wrote:
не звезди. будет всё работать

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


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


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

Author:  SLAK [ 2006-03-22 15:49:04 ]
Post subject: 

You Must Die wrote:
Code:
 uo.FindType(band,-1,'backpack')
 if uo.Count('finditem') > 0 then
    uo.bandageself()
 end if

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

Author:  Kynep [ 2006-03-22 15:52:36 ]
Post subject: 

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

Author:  Maryssa [ 2006-03-22 16:19:27 ]
Post subject: 

Спасибо, вроде все работает так как и я хотела

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/