Scott C. said: There's the @{target} syntax which might do what you are hoping for, or at least make the script your envisioning easier (there can be a lot of tokens on a map after all). What system do you play? Most of the solutions for this are going to be character sheet specific (as the script needs to know what to compare to what and what to affect). The pokemon System I am trying to code will require this targeting macro: ((2*(@{level})/5+2)*@{AType}*@{APower})/@{Target|Def})/50)+2)*@{STAB})*(@{Target|Typemod1}*@{Target|Typemod2})*(1d39+216))/255 @{level} = The PC's level. @{AType} = Either Atk or Sp.Atk, chosen by a drop-down menu when "creating" a move. @{APower} = The base power of a move, I.e. Surf = 95 @{Target|Def} = This one is tricky as the player must state weather the Move is targeting Def or Sp.Def @{STAB} = Either 1 or 1.5 if the pokemon using the move is the same type as the move. @{Target|Typemod1} and @{Target|Typemod2} = This is even trickier than @{Target|Def} as it needs to respond to the type of attack being used on the target. Both Values must result in 2, 1, 0.5, 0.25 or 0 depending on the Attack type being used on the Target. Additionally if a pokemon has no secondary type, @{Target|Typemod2} must register as a 1. I.e. a Fire-Type move targeting a Water-type pokemon will deal 0.5x normal damage. If a fire-type move is used on a Water / Ground type, it will deal 0.25x normal damage (0.5 x 0.5 = 0.25)