Scripting across multiple profiles/tabs

Post Reply
soupy
Posts: 1
Joined: Fri Dec 12, 2014 5:29 am

Scripting across multiple profiles/tabs

Post by soupy »

Hello,

I am currently trying to explore options for how to manage multiple profiles from one place. This is to play on a mud that allows you to simultaneously play 3 characters. Specifically I am looking for a way to operate out of a single profile/command line and execute commands that deliver across profile.

For example, I would like to have a single command to trigger an uppercut in the primary profile, cast color spray in the second profile and cast heal in the third profile at the same time.

I can't find anything in the documentation on send() that suggests a way to accomplish this. I also really want to avoid having to set up something indirect like passing a code through the game that activates a trigger to execute the desired command. Does anyone know what command I should be looking at? Happy to work with reading the appropriate documentation or picking through an example script and experimenting

Please let me know if you have any questions.


Thanks,
Soupy

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Scripting across multiple profiles/tabs

Post by SlySven »

Well, each profile that is running has it's own Lua Interpreter so they do not share code or data. I'm not sure but the event handling system might work though - one profile raises an event and this gets radiated to the others - but that is off the top of my head and might not be the case... :sad:

Edit: No it does not work like that - however I believe this is something that ought to go onto the wish list so that say lua sendOtherProfiles( "string" ) emits a "sysProfileLink" event that other profiles could catch with a handler that processes two arguments the first being the name of the sending profile and the second that "string". The data would need to go up from the lua subsystem into the application core to be passed down to each of the other profiles that are running... :geek:

Though each profile would have to be considered asynchronous, it might take more work to ensure that the profiles keep in step with each other if that is required...

Post Reply