Page 1 of 1

Скрипт на хилл и отходилку.

Posted: 2010-05-04 13:58:04
by Jekaaa
Доброго времени суток. Поскольку сам криворукий в скриптах а учится поздно :oops: прошу вас. Мне нужен скрипт что бы чар стоял и хилился и в случае если у него хп меньше 60 отходил на таил отхиливался и подходил. И скрипт что бы второй чар стоял и бил первого деггером и что бы как только даггер ломался он брал новый из рюкзака. Заранее благодарен! Облазил форум ничего подобного не нашел. Может что то пропустил если так то ткните носом =)

Re: Скрипт на хилл и отходилку.

Posted: 2010-05-04 14:24:26
by Mirage
Вверху справа
Search - спаринг = Search found 100 matches

Re: Скрипт на хилл и отходилку.

Posted: 2010-05-04 21:17:41
by Jekaaa
Того что надо там нет.

Есть вот такой скрипт но там не работает ни хил ни отходилка (может я че то не так настраиваю но вроде делал все о инструкции)

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

Re: Скрипт на хилл и отходилку.

Posted: 2010-05-05 08:46:16
by Mirage
Попробуй вот так. Ходилка хз работает ли я такую не пробовал.
х1y1 это координаты когда чары бьются
х2y2 это координаты когда чары лечатся.
тип бинтов пропиши.
Но скирпты есть лучше. Видел гдето чтобы брал бинты, мыл их, брал оружие, ел...

Code: Select all

sub WarTraining()
   var x1 = 123
   var y1 = 123
   var x2 = 123
   var y2 = 123

   var bandages='ТИП бинтов'
   uo.addObject('opponent')
   while uo.targeting()
      wait(200)
   wend
   uo.warmode(true)
   uo.attack('opponent')
   repeat
      if uo.getHP() < uo.getMaxHP()/4 then
         Walk(x2,y2)
         uo.warmode(false)
         repeat
            UO.Bandageself()
            wait(3000)
         until uo.getHP() == uo.getMaxHP()
         Walk(x1,y1)
         uo.warmode(true)
         uo.attack('opponent')
      endif
      if uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then
         Walk(x2,y2)
         uo.warmode(false)
         repeat
            uo.waittargetobject('opponent')
            uo.usetype('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
      wait(700)
   wend
   wait(700)
   if not uo.getX() == x || not uo.getY() == y then
      goto go
   endif
endsub

Re: Скрипт на хилл и отходилку.

Posted: 2010-05-05 10:53:08
by Jekaaa
Все сделал, скрипт работает, чар отходит. Только не хилится во время спаринга а ждут пока хп не станет мало и только тогда отходит что бы похилится. Можно сделать так что бы он весь процесс хилился, а если хп мало то отходил. И еще он отходит когда у оппонента мало хп, но отходит он почему то только когда отходит оппонент.

Code: Select all

sub WarTraining()
   var x1 = 1472
   var y1 = 1612
   var x2 = 1470
   var y2 = 1614

   var bandages='0x0E21'
   uo.addObject('opponent')
   while uo.targeting()
      wait(200)
   wend
   uo.warmode(true)
   uo.attack('opponent')
   repeat
      if uo.getHP() < uo.getMaxHP()/4 then
         Walk(x2,y2)
         uo.warmode(false)
         repeat
            UO.Bandageself()
            wait(3000)
         until uo.getHP() == uo.getMaxHP()
         Walk(x1,y1)
         uo.warmode(true)
         uo.attack('opponent')
      endif
      if uo.getHP('opponent') < uo.getMaxHP('opponent')/2 then
         Walk(x2,y2)
         uo.warmode(false)
         repeat
            uo.waittargetobject('opponent')
            uo.usetype('bandages')
            wait(350)
         until uo.getHP('opponent') == uo.getMaxHP('opponent')
         Walk(x1,y1)
         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
      wait(700)
   wend
   wait(700)
   if not uo.getX() == x || not uo.getY() == y then
      goto go
   endif
endsub

Re: Скрипт на хилл и отходилку.

Posted: 2010-05-05 15:32:47
by Mirage
Ну уж это специфика найденного скрипта. Я просто поправил.