Moving From zMUD

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Moving From zMUD

Post by Jor'Mox »

It is technically possible to do such a thing. However, doing so requires a LOT of complex code work that is going to be far beyond what you are ready for at the moment, and for something simple wouldn't even be justified. There is definitely NOT some simple button or checkbox to extend the triggers and such to all other connections to the same game that are open in other profiles. Until someone makes a framework to share such things for multiplaying, I would just rely on good old fashioned copy/paste.

Sloan
Posts: 11
Joined: Sat Apr 07, 2018 3:23 pm

Re: Moving From zMUD

Post by Sloan »

Okay thanks. So I also assume there is no way to send the same command to multiple windows? For instance in zmud I could do :drink water and all my open sessions would drink.

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Moving From zMUD

Post by Jor'Mox »

There is something for that. They relatively recently added the ability to send an event to all profiles, and you can use such an event to trigger commands being sent. You can use the raiseGlobalEvent for this purpose, and you could make a fairly generic simple script to capture such events and execute whatever command is passed via them. As a disclaimer though, the games I play don't allow multiplaying, so I don't have personal experience using this. But, here is an example script that you could use to send and receive commands from the various profiles:
Code: [show] | [select all] lua
function sendGlobal(arg, send_local)
    if send_local then
        send(arg)
    end
    raiseGlobalEvent("sendGlobalCommand",arg)
end

function globalEventHandler(event,...)
    if event == "sendGlobalCommand" then
        send(arg[1])
    end
end

registerAnonymousEventHandler("sendGlobalCommand","globalEventHandler")
So, this would provide you with a new function you could use in any trigger or alias, that would let you command all of your other profiles to execute a command, with the option of also executing that command on the profile you are currently in (if the "send_local" argument is true). And the event handling function would perform the very simple task of intercepting the events raised by the sendGlobal function and executing whatever command is sent with it. This could be made a lot more complicated, so you could orchestrate exactly which profiles intercepted which commands and so forth, but this would make a basic framework you could use.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Moving From zMUD

Post by Vadi »

You-re in luck - we've also just built this into Mudlet 3.8: https://www.mudlet.org/2018/04/mudlet-3 ... tiplaying/

Sloan
Posts: 11
Joined: Sat Apr 07, 2018 3:23 pm

Re: Moving From zMUD

Post by Sloan »

That is awesome! Thank you. Also can you tell me how I pick where the install goes? I would like to install to my OneDrive folder so the app with all my settings are available on whichever PC I am on.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Moving From zMUD

Post by Vadi »

You can't pick where the install goes, and the settings are not stored in the same place as the installation is. You can sync your settings however following instructions from http://forums.aetolia.com/discussion/17 ... ings-again

Post Reply