There are a few approaches that come to mind you could take.
- @Redbot shows an example here on how to define a variable and use it later in the same chain of commands
- You can write a Lua script to take the various input values and do with them what you want
- You can write a Lua script to monitor the event separately (i.e., mq.event()) and handle it how you want
I wrote some code to do events for 2 to 5 targets, 2 works, 3 works for the first two targets, but not the third, and 4 and 5 targets doesnt work at all. I'm sure its a parenthesis/punctuation problem but I cant figure it out. Seems I missed some /mutliline commands i need to replace and do some counting of parenthesis and brackets and see if it works.
[CODE title="Event"][Shadows21]
trigger=#*#sends shadows at #1# and #2#.#*#
command=/docommand ${If[${Me.CleanName.Equal[${EventArg1}]},/multiline ; /rsay I am running to my (1a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 284 94; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,${If[${Me.CleanName.Equal[${EventArg2}]},/multiline ; /rsay I am running to my (2a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 162.52 260; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,/echo Not Me]}]}]}
[Shadows31]
trigger=#*#sends shadows at #1#, #2#, and #3#.#*#
command=/docommand ${If[${Me.CleanName.Equal[${EventArg1}]},/multiline ; /rsay I am running to my (1a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 284 94; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,${If[${Me.CleanName.Equal[${EventArg2}]},/multiline ; /rsay I am running to my (2a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 162.52 260; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,${If[${Me.CleanName.Equal[${EventArg3}]},/rsay I am running to my (3a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 2.29 328; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,/echo Not Me]}]}]}
[Shadows41]
trigger=#*#sends shadows at #1#, #2#, #3#, and #4#.#*#
command=/docommand ${If[${Me.CleanName.Equal[${EventArg1}]},/multiline ; /rsay I am running to my (1a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 284 94; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,${If[${Me.CleanName.Equal[${EventArg2}]},/multiline ; /rsay I am running to my (2a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 162.52 260; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,${If[${Me.CleanName.Equal[${EventArg3}]},/rsay I am running to my (3a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 2.29 328; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,${If[${Me.CleanName.Equal[${EventArg4}]},/rsay I am running to my (4a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 108.58 -81; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,/echo Not Me]}]}]}
[Shadows51]
trigger=#*#sends shadows at #1#, #2#, #3#, #4#, and #5#.#*#
command=/docommand ${If[${Me.CleanName.Equal[${EventArg1}]},/multiline ; /rsay I am running to my (1a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 284 94; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,${If[${Me.CleanName.Equal[${EventArg2}]},/multiline ; /rsay I am running to my (2a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 162.52 260; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,${If[${Me.CleanName.Equal[${EventArg3}]},/rsay I am running to my (3a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 2.29 328; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,${If[${Me.CleanName.Equal[${EventArg4}]},/rsay I am running to my (4a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc 108.58 -81; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,${If[${Me.CleanName.Equal[${EventArg5}]},/multiline ; /rsay I am running to my (5a) spot!; /docommand /${Me.Class.ShortName} pause on; /stopcast; /target clear; /moveto loc -32.71 -164.8; /timed 70 /rsay I am at my spot; /timed 245 /nav loc -165.05 108.03 1.04; /timed 315 /docommand /${Me.Class.ShortName} pause off,/echo Not Me]}]}]}[/CODE]