Login
User Name:

Password:



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

Members: 0
Guests: 15
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 » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] Midas touch can be abus...
Forum Rules | Mark all | Recent Posts

[Bug] Midas touch can be abused for limitless gold
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 5, 2005, 3:55 pm   Last edited May 11, 2005, 6:33 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: Midas touch can be abused for limitless gold.
Danger: medium
Found by: Orion Elder
Fixed by: Orion Elder
-----
(magic.c)
Find the midas_touch spell function and replace it with:

ch_ret spell_midas_touch( int sn, int level, CHAR_DATA *ch, void *vo )
{
    int val;
    OBJ_DATA *obj = (OBJ_DATA *) vo;

    if ( IS_OBJ_STAT( obj, ITEM_NODROP ) )
    {
        send_to_char( "You can't seem to let go of it.\n\r", ch );
        return rSPELL_FAILED;
    }

    if ( IS_OBJ_STAT( obj, ITEM_PROTOTYPE )
    &&   get_trust( ch ) < LEVEL_IMMORTAL ) /* was victim instead of ch!  Thanks Nick Gammon */
    {
        send_to_char( "That item is not for mortal hands to touch!\n\r", ch );
        return rSPELL_FAILED;   /* Thoric */
    }

    if ( !CAN_WEAR(obj, ITEM_TAKE)  || ( obj->item_type == ITEM_CORPSE_NPC) ||
         ( obj->item_type == ITEM_CORPSE_PC ) )
    {
       send_to_char( "You cannot seem to turn this item to gold!\n\r", ch);
       return rNONE;
    }

    separate_obj(obj);  /* nice, alty :) */

    val = obj->cost/2;
    val = UMAX(0, val);

    ch->gold += val;

    if ( obj_extracted(obj) )
        return rNONE;
    if ( cur_obj == obj->serial )
        global_objcode = rOBJ_SACCED;

    extract_obj( obj );
    send_to_char( "You transmogrify the item to gold!\n\r", ch );

    return rNONE;
}
       
Pages:<< prev 1 next >>