Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 Couple bugs
Yesterday, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
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
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
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 #101 Aug 14, 2013, 6:31 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

ok ill check these things out and see what the issue is :)
       
Post is unread #102 Aug 14, 2013, 6:58 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

Well i would leave emerge like it was, it isn't bad it saying you emerge from hiding, although it doesn't remove sneak aff like it should....As for the other It is using the old stock setup instead of the body parts where things are worn and ill have to figure out a fix for it sometime. There is a lot in this code that needs modified to work under the new setup.
       
Post is unread #103 Aug 14, 2013, 7:03 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

thanks very much

Ah ya I guess emerge can just stay like it is

it's really not that big of a deal I guess... Hmm hadn't noticed it didn't remove sneak



If it makes it easier I'm ok with changing it to check for the scroll (or potion vial since the code is the same and having problems too) in the characters inventory... I don't necessarily want them to be holding the items , but holding them is ok too
       
Post is unread #104 Aug 19, 2013, 2:48 pm
Go to the top of the page
Go to the bottom of the page

mystickdreamer
Magician
GroupMembers
Posts128
JoinedApr 9, 2010

Hah through looking at other code I figured out how to make the scribe skill work here is the updated code


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;

char arg2[MAX_INPUT_LENGTH];
   
bool found;
   
argument = one_argument( argument, arg2 );

scroll = get_obj_carry( ch, arg2 );
   
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, BP_RHAND ) ) == NULL )
  if ( !scroll )    
   {
      
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 have 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;

} 



What I did was

initialized arg2
 
char arg2[MAX_INPUT_LENGTH];



then based off of the enchanting code added this

argument = one_argument( argument, arg2 );

scroll = get_obj_carry( ch, arg2 );


then I commented out

//if( ( scroll = get_eq_char( ch, WEAR_HAND ) ) == NULL )


and added

if (!scroll)
in it's place


this checked to see if a blank scroll was in the inventory and proceeded with scribing code

I'm going to try and apply this same fix to the brew command
       
Post is unread #105 Aug 19, 2013, 6:41 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

Ok, If you dont mind download the latest copy and try using the source there for scribe and brew, you won't have to change the scroll or potions just have to be able to wield the scroll or flask (so have to have hands) etc... but it should work no matter which hand the scroll or flask are in just fine.
       
Pages:<< prev ... 2, 3, 4, 5, 6 next >>