Gets players to "force" gm to run a macro.

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

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

Post Reply
Shadow Wizard
Giant
Posts: 177
Joined: Mon Apr 11, 2011 8:11 pm

Gets players to "force" gm to run a macro.

Post by Shadow Wizard »

I have the following at the end of a macro script:

[h: link = macroLinkText( "Write HPs@lib:Wizard", "gm" )]
[h: execLink( link, 1 )]

However, when a player clicks on it, it doesn't seem to run.

If it matters the macro it is running is as follows:

Code: Select all

[h:pcids=getPC()]
[h:exportplayername="c:/maptooldata/names.txt"]
[h:exportplayerhp="c:/maptooldata/hps.txt"]
[h:exportData(exportplayername, "", 0)]
[h:exportData(exportplayerhp, "", 0)]
[FOREACH(id,pcids), CODE:{
	
	[h:exportData(exportplayername, getName(id), 1)]
	[h:hpdataexport=getProperty("HP", id)]
	[h:hpdataexport=hpdataexport+"/"]
	[h:hpdataexport=hpdataexport+getProperty("MAXHP", id)]
	[h:exportData(exportplayerhp, hpdataexport, 1)]
}]

Basically it need to write a file on the GM's computer when the players execute the first script.
Lil help?

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

Re: Gets players to "force" gm to run a macro.

Post by aliasmask »

Afaik, you can't send or receive data to the client computer without going through REST or in part the File Sync Directory.

Shadow Wizard
Giant
Posts: 177
Joined: Mon Apr 11, 2011 8:11 pm

Re: Gets players to "force" gm to run a macro.

Post by Shadow Wizard »

I don't need to send it. The data already exists. Its just, if I use the GM computer to click the " "Write HPs" it writes it to where it needs to be. What I need is the players to run a macro, and that macro causes the GM to run " "Write HPs" macro.

Shadow Wizard
Giant
Posts: 177
Joined: Mon Apr 11, 2011 8:11 pm

Re: Gets players to "force" gm to run a macro.

Post by Shadow Wizard »

So, I found a workaround. Instead of getting the players to "force" the GM to run the macro, I just did the exportdata to a network location. Now the players can write to it directly.

Post Reply

Return to “Macros”