Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Development
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
633
Rhyader
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,874
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,874
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,874
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 >>