sequential scan through zone

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Pragma
a ghoul
a ghoul
Posts: 91
Joined: Sat May 03, 2003 1:45 am

sequential scan through zone

Post by Pragma » Sat May 03, 2003 1:48 am

I know very similar topics have been discussed before, but I need a way to target every mob in the zone exactly once for 2 min each. The order is not important, and the range is not important. Preperably PCs would not be targeted but if they are its not a big deal. I need this for a pickpocket mqacro I am writintg, and I will not know the names of the mobs ahead of time (I want on the fly zone swtiching capability). If this can not be done I will modify the source, but since im new to macro wriitng I figured it woudl be good to ask.

eqjoe
a grimling bloodguard
a grimling bloodguard
Posts: 984
Joined: Sat Sep 28, 2002 12:26 pm

Post by eqjoe » Sat May 03, 2003 6:19 pm

Be very carefull with this. If you use /target and target mobs out of range, that is detectable serverside. I know a player that was banned for this very reason. If you need to do things client side that are impossable by an attended client, I think you are using the wrong tool. Look at myseq and LEQM, two windows based SEQ clones. The source code demos how to pull zone mob data from the client passively. You might find a safer way to do what you want if you do not use the detoured superwho funtions of MQ.

Clawed
a ghoul
a ghoul
Posts: 105
Joined: Mon Jan 20, 2003 6:17 am

Post by Clawed » Sat May 03, 2003 7:24 pm

Now that we got that out of our system, eqjoe :P , let's just realize we'll all get banned for using MQ and answer the question. :D

This kind of functionality does not exist within the existing macro language in MQ. You will need to write your own C code into the project. Look at the modified who (SuperWho) for examples of writing the loops. Also, doing a SuperWho on a target is not detectable in the way that doing a /target on an OOR mob is (or might be). Every SuperWho called is just doing the same thing that LEQM does -- it's a passive memory read only.
Clawed

Pragma
a ghoul
a ghoul
Posts: 91
Joined: Sat May 03, 2003 1:45 am

Post by Pragma » Sat May 03, 2003 11:31 pm

Hmm. Well on being banned, first off on my main account I almost constantly exp by doing a /who npc blah blah blah and targeting an out of range mob, and so does my brother, and we were never banned. I am in no way saying that your concern in illegitimate, just that though the server can monitor this, it seems clear that banning on this is not on this top list of things to do (as compared to say an undetoured speed or zone which is basicly instant ban). Also, the routine will be done an an alt account, and the money will be "laundered" to my main account.

There is no way for me to avoid targeting out of range mobs, as the entire point of the macro is that I can steal from anywhere, and I therefore NEED to target the out of raneg mobs.

Moving on, I will take a look at the c code in superwho, and probably make a new command called /targetnext. The routine will work by starting with any mob, targeting him, and adding his unique id to an external file llist (scan.dat or something). The next, (and every) time /targetnext is called, it will scan though that file, and keep moving down the list of mobs until it find one not on the list, then add that mob to the list. Thanks.

eqjoe
a grimling bloodguard
a grimling bloodguard
Posts: 984
Joined: Sat Sep 28, 2002 12:26 pm

Post by eqjoe » Sat May 03, 2003 11:55 pm

This accually sounds cool ... donno why but it does :)

User avatar
Stargazer
a lesser mummy
a lesser mummy
Posts: 32
Joined: Mon Sep 30, 2002 3:30 pm

Post by Stargazer » Sun May 04, 2003 12:50 am

I think a macro to cycle thru every mob in the zone was posted a while back. Here is what I use in my macros when I want to do just that.

Code: Select all

Sub GetNext

    /if "$target()"=="FALSE" /target npc

    :AGAIN
      /delay 5
      /target id $target(next) 
      /if "$target(type)"!="NPC" /goto :AGAIN
     
 /return
Cromwell Stargazer

Pragma
a ghoul
a ghoul
Posts: 91
Joined: Sat May 03, 2003 1:45 am

Post by Pragma » Sun May 04, 2003 2:32 pm

thanks again cromwell, worked like a charm

merkzu
a ghoul
a ghoul
Posts: 99
Joined: Wed May 14, 2003 2:08 pm

Post by merkzu » Wed May 14, 2003 2:17 pm

will this target the same mob twice? I'm looking to have a smarter KS check than just seeing if a PC is within a certain radius. I want to target a mob, do /assist, see if the target changed. If it did change, then someone engaged the mob and I want to ignore that mob permanently. That way when I do /target again, there is no chance of getting that mob again.