Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Bing, Yandex, Yahoo!

Members: 0
Guests: 9
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
Evoru (32)
Related Links
» SmaugMuds.org » General » Coding » Saveall command for HEAVYILY ...
Forum Rules | Mark all | Recent Posts

Saveall command for HEAVYILY modified SMAUG
< Newer Topic :: Older Topic > Command to save EVERYTHING

Pages:<< prev 1 next >>
Post is unread #1 Jun 9, 2005, 3:03 pm
Go to the top of the page
Go to the bottom of the page

AxelFayt

GroupMembers
Posts5
JoinedJun 1, 2005

Heh, getting a bit tired of having to consistently type "force all save", "force all savea" "cedit save cmdtable" "hset save" constantly when I need to do a hotboot (copyover). I've looked at several different saveall snippets, but not sure which one will work best for it. *shrug* Most likely a retarded question, but still.. any advice?
       
Post is unread #2 Jun 11, 2005, 12:48 pm
Go to the top of the page
Go to the bottom of the page

AxelFayt

GroupMembers
Posts5
JoinedJun 1, 2005

Nevermind, I got it working. Decided to go ahead and write my own saveall command code, and got it working perfectly fine.
       
Post is unread #3 Jun 18, 2005, 1:55 am
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

I encourage you to post your work. :)

If anything, maybe make a snippet out of it for the AFKMud Snippets.

As for anyone else interested, a saveall need only loop through the characters, and invoke do_save on them. Example (may not compile... didn't test):

CMDF do_saveall( CHAR_DATA *ch, char *argument )
{
   CHAR_DATA *vch = NULL;
   send_to_char( "&[immortal]Saving all players...\n", ch );
   for( vch = first_char; vch; vch = vch->next )
   {
      if( !IS_NPC( vch ) )
      {
         ch_printf( vch, "&[immortal]%s commands you to record your progress...\n", ch->name );
         do_save( vch, "" );
      }
   }
   return;
}


You could do a few other things in there... like IS_IMMORTAL(vch) && if they have a building area && if it is loaded, then do_savearea( vch, "" );

Not too hard really. :)
       
Pages:<< prev 1 next >>