Yoko

All sides of Injection
It is currently 2024-04-20 00:30:04

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Auto Target Скрипт
PostPosted: 2013-09-15 08:37:57 
Offline

Joined: 2013-09-01 15:59:29
Posts: 34
Как сделать так, что бы он ставил не MainTarget, а LastTarget?
Если невозможно, то как сделать, что бы кастовать спеллы на MainTarget?
Code:
sub Ignores()
; Игноры для поиска:
UO.Ignore('self','on')
UO.Ignore('Friend','on')
UO.Ignore('Friend2','on')
UO.Ignore('Friend3','on') ; вместо Friend1, Friend2, Friend3 пишем айди своих друзей и согильдицев.
end sub

sub AutoTarget() ; Авто-таргет на одного чувака. Хорошо для ПК и 1х1.
var a, i
var lastplayernum = 0
var maleplayernum = 0
var femaleplayernum = 0
var allplayernum = 0
var temp = 0
UO.Set('quiet','1')
uo.exec('set finddistance 25')
Ignores()
DIM Chars[2]
Chars[0] = '0x0190' ## - Тип male.
Chars[1] = '0x0191' ## - Тип female.
uo.findtype(Chars[0], '-1', '1')
maleplayernum = uo.findcount()
uo.findtype(Chars[1], '-1', '1')
femaleplayernum = uo.findcount()
allplayernum = maleplayernum + femaleplayernum
for a = 0 to 1 ## - Перебираем типы male/female.
uo.findtype(Chars[a], '-1', '1')
if allplayernum == 1 then
if UO.GetMaxHP('finditem') < 200 then ; проверка на хп, чтобы отсеивало вендоров.
UO.AddObject('MainTarget','finditem')
endif
else
if uo.findcount() > 0 then
temp = uo.findcount()
for i=0 to uo.findcount()
uo.findtype(Chars[a], '-1', '1')
UO.GetStatus('finditem')
if UO.GetMaxHP('finditem') < 200 then
lastplayernum = lastplayernum + 1
if lastplayernum < 5 then
UO.AddObject('AddTarget'+str(lastplayernum), 'finditem')
else
i = temp
endif
if lastplayernum == 1 then
UO.AddObject('MainTarget','finditem')
endif
UO.Ignore('finditem', 'on')
endif
next
endif
endif
next
UO.Set('quiet','0')
UO.Print("MainTarget: "+UO.GetName('MainTarget'))
UO.Click('MainTarget')
UO.IgnoreReset()
end sub

sub ChooseTarget1()
UO.Set('quiet','1')
UO.AddObject('MainTarget','AddTarget1')
UO.Set('quiet','0')
UO.Print("MainTarget: "+UO.GetName('MainTarget'))
UO.Click('MainTarget')
end sub

sub ChooseTarget2()
UO.Set('quiet','1')
UO.AddObject('MainTarget','AddTarget2')
UO.Set('quiet','0')
UO.Print("MainTarget: "+UO.GetName('MainTarget'))
UO.Click('MainTarget')
end sub

sub ChooseTarget3()
UO.Set('quiet','1')
UO.AddObject('MainTarget','AddTarget3')
UO.Set('quiet','0')
UO.Print("MainTarget: "+UO.GetName('MainTarget'))
UO.Click('MainTarget')
end sub

sub ChooseTarget4()
UO.Set('quiet','1')
UO.AddObject('MainTarget','AddTarget4')
UO.Set('quiet','0')
UO.Print("MainTarget: "+UO.GetName('MainTarget'))
UO.Click('MainTarget')
end sub


Top
   
PostPosted: 2013-09-17 17:12:35 
Offline

Joined: 2013-09-01 15:59:29
Posts: 34
UP


Top
   
PostPosted: 2013-09-22 07:59:23 
Offline

Joined: 2013-09-01 15:59:29
Posts: 34
UP


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 15 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited