Page 1 of 1

Import/export settings

Posted: 24 Feb 2015 08:31
by Boreaulam
Hi

Please, Can you add feature to import and export triggers/aliases as XML.
So I can transform my triggers on old client to a new fancy app.

Re: Import/export settings

Posted: 24 May 2015 06:31
by Vlek
Boreaulam wrote:Please, Can you add feature to import and export triggers/aliases as XML.
Sure, that's completely doable. Hell, you could do it yourself pretty easily enough through an alias that appends all children of your triggers and alias selection lists and their information into an xml format and give a save window for exporting at least. Importing might have more problems. I don't know what all goes on between the client and the server that actually saves them. I'm sure one can figure it out by looking at the save button.
Boreaulam wrote:So I can transform my triggers on old client to a new fancy app.
Eerrmm... this is trickier than the above question. That'd mean that your old client would have had to have used javascript for scripts which is highly unlikely. You'd have to not only have it export in the same xml format but also translate it into the other language whatever it happens to be. The top is totally doable, this part is questionable at best.

Re: Import/export settings

Posted: 30 Jan 2021 16:39
by Kjartan
Not XML, just the server-side stored JSON, and only to backup triggers so far (backup/restoring via GUI + all the same for aliases follows the next few days) via the following JavaScript:

Code: Select all

(function(y,x){$.ajax({type: "GET",beforeSend: function(rq) 
{rq.setRequestHeader("GMCP-Token",x[0]+x[1]+x[2]+x[3]+x[4]+x[5]+x[6]+x[7]);}, 
url: "https://www.genesismud.org/player_file/"+encodeURIComponent(y.name)+
"/triggers.json",success: function(msg) {let a = document.createElement('a');
a.href="data:application/octet-stream,"+encodeURIComponent(msg);a.download=
'triggers.json'; a.click();}}); })(mud.gmcp['char.login'],mud.gmcp['core.token'])
Enjoy!