New to MUSH want to port IRE Jscript System to MUSH

Posted by IREMUSH on Mon 01 Feb 2016 05:54 AM — 6 posts, 20,085 views.

#0
So I made the mistake of spending lots of time writing a client system for an IRE MUD using their webclient, but they cannot get the lag out of the webclient, for some stupid reason they wrote a separate GMCP engine for the webclient vs the standard telnet clients. I would like to port this system over to MUSH. Essentially the system is several dozen large separate Javascript functions along with tons of triggers. I am looking for some help point me in the right direction to package these up into a MUSH based system. I used to code systems in MUSH but it has been so long I have forgotten almost everything I knew. I would like to bring these scripts/functions in as individual elements and then reference them or call them from each other as needed. Can someone point me to a good starting point for packaging up a system for MUSH?

Thanks
USA Global Moderator #1
Not enough information provided.
Australia Forum Administrator #2
MUSHclient supports Jscript, however setting up the triggers is likely to be something you would have to modify.
#3
Nick Gammon said:

MUSHclient supports Jscript, however setting up the triggers is likely to be something you would have to modify.


Yep but it'll all be copy past work and many of the triggers I have have script actions associated with them and those are Javascript so they should pretyy well port right over.

the more extensive work are things like the attacking healing and defending engines along with the balance and GMCP engines, that while I'd love to re-code those in lua just don't have the cycles :)

For the triggers I see a script window but looks like it's designed to hold a single script command rather than a full script. I am guessing I am better off creating my scripts and then using sub to call the associated script?
Australia Forum Administrator #4
For larger scripts you are probably better off using the script file (or make a plugin). Then you can just put the name of the function in the trigger and let the script file do the rest. Plus it is only compiled once.
#5
Thanks Nick that is what I was guessing. Slowly getting my hands back around things. Need to get my hands around plugins again too so I can effective package up pieces and parts!