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

Anything and all.

Moderators: Murderator+, Murderator

MeLFiS
Posts: 80
Joined: 2007-06-08 11:44:35

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

Post 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
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post 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
MeLFiS
Posts: 80
Joined: 2007-06-08 11:44:35

Post by MeLFiS »

спс большое !
pika
Posts: 118
Joined: 2007-06-11 22:57:49

Post 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
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post 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
pika
Posts: 118
Joined: 2007-06-11 22:57:49

Post by pika »

scripts writer спаасибо щ) вот токо он не одевает после таво как вылечит себя и другого чара!! тоесть щит и оружие не одевает щ((
можеш пожалуйсто если время будет посмотреть что не так ш(
может луче поставить чтоб при первом запуске оружие и щит метил? спасибо
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Ошибся, вписывай ID в переменные
pika
Posts: 118
Joined: 2007-06-11 22:57:49

Post by pika »

SCRIPTS WRITER работает!! сэнк тебе огромнейший я так давно это искал
вот есть вопрос еще
вот когда я лечу себя и другого чара - очень быстро он лечит
скажи это же можно подругулировать?

Code: Select all

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

это в wait поменьше ставить надо чтоб не так быстро лечил? спасибо
спасибо
pika
Posts: 118
Joined: 2007-06-11 22:57:49

Post by pika »

это вощ не обязательно просто спросил ы)
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Экспериментируй, а потом если не получится спрашивай. На ошибках учатся
pika
Posts: 118
Joined: 2007-06-11 22:57:49

Post by pika »

Scripts Writer всё работает )
токо я не могу понять или найти - вот чтобы мой первый чар
при отходе лечил себя и второго чара и шол в бой
а то тут както - он бёт второго чара - отходит лечит его - идёт опять бить его (себя не лечит) а потом уже опять отходит и себя лечит
я так много раз умерял изза этого (
е мог бы ты помочь пожалуйсто чтоб он при отходе лечил себя и второго чара
а то он второго полечит - и идёт руками бить его
потом отходит лечит себя и одевает щит и оружие
вобщем помоги чтоб он лечил сразу при первом отходе и себя и второго чара пожалуйсто
спасибо
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post 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
pika
Posts: 118
Joined: 2007-06-11 22:57:49

Post by pika »

Script Writer всёё точно работает!! огромнейшее спасибо тебе -
теперь он отходит лечит себя и сразу второго чара и одевает щит и опять в драку
огромнейше тебе спасибо!!
No Exit
Posts: 11
Joined: 2007-09-27 10:08:30

Post by No Exit »

[quote="Scripts Writer"][/quote]В это скрипт кроме типов оружия и щита еще че надо вписать?
-=JoKeR=-
Posts: 173
Joined: 2007-05-26 00:00:56
Location: Украина, Ode$$a:[X-TEAM Group]
Contact:

Post by -=JoKeR=- »

Больше ничего ненада вписывать.
No Exit
Posts: 11
Joined: 2007-09-27 10:08:30

Post by No Exit »

В упор ставлю чаров он пишет вы должны быть рядом и обрубается,в чем проблема?
Kaxu
Posts: 8
Joined: 2010-10-18 20:56:00

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

Post 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

После того как подлечит не хочет одевать последние деваисы( может кто помочь?
Gromiz
Posts: 444
Joined: 2005-02-08 18:39:50
Location: Moscow

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

Post 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
не работает или оно как-то по-другому записывается?
Mirage
Posts: 2802
Joined: 2009-05-28 09:58:28
Location: Иваново
Contact:

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

Post by Mirage »

if uo.Gethp() < 100 then

У меня в другом скрипте работает - возможно дело в пробеле :)
А чем не устраивает стандартная запись?
Gromiz
Posts: 444
Joined: 2005-02-08 18:39:50
Location: Moscow

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

Post by Gromiz »

пробелы тоже пробовал, не работает.
есть возможность увеличения хп от максимума, но скрипт все равно ждет пока придет в равное отношение с установленным параметром STR, а приход в стандартное положение время занимает.
в принципе не критично. так что парится не будем.
Post Reply