targetnext "filtering"
Moderators: Murderator+, Murderator
targetnext "filtering"
hi guys!
im looking for a script that do this:
when i press nexttarget, IF the target appointed is "Bob" or "Tiny",
it ignore that guys, and go for nexttarget avaiable!
something like that:
sub targetfilter()
uo.press (123) ; target next key
" IGNORE Bob and Tiny and keep going! "
end if
end sub
:/
any idea ?
im looking for a script that do this:
when i press nexttarget, IF the target appointed is "Bob" or "Tiny",
it ignore that guys, and go for nexttarget avaiable!
something like that:
sub targetfilter()
uo.press (123) ; target next key
" IGNORE Bob and Tiny and keep going! "
end if
end sub
:/
any idea ?
Dunno if UO.Ignore has any influence on targetnext but you can try it.
Just set :
Just set :
Code: Select all
if (UO.GetName('lasttarget')=='Timmy') then
UO.Ignore('lasttarget')
end if
......
......
UO.IgnoreReset() ## Dont forget this line at the end
end sub
humm
thank you man, it may work, but i dont get the full idea..
how i can put to more than one guy to be ignored?
help me out with the full code looks:
sub targetfilter()
uo.press (123) ; target next key
if (UO.GetName('lasttarget')=='Timmy' or 'Doug' or 'Duckhead') then
UO.Ignore('lasttarget') then
uo.press (123) ; target next key
( AND IF IT GET DOUG AGAIN, IT WILL IGNORE AGAIN?)
end if
UO.IgnoreReset()
end sub
help me out, im lost =O
how i can put to more than one guy to be ignored?
help me out with the full code looks:
sub targetfilter()
uo.press (123) ; target next key
if (UO.GetName('lasttarget')=='Timmy' or 'Doug' or 'Duckhead') then
UO.Ignore('lasttarget') then
uo.press (123) ; target next key
( AND IF IT GET DOUG AGAIN, IT WILL IGNORE AGAIN?)
end if
UO.IgnoreReset()
end sub
help me out, im lost =O
Better make it through recursy:
Code: Select all
sub IgnoreLast(Name) # Functions looks if last target had a name=Name and ignores it then.
if (UO.GetName('lasttarget')==Name) then
UO.Ignore('lasttarget')
return 1 # Return 1 if we ignored someone
end if
return 0
end sub
sub targetfilter()
var IgCnt; //Ignore count
uo.press (123) ; target next key
IgCnt=IgCnt+IgnoreLast('Timmy') # Counting ignored people
IgCnt=IgCnt+IgnoreLast('Doug') # Counting ignored people
IgCnt=IgCnt+IgnoreLast('Duckhead') # Counting ignored people
if (IgCnt>0) then ## Means that we ignored someone
UO.exec('exec targetfilter') ## Running this function again without deleting ignore list
return
end if
UO.IgnoreReset() ## If target is locked than delete ignorelist, why do we need it if we've found a target?
end sub
:D
all right,
i changed, but it seems to dont work,
the character name of my friend is "Derrubadinha"
need i to change
sub IgnoreLast(Name) # Functions looks if last target had a name=Name and ignores it then.
if (UO.GetName('lasttarget')==Name) then
to
sub IgnoreLast(Derrubadinha) # Functions looks if last target had a name=Name and ignores it then.
if (UO.GetName('lasttarget')==Derrubadinha) then
?
i've tried both ways and it just seens to dont work.
the target names go changing.. but Derrubadinha keeps
one of them!
i changed, but it seems to dont work,
the character name of my friend is "Derrubadinha"
need i to change
sub IgnoreLast(Name) # Functions looks if last target had a name=Name and ignores it then.
if (UO.GetName('lasttarget')==Name) then
to
sub IgnoreLast(Derrubadinha) # Functions looks if last target had a name=Name and ignores it then.
if (UO.GetName('lasttarget')==Derrubadinha) then
?
i've tried both ways and it just seens to dont work.
the target names go changing.. but Derrubadinha keeps
one of them!
No, the only thing you have to change is here:
Add as much people as you want there wit ha 1 line for 1 guy.
Nothing more to change.
Code: Select all
IgCnt=IgCnt+IgnoreLast('Timmy') # Counting ignored people
IgCnt=IgCnt+IgnoreLast('Doug') # Counting ignored people
IgCnt=IgCnt+IgnoreLast('Duckhead') # Counting ignored people
Add as much people as you want there wit ha 1 line for 1 guy.
Nothing more to change.
hum
i tried it before make the question,
dont works man, liek in the first example,
i put "Derrubadinha" in
IgCnt=IgCnt+IgnoreLast('Derrubadinha') # Counting ignored people
but he keeps appearing like a normal target!
have ya tested it?
thank you very much
dont works man, liek in the first example,
i put "Derrubadinha" in
IgCnt=IgCnt+IgnoreLast('Derrubadinha') # Counting ignored people
but he keeps appearing like a normal target!
have ya tested it?

thank you very much