Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Fri May 01, 2009 2:29 pm   

[3.06] Mapper should call the enable code of the room/zone you are in at startup
 
Would it make sense to call the enable code for the room/zone you are in when you start Cmud? I call it manually right now, but it seems like something that should be done by default.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri May 01, 2009 5:29 pm   
 
Not necessarily. Any scripts (macros, aliases, triggers, etc) that are stored within the current room and/or zone class will be enabled, so they will all still work properly.

One common use of room scripts is to send a command to the MUD. For example, when I walk into the training room, my room script sends the "train" command to the MUD. When I walk into a store, my room script sends the "list" command to the MUD to list the store contents. And I'm not sure that I want these commands sent to the MUD when I first log in just because I'm already in that room.

Maybe you can tell us more about what you are trying to do in your script that would require the enable code to be run with you log in. Also, have you tried setting the option for your Room class to tell it to "Disable class when connecting"? That will disable your room class and then when the mapper runs, it should cause your current room class to get re-enabled, which should cause the enable script to run. The reason it's not running the enable script for you is that the room is already enabled when you connect (saved from the previous session). So maybe that will help.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Fri May 01, 2009 6:35 pm   
 
The situation I was looking at was the following:

- I have classes setup for each zone. Within each zone's class are triggers for the MOBs I find in that zone.
- These zone classes are set to be disabled upon connect so that if I have a crash or restore an old package file all my zone classes start out as disabled.
- Upon entering/leaving a zone I enable/disable the zone's class.
- If Cmud crashes or locks upon restarting Cmud the class for the zone I'm in won't be correct, so it would be beneficial if it executed the enable code upon startup. I do it manually as it is right now.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net