Secret Attack Button

Discussion concerning lmarkus' campaign framework for D&D3.x and Pathfinder.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice, lmarkus001

Forum rules
Discussion regarding lmarkus001's framework only. Other posts deleted without notice! :)
Post Reply
User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Secret Attack Button

Post by aliasmask »

If you don't want all the players to see the attack a player receives then you can limit who sees the attack with this macro.

Code: Select all

@@Secret Attack
[H: inputStr = json.append("","Message||Limit who can see output|LABEL|TEXT=FALSE")]
[H, foreach(player,getAllPlayerNames()): inputStr = json.append(inputStr,
   strformat("%s|1|%s|CHECK",player,player))]
[H: hasInput = input(json.toList(inputStr,"##"))]
[H: abort(hasInput)]
[H: outputList = ""]
[H, foreach(player,getAllPlayerNames()), code: {
   [H: pVal = eval(player)]
   [H, if(pVal == 1): outputList = listAppend(outputList,player)]
}]
[S,W(outputList): "<font color=red><b>SECRET ATTACK: </b></font><b>Do not discuss with other players</b><br>"]
[S,W(outputList), MACRO("Attack@Lib:libDnD35Pathfinder"): "" ] 
My players will get the benefit of seeing this macro this weekend, hehe. I also have HP Change that limits who can see what. That's a bit more complicated, but I think I posted that code in the main forum.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Secret Attack Button

Post by aliasmask »

This worked in 1.3b63 but I didn't noticed it stopped working until 1.3b70. I'll post when I take a look at it and figure it out.

edit:
I'm thinking one of the player had an odd name (ie with a / in it) that may have caused a problem. I'll try it with a json which I "think" will word in the W() argument??

User avatar
Paradox
Dragon
Posts: 724
Joined: Fri Feb 27, 2009 4:01 pm

Re: Secret Attack Button

Post by Paradox »

Looking forward to what you find out. Seems like a great idea if it works in b70

********************
As a side note, after a long break and fiddling with 4E for a while.. I am back home to Pathfinder. My thanks to all of you guys and gals for keeping the flame alive.
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.

Post Reply

Return to “D&D 3.5/Pathfinder 1e Campaign Macros”