Feat Req: fix /alert or store mobs id (long, sorry)
Posted: Wed Nov 05, 2003 3:21 am
Beg your pardon beacuse this will be long. I am trying to rebuild an "adds" rutine to manage bad or multi pull using mez spells or multi tanking. The problem comes with mob that have the same name (eg "an orc pawn"). $searchspawn is a very good tool but the prev and next param circle through the spawn till the last (or first) spawn, then $searchspawn returns always the the last (or the first) mob found (and not ,for example, zero, in which case all will works perfectly and will be no need to read all that follows). I mean: if we have four mobs near us and the first is targeted, we can use this code
and the result will be the first mob that match the params; next we can use this second piece of code
and so having the id of the next one. Untill here is going all well, but if we need to make an other check (as I said the mob are four, till now we have checked only the first three) and we need to use on other time the code
now we have to go through our array of mob to understand if the mob id reported by this last command is a new one or insteed we already have it store (we know that there are four mobs around our char but our computer have no idea till it go through the full code circle).
Then, I know the code is simple
where @tmpSpawn is the result of
[/code]
and @locv2 is the max array range; but it take time (in this example the mobs are only four but they can be 10 or 15 or 20 in a very bad pull, and we need to know it as fast as possible to gate, evac or simply store our loc) and is not perfect.
Insteed if we can use this simple code
all will be simpler, and faster.
BUT, here we come, as I have said more times, /alert is not working anymore (from September) using the $xxx(name) (eg, "an_orc_spawn00") but only with $xxx(name,clean) (eg, "an orc spawn"). Obviusly if the mobs have the same name (eg, "an orc spawn") all the code will not work because it will discard all the "an orc spawn" and not only the one we add to the /alert list.
Now I can understand that /alert was created to be alerted when a given mob spawn and not for what I am trying to accomplish but, please, can we find a way to "repair" or to add a new function (maybe storing the ids insteed of the names) to the alert (or to an other command, as said for example having $searchspawn(next/prev) returns zero when the circle ends) that will permit us to move trought the spawn that are around us without having to check for every one if we already have that one stored or not? Infact there is no other way to understand if the spawn we get is the last one or not, but to confont it with the full array of stored ids.
I have tried to "repair" (I know "repair" is not the right word, lets say to have the /alert command do what I want) the source code by myself with no result (my c++ skill is very bad) and so I cant make more than ask your help. I dont think to be the only one that need a good mob identification routine to manage adds and multi pull, I think that this code will be usefull to all of us, but if I am the only one interessed maybe there is no need to use your time on this project (I am no flaming, I am saying only what I feel).
To finish, let me thank you all for the GREAT work you have done to make this program the "status of art" that it is now, to say the true I'd have stopped with EQ from months if not for MQ. THANK YOU DEVS.
Code: Select all
$searchspawn(npc,radius:100,notid:$target(id))Code: Select all
$searchspawn(npc,radius:100,notid:$target(id),next)Code: Select all
$searchspawn(npc,radius:100,notid:$target(id),next)Then, I know the code is simple
Code: Select all
/for locv1 to @locv2
/if n @mezid(0,locv1)==@tmpSpawn /goto :exitcircle
/next locv1Code: Select all
/varset tmpSpawn $searchspawn(npc,radius:100,notid:$target(id),next)and @locv2 is the max array range; but it take time (in this example the mobs are only four but they can be 10 or 15 or 20 in a very bad pull, and we need to know it as fast as possible to gate, evac or simply store our loc) and is not perfect.
Insteed if we can use this simple code
Code: Select all
/alert clear 1
/for 1 to @locv2
/varset tmpSpawn $searchspawn(npc,radius:100,notid:$target(id),noalert:1)
/alert add 1 $spawn(@tmpSpawn,name)
/next locv2BUT, here we come, as I have said more times, /alert is not working anymore (from September) using the $xxx(name) (eg, "an_orc_spawn00") but only with $xxx(name,clean) (eg, "an orc spawn"). Obviusly if the mobs have the same name (eg, "an orc spawn") all the code will not work because it will discard all the "an orc spawn" and not only the one we add to the /alert list.
Now I can understand that /alert was created to be alerted when a given mob spawn and not for what I am trying to accomplish but, please, can we find a way to "repair" or to add a new function (maybe storing the ids insteed of the names) to the alert (or to an other command, as said for example having $searchspawn(next/prev) returns zero when the circle ends) that will permit us to move trought the spawn that are around us without having to check for every one if we already have that one stored or not? Infact there is no other way to understand if the spawn we get is the last one or not, but to confont it with the full array of stored ids.
I have tried to "repair" (I know "repair" is not the right word, lets say to have the /alert command do what I want) the source code by myself with no result (my c++ skill is very bad) and so I cant make more than ask your help. I dont think to be the only one that need a good mob identification routine to manage adds and multi pull, I think that this code will be usefull to all of us, but if I am the only one interessed maybe there is no need to use your time on this project (I am no flaming, I am saying only what I feel).
To finish, let me thank you all for the GREAT work you have done to make this program the "status of art" that it is now, to say the true I'd have stopped with EQ from months if not for MQ. THANK YOU DEVS.