Page 1 of 1

Bandage script fails

Posted: 2006-04-22 09:38:34
by JaYz
Hello, Anyone know why i doesnt print in the screen when i fail healing with a bandage?

Always prints succeeded, looks like it isnt loading from the journal.

Thanks.

Code: Select all

sub bandage()
uo.deletejournal ()
uo.exec("bandageself")
if UO.InJournal("failed to heal") then
UO.print ("You failed")
uo.exec("bandageself")
else
UO.print ("succeeded")
endif
repeat
until false
end sub

Posted: 2006-04-22 09:51:59
by Scripts Writer

Code: Select all

sub bandage() 
uo.deletejournal ()
uo.exec("bandageself")
if UO.InJournal("failed to heal") then
UO.print ("You failed")
uo.exec("bandageself")
else
UO.print ("succeeded")
endif
repeat
until false
end sub


there are no pause before healing and printing. Maybe

Code: Select all

sub bandage() 
  uo.deletejournal()
  uo.exec("bandageself")
  wait(3000)
  if uo.InJournal('You put') then
    uo.Print('Succesful')
    wait(100)
  end if
  if uo.InJournal('You fail')
     uo.Print(' You fail ')
     uo.exec("bandageself")
     wait(3000)
  end if
end sub

Posted: 2006-04-22 10:01:42
by JaYz
Error in line 9.

Posted: 2006-04-22 10:02:46
by dmitrykit
JaYz wrote:Error in line 9.

i che s togo? tebe che, dolzhny vydavat' to 4to srazu zoloto domoj nosit' budet? pravj sam, kak tbe nado, i 4tob rabotalo kak ty hocehsh

Posted: 2006-04-22 10:07:13
by JaYz
dmitrykit wrote:
JaYz wrote:Error in line 9.

i che s togo? tebe che, dolzhny vydavat' to 4to srazu zoloto domoj nosit' budet? pravj sam, kak tbe nado, i 4tob rabotalo kak ty hocehsh


???

Posted: 2006-04-22 10:20:34
by flake

Code: Select all

sub bandage() 
  uo.deletejournal()
  uo.exec("bandageself")
  wait(3000)
  if uo.InJournal('You put') then
    uo.Print('Succesful')
    wait(100)
  end if
  if uo.InJournal('You fail') Then
     uo.Print(' You fail ')
     uo.exec("bandageself")       
  end if
end sub


P.S.
dmitrykit, он русского не понимает.

Posted: 2006-04-22 10:54:05
by JaYz
flake wrote:

Code: Select all

sub bandage() 
  uo.deletejournal()
  uo.exec("bandageself")
  wait(3000)
  if uo.InJournal('You put') then
    uo.Print('Succesful')
    wait(100)
  end if
  if uo.InJournal('You fail') Then
     uo.Print(' You fail ')
     uo.exec("bandageself")       
  end if
end sub


P.S.
dmitrykit, он русского не понимает.



Thanks but i need a loop because it must repeat everytime.

Posted: 2006-04-22 11:56:11
by flake

Code: Select all

sub bandage() 
  repeat
    uo.deletejournal()
    uo.exec("bandageself")
      repeat
        wait(50)
      until uo.InJournal('You put') OR uo.InJournal('You fail')
  until uo.dead()
endsub

Posted: 2006-04-22 13:17:45
by JaYz
flake wrote:

Code: Select all

sub bandage() 
  repeat
    uo.deletejournal()
    uo.exec("bandageself")
      repeat
        wait(50)
      until uo.InJournal('You put') OR uo.InJournal('You fail')
  until uo.dead()
endsub


That isnt what i want. I play in a shard with bandage. When i use bandages on my own char i need 15 seconds to end healing process and when i use them on another char 6 seconds. But when i fail healing myself i dont want wait 15 seconds again i want macro try again.

Posted: 2006-04-22 13:35:40
by flake
That's what the macro will do. Once you finish healing or fail, it starts healing again.

Posted: 2006-04-22 15:47:42
by JaYz
flake wrote:That's what the macro will do. Once you finish healing or fail, it starts healing again.


Yeah but where i made the time control?

Posted: 2006-04-22 16:03:44
by flake
Have you tried this macro? Try it, and you will see that it is what you wrote you need.