Yoko

All sides of Injection
It is currently 2025-12-10 02:58:30

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Мобокилл
PostPosted: 2011-04-12 14:56:22 
Offline

Joined: 2004-09-08 13:09:13
Posts: 127
Имеется вот такой скрипт. Никак не могу понять как в него вставить массив мобов. Может быть кто-нибудь поможет...
Code:
var MobType,WeaponType,ShieldType,Mob,Distance,Corpse,Amount
; Переменные
WeaponType=UO.GetSerial(UO.ObjAtLayer('Rhand'))
ShieldType=UO.GetSerial(UO.ObjAtLayer('Lhand'))
Distance=15 ; дистанция
Bandages='0x0E21' ; тип бинтов
MobType='0x0003' ; тип моба

sub UOKillerBot()
dim Looting[10]
Looting[0]=4
Looting[1]='0x1450'
Looting[2]='0x1452'
Looting[3]='0x1451'
Looting[4]='0x1453'

UO.Set('finddistance',Distance)
while not UO.Dead()
UO.FindType(MobType,'-1','ground')
if UO.FindCount()>0 then
Mob=UO.GetSerial('finditem')
while UO.GetDistance(Mob)>1
Walker(UO.GetX(Mob),UO.GetY(Mob),1)
wend
UO.Exec('warmode 1')
UO.DeleteJournal()
UO.UseType(WeaponType)
UO.UseType(ShieldType)
wait(100)
UO.WaitTargetType(Mob)
wait(100)
UO.Attack(Mob)
repeat
wait(100)
if UO.GetDistance(Mob)>1 then
Walker(UO.GetX(Mob),UO.GetY(Mob),1)
end if
until UO.InJournal('Body of')
UO.Exec('warmode 0')
wait(100)
; Looting
Corpse=UO.GetSerial('lastcorpse')
UO.UseObject(Corpse)
wait(1000)
for Amount=1 to Looting[0]
while UO.GetQuantity('<'+Looting[i])
UO.MoveItem('<'+Looting[i])
wait(700)
wend
next
while UO.Life<UO.STR-30 and UO.Count(Bandages)
UO.BandageSelf()
wait(3500)
wend
end if
wend
end sub


Top
   
 Post subject: Re: Мобокилл
PostPosted: 2011-04-12 19:12:31 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Code:
while not UO.Dead()
for i =0 to 100
UO.FindType(MobType[i],'-1','ground')
...

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject: Re: Мобокилл
PostPosted: 2011-04-12 19:49:12 
Offline

Joined: 2004-09-08 13:09:13
Posts: 127
а закрывать for где ? :) вот в этом основной вопрос :)


Top
   
 Post subject: Re: Мобокилл
PostPosted: 2011-04-12 20:00:30 
Offline

Joined: 2004-09-08 13:09:13
Posts: 127
Вот посмотри мираж вродибы так ?
Code:
var MobType,WeaponType,ShieldType,Mob,Distance,Corpse,Amount,i,Bandages
; Переменные
Distance=10 ; дистанция
Bandages='0x0E21' ; тип бинтов
MobType='0x0003' ; тип моба

sub UOKillerBot()
WeaponType=UO.GetSerial(UO.ObjAtLayer('Rhand'))
ShieldType=UO.GetSerial(UO.ObjAtLayer('Lhand'))

dim Mobs[10]
Mobs[0]=1
Mobs[1]='0x0003'
Mobs[2]=''
Mobs[3]=''

dim Looting[10]
Looting[0]=1
Looting[1]='0x0EED'
Looting[2]=''
Looting[3]=''
Looting[4]=''

UO.Set('finddistance',Distance)
while not UO.Dead()
for i=1 to Mobs[0]
UO.FindType(Mobs[i],'-1','ground')
if UO.FindCount()>0 then
Mob=UO.GetSerial('finditem')
while UO.GetDistance(Mob)>1
CheckLag()
Walker(UO.GetX(Mob),UO.GetY(Mob),1)
wend
UO.Exec('warmode 1')
UO.DeleteJournal()
CheckLag()
UO.UseObject(WeaponType)
UO.UseObject(ShieldType)
wait(100)
UO.WaitTargetType(Mob)
wait(100)
UO.Attack(Mob)
repeat
wait(100)
if UO.GetDistance(Mob)>1 then
CheckLag()
Walker(UO.GetX(Mob),UO.GetY(Mob),1)
end if
until UO.InJournal('Body of')
UO.Exec('warmode 0')
wait(100)
; Looting
Corpse=UO.GetSerial('lastcorpse')
CheckLag()
UO.UseObject(Corpse)
wait(1000)
for Amount=1 to Looting[0]
while UO.GetQuantity('<'+Looting[Amount])
CheckLag()
UO.MoveItem('<'+Looting[Amount])
wait(700)
wend
next
while UO.Life<UO.STR-20 and UO.Count(Bandages)
CheckLag()
UO.BandageSelf()
wait(3500)
wend
end if
next
wend
end sub

sub CheckLag()
if UO.Waiting()>0 then
UO.Exec('canceltarget')
end if
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(100)
until UO.InJournal('backpack')
end sub

Только вот единственная проблема. Мобов бить - бьет ходить ходит лутает но когда мобы кончаются и появляются снова он их как будето не видит. Из-за чего это может быть ?


Last edited by kuviCk on 2011-04-12 20:33:19, edited 1 time in total.

Top
   
 Post subject: Re: Мобокилл
PostPosted: 2011-04-12 20:04:40 
Offline

Joined: 2004-09-08 13:09:13
Posts: 127
Хотя вроди сам тупанул бью скеллетонов от которых не остается корпса. и нету Body of :roll:


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 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