Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 parse description bug
Today, 9:00 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, Yandex, Remcon, DotBot

Members: 1
Guests: 16
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,237
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » Old bribe bug
Forum Rules | Mark all | Recent Posts

Old bribe bug
< Newer Topic :: Older Topic > Lol, this one's pretty funny...

Pages:<< prev 1 next >>
Post is unread #1 May 13, 2005, 9:47 pm
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

Yeah, um...

Do we really want our players to be able to bribe with as much money as they want, regardless of how much they actually HAVE?

If you take a look at do_bribe, you'll notice that there's absolutely NO check for a player's money before allowing the bribe. You bribe 2.5Mil, you kill the mob, you get all the money back, even though you never really had it.

The fix is pretty simple:

   if( victim->vip_flags == 0 )
   {
      send_to_char( "Diplomacy would be wasted on them.\n\r", ch );
      return;
   }


Right after that piece, add in:

   if( ch->gold < amount )
   {
	   send_to_char( "You don't have that much money!\n\r", ch);
	   return;
   }


Instant amount < money ifcheck! :D
       
Post is unread #2 May 13, 2005, 10:37 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Nice catch there, although it won't do the person performing this a whole lot of good since they'll go negative, but a second PC making the kill would think they hit the lottery :P
       
Post is unread #3 May 14, 2005, 9:55 pm
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

Case in point.

One player takes one for the team and bribes a ridiculous amount, while his buddies take what's left. Ineffective, unlikely, but all the same, it's there.

That aside though, consider the following code:

      amount =
         UMIN( amount,
               ( exp_level( ch->skill_level[DIPLOMACY_ABILITY] + 1 ) - exp_level( ch->skill_level[DIPLOMACY_ABILITY] ) ) );

      gain_exp( ch, amount, DIPLOMACY_ABILITY );
      ch_printf( ch, "You gain %d diplomacy experience.\n\r", amount );

      learn_from_success( ch, gsn_bribe );


That means that they can freely bribe whatever amount is needed to obtain their next level, and get it back simply by slaughtering the victim, regardless of whether they have that much money or not.
       
Pages:<< prev 1 next >>