Re: olc

From: Sammy (samedi@clark.net)
Date: 09/11/95


This was mailed to me, but I thought I'd share my response with the list 
in case it helps.


On Mon, 11 Sep 1995, Daniel W. Burke wrote:

> >On Sun, 10 Sep 1995, Levork wrote:
> >
> >> I think the problem is that somewhere along the line, it'll ignore 
> >> changes to the last object/room, or it won't allow the creation of 
> >> objects/rooms which are numbered greater than everything else. 
> Something 
> >> like that. I ran into this earlier, and I think I've fixed this, 
> thanks.
> >> 
> 
> I havn't been able to fix the problems with the iedit, (which include 
> the description strings getting turned to garble), but my solution to 
> the rooms not saving was to when redit was used, no matter what, the 
> zone number for the room is changed to equal  roomnumber / 100....
> and I don't have any probs anymore......  now if I can only find out 
> why iedit is suddenly crashing the mud for no reason....

I think I see what you're talking about.  The way I set up my olc was you 
have to be in a room in the zone you're working on.  When someone tries 
to enter the object editor, it sets zone = world[ch->in_room].number / 100.
Then it does check_permission(zone) to make sure the god has builder 
rights in the zone, and check_edit_object(object_vnum) to make sure 
nobody else is editing that object.

With rooms it's basically the same.  When they enter the room editor it 
does the same 2 checks, then sets a zone number variable in the 
char_data->player struct.  The god can go from room to room building, and 
every time they use rset (the main room editing command) it just checks 
to make sure the room they're in is in the zone they're working on.

As for room saves, the way I did it was put a check in Crash_crashsave to 
see if the player is editing a zone.  If so, it saves.  This way the 
rooms save every time the player is saved.

Now if I can only figure out why a whole wld file got zero'ed out last 
night.  My code would work great if nobody but me used it :)

Sam



This archive was generated by hypermail 2b30 : 12/07/00 PST