Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUDs
➜ General
➜ Multiple characters, same script.
Multiple characters, same script.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Heart
(4 posts) Bio
|
Date
| Wed 15 Jun 2011 06:00 AM (UTC) |
Message
| 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 15 Jun 2011 06:11 AM (UTC) |
Message
| 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.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Heart
(4 posts) Bio
|
Date
| Reply #2 on Wed 15 Jun 2011 03:11 PM (UTC) |
Message
| The chat does seem to be the way to go, thanks for the support! I appreciate it. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,497 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top