[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Globally Open Once....
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Globally Open Once....

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by MattMc   USA  (54 posts)  [Biography] bio
Date Sun 25 Jul 2004 03:55 AM (UTC)  quote  ]
Message
Hmm, got a peculiar question for you guys.

I have a bot open on a mud. It runs 24/7. I have it set to run on the startup of Mush, and my computer starts mush in the startup list for windows. Even though I have a bot in the game I play, I still play with a normal character.

The bot though uses a perl socket plugin I made (some of you might have seen my horrible attempts at figuring this out at first) and the script works great, but it will sometimes lag the entire mushclient program 2 or 3 seconds... sometimes 5 or 6 seconds. That's alot of lag.

So what I'm asking here is - is there any way to restrict a autostart world from starting if it is already open somewhere else on that computer. I know mushclient won't let it open in the same parent window - but if you open a nother parent window it will still load it.

I want to use a second instance of Mushclient to run my normal character, but don't want the two instances of Mushclient fighting over the character with both of their autologin scripts.

If there is a function already existant to handle this, how would I do it that if that world is already open somewhere, open World B instead. That would rock.


Thanks,
Matt
[Go to top] top

Posted by Meerclar   USA  (607 posts)  [Biography] bio
Date Reply #1 on Sun 25 Jul 2004 03:59 AM (UTC)  quote  ]
Message
Hold the ctrl (maybe its shift) key down when you open the 2nd instance of MC, MC will completely skip loading worlds at startup.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by MattMc   USA  (54 posts)  [Biography] bio
Date Reply #2 on Sun 25 Jul 2004 04:10 AM (UTC)  quote  ]
Message
Hmm, a good point. I'll do that for now. Does anyone know of any coding functions I can do though?
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #3 on Sun 25 Jul 2004 06:48 AM (UTC)  quote  ]
Message
If you mean that Mushclient is lagged because your plugin is waiting for the net to respond, then why not make it a separate app and load into Mushclient through COM? It's a whole other can of worms, but at least you could code your socket thing the way it's supposed to be coded - in a separate thread.
[Go to top] top

Posted by Nick Gammon   Australia  (19,673 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Sun 25 Jul 2004 09:59 PM (UTC)  quote  ]
Message
What would probably work fairly well is to make a small plugin that creates a file when it opens (eg. my_world_is_open.txt). This could be in the OnPluginConnect
routine. Then in OnPluginDisconnect you would delete the file. This file effectively becomes the "world is open" flag.

Then you have an additional check, that (before you create this file) you check if it is already there. That means the world must be open already. In that case you don't create the file, and do a:

world.DoCommand "Close"


Or, don't have this world in the startup list, but have another dummy world that checks for this file, and if the world isn't open already, opens it. Something like that.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


2,685 views.

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]