Page 1 of 1

Хочется немного исправить скриптик...

Posted: 2006-03-21 19:27:34
by Maryssa

Code: Select all

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


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

Posted: 2006-03-21 20:40:23
by Scripts Writer

Code: Select all

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

Posted: 2006-03-21 21:05:44
by Grin
ну Троцкий извас скриптер... Может ты забудишь про это?;)

Code: Select all

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

это же шедевр...

Code: Select all

if uo.Count(band) > 0 then 
    uo.bandageself()
 end if

Posted: 2006-03-21 22:14:05
by Maryssa
Из меня то уж скриптер точно никакой :)) Так что дайте мне готовенький скриптик уже, а то я щас налеплю что-то плохое чувствую ;(

Posted: 2006-03-22 10:20:59
by flake
Проверку на наличие бинтов вставил, а задержка там итак есть - он ждет, пока не увидит нужного сообщения в журнале.

Code: Select all

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

Posted: 2006-03-22 11:52:44
by Scripts Writer
Grin wrote:ну Троцкий извас скриптер... Может ты забудишь про это?;)

Code: Select all

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

это же шедевр...

Code: Select all

if uo.Count(band) > 0 then 
    uo.bandageself()
 end if


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

Posted: 2006-03-22 11:55:51
by Grin
Это самый простой... А твой так вообще работать не будет;)

Posted: 2006-03-22 12:10:52
by Scripts Writer
не звезди. будет всё работать

Posted: 2006-03-22 12:13:42
by Grin
Проверь;)))

Posted: 2006-03-22 13:24:16
by Maryssa
flake wrote:Проверку на наличие бинтов вставил, а задержка там итак есть - он ждет, пока не увидит нужного сообщения в журнале.

Code: Select all

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

Posted: 2006-03-22 13:54:27
by Kynep
Maryssa wrote:
flake wrote:Проверку на наличие бинтов вставил, а задержка там итак есть - он ждет, пока не увидит нужного сообщения в журнале.

Code: Select all

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: Select all

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

Posted: 2006-03-22 14:00:43
by SLAK
You Must Die wrote:не звезди. будет всё работать

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

Posted: 2006-03-22 14:32:55
by Scripts Writer
SLAK wrote:
You Must Die wrote:не звезди. будет всё работать

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


а мы че ищем мля?

Code: Select all

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


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

Posted: 2006-03-22 15:49:04
by SLAK
You Must Die wrote:

Code: Select all

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

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

Posted: 2006-03-22 15:52:36
by Kynep
SLAK wrote:
You Must Die wrote:

Code: Select all

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

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


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

Code: Select all

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

Posted: 2006-03-22 16:19:27
by Maryssa
Спасибо, вроде все работает так как и я хотела