Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
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
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
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, Bing, Yahoo!

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » some magic.c issues
Forum Rules | Mark all | Recent Posts

some magic.c issues
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Oct 29, 2005, 7:59 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Blah, is it just me or is the code to trusting lol :P
magic.c
find
ch_ret spell_create_food( int sn, int level, CHAR_DATA * ch, void *vo )
{
   OBJ_DATA *mushroom;

   mushroom = create_object( get_obj_index( OBJ_VNUM_MUSHROOM ), 0 );
   mushroom->value[0] = 5 + level;
   act( AT_MAGIC, "$p suddenly appears.", ch, mushroom, NULL, TO_ROOM );
   act( AT_MAGIC, "$p suddenly appears.", ch, mushroom, NULL, TO_CHAR );
   mushroom = obj_to_room( mushroom, ch->in_room );
   return rNONE;
}

change it to this
ch_ret spell_create_food( int sn, int level, CHAR_DATA * ch, void *vo )
{
   OBJ_DATA *mushroom;

   if( !( mushroom = create_object( get_obj_index( OBJ_VNUM_MUSHROOM ), 0 ) ) )
   {
      bug( "%s: Object vnum %d couldn't be created", __FUNCTION__, OBJ_VNUM_MUSHROOM );
      return rNONE;
   }
   mushroom->value[0] = 5 + level;
   act( AT_MAGIC, "$p suddenly appears.", ch, mushroom, NULL, TO_ROOM );
   act( AT_MAGIC, "$p suddenly appears.", ch, mushroom, NULL, TO_CHAR );
   mushroom = obj_to_room( mushroom, ch->in_room );
   return rNONE;
}


in function spell_portal
find
   pexit->vnum = targetRoomVnum;

  portalObj = create_object( get_obj_index( OBJ_VNUM_PORTAL ), 0 );
   portalObj->timer = 3;

change it to this
   pexit->vnum = targetRoomVnum;

   if( !( portalObj = create_object( get_obj_index( OBJ_VNUM_PORTAL ), 0 ) ) )
   {
      bug( "%s: Object vnum %d couldn't be created", __FUNCTION__, OBJ_VNUM_PORTAL );
      return rNONE;
   }
   portalObj->timer = 3;

then futhur down find
   pexit->vnum = targetRoomVnum;

   portalObj = create_object( get_obj_index( OBJ_VNUM_PORTAL ), 0 );
   portalObj->timer = 3;
   STRFREE( portalObj->short_descr );

change it to this
   pexit->vnum = targetRoomVnum;

   if( !( portalObj = create_object( get_obj_index( OBJ_VNUM_PORTAL ), 0 ) ) )
   {
      bug( "%s: Object vnum %d couldn't be created", __FUNCTION__, OBJ_VNUM_PORTAL );
      return rNONE;
   }
   portalObj->timer = 3;
   STRFREE( portalObj->short_descr );
   portalObj->short_descr = STRALLOC( buf );

       
Post is unread #2 Oct 30, 2005, 6:39 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Ok, well heres some more you need to do the same similar thing to for create_obj etc...
makeobjs.c
make_fire
make_trap
make_scraps
make_corpse
make_blood
make_bloodstain
create_money

mud_prog.c
mprog_bribe_trigger

shops.c
do_buy

skills.c
do_skin

probably some more ill post later when i get around to it lol.
       
Post is unread #3 Oct 30, 2005, 8:42 am   Last edited Oct 30, 2005, 8:43 am by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Ok, just pretty much all of them need fixed.
look for get_obj_index/create_obj and fix all of the ones that arent right :)
Likly some others we should fix to, like make_trap etc...
       
Pages:<< prev 1 next >>