Multiple characters, same script.

Posted by Heart on Wed 15 Jun 2011 06:00 AM — 3 posts, 15,135 views.

#0
I was wondering if there was a way multiple instances of MUSH could access the same script file, and process it at once. Such as variable X gets flipped from 0 to 1, and both clients recognize the change in the file.

For reference, the file is being shared between two computers through a home workgroup in windows. Both clients seem to load the file, but then process it independently.
Australia Forum Administrator #1
The script file isn't the same as the script space which is in memory.

What you could do is have them both open the same SQLite3 database. Then if one updated a row in a table, the other would notice it (that is, next time it read it).

http://www.gammon.com.au/sql
http://www.gammon.com.au/db

Another thing you could do is set up a chat session:

http://www.gammon.com.au/mushclient/chat.htm

See near the bottom of that page:


Example of using scripting
Using a trigger to tell the group what is happening


By sending custom chat messages one client can notify the other of some event.

#2
The chat does seem to be the way to go, thanks for the support! I appreciate it.