Page 1 of 2

спаринг+хил 2 чаров !

Posted: 2007-09-25 18:40:10
by MeLFiS
скрипт таков он деретса с партнером када мало хп отходит на 1 клетку и хилитса када отхилился подходит и дальше деретса можете помоч мне нужно убрать из етого скрипта отходилку плиз и все !

Code: Select all

sub WarTraining() 
var x = uo.getX()
var y = uo.getY()
var tx, ty
uo.addObject('opponent')
while uo.targeting()
wait(200)
wend
uo.addObject('bandages')
while uo.targeting()
wait(200)
wend
if uo.getX()-uo.getX('opponent') > 1 || uo.getX('opponent')-uo.getX() > 1 || uo.getY()-uo.getY('opponent') > 1 || uo.getY('opponent')-uo.getY() > 1 then
uo.print('Персонажи должны стоять рядом!')
return
endif
if uo.getX() > uo.getX('opponent') then
tx = x+1
ty = y
else
if uo.getX('opponent') > uo.getX() then
tx = x-1
ty = y
else
if uo.getY() > uo.getY('opponent') then
tx = x
ty = y+1
else
if uo.getY('opponent') > uo.getY() then
tx = x
ty = y-1
else
uo.print('Вы должны быть на расстоянии!!')
return
endif
endif
endif
endif
uo.warmode(true)
uo.attack('opponent')
repeat
if uo.getHP() < uo.getMaxHP()/4 then
Walk(tx,ty)
uo.warmode(false)
repeat
uo.waittargetobject('self')
uo.usetype(uo.getGraphic('bandages'))
wait(350)
until uo.getHP() == uo.getMaxHP()
Walk(x,y)
uo.warmode(true)
uo.attack('opponent')
endif
if uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then
Walk(tx,ty)
uo.warmode(false)
repeat
uo.waittargetobject('opponent')
uo.usetype(uo.getGraphic('bandages'))
wait(350)
until uo.getHP('opponent') == uo.getMaxHP('opponent')
Walk(x,y)
uo.warmode(true)
uo.attack('opponent')
endif
wait(700)
until uo.dead()
endsub

sub Walk(x,y)
go:
while not uo.getX() == x || not uo.getY() == y
if not uo.getX() == x then
if uo.getX() > x then
uo.press(36)
else
uo.press(34)
endif
endif
if not uo.getY() == y && uo.getX() == x then
if uo.getY() > y then
uo.press(33)
else
uo.press(35)
endif
endif
checklag()
wend
checklag()
if not uo.getX() == x || not uo.getY() == y then
goto go
endif
endsub

sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
while uo.injournal('backpack')
uo.setJournalLine(uo.Injournal('backpack')-1,'is Empty!')
wend
end sub

Posted: 2007-09-25 20:08:53
by Scripts Writer

Code: Select all

sub WarTraining() 

uo.addObject('opponent')
while uo.targeting()
wait(200)
wend
uo.addObject('bandages')
while uo.targeting()
wait(200)
wend

uo.warmode(true)
uo.attack('opponent')
repeat
 if uo.getHP() < uo.getMaxHP()/4 then
  uo.warmode(false)
   repeat
     uo.waittargetobject('self') 
     uo.usetype(uo.getGraphic('bandages')) 
     wait(350)
   until uo.getHP() == uo.getMaxHP()
   uo.warmode(true)
   uo.attack('opponent')
 endif
 if uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then
  uo.warmode(false)
  repeat
   uo.waittargetobject('opponent')
   uo.usetype(uo.getGraphic('bandages'))
   wait(350)
  until uo.getHP('opponent') == uo.getMaxHP('opponent')
  uo.warmode(true)
  uo.attack('opponent')
 endif
 wait(700)
until uo.dead()
endsub

sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
while uo.injournal('backpack')
uo.setJournalLine(uo.Injournal('backpack')-1,'is Empty!')
wend
end sub

Posted: 2007-09-25 22:07:00
by MeLFiS
спс большое !

Posted: 2007-09-28 17:14:51
by pika
памагите пожалуйсто - вот я наконецто нашол то что мне надоо
скриптик идеальный и работает
вото токо можете написать пожалуйсто как чтобы когда первый (мой чар) после себяизлечения опять одевал то что у него было а это щит и оружие - помогите пожалуйсто!!

Code: Select all

