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, Yahoo!, Sogou

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » Calareymud loadarea crash
Forum Rules | Mark all | Recent Posts

Calareymud loadarea crash
< Newer Topic :: Older Topic >

Pages:<< prev ... 2, 3, 4, 5, 6 next >>
Post is unread #81 Aug 8, 2013, 7:13 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

ok think i see the issue lol
      /*
       * Clear out shops of players that no longer exist 
       */ 
      if( str_cmp( shop->owner, "(for sale)" ) )
   {
      
sprintf( buf, "%s%c/%s", PLAYER_DIR, LOWER( shop->owner[0] ), shop->owner );
      
if( stat( buf, &fst ) == -1 )
      {
         
STRFREE( shop->owner );
         
shop->owner = STRALLOC( "(for sale)" );
         
fold_area( ch->in_room->area, ch->in_room->area->filename, FALSE );
      
}

you might be setting it to like admin instead of Admin etc... And since it isn't doing a capitalize on it when checking it will think it doesn't exist and reset it although personally i think that is better done on startup when loading the rooms lol
       
Post is unread #82 Aug 8, 2013, 7:48 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Ok, it is updated now with a fix for that.Thanks for the info on what all was going on when it seemed to change. :)
       
Post is unread #83 Aug 9, 2013, 7:22 am
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

Ah that was the problem when I capitalized the A it worked just fine lol


       
Post is unread #84 Aug 10, 2013, 5:17 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

If you find any more bugs let me know :)
       
Post is unread #85 Aug 10, 2013, 6:41 am
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

Well what I am currently working on is peek seems to be at 100% for every race that is allowed to learn it


I don't know if that is a code issue or peek is just set up wrong

Dodge seems to be the same case
       
Post is unread #86 Aug 10, 2013, 12:02 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

make sure you test with lower level characters
       
Post is unread #87 Aug 10, 2013, 2:47 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

I created 3 brand new characters of different races and they all had:

This is a dwarf
 ----------------------------------Skills----------------------------------
               affix 100%                  aid 100%              combine 100%
                 dig 100%                dodge 100%              fashion 100%
                jump 100%                 peek 100%               repair 100%
                scan 100%               search 100%


This is a human
 ----------------------------------Skills----------------------------------
                 aid 100%                  dig 100%                dodge 100%
             fashion 100%                 jump 100%                mount 100%
                peek 100%                 scan 100%               search 100%



I want characters to start out with skills like this, but I would like them to start out at maybe 10% or 15%
       
Post is unread #88 Aug 10, 2013, 9:12 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

found in skills.dat for aid skill
Race	0 1
Race	1 1
Race	2 1
Race	3 2
Race	4 2
Race	5 2
Race	6 2
Race	7 2
Race	8 2
Race	9 2
Race	10 2
Race	11 2
Race	12 2
Race	13 2
Race	14 1
Race	15 2
Race	16 2
Race	17 2
Race	18 2
Race	19 1
Race	20 2
Race	21 2
Race	22 2
Race	23 2
Race	24 2
Race	25 2
Race	26 2
Race	27 1
Race	28 2
Race	29 2
Race	30 2
Race	31 3
Race	32 3
Race	33 3
Race	34 3
Race	35 3
Race	36 3
Race	37 3
Race	38 3
Race	39 3

the first number is the race number and the second is how it is handled.
For non spells: 1 is an auto 100%, 2 is handle it like a spell (goes by what they know it at), anything else is 0%

Human is race 0 and Dwarf is race 2 and both them have 1 for aid in skills.dat so thats why they have it at 100%
       
Post is unread #89 Aug 11, 2013, 8:15 am
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

ah so if i want them to learn it in percentages then just put everything to 2?
       
Post is unread #90 Aug 11, 2013, 8:20 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Yep, and if you want them always at 100% in it set it to 1
       
Post is unread #91 Aug 11, 2013, 9:46 am
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

What if I want them to start out with like 15% and then be able to learn from there?
       
Post is unread #92 Aug 11, 2013, 10:45 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

nothing setup for that as far as I could tell.
       
Post is unread #93 Aug 11, 2013, 1:22 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

Ah ok


So as the code is written everybody either starts at 0 or 100

I can deal with that for now


       
Post is unread #94 Aug 12, 2013, 6:57 pm   Last edited Aug 12, 2013, 6:58 pm by mystickdreamer
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

Wonder if you might tell me where I can find what species is which number?



EDIT: Ah nevermind I found a way with the species show command
       
Post is unread #95 Aug 12, 2013, 7:07 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

ok lol
       
Post is unread #96 Aug 13, 2013, 3:49 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

Although I have put the scribe skill back into the game, but it doesn't seem to get past this part of the code


