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, DotBot

Members: 0
Guests: 18
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
635
JenniRosen
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SWFOTE FUSS Bugfix List » [Enh] Easier to understand me...
Forum Rules | Mark all | Recent Posts

[Enh] Easier to understand messages for "get all"
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Feb 22, 2010, 9:27 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

This nifty enhancement changes the messages when there's nothing in the container you attempt to "get all" from to something that makes a little more sense, and tells you what you tried to get thing from.

Found by: Nick Gammon

act_obj.c, do_get

Find:
         if( !obj )
         {
            act( AT_PLAIN, IS_OBJ_STAT( container, ITEM_COVERING ) ?
               "I see nothing like that beneath the $T." : "I see nothing like that in the $T.", ch, NULL, arg1, TO_CHAR );
            return;
         }


Replace With:
         if( !obj )
         {
            act( AT_PLAIN, IS_OBJ_STAT( container, ITEM_COVERING ) ?
               "I see nothing like that beneath the $T." : "I see nothing like that in the $T.", ch, NULL, container->short_descr, TO_CHAR );
            return;
         }


Find:
            if( fAll )
            {
               if( container->item_type == ITEM_KEYRING && !IS_OBJ_STAT( container, ITEM_COVERING ) )
                  act( AT_PLAIN, "The $T holds no keys.", ch, NULL, arg2, TO_CHAR );
               else
                  act( AT_PLAIN, IS_OBJ_STAT( container, ITEM_COVERING ) ?
                       "I see nothing beneath the $T." : "I see nothing in the $T.", ch, NULL, arg2, TO_CHAR );
            }
            else
            {
               if( container->item_type == ITEM_KEYRING && !IS_OBJ_STAT( container, ITEM_COVERING ) )
                  act( AT_PLAIN, "The $T does not hold that key.", ch, NULL, arg2, TO_CHAR );
               else
                  act( AT_PLAIN, IS_OBJ_STAT( container, ITEM_COVERING ) ?
                       "I see nothing like that beneath the $T." :
                       "I see nothing like that in the $T.", ch, NULL, arg2, TO_CHAR );
            }


Replace with:
            if( fAll )
            {
               if( container->item_type == ITEM_KEYRING && !IS_OBJ_STAT( container, ITEM_COVERING ) )
                  act( AT_PLAIN, "The $T holds no keys.", ch, NULL, container->short_descr, TO_CHAR );
               else
                  act( AT_PLAIN, IS_OBJ_STAT( container, ITEM_COVERING ) ?
                       "I see nothing beneath the $T." : "I see nothing in the $T.", ch, NULL, container->short_descr, TO_CHAR );
            }
            else
            {
               if( container->item_type == ITEM_KEYRING && !IS_OBJ_STAT( container, ITEM_COVERING ) )
                  act( AT_PLAIN, "The $T does not hold that key.", ch, NULL, container->short_descr, TO_CHAR );
               else
                  act( AT_PLAIN, IS_OBJ_STAT( container, ITEM_COVERING ) ?
                       "I see nothing like that beneath the $T." :
                       "I see nothing like that in the $T.", ch, NULL, container->short_descr, TO_CHAR );
            }
       
Pages:<< prev 1 next >>