sub WarTraining() 
var x = uo.getX()
var y = uo.getY()
var tx, ty
uo.addObject('opponent')
while uo.targeting()
wait(200)
wend
uo.addObject('bandages')
while uo.targeting()
wait(200)
wend
if uo.getX()-uo.getX('opponent') > 1 || uo.getX('opponent')-uo.getX() > 1 || uo.getY()-uo.getY('opponent') > 1 || uo.getY('opponent')-uo.getY() > 1 then
uo.print('Персонажи должны стоять рядом!')
return
endif
if uo.getX() > uo.getX('opponent') then
tx = x+1
ty = y
else
if uo.getX('opponent') > uo.getX() then
tx = x-1
ty = y
else
if uo.getY() > uo.getY('opponent') then
tx = x
ty = y+1
else
if uo.getY('opponent') > uo.getY() then
tx = x
ty = y-1
else
uo.print('Вы должны быть на расстоянии!!')
return
endif
endif
endif
endif
uo.warmode(true)
uo.attack('opponent')
repeat
if uo.getHP() < uo.getMaxHP()/4 then
Walk(tx,ty)
uo.warmode(false)
repeat
uo.waittargetobject('self')
uo.usetype(uo.getGraphic('bandages'))
wait(350)
until uo.getHP() == uo.getMaxHP()
Walk(x,y)
uo.warmode(true)
uo.attack('opponent')
endif
if uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then
Walk(tx,ty)
uo.warmode(false)
repeat
uo.waittargetobject('opponent')
uo.usetype(uo.getGraphic('bandages'))
wait(350)
until uo.getHP('opponent') == uo.getMaxHP('opponent')
Walk(x,y)
uo.warmode(true)
uo.attack('opponent')
endif
wait(700)
until uo.dead()
endsub

sub Walk(x,y)
go:
while not uo.getX() == x || not uo.getY() == y
if not uo.getX() == x then
if uo.getX() > x then
uo.press(36)
else
uo.press(34)
endif
endif
if not uo.getY() == y && uo.getX() == x then
if uo.getY() > y then
uo.press(33)
else
uo.press(35)
endif
endif
checklag()
wend
checklag()
if not uo.getX() == x || not uo.getY() == y then
goto go
endif
endsub

sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
while uo.injournal('backpack')
uo.setJournalLine(uo.Injournal('backpack')-1,'is Empty!')
wend
end sub

Posted: 2007-09-28 17:17:10
by Scripts Writer

Code: Select all

sub WarTraining() 
#
var shield='input type of your shield'
var weapon='input type of your weapon'
#
var x = uo.getX()
var y = uo.getY()
var tx, ty
uo.addObject('opponent')
while uo.targeting()
wait(200)
wend
uo.addObject('bandages')
while uo.targeting()
wait(200)
wend
if uo.getX()-uo.getX('opponent') > 1 || uo.getX('opponent')-uo.getX() > 1 || uo.getY()-uo.getY('opponent') > 1 || uo.getY('opponent')-uo.getY() > 1 then
uo.print('Персонажи должны стоять рядом!')
return
endif
if uo.getX() > uo.getX('opponent') then
tx = x+1
ty = y
else
if uo.getX('opponent') > uo.getX() then
tx = x-1
ty = y
else
if uo.getY() > uo.getY('opponent') then
tx = x
ty = y+1
else
if uo.getY('opponent') > uo.getY() then
tx = x
ty = y-1
else
uo.print('Вы должны быть на расстоянии!!')
return
endif
endif
endif
endif
uo.warmode(true)
uo.attack('opponent')
repeat
if uo.getHP() < uo.getMaxHP()/4 then
Walk(tx,ty)
uo.warmode(false)
repeat
uo.waittargetobject('self')
uo.usetype(uo.getGraphic('bandages'))
wait(350)
until uo.getHP() == uo.getMaxHP()
wait(250)
uo.UseObject(shield)
wait(500)
uo.UseObject(weapon)
wait(500)
Walk(x,y)
uo.warmode(true)
uo.attack('opponent')
endif
if uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then
Walk(tx,ty)
uo.warmode(false)
repeat
uo.waittargetobject('opponent')
uo.usetype(uo.getGraphic('bandages'))
wait(350)
until uo.getHP('opponent') == uo.getMaxHP('opponent')
Walk(x,y)
uo.warmode(true)
uo.attack('opponent')
endif
wait(700)
until uo.dead()
endsub