if( ( scroll = get_eq_char( ch, WEAR_HAND ) ) == NULL )
      
   {
      
send_to_char( "You must be holding a blank scroll to scribe it.\n\r", ch );
      
return;
   
}
   
if( scroll->pIndexData->vnum != OBJ_VNUM_SCROLL_SCRIBING )
      
   {
      
send_to_char( "You must be holding a blank scroll to scribe it.\n\r", ch );
      
return;
   



Here is the scroll :

 Name: scroll scribing blank
Created by: Admin
Vnum: 34  Type: scroll  Count:  1  Gcount: 1
Serial#: 314  TopIdxSerial#: 314  TopSerial#: 1525
Short description: a blank scroll
Long description : A blank scroll lays here gathering dust.
Part flags : 
Extra flags: inventory
Number: 1/1   Weight: 2/2   Size: 76   Layers: 0   Wear_loc: -1
Cost: 1000  Condition: 100  Tech: 8193  Timer: 0  Mana: 0/0
In room: 0  In object: (none)  Carried by: Admin
Index Values : 0 -1 -1 -1 -1 -1 0.
Object Values: 1 -1 -1 -1 -1 -1 0.
Progs: 


and here is the slookup for scribe

Sn:   71 Slot:    0 Skill: 'scribe              '
Type: Skill  Target: ignore  Minpos: 0  Mana: 0  Beats: 18  Range: 0
Flags: 0  Club: 0  Value: 0  Info: 0  Code: do_scribe
Dammsg: 
Wearoff: (none set)
Has been used 5 times this boot.
Time (in secs): min 0.000003; avg: 0.000005; max 0.000007
--------------------------[STAT USE]--------------------------
Stat 1: Intelligence
Stat 2: None

--------------------------[RACE USE]--------------------------
0  ):    learn  1  ):    learn
2  ):    learn  3  ):    learn  4  ):    learn
5  ):    learn  6  ):    learn  7  ):    learn
8  ):    learn  9  ):    learn  10 ):    learn
11 ):    learn  12 ):    learn  13 ):    learn
14 ):    learn  15 ):    learn  16 ):    learn
17 ):    learn  18 ):    learn  19 ):    learn
20 ):    learn  21 ):    learn  22 ):    learn
23 ):    learn  24 ):    learn  25 ):    learn
26 ):    learn  27 ):    learn  28 ):    learn
29 ):    learn  30 ):    learn  31 ):    learn
32 ):    learn  33 ):    learn  34 ):    learn
35 ):    learn  36 ):    learn  37 ):    learn
38 ):    learn  39 ):    learn






Here is what happens:

hold scroll
You hold a blank scroll in your right hand.
< 1650/1650hp 5390/5390m 3000/3000ep > scribe blindness
You must be holding a blank scroll to scribe it



and I do have a magical pen in my inventory and I tried to hold the pen as well
       
Post is unread #97 Aug 13, 2013, 4:59 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

chances are it has to do with another part of do_scribe and the obj values or it is isnt defined to that vnum. or well you need to have it check the right hand.
       
Post is unread #98 Aug 13, 2013, 7:33 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

well here is the entire function

and I have checked there is a define in mud.h

#define OBJ_VNUM_SCROLL_SCRIBING     34




