|
Rent Deduction Code [by Michael J. Fara] |
|
|
|
Posted Wednesday, August 12th @ 11:35:41 PM, by George Greer in the Utils dept.
Added Jul 6, 1998. Click the link below to read it or download it.
From: Michael J. Fara <mulder@cloud9.net>
Subject: Rent Deduction Code for CircleMUD bpl12
The following are simple instructions for installing a rent deduction
formula to your CircleMUD. This shouldn't take too long. Before
installing this please note that I will not be responsible for any damage
this causes to your MUD as a result of this and I don't really have the
time to help you since I'm already very busy.
You don't have to make a shrine on your MUD dedicated to me because you
used this code, but if someone asks you where it's from please mention my
name. Thanks.
Add this at the bottom of utils.c:
int charge_less_rent(struct char_data *ch)
{
int lessrent;
lessrent = GET_LEVEL(ch) * 1000; /* change formula to what you want */
return lessrent;
}
Then go to objsave.c:
Find...
totalcost = min_rent_cost * factor
Change that to:
totalcost = min_rent_cost * factor - charge_less_rent(ch);
Then go down a bit and you will find
sprintf (buf, "$n tells you, 'Plus, my %d coin fee..'",
min_rent_cost * factor);
act (buf, FALSE, receptionist, 0, ch, TO_VICT);
Directly under that add..
sprintf (buf, "$n tells you, 'You're quite famous.. I'll charge %d less.'
",
charge_less_rent(ch));
act (buf, FALSE, receptionist, 0, ch, TO_VICT);
if (totalcost < 0)
totalcost = 0;
Then look for...
if (CMD_IS ("rent"))
{
if (!(cost = Crash_offer_rent (ch, recep, FALSE, mode)))
return TRUE;
Directly under that add..
if (cost < 0)
cost = 0;
You're done.
P.S I really hope you take the time to add something to your rent system
that warns people when they type quit that they'll lose their stuff..now
that I think of it maybe I'll make a snippet for that too.
<< Remort Snippet [by Digital] | Reply | View as text | Flattened | Reroll stats [by BuckFloyd] >> |
|
Related Links |
|
|
|
CircleMUD Snippets |
|
|
Note: Not all of these snippets will work perfectly with
your version of code, so be prepared to fix one
or two bugs that may arise, and please let me know
what you needed to do to fix it. Sending a corrected
version is always welcome.
|
Finally, if you wish to use any of the snippets from this
page, you are more than welcome, just mention the
authors in your credits. If you wish to release any
of these snippets to the public on another site,
contact me FIRST.
|
|
|
|
|
|
|