Yoko

All sides of Injection
It is currently 2025-12-26 08:40:26

All times are UTC+02:00




Post new topic  Reply to topic  [ 13 posts ] 
Author Message
 Post subject: targetnext "filtering"
PostPosted: 2005-05-06 13:15:06 
Offline

Joined: 2005-01-03 07:00:13
Posts: 7
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 ?


Top
   
 Post subject:
PostPosted: 2005-05-06 13:26:19 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
Dunno if UO.Ignore has any influence on targetnext but you can try it.
Just set :
Code:
if (UO.GetName('lasttarget')=='Timmy') then
UO.Ignore('lasttarget')
end if
......
......
UO.IgnoreReset()  ## Dont forget this line at the end
end sub


Top
   
 Post subject: humm
PostPosted: 2005-05-07 01:20:27 
Offline

Joined: 2005-01-03 07:00:13
Posts: 7
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


Top
   
 Post subject:
PostPosted: 2005-05-07 07:11:15 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
Better make it through recursy:
Code:
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


Top
   
 Post subject:
PostPosted: 2005-05-09 00:00:39 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
what do your recursion function do when just no man around?


Top
   
 Post subject:
PostPosted: 2005-05-09 08:48:19 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
The same the nexttarget does when there is no people around i guess...


Top
   
 Post subject: oops
PostPosted: 2005-05-11 11:08:43 
Offline

Joined: 2005-01-03 07:00:13
Posts: 7
man, thank you very much, but when i use, it displays that:


Line 461: Bad operation for this type of variable - IGCNT

:(


Top
   
 Post subject:
PostPosted: 2005-05-11 12:43:28 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
Sorry, my mistake ;D.
Change this:
var IgCnt; //Ignore count
to:
var IgCnt=0; //Ignore count


Top
   
 Post subject: :D
PostPosted: 2005-05-11 13:25:01 
Offline

Joined: 2005-01-03 07:00:13
Posts: 7
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!


Top
   
 Post subject:
PostPosted: 2005-05-11 14:46:47 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
No, the only thing you have to change is here:
Code:
  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.


Top
   
 Post subject: hum
PostPosted: 2005-05-12 00:26:44 
Offline

Joined: 2005-01-03 07:00:13
Posts: 7
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


Top
   
 Post subject: oh my
PostPosted: 2005-05-12 06:07:19 
Offline

Joined: 2005-01-03 07:00:13
Posts: 7
really dont works! have ya tried?

please help me out! any hope ??

:cry:


Top
   
 Post subject:
PostPosted: 2005-05-13 08:11:42 
Offline

Joined: 2005-01-03 07:00:13
Posts: 7
any guy have ideas?
or anyone have used it and worked?? :/


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

All times are UTC+02:00


Who is online

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