void do_scribe( CHAR_DATA * ch, char *argument ) 
{
   
OBJ_DATA * scroll;
   
OBJ_DATA * pen;
   
int sn;
   
char buf1[MAX_STRING_LENGTH];
   
char buf2[MAX_STRING_LENGTH];
   
char buf3[MAX_STRING_LENGTH];
   
int mana;
   
bool found;
   
if( IS_NPC( ch ) )
      
return;
   
if( !skill_available( ch, gsn_scribe ) )
      
   {
      
send_to_char( "A skill such as this requires more magical ability than you have.\n\r", ch );
      
return;
   
}
   
if( argument[0] == '\0' || !str_cmp( argument, "" ) )
      
   {
      
send_to_char( "Scribe what?\n\r", ch );
      
return;
   
}
   
if( ms_find_obj( ch ) )
      
return;
   
if( ( sn = find_spell( ch, argument, TRUE ) ) < 0 )
      
   {
      
send_to_char( "You have not learned that spell.\n\r", ch );
      
return;
   
}
   
if( skill_table[sn]->spell_fun == spell_null )
      
   {
      
send_to_char( "That's not a spell!\n\r", ch );
      
return;
   
}
   
if( SPELL_FLAG( skill_table[sn], SF_NOSCRIBE ) )
      
   {
      
send_to_char( "You cannot scribe that spell.\n\r", ch );
      
return;
   
}
   
mana =
      IS_NPC( ch ) ? 0 : UMAX( skill_table[sn]->min_mana,
                               
100 / ( 100 - skill_table[sn]->skill_level[get_best_talent( ch, sn )] ) );
   
mana *= 5;
   
if( !IS_NPC( ch ) && ch->mana < mana )
      
   {
      
send_to_char( "You don't have enough mana.\n\r", ch );
      
return;
   
}
   
if( ( scroll = get_eq_char( ch, WEAR_HAND ) ) == NULL )
      
   {
      
send_to_char( "You must be holding a blank scroll to scribe it.\n\r", ch );
      
return;
   
}
   
if( scroll->pIndexData->vnum != OBJ_VNUM_SCROLL_SCRIBING )
      
   {
      
send_to_char( "You must be holding a blank scroll to scribe it.\n\r", ch );
      
return;
   
}
   
if( ( scroll->value[1] != -1 ) 
 &&( scroll->pIndexData->vnum == OBJ_VNUM_SCROLL_SCRIBING ) )
      
   {
      
send_to_char( "That scroll has already been inscribed.\n\r", ch );
      
return;
   
}
   
found = FALSE;
   
for( pen = ch->first_carrying; pen; pen = pen->next_content )
      
if( ( pen->item_type == ITEM_PEN ) && ( IS_OBJ_STAT( pen, ITEM_MAGIC ) ) )
      {
         
found = TRUE;
         
break;
      
}
   
if( !found )
   {
      
send_to_char( "You must have a magical pen to scribe.\n\r", ch );
      
return;
   
}
   
if( !process_spell_components( ch, sn ) )
      
   {
      
learn_from_failure( ch, gsn_scribe );
      
ch->mana -= ( mana / 2 );
      
ch->in_room->area->weather->mana += ( int )mana / 10;
      
return;
   
}
   
if( !can_use_skill( ch, number_percent(  ), gsn_scribe ) )
      
   {
      
set_char_color( AT_MAGIC, ch );
      
send_to_char( "You failed.\n\r", ch );
      
learn_from_failure( ch, gsn_scribe );
      
ch->mana -= ( mana / 2 );
      
ch->in_room->area->weather->mana += ( int )mana / 10;
      
return;
   
}
   
scroll->value[1] = sn;
   
sprintf( buf1, "%s scroll", skill_table[sn]->name );
   
STRFREE( scroll->short_descr );
   
scroll->short_descr = STRALLOC( aoran( buf1 ) );
   
sprintf( buf2, "A glowing scroll inscribed '%s' lies in the dust.", 
skill_table[sn]->name );
   
STRFREE( scroll->description );
   
scroll->description = STRALLOC( buf2 );
   
sprintf( buf3, "scroll scribing %s", skill_table[sn]->name );
   
STRFREE( scroll->name );
   
scroll->name = STRALLOC( buf3 );
   
act( AT_MAGIC, "$n magically scribes $p.", ch, scroll, NULL, TO_ROOM );
   
act( AT_MAGIC, "You magically scribe $p.", ch, scroll, NULL, TO_CHAR );
   
learn_from_success( ch, gsn_scribe );
   
ch->mana -= mana;
   
ch->in_room->area->weather->mana += ( int )mana / 10;

} 
       
Post is unread #99 Aug 13, 2013, 8:22 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

well there is a WEAR_HAND and a WEAR_HAND2 try them both and see if either works lol
       
Post is unread #100 Aug 14, 2013, 2:04 pm   Last edited Aug 14, 2013, 4:29 pm by mystickdreamer
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

changing to WEAR_HAND2 didn't change anything




I came across a piece of code that lets you unhide even if you are not hidden


this is my thought on how to fix it, but it seems to not let you unhide anymore

mind letting me know what I'm doing wrong


void do_emerge( CHAR_DATA * ch, char *argument )
{
   
if( !IS_NPC( ch ) )
	if( !IS_AFFECTED( ch, AFF_HIDE) || !IS_AFFECTED( ch, AFF_SNEAK) )
	{
		send_to_char( "You are not hiding or sneaking!\n\r", ch );
			return;
	}
	else
		
   {

xREMOVE_BIT( ch->pcdata->perm_aff, AFF_SNEAK );
      
xREMOVE_BIT( ch->pcdata->perm_aff, AFF_HIDE );
   
}
	
   
xREMOVE_BIT( ch->affected_by, AFF_SNEAK );
   
xREMOVE_BIT( ch->affected_by, AFF_HIDE );
   
act( AT_DGREY, "You emerge from hiding.\n\r", ch, NULL, NULL, TO_CHAR );
   
act( AT_DGREY, "$n emerges from the shadows.\n\r", ch, NULL, NULL, TO_ROOM );

}
       
Pages:<< prev ... 2, 3, 4, 5, 6 next >>