sub Walk(x,y)
go:
while not uo.getX() == x || not uo.getY() == y
if not uo.getX() == x then
if uo.getX() > x then
uo.press(36)
else
uo.press(34)
endif
endif
if not uo.getY() == y && uo.getX() == x then
if uo.getY() > y then
uo.press(33)
else
uo.press(35)
endif
endif
checklag()
wend
checklag()
if not uo.getX() == x || not uo.getY() == y then
goto go
endif
endsub

sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
while uo.injournal('backpack')
uo.setJournalLine(uo.Injournal('backpack')-1,'is Empty!')
wend
end sub

Posted: 2007-09-28 21:01:08
by pika
scripts writer спаасибо щ) вот токо он не одевает после таво как вылечит себя и другого чара!! тоесть щит и оружие не одевает щ((
можеш пожалуйсто если время будет посмотреть что не так ш(
может луче поставить чтоб при первом запуске оружие и щит метил? спасибо

Posted: 2007-09-28 21:07:07
by Scripts Writer
Ошибся, вписывай ID в переменные

Posted: 2007-09-28 22:35:29
by pika
SCRIPTS WRITER работает!! сэнк тебе огромнейший я так давно это искал
вот есть вопрос еще
вот когда я лечу себя и другого чара - очень быстро он лечит
скажи это же можно подругулировать?

Code: Select all

uo.waittargetobject('self') 
uo.usetype(uo.getGraphic('bandages'))
wait(350)



это в wait поменьше ставить надо чтоб не так быстро лечил? спасибо
спасибо

Posted: 2007-09-28 22:36:05
by pika
это вощ не обязательно просто спросил ы)

Posted: 2007-09-29 09:42:40
by Scripts Writer
Экспериментируй, а потом если не получится спрашивай. На ошибках учатся

Posted: 2007-09-29 13:53:55
by pika
Scripts Writer всё работает )
токо я не могу понять или найти - вот чтобы мой первый чар
при отходе лечил себя и второго чара и шол в бой
а то тут както - он бёт второго чара - отходит лечит его - идёт опять бить его (себя не лечит) а потом уже опять отходит и себя лечит
я так много раз умерял изза этого (
е мог бы ты помочь пожалуйсто чтоб он при отходе лечил себя и второго чара
а то он второго полечит - и идёт руками бить его
потом отходит лечит себя и одевает щит и оружие
вобщем помоги чтоб он лечил сразу при первом отходе и себя и второго чара пожалуйсто
спасибо

Posted: 2007-09-29 14:01:51
by Scripts Writer
Пробуй

Code: Select all

sub WarTraining() 
#
var shield='input type of your shield'
var weapon='input type of your weapon'
#
var x = uo.getX()
var y = uo.getY()
var tx, ty

uo.addObject('opponent')
while uo.targeting()
wait(200)
wend

uo.addObject('bandages')
while uo.targeting()
wait(200)
wend

if uo.getX()-uo.getX('opponent') > 1 || uo.getX('opponent')-uo.getX() > 1 || uo.getY()-uo.getY('opponent') > 1 || uo.getY('opponent')-uo.getY() > 1 then
  uo.print('Персонажи должны стоять рядом!')
  return
endif

if uo.getX() > uo.getX('opponent') then
  tx = x+1
  ty = y
else
  if uo.getX('opponent') > uo.getX() then
    tx = x-1
    ty = y
  else
    if uo.getY() > uo.getY('opponent') then
      tx = x
      ty = y+1
    else
      if uo.getY('opponent') > uo.getY() then
        tx = x
        ty = y-1
      else 
        uo.print('Вы должны быть на расстоянии!!')
        return
      endif
    endif
  endif
endif

uo.warmode(true)
uo.attack('opponent')
repeat
  if uo.getHP() < uo.getMaxHP()/4 || uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then 
    Walk(tx,ty)
    uo.warmode(false)
    repeat
      uo.waittargetobject('self')
      uo.usetype(uo.getGraphic('bandages'))
      wait(350)
    until uo.getHP() == uo.getMaxHP()
    repeat
      uo.waittargetobject('opponent')
      uo.usetype(uo.getGraphic('bandages'))
      wait(350)
    until uo.getHP('opponent') == uo.getMaxHP('opponent')
    wait(250)
    uo.UseObject(shield) 
    wait(500)
    uo.UseObject(weapon)
    wait(500)
    Walk(x,y)
    uo.warmode(true)
    uo.attack('opponent')
  endif
  wait(700)
until uo.dead()
endsub

sub Walk(x,y)
go:
while not uo.getX() == x || not uo.getY() == y
if not uo.getX() == x then
if uo.getX() > x then
uo.press(36)
else
uo.press(34)
endif
endif
if not uo.getY() == y && uo.getX() == x then
if uo.getY() > y then
uo.press(33)
else
uo.press(35)
endif
endif
checklag()
wend
checklag()
if not uo.getX() == x || not uo.getY() == y then
goto go
endif
endsub

sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
while uo.injournal('backpack')
uo.setJournalLine(uo.Injournal('backpack')-1,'is Empty!')
wend
end sub

Posted: 2007-09-30 12:20:36
by pika
Script Writer всёё точно работает!! огромнейшее спасибо тебе -
теперь он отходит лечит себя и сразу второго чара и одевает щит и опять в драку
огромнейше тебе спасибо!!

Posted: 2007-09-30 16:55:28
by No Exit
[quote="Scripts Writer"][/quote]В это скрипт кроме типов оружия и щита еще че надо вписать?

Posted: 2007-10-01 00:16:03
by -=JoKeR=-
Больше ничего ненада вписывать.

Posted: 2007-10-01 00:21:28
by No Exit
В упор ставлю чаров он пишет вы должны быть рядом и обрубается,в чем проблема?

Re: спаринг+хил 2 чаров !

Posted: 2011-02-28 16:01:54
by Kaxu
sub WarTraining()

uo.addObject('opponent')
while uo.targeting()
wait(200)
wend
uo.addObject('bandages')
while uo.targeting()
wait(200)
wend

uo.warmode(true)
uo.attack('opponent')
repeat
if uo.getHP() < uo.getMaxHP()/4 then
uo.warmode(false)
repeat
uo.waittargetobject('self')
uo.usetype(uo.getGraphic('bandages'))
wait(350)
until uo.getHP() == uo.getMaxHP()
uo.warmode(true)
uo.attack('opponent')
endif
if uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then
uo.warmode(false)
repeat
uo.waittargetobject('opponent')
uo.usetype(uo.getGraphic('bandages'))
wait(350)
until uo.getHP('opponent') == uo.getMaxHP('opponent')
uo.warmode(true)
uo.attack('opponent')
endif
wait(700)
until uo.dead()
endsub

sub CheckLag()
if uo.Waiting()>0 then
uo.Exec('canceltarget')
end if
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
while uo.injournal('backpack')
uo.setJournalLine(uo.Injournal('backpack')-1,'is Empty!')
wend
end sub

После того как подлечит не хочет одевать последние деваисы( может кто помочь?

Re: спаринг+хил 2 чаров !

Posted: 2011-11-26 09:38:46
by Gromiz
направьте на путь истинный,

кусок кода

Code: Select all

if uo.getHP() < uo.getMaxHP()/4 || uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then 
    Walk(tx,ty)
    uo.warmode(false)
    repeat
      uo.waittargetobject('self')
      uo.usetype(uo.getGraphic('bandages'))
      wait(350)
    until uo.getHP() == uo.getMaxHP() <\\--------------|
    repeat
      uo.waittargetobject('opponent')
      uo.usetype(uo.getGraphic('bandages'))
      wait(350)
    until uo.getHP('opponent') == uo.getMaxHP('opponent') <\\--------------|
    wait(250)
    uo.UseObject(shield)
    wait(500)
    uo.UseObject(weapon)
    wait(500)
    Walk(x,y)
    uo.warmode(true)
    uo.attack('opponent')
  endif


выдержка из кода основная
until uo.getHP() == uo.getMaxHP()
until uo.getHP('opponent') == uo.getMaxHP('opponent')


так вот, при статусе хп < нужного чар отходит,
а при статусе хп = хп макс подходит.

никак не удается сделать, чтобы при статусе хп > 148 чар подходил

вариант :

Code: Select all

until uo.getHP() >148
until uo.getHP('opponent') >148

не работает или оно как-то по-другому записывается?

Re: спаринг+хил 2 чаров !

Posted: 2011-11-26 13:49:35
by Mirage
if uo.Gethp() < 100 then

У меня в другом скрипте работает - возможно дело в пробеле :)
А чем не устраивает стандартная запись?

Re: спаринг+хил 2 чаров !

Posted: 2011-11-26 18:13:55
by Gromiz
пробелы тоже пробовал, не работает.
есть возможность увеличения хп от максимума, но скрипт все равно ждет пока придет в равное отношение с установленным параметром STR, а приход в стандартное положение время занимает.
в принципе не критично. так что парится не будем.