Moderator: MacroQuest Developers
Code: Select all
sub main
:pantherloop
/target $p1 "$p0"
/if $target()!=TRUE {
/echo We ran out of $p0's to target... Exitting...
/return
}
/echo $target(name,clean) is level $target(level) and $target(distance) clicks away.
/varset p1 "$p1 notid $target(id)"
/goto :pantherloop
/returnCode: Select all
sub main
:pantherloop
/target $p1$p0
/if $target()!=TRUE {
/echo We ran out of $p0's to target... Exitting...
/return
}
| /echo $target(name,clean) is level $target(level) and $target(distance) clicks away.
/varset p1 "$p1 notid $target(id)"
/echo $p1
/goto :pantherloop
/returnCode: Select all
Sub FindOrcPawn
/varset l0 0
/for l0 to 99
/target "orc pawn$l0"
/if "$target(name)"!="NULL" /echo $target(name) -- $target(distance)ft.
/next l0
/echo All spawns matching orc pawn[nn] reported.
/return
Code: Select all
#turbo
Sub OrcPawnByDistRadius
/press Escape
/varset l0 0
:NextPawn
/tar radius $l0 100000 "orc pawn"
/if "$target(name)"=="NULL" /goto :NoPawns
/if "$target(name)"!="NULL" {
/if "$target(name)"=="NULL" /goto :NoPawns
/echo $target(name) -- $target(distance)ft.
/varcalc $l0 $target(distance)+0.01
/goto :NextPawn
}
:NoPawns
/echo End of OrcPawn spew.
/return
Code: Select all
Sub FindOrcPawn
/varset v10 1
/for v10 to 99
/target orc_pawn$10 | Anyone know if this is valid? Doesn't seem to be.
/if "$target(name)"!="NULL" /echo $target(name) -- $target(distance)ft. -- $target(Whatever_Else)
/next v10
/echo All spawns matching orc_pawn/?n/?n reported.
/return Was actually late for class. The only $v anything that is supposed to use is $l0 ($L0, local variable 0)Vendor001 wrote:From a "working" script I found using search, it appears the following /for-/next code should work:
btw, did you mean to put |0 instead of 10? Don't quite see how commenting out the rest of the line will make it work...Code: Select all
Sub FindOrcPawn /varset v10 1 ... /return
There will never be (I dont think) 2 NPCs with the same name and same number in zone at the same time without some other distinguishing characteristic to them...pablo wrote:Hm, what about adding them all to an alert list as the loop enumerates, using their goofy names? Not sure if they would they be unique though - e.g. are there 2 a_frenzied_assclown21 in zone at once, if so you may skip one.
Then obviously you can /target noalert x and whatnot.