Yoko

All sides of Injection
It is currently 2025-10-17 03:50:28

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Спаринг
PostPosted: 2009-06-05 10:23:51 
Offline

Joined: 2008-03-16 12:36:48
Posts: 70
Кому не тяжко гляньте. Пишу скрипт на спарринг. Чар должен бить оппонента, и при хп жертвы меньше 50% останавливать бой и лечить его. И так до победного.
Проблема в том что не могу нормально зациклить действие. Чар все время пытается юзать оружие на цель. Вот сам скрипт


Quote:
sub sparing()
while not uo.Dead()
if uo.GetHp('0x0029D60B') > uo.getMaxHP('0x0029D60B')/2 then
atak()
else
hil()
endif
wend
end sub

sub hil()
uo.deletejournal()
repeat
uo.warmode(0)
UO.Usetype("0x0E21")
UO.Exec("waittargetobject 0x0029D60B")
wait(4500)
until uo.injournal('does not need you to heal or cure him')
end sub

sub atak()
uo.warmode(1)
UO.Exec("attack 0x0029D60B")
wait(100)
uo.usetype("0x13FA") # тип оружия
wait(100)
uo.waittargetobject("0x0029D60B")
UO.Exec("attack 0x0029D60B")
end sub


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


Top
   
 Post subject: Re: Спаринг
PostPosted: 2009-06-05 10:33:55 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Alex82 wrote:
Чар все время пытается юзать оружие на цель.

Quote:

sub atak()
uo.warmode(1)
UO.Exec("attack 0x0029D60B")
wait(500)
end sub


Вот так можно.
Я не уверен что инжект умеет определять хиты оппонента.

Скрипты на паринг были тут.


Top
   
 Post subject:
PostPosted: 2009-06-05 11:57:22 
Offline

Joined: 2008-03-16 12:36:48
Posts: 70
Так как ты предложил,чар не возьмет в руки нужное мне оружие. Да и главной проблемы это не решает.


Top
   
 Post subject:
PostPosted: 2009-06-05 13:15:29 
Offline

Joined: 2009-02-14 14:22:37
Posts: 23
Попробуй терминейт сделать.
sub sparing()
while not uo.Dead()
if uo.GetHp('0x0029D60B') > uo.getMaxHP('0x0029D60B')/2 then
atak()
else
uo.exec('terminate atak')
hil()
endif
wend
end sub


Top
   
 Post subject:
PostPosted: 2009-06-05 13:17:43 
Offline

Joined: 2008-03-16 12:36:48
Posts: 70
Все всем кто отписался спасибо.Взял и тупо переделал скрипт на спаринг с лошадью. :D Тема закрыта


Top
   
 Post subject:
PostPosted: 2009-06-05 14:03:42 
Offline

Joined: 2008-03-16 12:36:48
Posts: 70
Вдруг кому понадобится. Скрипт нагло содран с спарринга с лошадью неизвестного автора :roll:


Code:
;перетащите ОБЯЗАТЕЛЬНО полоску с жизньями жертвы!!!!!!!!! 
;Жертве в руки лук без стрел :=)))

var kykla='0x0190' ;тип человека -)
var orygie='0x13B9';тип оружия -)
var bints='0x0E21'; тип бинта -)

sub train()
uo.findtype(kykla,'-1','ground')
while not uo.dead()
uo.findtype(kykla,'-1','ground')
if uo.gethp('finditem')>20 then
  atack()
 else
  heal()
endif
uo.warmode(0)
wait(100)
wend
endsub

sub atack()
uo.usetype(orygie)
uo.waittargetself()
wait(500)
uo.warmode(1)
uo.ignorereset()
uo.ignore('self')
uo.findtype(kykla,'-1','ground')
uo.attack('finditem')
while uo.gethp('finditem')>20
 uo.findtype(kykla,'-1','ground')
 wait(100)
 if uo.gethp('finditem')<19 then
  uo.warmode(0)
 endif
wend
uo.warmode(0)
endsub

sub heal()
var moy
var BandBL ='0x0E20'
uo.warmode(0)
UO.Disarm()

uo.FindType('0x1008','-1')
moy=uo.GetSerial('finditem')
UO.WaitTargetObject(Moy)
UO.UseType(BandBL)

uo.deletejournal()
uo.findtype(kykla,'-1','ground')
while not uo.injournal("does not need")
 uo.warmode(0)
 CheckLag()
 uo.waittargetobject('finditem')
 uo.usetype(bints)
 wait(4000)
 uo.findtype(kykla,'-1','ground')
 wend
  endsub
 


Sub CheckLag()
    UO.DeleteJournal()
    UO.Click('backpack')
    repeat
       wait(50)
    until UO.InJournal('backpack')
end sub



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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB® Forum Software © phpBB Limited