Yoko

All sides of Injection
It is currently 2025-12-27 20:44:29

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2008-03-25 15:47:32 
Offline

Joined: 2008-01-26 22:35:57
Posts: 59
есть скрипт для куклы для спарринга ... (за основу взять скрипт Destruction`a)
который выбирает цель хиллера , который стоит через тайл от куклы , и пытается ее атаковать пока ее бьют , но к сожалению почему то через какое то время кукла начинает бить качающегося чара ...

вот код

Code:
sub WarTraining()
uo.setarm('current armor')
var x = uo.getX()
var y = uo.getY()
var time = uo.timer(), tx, ty
uo.addObject('opponent')
while uo.targeting()
  wait(200)
wend
uo.addObject('shield')
while uo.targeting()
  wait(200)
wend
uo.addObject('target')
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('Ia?niia?e aie?iu noiyou ?yaii!')
  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('Au aie?iu auou ia ?annoiyiee!!')
    return
      endif
    endif
  endif
endif
uo.useobject('shield')
uo.warmode(true)
uo.attack('target')


repeat
  if uo.getHP() < uo.getMaxHP()/2 then
 
    uo.disarm()
    Walk(tx,ty)
    uo.warmode(false)
   uo.attack('target')
   
    while not uo.getHP()==uo.getMaxHP()
     uo.deletejournal()
      uo.waittargetobject('self')
      uo.useobject('bandages')
     while not uo.injournal('put') and not uo.injournal('wanna')
      wait(100)
     wend
    wend
 
    uo.arm('current armor')
    uo.useobject('shield')
    uo.warmode(true)
   uo.attack('target')
   wait (1000)
   uo.useobject('shield')
    uo.warmode(true)
   uo.attack('target')
   Walk(x,y)
  endif


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)
      wait(100)
      uo.press(33)
    else
      uo.press(35)
      wait(100)
      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



Last edited by GambiT on 2008-03-26 16:18:20, edited 2 times in total.

Top
   
 Post subject:
PostPosted: 2008-03-25 16:47:40 
Offline

Joined: 2006-02-09 11:37:25
Posts: 94
еще 10 тем создай.... :( ппц
сорри за флуд


Top
   
 Post subject:
PostPosted: 2008-03-26 03:48:48 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
Все бояться связываться с моим скриптом и следовательно скриптах на его основе :)

Я тоже боюсь.. Стрёмный там код какой-то :)

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2008-03-26 16:15:02 
Offline

Joined: 2008-01-26 22:35:57
Posts: 59
да вроде вполне толковый код ;)

у меня появилась идея что может быть просто через какое то время если не наносить удар по цели то атака останавливается ? ... хотя там вроде после каждого хила все равно заново атакует ....

з.ы. настоящий программист пишет код так что самому потом стрёмно туда залезать ;)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited