Login
User Name:

Password:



Register

Forgot your password?
I3 and IMC
Dec 26, 2024 3:27 am
By GatewaySysop
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
LOP 1.6
Author: Remcon
Submitted by: Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
Users Online
DotBot

Members: 0
Guests: 14
Stats
Files
Topics
Posts
Members
Newest Member
495
3,808
19,708
589
MaisieMacl

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Codebases » LoP Codebase » LoP1.39 Questions/Issues/Anom...
Forum Rules | Mark all | Recent Posts

LoP1.39 Questions/Issues/Anomalies + Suggestions?
< Newer Topic :: Older Topic >

Pages:<< prev ... 6, 7, 8, 9, 10 ... next >>
Post is unread #141 Jun 27, 2011 11:08 am   Last edited Jun 27, 2011 11:12 am by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
I have a few questions about the locker system.

From what I can tell if a person owns a locker, and they have it sharing it won't be deleted if they are deleted?
Does it matter how the VNUM for lockers are set up?

Post is unread #142 Jun 27, 2011 5:31 pm   
Go to the top of the page
Go to the bottom of the page

Remcon

GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
Your correct it will leave the locker if it is being shared. Feel free to change it if you want to lol.

Well Id set it up similar to how I had it set. But try and see :)

Post is unread #143 Jun 27, 2011 5:43 pm   
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
if I remove the ifcheck for being shared, it won't delete others lockers that they have access too if they are destroied right ?

Post is unread #144 Jun 27, 2011 5:44 pm   Last edited Jun 27, 2011 6:00 pm by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
Also lets say they put something in the locker, without using the locker command. Will it autosave the locker?

I aslo get this using locker put all
The Hokai is closed.

Post is unread #145 Jun 27, 2011 6:23 pm   
Go to the top of the page
Go to the bottom of the page

Remcon

GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
Well removing the if check will make it remove their locker when they delete/destroyed. It won't mess with any locker but their own.

Well I don't use the put code If you use locker put it will auto save yes.

That is closed message means that you haven't set up the flags/values on the base locker yet :) Have to set it like you would any container that you are able to put stuff in.

Post is unread #146 Jun 27, 2011 6:27 pm   Last edited Jun 27, 2011 6:27 pm by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
I thought it was, because it worked with the old Locker Snippet. I will take a look at it.

Post is unread #147 Jun 27, 2011 6:36 pm   
Go to the top of the page
Go to the bottom of the page

Remcon

GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
different ones require different things and plus might have been some porting issues as well. Just varies and depends just make sure you get the flags and values set right like you would any other container in the game and should be good to go.

Post is unread #148 Jun 27, 2011 7:32 pm   
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
it seems to be set up right

Name: %s
Vnum: 21  Area: Limbo
Type: container  Count: 1  Gcount: 1 Serial#: 65  
TopIdxSerial#: 65  TopSerial#: 65
Short description: the locker of %s
Long description : The locker of %s stands open here.
Wear flags : 
Extra flags: nosac locker
Magic flags: none
Number: 1/1   Weight: 1/1   Layers: 0   Wear_loc: -1
Cost: 0  Timer: 0  Pl: 0
In room: 2  In object: (none)  Carried by: (none)
Index Values : 10000 7 0 0 0 0.
Object Values: 10000 7 0 0 0 0.

Post is unread #149 Jun 27, 2011 7:38 pm   Last edited Jun 27, 2011 7:40 pm by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
I got it to work right but now I get this problem when I type locker list.

Log: [*****] BUG: do_locker: bad section.
You do not see that here.
or
Log: [*****] BUG: fread_obj: Locker without room
You do not see that here.

Post is unread #150 Jun 28, 2011 6:36 am   
Go to the top of the page
Go to the bottom of the page

antram

GroupMembers
Posts58
JoinedNov 22, 2010

 
Hello Remcon:

Please, could you explain-me how can I add new mob races in LOP? I look for it in const.c but there isn't any reference about mob races. I know taht isn't easy, but if you can tell me some guidelines. for example:

1. Look the mob races in xxx.c
2. Modifies something in yyy.c
3. etc.

Something like that. some instructions step by step.

Thanks.

Post is unread #151 Jun 28, 2011 9:10 am   
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
Suggestions:

BTI:
Not sure if any of this is in or not, Haven't really taken a look at the BTI system yet.
Make it so immortals get a message at random times about a bug/typo that is still on the list.

(Don't let it work with ideas, Since ideas can sometimes take awhile to deny or input.)
--(If it does work with Ideas maybe making it appear like once a day or something?)

Maybe a possible reward System that immortals can use to reward those who report bugs/typos if they are urge matters?
--Possibility have the reward system work whether or not the player is online???

Explorer Code:
--Maybe adding a way for the mortals to know what Percent of the explorer rooms they found?
Example on score Or worth(not sure if LOP uses worth):
You have found 9% of the hidden areas throughout the mud.

Mwresets:
Items resets:
-A message to the player or mud when an item is dropped.
Mob Resets:
-A message to the mud giving them the name of the mob that was spawned and the name of the area that was spawned?
-A flag that restricts mobs from being spawned in certain areas? Don't want mobs spawning in the intro area for example.

HighScore:
This is a great highscore replacement System I am very happy with it and I am glad I decided to pull it from the codebase.
-Maybe adding a way for the highscores to update sooner or renames and deleted pfiles?
While the whole concept of it auto checking on reboots things is great, mortals tend to complain if their highscores aren't adjusted right away when
their names have been changed or players they were racing against that have either deleted or been destroyed are still ahead of them, even if it is
only for a little while.

-Fishing Code:
I have only glanced at the code, but I am under the assumption that it allows you to use any item as bait?
-Maybe adding in a bait item type, and having values decide the following:
The Rate of Success, The type of Fish, The Size of the fish.
-A area tag for fish, where those fish only appear in certain areas?

I was thinking of during the fishing command into a skill based on Wisdom and Int adding into the rate of success. I am hoping to get your opinion on this.

Channel System:
This is a Great replacement for the smaug stock channel system.
- I am not sure if LOP has a wizinvis system but if so, the channels do not take an invis immy into account. It will show their names to anyone, instead of those at the same level, and above.
-It also shows invis immies name on channel histories.

I fixed these issues in my mud, but just thought I would run them by you.

Clan System:
-Adding in multiple ranks within the clans? instead of just first and second.
-A way for mortals to build a clan hq?
-Clan home towns?

Thats all I have for suggestions now I have the following questions:
I really like the idea of random resets I am wondering if its possible to add this system into the regular Smaug reset replacement system.
If so, can you give me suggestions on it? Because I tried adding it once before and it ended up breaking the mud, and when I got the mud to load probably again, the resets won't stay at the percent I put them as. So I just uploaded a backup that i made right before attempting to put the system in.

Post is unread #152 Jun 28, 2011 5:24 pm   
Go to the top of the page
Go to the bottom of the page

Remcon

GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
Hmm

I got it to work right but now I get this problem when I type locker list.

Log: [*****] BUG: do_locker: bad section.
You do not see that here.
or
Log: [*****] BUG: fread_obj: Locker without room
You do not see that here.

There is something in the locker file it is having an issue with. Care to post what it has in the locker file it was trying to open?

Post is unread #153 Jun 28, 2011 5:30 pm   
Go to the top of the page
Go to the bottom of the page

Remcon

GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
Well Antram there was never really any use for mob races so I took them out. It never really had any kind of affect on the game and was just for show. More or less you would just have to add in for MOB_INDEX_DATA struct to have a race number define the races etc... You can easily take a look at smaug muds for how it handles mob races and toss in for it. I won't be doing it since they were kind of useless when using descriptions I could just give the mobile any kind of race name I wanted with no limitations by the code. same for Mobile classes they were pointless lol. I always found it funny to see a level 2 warrior human "Mole" etc... This way you can just not have to deal with the crazy thing and put in the description anything you want it to be.

Post is unread #154 Jun 28, 2011 5:54 pm   
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
#LOCKERName Hokai~
ShortDescr the locker of Hokai~
Description The locker of Hokai stands open here.~
Vnum 21
Values 10000 0 0 0 0 0
End

#OBJECT
Nest 1
Vnum 801
Values 150 0 0 0 0 0
End

#OBJECT
Nest 1
Vnum 803
End

#END

Post is unread #155 Jun 28, 2011 6:05 pm   
Go to the top of the page
Go to the bottom of the page

Remcon

GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 

#LOCKERName Hokai~

Need a newline between locker and name

Post is unread #156 Jun 28, 2011 8:40 pm   Last edited Jun 28, 2011 9:19 pm by dbna2
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
Also, even though it gives me that message

The locker of Hokai stands open here. (4)
these showed up in limbo.

Post is unread #157 Jun 28, 2011 9:06 pm   
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
Even with that fixed I still get this error.
Log: [*****] BUG: fread_obj: Locker without room
You do not see that here.

Post is unread #158 Jun 29, 2011 4:55 am   
Go to the top of the page
Go to the bottom of the page

Remcon

GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
Well you will till you get the issue fixed a bit. The locker doesn't know where it is going for some reason so its putting it in limbo.

Post is unread #159 Jun 29, 2011 4:58 am   
Go to the top of the page
Go to the bottom of the page

Remcon

GroupAdministrators
Posts1,946
JoinedJul 26, 2005

 
What does your do_locker, fread_locker, and fread_obj all look like?

Post is unread #160 Jun 29, 2011 10:41 am   
Go to the top of the page
Go to the bottom of the page

dbna2

GroupMembers
Posts600
JoinedDec 3, 2008

 
The locker functions are the ones found in LOP 1.40
here is my fread_obj


void fread_obj( CHAR_DATA *ch, FILE *fp, sh_int os_type )
{
    OBJ_DATA *obj;
    char *word;
    int iNest;
    bool fMatch;
    bool fNest;
    bool fVnum;
    ROOM_INDEX_DATA *room = NULL;

    if ( ch )
	room = ch->in_room;
    CREATE( obj, OBJ_DATA, 1 );
    obj->count		= 1;
    obj->wear_loc	= -1;
    obj->weight		= 1;

    fNest		= TRUE;		/* Requiring a Nest 0 is a waste */
    fVnum		= TRUE;
    iNest		= 0;

    for ( ; ; )
    {
	word   = feof( fp ) ? "End" : fread_word( fp );
	fMatch = FALSE;

	switch ( UPPER(word[0]) )
	{
	case '*':
	    fMatch = TRUE;
	    fread_to_eol( fp );
	    break;

	case 'A':
	    KEY( "ActionDesc", obj->action_desc, 	fread_string( fp ) );
	    if ( !strcmp( word, "Affect" ) || !strcmp( word, "AffectData" ) )
	    {
		AFFECT_DATA *paf;
		int pafmod;

		CREATE( paf, AFFECT_DATA, 1 );
		if ( !strcmp( word, "Affect" ) )
		{
		    paf->type	= fread_number( fp );
		}
		else
		{
		    int sn;

		    sn = skill_lookup( fread_word( fp ) );
		    if ( sn < 0 )
			bug( "Fread_obj: unknown skill.", 0 );
		    else
			paf->type = sn;
		}
		paf->duration	= fread_number( fp );
		pafmod		= fread_number( fp );
		paf->location	= fread_number( fp );
		paf->bitvector	= fread_bitvector( fp );
		if ( paf->location == APPLY_WEAPONSPELL
		||   paf->location == APPLY_WEARSPELL
		||   paf->location == APPLY_STRIPSN
		||   paf->location == APPLY_REMOVESPELL
		||   paf->location == APPLY_RECURRINGSPELL )
		  paf->modifier		= slot_lookup( pafmod );
		else
		  paf->modifier		= pafmod;
		LINK(paf, obj->first_affect, obj->last_affect, next, prev );
		fMatch				= TRUE;
		break;
	    }
	    break;

	case 'C':
	    KEY( "Cost",	obj->cost,		fread_number( fp ) );
	    KEY( "Count",	obj->count,		fread_number( fp ) );
	    break;

	case 'D':
	    KEY( "Description",	obj->description,	fread_string( fp ) );
	    break;

	case 'E':
	    KEY( "ExtraFlags",	obj->extra_flags,	fread_bitvector( fp ) );

	    if ( !strcmp( word, "ExtraDescr" ) )
	    {
		EXTRA_DESCR_DATA *ed;

		CREATE( ed, EXTRA_DESCR_DATA, 1 );
		ed->keyword		= fread_string( fp );
		ed->description		= fread_string( fp );
		LINK(ed, obj->first_extradesc, obj->last_extradesc, next, prev );
		fMatch 				= TRUE;
	    }

	    if ( !strcmp( word, "End" ) )
	    {
               if( !fNest || !fVnum )
               {
                  if( obj->name )
                     bug( "%s: %s incomplete object.", __FUNCTION__, obj->name );
                  else
                     bug( "%s: incomplete object.", __FUNCTION__ );
                  free_obj( obj );
                  return;
               }
		else
		{
		    sh_int wear_loc = obj->wear_loc;
		if ( !obj )
			return;
		    if ( !obj->name && obj->pIndexData->name )
			obj->name = QUICKLINK( obj->pIndexData->name );
		    if ( !obj->description && obj->pIndexData->description )
			obj->description = QUICKLINK( obj->pIndexData->description );
		    if ( !obj->short_descr && obj->pIndexData->short_descr)
			obj->short_descr = QUICKLINK( obj->pIndexData->short_descr );
		    if ( !obj->action_desc && obj->pIndexData->action_desc )
			obj->action_desc = QUICKLINK( obj->pIndexData->action_desc );
		    LINK(obj, first_object, last_object, next, prev );
		    obj->pIndexData->count += obj->count;
		    if ( !obj->serial )
		    {
			cur_obj_serial = UMAX((cur_obj_serial + 1 ) & (BV30-1), 1);
			obj->serial = obj->pIndexData->serial = cur_obj_serial;
		    }
		    if ( fNest )
		      rgObjNest[iNest] = obj;
		    numobjsloaded += obj->count;
		    ++physicalobjects;
		    if ( file_ver > 1 || obj->wear_loc < -1
		    ||   obj->wear_loc >= MAX_WEAR )
		      obj->wear_loc = -1;
		    /* Corpse saving. -- Altrag */
		    if ( os_type == OS_CORPSE )
		    {
		        if ( !room )
		        {
		          bug( "Fread_obj: Corpse without room", 0);
		          room = get_room_index(ROOM_VNUM_LIMBO);
		        }
			/* Give the corpse a timer if there isn't one */

			if ( obj->timer < 1 )
			   obj->timer = 40;
			if ( room->vnum == ROOM_VNUM_HALLOFFALLEN 
				&& obj->first_content )
			   obj->timer = -1;
		        obj = obj_to_room( obj, room );
		    }
		                  else if( os_type == OS_LOCKER )
               {
                  /* Want to make sure it uses the room the ch is in */
                  if( ch && ch->in_room )
                     room = ch->in_room;

                  if( !room )
                  {
                     bug( "%s: Locker without room", __FUNCTION__ );
                     room = get_room_index( 2 );
                  }
                  if( room )
                     obj = obj_to_room( obj, room );
               }

		    else if ( iNest == 0 || rgObjNest[iNest] == NULL )
		    {
			int slot = -1;
			bool reslot = FALSE;

			if ( file_ver > 1
			&&   wear_loc > -1
			&&   wear_loc < MAX_WEAR )
			{
			   int x;

			   
                        for( x = 0; x < MAX_LAYERS; x++ )
                        {
                           if( IS_NPC( ch ) )
                           {
                              if( !mob_save_equipment[wear_loc][x] )
                              {
                                 mob_save_equipment[wear_loc][x] = obj;
                                 slot = x;
                                 reslot = TRUE;
                                 break;
                              }
                           }
                           else
                           {
                              if( !save_equipment[wear_loc][x] )
                              {
                                 save_equipment[wear_loc][x] = obj;
                                 slot = x;
                                 reslot = TRUE;
                                 break;
                              }
                           }
                        }

			   if ( x == MAX_LAYERS )
				bug( "Fread_obj: too many layers %d", wear_loc );
			}
			obj = obj_to_char( obj, ch );
                   if( reslot && slot != -1 )
                     {
                        if( IS_NPC( ch ) )
                           mob_save_equipment[wear_loc][slot] = obj;
                        else
                           save_equipment[wear_loc][slot] = obj;
                     }

		    }
		    else
		    {
			if ( rgObjNest[iNest-1] )
			{
			   separate_obj( rgObjNest[iNest-1] );
			   obj = obj_to_obj( obj, rgObjNest[iNest-1] );
			}
			else
			   bug( "Fread_obj: nest layer missing %d", iNest-1 );
		    }
		    if ( fNest )
		      rgObjNest[iNest] = obj;
		    return;
		}
	    }
	    break;

	case 'I':
	    KEY( "ItemType",	obj->item_type,		fread_number( fp ) );
	    break;

	case 'L':
	    KEY( "Level",	obj->level,		fread_number_ld( fp ) );
	    break;

	case 'N':
	    KEY( "Name",	obj->name,		fread_string( fp ) );

	    if ( !strcmp( word, "Nest" ) )
	    {
		iNest = fread_number( fp );
		if ( iNest < 0 || iNest >= MAX_NEST )
		{
		    bug( "Fread_obj: bad nest %d.", iNest );
		    iNest = 0;
		    fNest = FALSE;
		}
		fMatch = TRUE;
	    }
	    break;
	    case 'O':
            if( !strcmp( word, "Owner" ) )
            {
                if( xIS_SET( obj->extra_flags, ITEM_PERSONAL ) && !obj->owner && ch )
                  KEY( "Owner", obj->owner, fread_string( fp ) );
            }
	case 'R':
	    KEY( "Room", room, get_room_index(fread_number(fp)) );

	case 'S':
	    KEY( "ShortDescr",	obj->short_descr,	fread_string( fp ) );

	    if ( !strcmp( word, "Spell" ) )
	    {
		int iValue;
		int sn;

		iValue = fread_number( fp );
		sn     = skill_lookup( fread_word( fp ) );
		if ( iValue < 0 || iValue > 5 )
		    bug( "Fread_obj: bad iValue %d.", iValue );
		else if ( sn < 0 )
		    bug( "Fread_obj: unknown skill.", 0 );
		else
		    obj->value[iValue] = sn;
		fMatch = TRUE;
		break;
	    }

	    break;

	case 'T':
	    KEY( "Timer",	obj->timer,		fread_number( fp ) );
	    break;

	case 'V':
	    if ( !strcmp( word, "Values" ) )
	    {
		int x1,x2,x3,x4,x5,x6;
		char *ln = fread_line( fp );

		x1=x2=x3=x4=x5=x6=0;
		sscanf( ln, "%d %d %d %d %d %d", &x1, &x2, &x3, &x4, &x5, &x6 );
		
		obj->value[0]	= x1;
		obj->value[1]	= x2;
		obj->value[2]	= x3;
		obj->value[3]	= x4;
		obj->value[4]	= x5;
		obj->value[5]	= x6;
		fMatch		= TRUE;
		break;
	    }

	    if ( !strcmp( word, "Vnum" ) )
	    {
		int vnum;

		vnum = fread_number( fp );
		/*  bug( "Fread_obj: bad vnum %d.", vnum );  */
		if ( ( obj->pIndexData = get_obj_index( vnum ) ) == NULL )
		    fVnum = FALSE;
		else
		{
		    fVnum = TRUE;
		    obj->cost = obj->pIndexData->cost;
		    obj->weight = obj->pIndexData->weight;
		    obj->item_type = obj->pIndexData->item_type;
		    obj->wear_flags = obj->pIndexData->wear_flags;
		    obj->extra_flags = obj->pIndexData->extra_flags;
		}
		fMatch = TRUE;
		break;
	    }
	    break;

	case 'W':
            KEY( "WearFlags", obj->wear_flags, fread_number( fp ) );
	    KEY( "WearLoc",	obj->wear_loc,		fread_number( fp ) );
	    KEY( "Weight",	obj->weight,		fread_number( fp ) );
	    break;

	}

	if ( !fMatch )
	{
	    EXTRA_DESCR_DATA *ed;
	    AFFECT_DATA *paf;

	    bug( "Fread_obj: no match.", 0 );
	    bug( word, 0 );
	    fread_to_eol( fp );
	    if ( obj->name )
		STRFREE( obj->name        );
	    if ( obj->description )
		STRFREE( obj->description );
	    if ( obj->short_descr )
		STRFREE( obj->short_descr );
	    while ( (ed=obj->first_extradesc) != NULL )
	    {
		STRFREE( ed->keyword );
		STRFREE( ed->description );
		UNLINK( ed, obj->first_extradesc, obj->last_extradesc, next, prev );
		DISPOSE( ed );
	    }
	    while ( (paf=obj->first_affect) != NULL )
	    {
		UNLINK( paf, obj->first_affect, obj->last_affect, next, prev );
		DISPOSE( paf );
	    }
	    DISPOSE( obj );
	    return;
	}
    }
}

Pages:<< prev ... 6, 7, 8, 9, 10 ... next >>