mirror of
https://github.com/tbamud/tbamud.git
synced 2026-03-21 03:36:32 +01:00
Coins as items update 2
This commit is contained in:
parent
972d290126
commit
d4bda3ad4a
37 changed files with 736 additions and 779 deletions
|
|
@ -104,16 +104,16 @@ can use MSDPFlush() instead - however, as with MSDPUpdate(), it will only send
|
|||
variables that are reportable and have changed.
|
||||
|
||||
/******************************************************************************
|
||||
The MSDP_GOLD variable reports a negative number!
|
||||
The MSDP_MONEY variable reports a negative number!
|
||||
******************************************************************************/
|
||||
|
||||
The snippet uses ints, which are usually 32 bits. If you're using 64 bit long
|
||||
long ints for certain things (such as gold), then you should either store them
|
||||
long ints for certain things (such as coins), then you should either store them
|
||||
in MSDP string variables, or change the snippet to use long long ints.
|
||||
|
||||
Note that this won't effect your character, it's only the MSDP variable that
|
||||
overflows. It will give inaccurate information on your GUI, but players won't
|
||||
actually lose any gold, so don't panic!
|
||||
actually lose any coins, so don't panic!
|
||||
|
||||
/******************************************************************************
|
||||
The snippet is revealing my vnums! Those are supposed to be top secret!
|
||||
|
|
|
|||
|
|
@ -447,7 +447,7 @@ trap! tbaMUD is bound to contain bugs, but most of the core systems have been
|
|||
well tested, so you should take claims such as “I magically lost all my stuff!”
|
||||
with a grain of salt and check your system logs.
|
||||
|
||||
If a player ever asks you for reimbursement of equipment, money, gold,
|
||||
If a player ever asks you for reimbursement of equipment, money, coins,
|
||||
experience points (XP), or whatever, your gut reaction should always be to
|
||||
check the logs first.
|
||||
|
||||
|
|
|
|||
|
|
@ -750,7 +750,7 @@ For type S mobs, the type-specific information should be in the following format
|
|||
|
||||
<mob flags> <affect flags> <alignment> S
|
||||
<level> <thaco> <armor class> <hitpoints> <damage>
|
||||
<gold> <experience points>
|
||||
<coins> <experience points>
|
||||
<load position> <default position> <sex>
|
||||
|
||||
Level The level of the monster, from 1 to 34.
|
||||
|
|
@ -803,7 +803,7 @@ will do between 11 and 14 hitpoints each round without a weapon. If the monster
|
|||
picks up and wields a tiny stick which gives 1d2 damage, then the monster will
|
||||
do 1d2 + 10 points of damage per round with the stick.
|
||||
|
||||
Gold The number of gold coins the mobile is initially loaded with.
|
||||
Coins The number of coins the mobile is initially loaded with.
|
||||
|
||||
Experience The number of experience points the mobile is initially loaded with.
|
||||
|
||||
|
|
@ -848,7 +848,7 @@ hanging around his teeth.
|
|||
This is mobile vnum 3062. The Fido has mob and affect flags set and has an
|
||||
initial alignment of -200. After the S flag we see that the Fido is level 1,
|
||||
has a THAC0 of 20, an Armor Class of 9, 0d0+10 hit points (10 hitpoints), and
|
||||
will do 1d2 hit points of bare hand damage per round. The Fido has 10 gold
|
||||
will do 1d2 hit points of bare hand damage per round. The Fido has 10 coins
|
||||
and 100 experience points, has a load position and default position of
|
||||
STANDING, and is male.
|
||||
|
||||
|
|
@ -867,7 +867,7 @@ The format of an E mobile is as follows:
|
|||
|
||||
<mob flags> <affect flags> <alignment> E
|
||||
<level> <hitroll> <armor class> <hitpoints> <damage>
|
||||
<gold> <experience points>
|
||||
<coins> <experience points>
|
||||
<load position> <default position> <sex>
|
||||
{E-spec list}
|
||||
E
|
||||
|
|
@ -1002,7 +1002,7 @@ the following numbers:
|
|||
5 WEAPON Must be piercing to backstab.
|
||||
6 FURNITURE Item may be sat on.
|
||||
7 FREE Do not set.
|
||||
8 TREASURE Item is treasure other than gold coins (i.e. gems)
|
||||
8 TREASURE Item is treasure other than coins (i.e. gems)
|
||||
9 ARMOR Item is armor.
|
||||
10 POTION Item is a magical potion.
|
||||
11 WORN Item is worn, but not armor.
|
||||
|
|
@ -1073,7 +1073,7 @@ Weight The weight of the object. The weight controls how many strength points a
|
|||
character must have to take the object, and is used to calculate when bags and
|
||||
other containers become full.
|
||||
|
||||
Cost The value of the object in gold coins; used by shopkeepers.
|
||||
Cost The value of the object in coins; used by shopkeepers.
|
||||
|
||||
Cost Per Day A legacy value that the game ignores.
|
||||
|
||||
|
|
@ -1184,7 +1184,7 @@ value 1-2: unused
|
|||
value 3: Non-zero if the food is poisoned, 0 otherwise.
|
||||
|
||||
MONEY: (Type Flag 20)
|
||||
value 0: The number of gold coins in the pile.
|
||||
value 0: The number of coins in the pile.
|
||||
value 1-3: unused
|
||||
|
||||
PEN: (Type Flag 21)
|
||||
|
|
@ -1239,7 +1239,7 @@ the following numbers:
|
|||
12 MAXMANA Apply to MAX mana points.
|
||||
13 MAXHIT Apply to MAX hit points.
|
||||
14 MAXMOVE Apply to MAX movement points.
|
||||
15 GOLD Unimplemented. Do not use.
|
||||
15 COINS Unimplemented. Do not use.
|
||||
16 EXP Unimplemented. Do not use.
|
||||
17 ARMOR Apply to armor class (AC). negative is better.
|
||||
18 HITROLL Apply to hitroll.
|
||||
|
|
@ -1811,7 +1811,7 @@ See also: TRIG-COMMANDS, VARIABLES, EXPRESSIONS =========================
|
|||
Numeric arguments purpose varies depending on the trigger type. For most
|
||||
triggers it is the percentage chance of firing. But, it can also be the
|
||||
percentage of hitpoints remaining, location of an object, to match a string
|
||||
or single word in the argument, or the amount of gold for a bribe. To find
|
||||
or single word in the argument, or the amount of coins for a bribe. To find
|
||||
out what numeric arg does for each trig look up that triggers help file.
|
||||
|
||||
Trig arg This describes the text argument, if any, which can be used to filter
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -34,7 +34,7 @@ NEW COMMANDS AND NEW MUD BEHAVIOR:
|
|||
** You will now be immediately notified when you have new mail, when coming
|
||||
back from AFK and reconnecting.
|
||||
|
||||
** New toggles: autoloot, autogold, autosplit, autosac, and autoassist.
|
||||
** New toggles: autoloot, autosplit, autosac, and autoassist.
|
||||
|
||||
** Improved toggle command allowing more options.
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ NEW COMMANDS AND NEW MUD BEHAVIOR:
|
|||
** Use the ASSIST command to engage in mortal combat with someone in the room
|
||||
who is getting pummeled.
|
||||
|
||||
** Use the SPLIT command to split gold among the members of your group
|
||||
** Use the SPLIT command to split coins among the members of your group
|
||||
(including yourself) who are in the room. i.e. If you are in a group
|
||||
with 4 other people who are in the room with you, type "SPLIT 100"
|
||||
to give each of them 20 coins.
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ end
|
|||
if %actor.level% < 3
|
||||
nop %actor.exp(%value%)%
|
||||
else
|
||||
nop %actor.gold(%value%)%
|
||||
nop %actor.coins(%value%)%
|
||||
end
|
||||
%purge% %object%
|
||||
~
|
||||
|
|
@ -79,12 +79,12 @@ Stock Thief~
|
|||
~
|
||||
set actor %random.char%
|
||||
if %actor%
|
||||
if %actor.is_pc% && %actor.gold%
|
||||
if %actor.is_pc% && %actor.coins%
|
||||
%send% %actor% You discover that %self.name% has %self.hisher% hands in your wallet.
|
||||
%echoaround% %actor% %self.name% tries to steal gold from %actor.name%.
|
||||
eval coins %actor.gold% * %random.10% / 100
|
||||
nop %actor.gold(-%coins%)%
|
||||
nop %self.gold(%coins%)%
|
||||
%echoaround% %actor% %self.name% tries to steal coins from %actor.name%.
|
||||
eval coins %actor.coins% * %random.10% / 100
|
||||
nop %actor.coins(-%coins%)%
|
||||
nop %self.coins(%coins%)%
|
||||
end
|
||||
end
|
||||
~
|
||||
|
|
@ -280,7 +280,7 @@ set zodiac 5701
|
|||
set grave 7401
|
||||
set zamba 7500
|
||||
set gidean 7801
|
||||
set glumgold 8301
|
||||
set glumcoins 8301
|
||||
set duke 8660
|
||||
set oasis 9000
|
||||
set domiae 9603
|
||||
|
|
|
|||
25
src/act.h
25
src/act.h
|
|
@ -106,7 +106,7 @@ ACMD(do_diagnose);
|
|||
ACMD(do_equipment);
|
||||
ACMD(do_examine);
|
||||
ACMD(do_exits);
|
||||
ACMD(do_gold);
|
||||
ACMD(do_coins);
|
||||
ACMD(do_help);
|
||||
ACMD(do_history);
|
||||
ACMD(do_inventory);
|
||||
|
|
@ -230,18 +230,17 @@ ACMD(do_gen_tog);
|
|||
#define SCMD_BUILDWALK 15
|
||||
#define SCMD_AFK 16
|
||||
#define SCMD_AUTOLOOT 17
|
||||
#define SCMD_AUTOGOLD 18
|
||||
#define SCMD_AUTOSPLIT 19
|
||||
#define SCMD_AUTOASSIST 20
|
||||
#define SCMD_AUTOMAP 21
|
||||
#define SCMD_AUTOKEY 22
|
||||
#define SCMD_AUTODOOR 23
|
||||
#define SCMD_ZONERESETS 24
|
||||
#define SCMD_SYSLOG 25
|
||||
#define SCMD_WIMPY 26
|
||||
#define SCMD_PAGELENGTH 27
|
||||
#define SCMD_SCREENWIDTH 28
|
||||
#define SCMD_COLOR 29
|
||||
#define SCMD_AUTOSPLIT 18
|
||||
#define SCMD_AUTOASSIST 19
|
||||
#define SCMD_AUTOMAP 20
|
||||
#define SCMD_AUTOKEY 21
|
||||
#define SCMD_AUTODOOR 22
|
||||
#define SCMD_ZONERESETS 23
|
||||
#define SCMD_SYSLOG 24
|
||||
#define SCMD_WIMPY 25
|
||||
#define SCMD_PAGELENGTH 26
|
||||
#define SCMD_SCREENWIDTH 27
|
||||
#define SCMD_COLOR 28
|
||||
|
||||
/* do_quit */
|
||||
ACMD(do_quit);
|
||||
|
|
|
|||
|
|
@ -1132,14 +1132,14 @@ ACMD(do_examine)
|
|||
}
|
||||
}
|
||||
|
||||
ACMD(do_gold)
|
||||
ACMD(do_coins)
|
||||
{
|
||||
if (GET_GOLD(ch) == 0)
|
||||
if (GET_COINS(ch) == 0)
|
||||
send_to_char(ch, "You're broke!\r\n");
|
||||
else if (GET_GOLD(ch) == 1)
|
||||
else if (GET_COINS(ch) == 1)
|
||||
send_to_char(ch, "You have one miserable little coin.\r\n");
|
||||
else
|
||||
send_to_char(ch, "You have %d coins.\r\n", GET_GOLD(ch));
|
||||
send_to_char(ch, "You have %d coins.\r\n", GET_COINS(ch));
|
||||
}
|
||||
|
||||
ACMD(do_score)
|
||||
|
|
@ -2256,9 +2256,6 @@ ACMD(do_toggle)
|
|||
{"autoloot", PRF_AUTOLOOT, 0,
|
||||
"Autoloot disabled.\r\n",
|
||||
"Autoloot enabled.\r\n"},
|
||||
{"autogold", PRF_AUTOGOLD, 0,
|
||||
"Autogold disabled.\r\n",
|
||||
"Autogold enabled.\r\n"},
|
||||
{"autosplit", PRF_AUTOSPLIT, 0,
|
||||
"Autosplit disabled.\r\n",
|
||||
"Autosplit enabled.\r\n"},
|
||||
|
|
@ -2355,7 +2352,6 @@ ACMD(do_toggle)
|
|||
" Wimpy: %-3s\r\n"
|
||||
|
||||
" AutoLoot: %-3s "
|
||||
" AutoGold: %-3s "
|
||||
" AutoSplit: %-3s\r\n"
|
||||
|
||||
" AutoAssist: %-3s "
|
||||
|
|
@ -2385,7 +2381,6 @@ ACMD(do_toggle)
|
|||
buf2,
|
||||
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_AUTOLOOT)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_AUTOGOLD)),
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_AUTOSPLIT)),
|
||||
|
||||
ONOFF(PRF_FLAGGED(ch, PRF_AUTOASSIST)),
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ static int perform_get_from_room(struct char_data *ch, struct obj_data *obj);
|
|||
/* do_give utility functions */
|
||||
static struct char_data *give_find_vict(struct char_data *ch, char *arg);
|
||||
static void perform_give(struct char_data *ch, struct char_data *vict, struct obj_data *obj);
|
||||
static void perform_give_gold(struct char_data *ch, struct char_data *vict, int amount);
|
||||
static void perform_give_coins(struct char_data *ch, struct char_data *vict, int amount);
|
||||
/* do_drop utility functions */
|
||||
static int perform_drop(struct char_data *ch, struct obj_data *obj, byte mode, const char *sname, room_rnum RDR);
|
||||
static void perform_drop_gold(struct char_data *ch, int amount, byte mode, room_rnum RDR);
|
||||
static void perform_drop_coins(struct char_data *ch, int amount, byte mode, room_rnum RDR);
|
||||
/* do_put utility functions */
|
||||
static void perform_put(struct char_data *ch, struct obj_data *obj, struct obj_data *cont);
|
||||
/* do_remove utility functions */
|
||||
|
|
@ -192,7 +192,7 @@ ACMD(do_put)
|
|||
}
|
||||
GET_OBJ_VAL(obj, 0) = pile - howmany;
|
||||
update_money_obj(obj);
|
||||
GET_GOLD(ch) = MAX(0, GET_GOLD(ch) - howmany);
|
||||
GET_COINS(ch) = MAX(0, GET_COINS(ch) - howmany);
|
||||
obj = split;
|
||||
howmany = 1;
|
||||
} else {
|
||||
|
|
@ -318,7 +318,7 @@ static bool merge_money_pile(struct char_data *ch, struct obj_data *obj)
|
|||
|
||||
GET_OBJ_VAL(target, 0) += coins;
|
||||
update_money_obj(target);
|
||||
GET_GOLD(ch) = MIN(MAX_GOLD, GET_GOLD(ch) + coins);
|
||||
GET_COINS(ch) = MIN(MAX_COINS, GET_COINS(ch) + coins);
|
||||
extract_obj(obj);
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -559,14 +559,14 @@ ACMD(do_get)
|
|||
}
|
||||
}
|
||||
|
||||
static void perform_drop_gold(struct char_data *ch, int amount, byte mode, room_rnum RDR)
|
||||
static void perform_drop_coins(struct char_data *ch, int amount, byte mode, room_rnum RDR)
|
||||
{
|
||||
struct obj_data *obj;
|
||||
int removed;
|
||||
|
||||
if (amount <= 0)
|
||||
send_to_char(ch, "Heh heh heh.. we are jolly funny today, eh?\r\n");
|
||||
else if (GET_GOLD(ch) < amount)
|
||||
else if (GET_COINS(ch) < amount)
|
||||
send_to_char(ch, "You don't have that many coins!\r\n");
|
||||
else {
|
||||
if (mode != SCMD_JUNK) {
|
||||
|
|
@ -691,7 +691,7 @@ ACMD(do_drop)
|
|||
multi = atoi(arg);
|
||||
one_argument(argument, arg);
|
||||
if (!str_cmp("coins", arg) || !str_cmp("coin", arg))
|
||||
perform_drop_gold(ch, multi, mode, RDR);
|
||||
perform_drop_coins(ch, multi, mode, RDR);
|
||||
else if (multi <= 0)
|
||||
send_to_char(ch, "Yeah, that makes sense.\r\n");
|
||||
else if (!*arg)
|
||||
|
|
@ -792,7 +792,7 @@ static struct char_data *give_find_vict(struct char_data *ch, char *arg)
|
|||
return (NULL);
|
||||
}
|
||||
|
||||
static void perform_give_gold(struct char_data *ch, struct char_data *vict,
|
||||
static void perform_give_coins(struct char_data *ch, struct char_data *vict,
|
||||
int amount)
|
||||
{
|
||||
char buf[MAX_STRING_LENGTH];
|
||||
|
|
@ -802,7 +802,7 @@ static void perform_give_gold(struct char_data *ch, struct char_data *vict,
|
|||
send_to_char(ch, "Heh heh heh ... we are jolly funny today, eh?\r\n");
|
||||
return;
|
||||
}
|
||||
if ((GET_GOLD(ch) < amount) && (IS_NPC(ch) || (GET_LEVEL(ch) < LVL_GOD))) {
|
||||
if ((GET_COINS(ch) < amount) && (IS_NPC(ch) || (GET_LEVEL(ch) < LVL_GOD))) {
|
||||
send_to_char(ch, "You don't have that many coins!\r\n");
|
||||
return;
|
||||
}
|
||||
|
|
@ -860,7 +860,7 @@ ACMD(do_give)
|
|||
if (!str_cmp("coins", arg) || !str_cmp("coin", arg)) {
|
||||
one_argument(argument, arg);
|
||||
if ((vict = give_find_vict(ch, arg)) != NULL)
|
||||
perform_give_gold(ch, vict, amount);
|
||||
perform_give_coins(ch, vict, amount);
|
||||
return;
|
||||
} else if (!*arg) /* Give multiple code. */
|
||||
send_to_char(ch, "What do you want to give %d of?\r\n", amount);
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ static bool sleight_merge_money_pile(struct char_data *ch, struct obj_data *obj)
|
|||
|
||||
GET_OBJ_VAL(target, 0) += coins;
|
||||
update_money_obj(target);
|
||||
GET_GOLD(ch) = MIN(MAX_GOLD, GET_GOLD(ch) + coins);
|
||||
GET_COINS(ch) = MIN(MAX_COINS, GET_COINS(ch) + coins);
|
||||
extract_obj(obj);
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -1106,7 +1106,7 @@ ACMD(do_slip)
|
|||
}
|
||||
GET_OBJ_VAL(obj, 0) = pile - howmany;
|
||||
update_money_obj(obj);
|
||||
GET_GOLD(ch) = MAX(0, GET_GOLD(ch) - howmany);
|
||||
GET_COINS(ch) = MAX(0, GET_COINS(ch) - howmany);
|
||||
obj = split;
|
||||
}
|
||||
}
|
||||
|
|
@ -1155,7 +1155,7 @@ ACMD(do_steal)
|
|||
struct char_data *vict;
|
||||
struct obj_data *obj;
|
||||
char vict_name[MAX_INPUT_LENGTH], obj_name[MAX_INPUT_LENGTH];
|
||||
int gold, eq_pos, ohoh = 0;
|
||||
int coins, eq_pos, ohoh = 0;
|
||||
int sleight_total, dc;
|
||||
|
||||
if (!GET_SKILL(ch, SKILL_SLEIGHT_OF_HAND)) {
|
||||
|
|
@ -1184,7 +1184,7 @@ ACMD(do_steal)
|
|||
|
||||
sleight_total = roll_sleight_check(ch);
|
||||
|
||||
if (str_cmp(obj_name, "coins") && str_cmp(obj_name, "gold")) {
|
||||
if (str_cmp(obj_name, "coins") && str_cmp(obj_name, "coin")) {
|
||||
|
||||
if (!(obj = get_obj_in_list_vis(ch, obj_name, NULL, vict->carrying))) {
|
||||
|
||||
|
|
@ -1250,18 +1250,18 @@ ACMD(do_steal)
|
|||
int total = count_coins_in_list(vict->carrying);
|
||||
int max_steal = total / 10;
|
||||
if (max_steal > 0) {
|
||||
gold = rand_number(1, max_steal);
|
||||
gold = remove_coins_from_list(vict->carrying, gold);
|
||||
coins = rand_number(1, max_steal);
|
||||
coins = remove_coins_from_list(vict->carrying, coins);
|
||||
} else {
|
||||
gold = 0;
|
||||
coins = 0;
|
||||
}
|
||||
|
||||
if (gold > 0) {
|
||||
GET_GOLD(vict) = MAX(0, GET_GOLD(vict) - gold);
|
||||
add_coins_to_char(ch, gold);
|
||||
if (coins > 0) {
|
||||
GET_COINS(vict) = MAX(0, GET_COINS(vict) - coins);
|
||||
add_coins_to_char(ch, coins);
|
||||
gain_skill(ch, "sleight of hand", TRUE);
|
||||
if (gold > 1)
|
||||
send_to_char(ch, "Bingo! You got %d coins.\r\n", gold);
|
||||
if (coins > 1)
|
||||
send_to_char(ch, "Bingo! You got %d coins.\r\n", coins);
|
||||
else
|
||||
send_to_char(ch, "You manage to swipe a solitary coin.\r\n");
|
||||
} else {
|
||||
|
|
@ -1485,7 +1485,7 @@ ACMD(do_split)
|
|||
send_to_char(ch, "Sorry, you can't do that.\r\n");
|
||||
return;
|
||||
}
|
||||
if (amount > GET_GOLD(ch)) {
|
||||
if (amount > GET_COINS(ch)) {
|
||||
send_to_char(ch, "You don't seem to have that many coins to split.\r\n");
|
||||
return;
|
||||
}
|
||||
|
|
@ -1503,7 +1503,7 @@ ACMD(do_split)
|
|||
return;
|
||||
}
|
||||
|
||||
decrease_gold(ch, share * (num - 1));
|
||||
decrease_coins(ch, share * (num - 1));
|
||||
|
||||
/* Abusing signed/unsigned to make sizeof work. */
|
||||
len = snprintf(buf, sizeof(buf), "%s splits %d coins; you receive %d.\r\n",
|
||||
|
|
@ -1516,7 +1516,7 @@ ACMD(do_split)
|
|||
|
||||
while ((k = (struct char_data *) simple_list(GROUP(ch)->members)) != NULL)
|
||||
if (k != ch && IN_ROOM(ch) == IN_ROOM(k) && !IS_NPC(k)) {
|
||||
increase_gold(k, share);
|
||||
increase_coins(k, share);
|
||||
send_to_char(k, "%s", buf);
|
||||
}
|
||||
|
||||
|
|
@ -1687,8 +1687,6 @@ ACMD(do_gen_tog)
|
|||
"AFK flag is now on.\r\n"},
|
||||
{"Autoloot disabled.\r\n",
|
||||
"Autoloot enabled.\r\n"},
|
||||
{"Autogold disabled.\r\n",
|
||||
"Autogold enabled.\r\n"},
|
||||
{"Autosplit disabled.\r\n",
|
||||
"Autosplit enabled.\r\n"},
|
||||
{"Autoassist disabled.\r\n",
|
||||
|
|
@ -1778,9 +1776,6 @@ ACMD(do_gen_tog)
|
|||
case SCMD_AUTOLOOT:
|
||||
result = PRF_TOG_CHK(ch, PRF_AUTOLOOT);
|
||||
break;
|
||||
case SCMD_AUTOGOLD:
|
||||
result = PRF_TOG_CHK(ch, PRF_AUTOGOLD);
|
||||
break;
|
||||
case SCMD_AUTOSPLIT:
|
||||
result = PRF_TOG_CHK(ch, PRF_AUTOSPLIT);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1840,7 +1840,7 @@ static void do_stat_character(struct char_data *ch, struct char_data *k)
|
|||
GET_MOVE(k), GET_MAX_MOVE(k), move_gain(k));
|
||||
|
||||
stat_table_row_fmt(ch, "Currency", "Coins %d, Bank %d (Total %d)",
|
||||
GET_GOLD(k), GET_BANK_GOLD(k), GET_GOLD(k) + GET_BANK_GOLD(k));
|
||||
GET_COINS(k), GET_BANK_COINS(k), GET_COINS(k) + GET_BANK_COINS(k));
|
||||
|
||||
if (!IS_NPC(k)) {
|
||||
if (GET_QUEST(k) != NOTHING)
|
||||
|
|
@ -3568,7 +3568,7 @@ ACMD(do_show)
|
|||
send_to_char(ch, "Player: %-12s (%s) [%2d %s]\r\n", GET_NAME(vict),
|
||||
genders[(int) GET_SEX(vict)], GET_LEVEL(vict), CLASS_ABBR(vict));
|
||||
send_to_char(ch, "Coins: %-8d Bal: %-8d Exp: %-8d Align: %-5d\r\n",
|
||||
GET_GOLD(vict), GET_BANK_GOLD(vict), GET_EXP(vict),
|
||||
GET_COINS(vict), GET_BANK_COINS(vict), GET_EXP(vict),
|
||||
GET_ALIGNMENT(vict));
|
||||
send_to_char(ch, "Started: %-25.25s Last: %-25.25s\r\n", buf1, buf2);
|
||||
send_to_char(ch, "Played: %dh %dm\r\n",
|
||||
|
|
@ -3881,7 +3881,7 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
|
|||
affect_total(vict);
|
||||
break;
|
||||
case 4: /* bank */
|
||||
GET_BANK_GOLD(vict) = RANGE(0, 100000000);
|
||||
GET_BANK_COINS(vict) = RANGE(0, 100000000);
|
||||
break;
|
||||
case 5: /* brief */
|
||||
SET_OR_REMOVE(PRF_FLAGS(vict), PRF_BRIEF);
|
||||
|
|
@ -3959,7 +3959,7 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
|
|||
remove_other_coins_from_list(vict->carrying, NULL);
|
||||
for (i = 0; i < NUM_WEARS; i++)
|
||||
remove_other_coins_from_list(GET_EQ(vict, i), NULL);
|
||||
GET_GOLD(vict) = 0;
|
||||
GET_COINS(vict) = 0;
|
||||
send_to_char(ch, "Ok.\r\n");
|
||||
return (1);
|
||||
}
|
||||
|
|
@ -3980,7 +3980,7 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
|
|||
for (i = 0; i < NUM_WEARS; i++)
|
||||
remove_other_coins_from_list(GET_EQ(vict, i), coin_obj);
|
||||
|
||||
GET_GOLD(vict) = value;
|
||||
GET_COINS(vict) = value;
|
||||
send_to_char(ch, "Ok.\r\n");
|
||||
return (1);
|
||||
}
|
||||
|
|
@ -4549,7 +4549,7 @@ ACMD(do_links)
|
|||
/*item limits*/
|
||||
#define MAX_DAM_ALLOWED 50 /* for weapons - avg. dam*/
|
||||
#define MAX_AFFECTS_ALLOWED 3
|
||||
#define MAX_OBJ_GOLD_ALLOWED 1000000
|
||||
#define MAX_OBJ_COINS_ALLOWED 1000000
|
||||
|
||||
/* Armor class limits*/
|
||||
#define TOTAL_WEAR_CHECKS (NUM_ITEM_WEARS-2) /*minus Wield and Take*/
|
||||
|
|
@ -4597,7 +4597,7 @@ static struct zcheck_affs {
|
|||
{APPLY_MANA, -50, 50, "mana"},
|
||||
{APPLY_HIT, -50, 50, "hit points"},
|
||||
{APPLY_MOVE, -50, 50, "movement"},
|
||||
{APPLY_GOLD, 0, 0, "gold"},
|
||||
{APPLY_COINS, 0, 0, "coins"},
|
||||
{APPLY_EXP, 0, 0, "experience"},
|
||||
{APPLY_AC, -10, 10, "magical AC"},
|
||||
{APPLY_SAVE_STR, -2, 2, "saving throw (Strength)"},
|
||||
|
|
@ -4751,10 +4751,10 @@ ACMD (do_zcheck)
|
|||
obj = &obj_proto[i];
|
||||
switch (GET_OBJ_TYPE(obj)) {
|
||||
case ITEM_MONEY:
|
||||
if ((value = GET_OBJ_VAL(obj, 0))>MAX_OBJ_GOLD_ALLOWED && (found=1))
|
||||
if ((value = GET_OBJ_VAL(obj, 0))>MAX_OBJ_COINS_ALLOWED && (found=1))
|
||||
len += snprintf(buf + len, sizeof(buf) - len,
|
||||
"- Is worth %d (money limit %d coins).\r\n",
|
||||
value, MAX_OBJ_GOLD_ALLOWED);
|
||||
value, MAX_OBJ_COINS_ALLOWED);
|
||||
break;
|
||||
case ITEM_WEAPON:
|
||||
if (GET_OBJ_VAL(obj, 3) >= NUM_ATTACK_TYPES && (found=1))
|
||||
|
|
|
|||
|
|
@ -2786,7 +2786,7 @@ static void msdp_update( void )
|
|||
MSDPSetNumber( d, eMSDP_MANA, GET_MANA(ch) );
|
||||
MSDPSetNumber( d, eMSDP_MANA_MAX, GET_MAX_MANA(ch) );
|
||||
MSDPSetNumber( d, eMSDP_WIMPY, GET_WIMP_LEV(ch) );
|
||||
MSDPSetNumber( d, eMSDP_MONEY, GET_GOLD(ch) );
|
||||
MSDPSetNumber( d, eMSDP_MONEY, GET_COINS(ch) );
|
||||
MSDPSetNumber( d, eMSDP_MOVEMENT, GET_MOVE(ch) );
|
||||
MSDPSetNumber( d, eMSDP_MOVEMENT_MAX, GET_MAX_MOVE(ch) );
|
||||
MSDPSetNumber( d, eMSDP_AC, compute_armor_class(ch) );
|
||||
|
|
|
|||
|
|
@ -271,7 +271,6 @@ const char *preference_bits[] = {
|
|||
"BLDWLK",
|
||||
"AFK",
|
||||
"AUTOLOOT",
|
||||
"AUTOGOLD",
|
||||
"AUTOSPLIT",
|
||||
"AUTOSAC",
|
||||
"AUTOASSIST",
|
||||
|
|
|
|||
|
|
@ -971,7 +971,7 @@ ACMD(do_mtransform)
|
|||
GET_MAX_HIT(&tmpmob) = GET_MAX_HIT(ch);
|
||||
GET_EXP(&tmpmob) = GET_EXP(ch);
|
||||
}
|
||||
GET_GOLD(&tmpmob) = GET_GOLD(ch);
|
||||
GET_COINS(&tmpmob) = GET_COINS(ch);
|
||||
GET_POS(&tmpmob) = GET_POS(ch);
|
||||
IS_CARRYING_W(&tmpmob) = IS_CARRYING_W(ch);
|
||||
IS_CARRYING_N(&tmpmob) = IS_CARRYING_N(ch);
|
||||
|
|
|
|||
|
|
@ -451,8 +451,8 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||
* For example you want to check how many PC's are in room with vnum 1204. PC's
|
||||
* have the vnum -1 so: %echo% players in room 1204: %findmob.1204(-1)%
|
||||
* Or say you had a bank, and you want a script to check the number of bags of
|
||||
* gold (vnum: 1234). In the vault (vnum: 453). Use: %findobj.453(1234)% and it
|
||||
* will return the number of bags of gold.
|
||||
* coins (vnum: 1234). In the vault (vnum: 453). Use: %findobj.453(1234)% and it
|
||||
* will return the number of bags of coins.
|
||||
* Addition inspired by Jamie Nelson */
|
||||
else if (!str_cmp(var, "findmob")) {
|
||||
if (!field || !*field || !subfield || !*subfield) {
|
||||
|
|
@ -717,12 +717,12 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||
}
|
||||
break;
|
||||
case 'g':
|
||||
if (!str_cmp(field, "gold")) {
|
||||
if (!str_cmp(field, "coins")) {
|
||||
if (subfield && *subfield) {
|
||||
int addition = atoi(subfield);
|
||||
increase_gold(c, addition);
|
||||
increase_coins(c, addition);
|
||||
}
|
||||
snprintf(str, slen, "%d", GET_GOLD(c));
|
||||
snprintf(str, slen, "%d", GET_COINS(c));
|
||||
}
|
||||
break;
|
||||
case 'h':
|
||||
|
|
@ -1565,7 +1565,7 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||
* if the field returns a name or a script UID or the like it can recurse. If
|
||||
* you supply a value like, %actor.int.str% it wont blow up on you either. Now
|
||||
* also lets subfields have variables parsed inside of them so that: %echo%
|
||||
* %actor.gold(%actor.gold%)% will double the actors gold every time its called.
|
||||
* %actor.coins(%actor.coins%)% will double the actors coins every time its called.
|
||||
* - Jamie Nelson */
|
||||
|
||||
/* substitutes any variables into line and returns it as buf */
|
||||
|
|
|
|||
19
src/fight.c
19
src/fight.c
|
|
@ -287,9 +287,9 @@ static void make_corpse(struct char_data *ch)
|
|||
obj_to_obj(unequip_char(ch, i), corpse);
|
||||
}
|
||||
|
||||
/* transfer gold */
|
||||
if (GET_GOLD(ch) > 0)
|
||||
GET_GOLD(ch) = 0;
|
||||
/* transfer coins */
|
||||
if (GET_COINS(ch) > 0)
|
||||
GET_COINS(ch) = 0;
|
||||
ch->carrying = NULL;
|
||||
IS_CARRYING_N(ch) = 0;
|
||||
IS_CARRYING_W(ch) = 0;
|
||||
|
|
@ -630,7 +630,7 @@ int skill_message(int dam, struct char_data *ch, struct char_data *vict,
|
|||
* > 0 How much damage done. */
|
||||
int damage(struct char_data *ch, struct char_data *victim, int dam, int attacktype)
|
||||
{
|
||||
long local_gold = 0;
|
||||
long local_coins = 0;
|
||||
char local_buf[256];
|
||||
struct char_data *tmp_char;
|
||||
struct obj_data *corpse_obj;
|
||||
|
|
@ -796,22 +796,19 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
|
|||
if (MOB_FLAGGED(ch, MOB_MEMORY))
|
||||
forget(ch, victim);
|
||||
}
|
||||
/* Cant determine GET_GOLD on corpse, so do now and store */
|
||||
/* Can't determine GET_COINS on corpse, so do now and store */
|
||||
if (IS_NPC(victim)) {
|
||||
local_gold = GET_GOLD(victim);
|
||||
sprintf(local_buf,"%ld", (long)local_gold);
|
||||
local_coins = GET_COINS(victim);
|
||||
sprintf(local_buf,"%ld", (long)local_coins);
|
||||
}
|
||||
|
||||
die(victim, ch);
|
||||
if (GROUP(ch) && (local_gold > 0) && PRF_FLAGGED(ch, PRF_AUTOSPLIT) ) {
|
||||
if (GROUP(ch) && (local_coins > 0) && PRF_FLAGGED(ch, PRF_AUTOSPLIT) ) {
|
||||
generic_find("corpse", FIND_OBJ_ROOM, ch, &tmp_char, &corpse_obj);
|
||||
if (corpse_obj) {
|
||||
do_get(ch, "all.coin corpse", 0, 0);
|
||||
do_split(ch, local_buf, 0, 0);
|
||||
}
|
||||
/* need to remove the gold from the corpse */
|
||||
} else if (!IS_NPC(ch) && (ch != victim) && PRF_FLAGGED(ch, PRF_AUTOGOLD)) {
|
||||
do_get(ch, "all.coin corpse", 0, 0);
|
||||
}
|
||||
if (!IS_NPC(ch) && (ch != victim) && PRF_FLAGGED(ch, PRF_AUTOLOOT)) {
|
||||
do_get(ch, "all corpse", 0, 0);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ int copy_quest(struct aq_data *to, struct aq_data *from, int free_old_strings)
|
|||
for (i = 0; i < 7; i++){
|
||||
to->value[i] = from->value[i];
|
||||
}
|
||||
to->gold_reward = from->gold_reward;
|
||||
to->coins_reward = from->coins_reward;
|
||||
to->exp_reward = from->exp_reward;
|
||||
to->obj_reward = from->obj_reward;
|
||||
to->func = from->func;
|
||||
|
|
@ -247,7 +247,7 @@ int save_quests(zone_rnum zone_num)
|
|||
QST_POINTS(rnum), QST_PENALTY(rnum), QST_MINLEVEL(rnum),
|
||||
QST_MAXLEVEL(rnum), QST_TIME(rnum),
|
||||
QST_RETURNMOB(rnum) == NOBODY ? -1 : QST_RETURNMOB(rnum),
|
||||
QST_QUANTITY(rnum), QST_GOLD(rnum), QST_EXP(rnum), QST_OBJ(rnum)
|
||||
QST_QUANTITY(rnum), QST_COINS(rnum), QST_EXP(rnum), QST_OBJ(rnum)
|
||||
);
|
||||
|
||||
if(n < MAX_STRING_LENGTH) {
|
||||
|
|
@ -278,4 +278,3 @@ int save_quests(zone_rnum zone_num)
|
|||
remove_from_save_list(zone_table[zone_num].number, SL_QST);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ static void aff_apply_modify(struct char_data *ch, byte loc, sbyte mod, char *ms
|
|||
case APPLY_MANA: GET_MAX_MANA(ch) += mod; break;
|
||||
case APPLY_HIT: GET_MAX_HIT(ch) += mod; break;
|
||||
case APPLY_MOVE: GET_MAX_MOVE(ch) += mod; break;
|
||||
case APPLY_GOLD: break;
|
||||
case APPLY_COINS: break;
|
||||
case APPLY_EXP: break;
|
||||
|
||||
case APPLY_AC: GET_AC(ch) += mod; break;
|
||||
|
|
@ -424,9 +424,9 @@ static void adjust_char_coins(struct char_data *ch, int amount)
|
|||
return;
|
||||
|
||||
if (amount > 0)
|
||||
GET_GOLD(ch) = MIN(MAX_GOLD, GET_GOLD(ch) + amount);
|
||||
GET_COINS(ch) = MIN(MAX_COINS, GET_COINS(ch) + amount);
|
||||
else
|
||||
GET_GOLD(ch) = MAX(0, GET_GOLD(ch) + amount);
|
||||
GET_COINS(ch) = MAX(0, GET_COINS(ch) + amount);
|
||||
}
|
||||
|
||||
/* Give an object to a char. */
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "autoexits" , "autoex" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOEXIT },
|
||||
{ "autoassist","autoass" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOASSIST },
|
||||
{ "autodoor" , "autodoor", POS_DEAD , do_gen_tog , 0, SCMD_AUTODOOR },
|
||||
{ "autogold" , "autogold", POS_DEAD , do_gen_tog , 0, SCMD_AUTOGOLD },
|
||||
{ "autokey" , "autokey" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOKEY },
|
||||
{ "autoloot" , "autoloot", POS_DEAD , do_gen_tog , 0, SCMD_AUTOLOOT },
|
||||
{ "automap" , "automap" , POS_DEAD , do_gen_tog , 0, SCMD_AUTOMAP },
|
||||
|
|
@ -157,8 +156,7 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "gemote" , "gem" , POS_SLEEPING, do_gen_comm , LVL_IMMORT, SCMD_GEMOTE },
|
||||
{ "give" , "giv" , POS_RESTING , do_give , 0, 0 },
|
||||
{ "goto" , "go" , POS_SLEEPING, do_goto , LVL_IMMORT, 0 },
|
||||
{ "gold" , "gol" , POS_RESTING , do_gold , 0, 0 },
|
||||
{ "coins" , "coin" , POS_RESTING , do_gold , 0, 0 },
|
||||
{ "coins" , "coin" , POS_RESTING , do_coins , 0, 0 },
|
||||
{ "group" , "gr" , POS_RESTING , do_group , 1, 0 },
|
||||
{ "grab" , "grab" , POS_RESTING , do_grab , 0, 0 },
|
||||
|
||||
|
|
|
|||
46
src/limits.c
46
src/limits.c
|
|
@ -490,68 +490,68 @@ void point_update(void)
|
|||
}
|
||||
|
||||
/* Note: amt may be negative */
|
||||
int increase_gold(struct char_data *ch, int amt)
|
||||
int increase_coins(struct char_data *ch, int amt)
|
||||
{
|
||||
int curr_gold;
|
||||
int curr_coins;
|
||||
int add;
|
||||
|
||||
if (!ch)
|
||||
return 0;
|
||||
|
||||
curr_gold = GET_GOLD(ch);
|
||||
curr_coins = GET_COINS(ch);
|
||||
|
||||
if (amt < 0)
|
||||
return decrease_gold(ch, -amt);
|
||||
return decrease_coins(ch, -amt);
|
||||
if (amt == 0)
|
||||
return curr_gold;
|
||||
return curr_coins;
|
||||
|
||||
add = MIN(amt, MAX_GOLD - curr_gold);
|
||||
add = MIN(amt, MAX_COINS - curr_coins);
|
||||
if (add <= 0)
|
||||
return curr_gold;
|
||||
return curr_coins;
|
||||
|
||||
add_coins_to_char(ch, add);
|
||||
|
||||
if (GET_GOLD(ch) == MAX_GOLD)
|
||||
if (GET_COINS(ch) == MAX_COINS)
|
||||
send_to_char(ch, "%sYou have reached the maximum coins!\r\n%sYou must spend them or bank them before you can gain any more.\r\n", QBRED, QNRM);
|
||||
|
||||
return GET_GOLD(ch);
|
||||
return GET_COINS(ch);
|
||||
}
|
||||
|
||||
int decrease_gold(struct char_data *ch, int deduction)
|
||||
int decrease_coins(struct char_data *ch, int deduction)
|
||||
{
|
||||
if (!ch || deduction <= 0)
|
||||
return GET_GOLD(ch);
|
||||
return GET_COINS(ch);
|
||||
|
||||
remove_coins_from_char(ch, deduction);
|
||||
return GET_GOLD(ch);
|
||||
return GET_COINS(ch);
|
||||
}
|
||||
|
||||
int increase_bank(struct char_data *ch, int amt)
|
||||
int increase_bank_coins(struct char_data *ch, int amt)
|
||||
{
|
||||
int curr_bank;
|
||||
|
||||
if (IS_NPC(ch)) return 0;
|
||||
|
||||
curr_bank = GET_BANK_GOLD(ch);
|
||||
curr_bank = GET_BANK_COINS(ch);
|
||||
|
||||
if (amt < 0) {
|
||||
GET_BANK_GOLD(ch) = MAX(0, curr_bank+amt);
|
||||
GET_BANK_COINS(ch) = MAX(0, curr_bank+amt);
|
||||
/* Validate to prevent overflow */
|
||||
if (GET_BANK_GOLD(ch) > curr_bank) GET_BANK_GOLD(ch) = 0;
|
||||
if (GET_BANK_COINS(ch) > curr_bank) GET_BANK_COINS(ch) = 0;
|
||||
} else {
|
||||
GET_BANK_GOLD(ch) = MIN(MAX_BANK, curr_bank+amt);
|
||||
GET_BANK_COINS(ch) = MIN(MAX_BANK_COINS, curr_bank+amt);
|
||||
/* Validate to prevent overflow */
|
||||
if (GET_BANK_GOLD(ch) < curr_bank) GET_BANK_GOLD(ch) = MAX_BANK;
|
||||
if (GET_BANK_COINS(ch) < curr_bank) GET_BANK_COINS(ch) = MAX_BANK_COINS;
|
||||
}
|
||||
if (GET_BANK_GOLD(ch) == MAX_BANK)
|
||||
if (GET_BANK_COINS(ch) == MAX_BANK_COINS)
|
||||
send_to_char(ch, "%sYou have reached the maximum bank balance!\r\n%sYou cannot put more into your account unless you withdraw some first.\r\n", QBRED, QNRM);
|
||||
return (GET_BANK_GOLD(ch));
|
||||
return (GET_BANK_COINS(ch));
|
||||
}
|
||||
|
||||
int decrease_bank(struct char_data *ch, int deduction)
|
||||
int decrease_bank_coins(struct char_data *ch, int deduction)
|
||||
{
|
||||
int amt;
|
||||
amt = (deduction * -1);
|
||||
increase_bank(ch, amt);
|
||||
return (GET_BANK_GOLD(ch));
|
||||
increase_bank_coins(ch, amt);
|
||||
return (GET_BANK_COINS(ch));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ static void postmaster_send_mail(struct char_data *ch, struct char_data *mailman
|
|||
FALSE, mailman, 0, ch, TO_VICT);
|
||||
return;
|
||||
}
|
||||
if (GET_GOLD(ch) < STAMP_PRICE && GET_LEVEL(ch) < LVL_IMMORT) {
|
||||
if (GET_COINS(ch) < STAMP_PRICE && GET_LEVEL(ch) < LVL_IMMORT) {
|
||||
snprintf(buf, sizeof(buf), "$n tells you, 'A stamp costs %d coin%s.'\r\n"
|
||||
"$n tells you, '...which I see you can't afford.'", STAMP_PRICE,
|
||||
STAMP_PRICE == 1 ? "" : "s");
|
||||
|
|
@ -304,7 +304,7 @@ static void postmaster_send_mail(struct char_data *ch, struct char_data *mailman
|
|||
if (GET_LEVEL(ch) < LVL_IMMORT) {
|
||||
snprintf(buf, sizeof(buf), "$n tells you, 'I'll take %d coins for the stamp.'", STAMP_PRICE);
|
||||
act(buf, FALSE, mailman, 0, ch, TO_VICT);
|
||||
decrease_gold(ch, STAMP_PRICE);
|
||||
decrease_coins(ch, STAMP_PRICE);
|
||||
}
|
||||
|
||||
act("$n tells you, 'Write your message. (/s saves /h for help).'", FALSE, mailman, 0, ch, TO_VICT);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
/* minimum level a player must be to send mail */
|
||||
#define MIN_MAIL_LEVEL 1
|
||||
|
||||
/* # of gold coins required to send mail */
|
||||
/* # of coins required to send mail */
|
||||
#define STAMP_PRICE 150
|
||||
|
||||
/* Maximum size of mail in bytes (arbitrary) */
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
#define MAX_OBJ_COST 2000000
|
||||
#define MAX_CONTAINER_SIZE 10000
|
||||
|
||||
#define MAX_MOB_GOLD 100000
|
||||
#define MAX_MOB_COINS 100000
|
||||
#define MAX_MOB_EXP 150000
|
||||
|
||||
/* this is one mud year.. */
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ int Crash_clean_file(char *name)
|
|||
char filename[MAX_INPUT_LENGTH], filetype[20];
|
||||
int numread;
|
||||
FILE *fl;
|
||||
int savecode, timed, netcost, gold, account, nitems;
|
||||
int savecode, timed, netcost, coins, account, nitems;
|
||||
char line[READ_SIZE];
|
||||
|
||||
if (!get_filename(filename, sizeof(filename), CRASH_FILE, name))
|
||||
|
|
@ -318,7 +318,7 @@ int Crash_clean_file(char *name)
|
|||
return FALSE;
|
||||
|
||||
sscanf(line, "%d %d %d %d %d %d",&savecode,&timed,&netcost,
|
||||
&gold,&account,&nitems);
|
||||
&coins,&account,&nitems);
|
||||
|
||||
if ((savecode == SAVE_CRASH) ||
|
||||
(savecode == SAVE_LOGOUT) ||
|
||||
|
|
@ -401,11 +401,11 @@ static void Crash_write_header(struct char_data *ch, FILE *fp, int savecode)
|
|||
{
|
||||
int timed = (int)time(0);
|
||||
int netcost = 0;
|
||||
int gold = ch ? GET_GOLD(ch) : 0;
|
||||
int account = ch ? GET_BANK_GOLD(ch) : 0;
|
||||
int coins = ch ? GET_COINS(ch) : 0;
|
||||
int account = ch ? GET_BANK_COINS(ch) : 0;
|
||||
int nitems = 0;
|
||||
|
||||
fprintf(fp, "%d %d %d %d %d %d\n", savecode, timed, netcost, gold, account, nitems);
|
||||
fprintf(fp, "%d %d %d %d %d %d\n", savecode, timed, netcost, coins, account, nitems);
|
||||
}
|
||||
|
||||
void Crash_crashsave(struct char_data *ch)
|
||||
|
|
@ -783,7 +783,7 @@ static int Crash_load_objs(struct char_data *ch) {
|
|||
int i, orig_save_code, num_objs=0;
|
||||
struct obj_data *cont_row[MAX_BAG_ROWS];
|
||||
int savecode = SAVE_UNDEF;
|
||||
int timed=0,netcost=0,gold,account,nitems;
|
||||
int timed=0,netcost=0,coins,account,nitems;
|
||||
obj_save_data *loaded, *current;
|
||||
|
||||
if (!get_filename(filename, sizeof(filename), CRASH_FILE, GET_NAME(ch)))
|
||||
|
|
@ -801,10 +801,10 @@ static int Crash_load_objs(struct char_data *ch) {
|
|||
"Contact a God for assistance.\r\n");
|
||||
}
|
||||
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s entering game with no equipment.", GET_NAME(ch));
|
||||
if (GET_GOLD(ch) > 0) {
|
||||
int old_gold = GET_GOLD(ch);
|
||||
GET_GOLD(ch) = 0;
|
||||
add_coins_to_char(ch, old_gold);
|
||||
if (GET_COINS(ch) > 0) {
|
||||
int old_coins = GET_COINS(ch);
|
||||
GET_COINS(ch) = 0;
|
||||
add_coins_to_char(ch, old_coins);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -812,7 +812,7 @@ static int Crash_load_objs(struct char_data *ch) {
|
|||
if (!get_line(fl, line))
|
||||
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "Failed to read player's save code: %s.", GET_NAME(ch));
|
||||
else
|
||||
sscanf(line,"%d %d %d %d %d %d",&savecode, &timed, &netcost,&gold,&account,&nitems);
|
||||
sscanf(line,"%d %d %d %d %d %d",&savecode, &timed, &netcost,&coins,&account,&nitems);
|
||||
|
||||
if (savecode == SAVE_LOGOUT || savecode == SAVE_TIMEDOUT) {
|
||||
mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE,
|
||||
|
|
@ -856,16 +856,16 @@ static int Crash_load_objs(struct char_data *ch) {
|
|||
}
|
||||
|
||||
{
|
||||
int old_gold = GET_GOLD(ch);
|
||||
int old_coins = GET_COINS(ch);
|
||||
int coin_total = count_char_coins(ch);
|
||||
|
||||
if (coin_total > 0) {
|
||||
GET_GOLD(ch) = coin_total;
|
||||
} else if (old_gold > 0) {
|
||||
GET_GOLD(ch) = 0;
|
||||
add_coins_to_char(ch, old_gold);
|
||||
GET_COINS(ch) = coin_total;
|
||||
} else if (old_coins > 0) {
|
||||
GET_COINS(ch) = 0;
|
||||
add_coins_to_char(ch, old_coins);
|
||||
} else {
|
||||
GET_GOLD(ch) = 0;
|
||||
GET_COINS(ch) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
#define PFDEF_BADPWS 0
|
||||
#define PFDEF_PREFFLAGS 0
|
||||
#define PFDEF_PRACTICES 0
|
||||
#define PFDEF_GOLD 0
|
||||
#define PFDEF_BANK 0
|
||||
#define PFDEF_COINS 0
|
||||
#define PFDEF_BANK_COINS 0
|
||||
#define PFDEF_EXP 0
|
||||
#define PFDEF_AC 0
|
||||
#define PFDEF_STR 0
|
||||
|
|
|
|||
|
|
@ -269,8 +269,8 @@ int load_char(const char *name, struct char_data *ch)
|
|||
GET_COND(ch, THIRST) = PFDEF_THIRST;
|
||||
GET_COND(ch, DRUNK) = PFDEF_DRUNK;
|
||||
GET_BAD_PWS(ch) = PFDEF_BADPWS;
|
||||
GET_GOLD(ch) = PFDEF_GOLD;
|
||||
GET_BANK_GOLD(ch) = PFDEF_BANK;
|
||||
GET_COINS(ch) = PFDEF_COINS;
|
||||
GET_BANK_COINS(ch) = PFDEF_BANK_COINS;
|
||||
GET_EXP(ch) = PFDEF_EXP;
|
||||
GET_AC(ch) = PFDEF_AC;
|
||||
ch->real_abils.str = PFDEF_STR;
|
||||
|
|
@ -336,13 +336,14 @@ int load_char(const char *name, struct char_data *ch)
|
|||
case 'B':
|
||||
if (!strcmp(tag, "Back")) ch->player.background = fread_string(fl, buf2);
|
||||
else if (!strcmp(tag, "Badp")) GET_BAD_PWS(ch) = atoi(line);
|
||||
else if (!strcmp(tag, "Bank")) GET_BANK_GOLD(ch) = atoi(line);
|
||||
else if (!strcmp(tag, "BankCoins")) GET_BANK_COINS(ch) = atoi(line);
|
||||
else if (!strcmp(tag, "Brth")) ch->player.time.birth = atol(line);
|
||||
break;
|
||||
|
||||
case 'C':
|
||||
if (!strcmp(tag, "Cha ")) ch->real_abils.cha = atoi(line);
|
||||
else if (!strcmp(tag, "Clas")) GET_CLASS(ch) = atoi(line);
|
||||
else if (!strcmp(tag, "Coin")) GET_COINS(ch) = atoi(line);
|
||||
else if (!strcmp(tag, "Con ")) ch->real_abils.con = atoi(line);
|
||||
break;
|
||||
|
||||
|
|
@ -360,10 +361,6 @@ int load_char(const char *name, struct char_data *ch)
|
|||
if (!strcmp(tag, "Frez")) GET_FREEZE_LEV(ch) = atoi(line);
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
if (!strcmp(tag, "Gold")) GET_GOLD(ch) = atoi(line);
|
||||
break;
|
||||
|
||||
case 'H':
|
||||
if (!strcmp(tag, "Hit ")) load_HMVS(ch, line, LOAD_HIT);
|
||||
else if (!strcmp(tag, "Hite")) GET_HEIGHT(ch) = atoi(line);
|
||||
|
|
@ -672,8 +669,8 @@ void save_char(struct char_data * ch)
|
|||
if (GET_CHA(ch) != PFDEF_CHA) fprintf(fl, "Cha : %d\n", GET_CHA(ch));
|
||||
|
||||
if (GET_AC(ch) != PFDEF_AC) fprintf(fl, "Ac : %d\n", GET_AC(ch));
|
||||
if (GET_GOLD(ch) != PFDEF_GOLD) fprintf(fl, "Gold: %d\n", GET_GOLD(ch));
|
||||
if (GET_BANK_GOLD(ch) != PFDEF_BANK) fprintf(fl, "Bank: %d\n", GET_BANK_GOLD(ch));
|
||||
if (GET_COINS(ch) != PFDEF_COINS) fprintf(fl, "Coin: %d\n", GET_COINS(ch));
|
||||
if (GET_BANK_COINS(ch) != PFDEF_BANK_COINS) fprintf(fl, "BankCoins: %d\n", GET_BANK_COINS(ch));
|
||||
if (GET_EXP(ch) != PFDEF_EXP) fprintf(fl, "Exp : %d\n", GET_EXP(ch));
|
||||
if (GET_OLC_ZONE(ch) != PFDEF_OLC) fprintf(fl, "Olc : %d\n", GET_OLC_ZONE(ch));
|
||||
if (GET_PAGE_LENGTH(ch) != PFDEF_PAGELENGTH) fprintf(fl, "Page: %d\n", GET_PAGE_LENGTH(ch));
|
||||
|
|
|
|||
|
|
@ -205,21 +205,20 @@ static void prefedit_disp_toggles_menu(struct descriptor_data *d)
|
|||
|
||||
/* The top section of the actual menu */
|
||||
send_to_char(d->character, "%s1%s) Autoexits %s[%s%3s%s] %sA%s) Autoloot %s[%s%3s%s]\r\n"
|
||||
"%s2%s) Autogold %s[%s%3s%s] %sB%s) Shout %s[%s%3s%s]\r\n"
|
||||
"%s3%s) Autoassist %s[%s%3s%s] %sC%s) Autosplit %s[%s%3s%s]\r\n",
|
||||
"%s2%s) Autoassist %s[%s%3s%s] %sB%s) Shout %s[%s%3s%s]\r\n"
|
||||
"%s3%s) Autosplit %s[%s%3s%s]\r\n",
|
||||
|
||||
/* Line 1 - autoexits and autoloot */
|
||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), PREFEDIT_FLAGGED(PRF_AUTOEXIT) ? CBGRN(d->character, C_NRM) : CBRED(d->character, C_NRM),
|
||||
ONOFF(PREFEDIT_FLAGGED(PRF_AUTOEXIT)), CCCYN(d->character, C_NRM), CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM),
|
||||
PREFEDIT_FLAGGED(PRF_AUTOLOOT) ? CBGRN(d->character, C_NRM) : CBRED(d->character, C_NRM), ONOFF(PREFEDIT_FLAGGED(PRF_AUTOLOOT)), CCCYN(d->character, C_NRM),
|
||||
/* Line 2 - autogold and shout */
|
||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), PREFEDIT_FLAGGED(PRF_AUTOGOLD) ? CBGRN(d->character, C_NRM) : CBRED(d->character, C_NRM),
|
||||
ONOFF(PREFEDIT_FLAGGED(PRF_AUTOGOLD)), CCCYN(d->character, C_NRM), CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM),
|
||||
PREFEDIT_FLAGGED(PRF_NOSHOUT) ? CBRED(d->character, C_NRM) : CBGRN(d->character, C_NRM), ONOFF(!PREFEDIT_FLAGGED(PRF_NOSHOUT)), CCCYN(d->character, C_NRM),
|
||||
/* Line 3 - autoassist and autosplit */
|
||||
/* Line 2 - autoassist and shout */
|
||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), PREFEDIT_FLAGGED(PRF_AUTOASSIST) ? CBGRN(d->character, C_NRM) : CBRED(d->character, C_NRM),
|
||||
ONOFF(PREFEDIT_FLAGGED(PRF_AUTOASSIST)), CCCYN(d->character, C_NRM), CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM),
|
||||
PREFEDIT_FLAGGED(PRF_AUTOSPLIT) ? CBGRN(d->character, C_NRM) : CBRED(d->character, C_NRM), ONOFF(PREFEDIT_FLAGGED(PRF_AUTOSPLIT)), CCCYN(d->character, C_NRM)
|
||||
PREFEDIT_FLAGGED(PRF_NOSHOUT) ? CBRED(d->character, C_NRM) : CBGRN(d->character, C_NRM), ONOFF(!PREFEDIT_FLAGGED(PRF_NOSHOUT)), CCCYN(d->character, C_NRM),
|
||||
/* Line 3 - autosplit */
|
||||
CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), PREFEDIT_FLAGGED(PRF_AUTOSPLIT) ? CBGRN(d->character, C_NRM) : CBRED(d->character, C_NRM),
|
||||
ONOFF(PREFEDIT_FLAGGED(PRF_AUTOSPLIT)), CCCYN(d->character, C_NRM)
|
||||
);
|
||||
|
||||
send_to_char(d->character, "%s7%s) Automap %s[%s%3s%s]\r\n"
|
||||
|
|
@ -571,11 +570,11 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
|
|||
break;
|
||||
|
||||
case '2':
|
||||
TOGGLE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOGOLD);
|
||||
TOGGLE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOASSIST);
|
||||
break;
|
||||
|
||||
case '3':
|
||||
TOGGLE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOASSIST);
|
||||
TOGGLE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOSPLIT);
|
||||
break;
|
||||
|
||||
case '4':
|
||||
|
|
@ -609,10 +608,6 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
|
|||
TOGGLE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_NOSHOUT);
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
case 'C':
|
||||
TOGGLE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOSPLIT);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
case 'D':
|
||||
|
|
@ -861,10 +856,6 @@ void prefedit_Restore_Defaults(struct descriptor_data *d)
|
|||
if (!PREFEDIT_FLAGGED(PRF_AUTOLOOT))
|
||||
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOLOOT);
|
||||
|
||||
/* PRF_AUTOGOLD - On */
|
||||
if (!PREFEDIT_FLAGGED(PRF_AUTOGOLD))
|
||||
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOGOLD);
|
||||
|
||||
/* PRF_AUTOSPLIT - Off */
|
||||
if (PREFEDIT_FLAGGED(PRF_AUTOSPLIT))
|
||||
REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_AUTOSPLIT);
|
||||
|
|
@ -988,4 +979,3 @@ ACMD(do_oasis_prefedit)
|
|||
/* No need - done elsewhere */
|
||||
// mudlog(CMP, LVL_IMMORT, TRUE, "OLC: (prefedit) %s starts editing toggles for %s", GET_NAME(ch), GET_NAME(vict));
|
||||
}
|
||||
|
||||
|
|
|
|||
12
src/qedit.c
12
src/qedit.c
|
|
@ -214,7 +214,7 @@ static void qedit_setup_new(struct descriptor_data *d)
|
|||
quest->value[6] = 1; /* Quantity of targets */
|
||||
quest->prev_quest = NOTHING; /* Previous quest */
|
||||
quest->next_quest = NOTHING; /* Next quest */
|
||||
quest->gold_reward= 0; /* Prize in gold coins */
|
||||
quest->coins_reward= 0; /* Prize in coins */
|
||||
quest->exp_reward = 0; /* Prize in exp points */
|
||||
quest->obj_reward = NOTHING; /* vnum of reward object */
|
||||
quest->name = strdup("Undefined Quest");
|
||||
|
|
@ -310,7 +310,7 @@ static void qedit_disp_menu(struct descriptor_data *d)
|
|||
"\tn Quest Point Rewards\r\n"
|
||||
"\tg B\tn) Completed : [\tc%6d\tn] \tg C\tn) Abandoned : [\tc%6d\tn]\r\n"
|
||||
"\tn Other Rewards Rewards\r\n"
|
||||
"\tg G\tn) Gold Coins : [\tc%6d\tn] \tg T\tn) Exp Points : [\tc%6d\tn] \tg O\tn) Object : [\tc%6d\tn]\r\n"
|
||||
"\tg G\tn) Coins : [\tc%6d\tn] \tg T\tn) Exp Points : [\tc%6d\tn] \tg O\tn) Object : [\tc%6d\tn]\r\n"
|
||||
"\tn Level Limits to Accept Quest\r\n"
|
||||
"\tg D\tn) Lower Level : [\tc%6d\tn] \tg E\tn) Upper Level : [\tc%6d\tn]\r\n"
|
||||
"\tg F\tn) Prerequisite : [\tc%6d\tn] \ty%s\r\n"
|
||||
|
|
@ -337,7 +337,7 @@ static void qedit_disp_menu(struct descriptor_data *d)
|
|||
quest->target == NOBODY ? -1 : quest->target, targetname,
|
||||
quest->value[6],
|
||||
quest->value[0], quest->value[1],
|
||||
quest->gold_reward, quest->exp_reward, quest->obj_reward == NOTHING ? -1 : quest->obj_reward,
|
||||
quest->coins_reward, quest->exp_reward, quest->obj_reward == NOTHING ? -1 : quest->obj_reward,
|
||||
quest->value[2], quest->value[3],
|
||||
quest->prereq == NOTHING ? -1 : quest->prereq,
|
||||
quest->prereq == NOTHING ? "" :
|
||||
|
|
@ -544,7 +544,7 @@ void qedit_parse(struct descriptor_data *d, char *arg)
|
|||
break;
|
||||
case 'g':
|
||||
case 'G':
|
||||
OLC_MODE(d) = QEDIT_GOLD;
|
||||
OLC_MODE(d) = QEDIT_COINS;
|
||||
write_to_output(d, "Enter the number of coins (0 for none) : ");
|
||||
break;
|
||||
case 't':
|
||||
|
|
@ -703,8 +703,8 @@ void qedit_parse(struct descriptor_data *d, char *arg)
|
|||
}
|
||||
OLC_QUEST(d)->prev_quest = (number == -1 ? NOTHING : atoi(arg));
|
||||
break;
|
||||
case QEDIT_GOLD:
|
||||
OLC_QUEST(d)->gold_reward = LIMIT(number, 0, 99999);
|
||||
case QEDIT_COINS:
|
||||
OLC_QUEST(d)->coins_reward = LIMIT(number, 0, 99999);
|
||||
break;
|
||||
case QEDIT_EXP:
|
||||
OLC_QUEST(d)->exp_reward = LIMIT(number, 0, 99999);
|
||||
|
|
|
|||
10
src/quest.c
10
src/quest.c
|
|
@ -149,7 +149,7 @@ void parse_quest(FILE *quest_f, int nr)
|
|||
aquest_table[i].next_quest = NOTHING;
|
||||
aquest_table[i].func = NULL;
|
||||
|
||||
aquest_table[i].gold_reward = 0;
|
||||
aquest_table[i].coins_reward = 0;
|
||||
aquest_table[i].exp_reward = 0;
|
||||
aquest_table[i].obj_reward = NOTHING;
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ void parse_quest(FILE *quest_f, int nr)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
aquest_table[i].gold_reward = t[0];
|
||||
aquest_table[i].coins_reward = t[0];
|
||||
aquest_table[i].exp_reward = t[1];
|
||||
aquest_table[i].obj_reward = (t[2] == -1) ? NOTHING : t[2];
|
||||
|
||||
|
|
@ -299,11 +299,11 @@ void generic_complete_quest(struct char_data *ch)
|
|||
"%s\r\nYou have been awarded %d quest points for your service.\r\n",
|
||||
QST_DONE(rnum), QST_POINTS(rnum));
|
||||
|
||||
if (QST_GOLD(rnum)) {
|
||||
increase_gold(ch, QST_GOLD(rnum));
|
||||
if (QST_COINS(rnum)) {
|
||||
increase_coins(ch, QST_COINS(rnum));
|
||||
send_to_char(ch,
|
||||
"You have been awarded %d coins for your service.\r\n",
|
||||
QST_GOLD(rnum));
|
||||
QST_COINS(rnum));
|
||||
}
|
||||
if (QST_OBJ(rnum) && QST_OBJ(rnum) != NOTHING) {
|
||||
if (real_object(QST_OBJ(rnum)) != NOTHING) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ struct aq_data {
|
|||
int target; /* Target value */
|
||||
obj_vnum prereq; /* Object required to undertake quest */
|
||||
int value[7]; /* Quest values */
|
||||
int gold_reward; /* Number of gold coins given as reward */
|
||||
int coins_reward; /* Number of coins given as reward */
|
||||
int exp_reward; /* Experience points given as a reward */
|
||||
obj_vnum obj_reward; /* vnum of object given as a reward */
|
||||
qst_vnum prev_quest; /* Link to prev quest, NOTHING is open */
|
||||
|
|
@ -73,7 +73,7 @@ struct aq_data {
|
|||
#define QST_TIME(i) (aquest_table[i].value[4])
|
||||
#define QST_RETURNMOB(i) (aquest_table[i].value[5])
|
||||
#define QST_QUANTITY(i) (aquest_table[i].value[6])
|
||||
#define QST_GOLD(i) (aquest_table[i].gold_reward)
|
||||
#define QST_COINS(i) (aquest_table[i].coins_reward)
|
||||
#define QST_EXP(i) (aquest_table[i].exp_reward)
|
||||
#define QST_OBJ(i) (aquest_table[i].obj_reward)
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ int save_quests(zone_rnum zone_num);
|
|||
#define QEDIT_NEXTQUEST 19
|
||||
#define QEDIT_PREVQUEST 20
|
||||
#define QEDIT_CONFIRM_DELETE 21
|
||||
#define QEDIT_GOLD 22
|
||||
#define QEDIT_COINS 22
|
||||
#define QEDIT_EXP 23
|
||||
#define QEDIT_OBJ 24
|
||||
/* ******************************************************************** */
|
||||
|
|
|
|||
54
src/shop.c
54
src/shop.c
|
|
@ -483,7 +483,7 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
|
|||
{
|
||||
char tempstr[MAX_INPUT_LENGTH - 10], tempbuf[MAX_INPUT_LENGTH];
|
||||
struct obj_data *obj, *last_obj = NULL;
|
||||
int goldamt = 0, buynum, bought = 0;
|
||||
int coins_amt = 0, buynum, bought = 0;
|
||||
|
||||
if (!is_ok(keeper, ch, shop_nr))
|
||||
return;
|
||||
|
|
@ -518,8 +518,8 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
|
|||
do_tell(keeper, actbuf, cmd_tell, 0);
|
||||
return;
|
||||
}
|
||||
} else { /*has the player got enough gold? */
|
||||
if (buy_price(obj, shop_nr, keeper, ch) > GET_GOLD(ch) && !IS_GOD(ch)) {
|
||||
} else { /* has the player got enough coins? */
|
||||
if (buy_price(obj, shop_nr, keeper, ch) > GET_COINS(ch) && !IS_GOD(ch)) {
|
||||
char actbuf[MAX_INPUT_LENGTH];
|
||||
|
||||
snprintf(actbuf, sizeof(actbuf), shop_index[shop_nr].missing_cash2, GET_NAME(ch));
|
||||
|
|
@ -565,7 +565,7 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
|
|||
}
|
||||
obj_to_char(obj, ch);
|
||||
|
||||
goldamt += GET_OBJ_COST(obj);
|
||||
coins_amt += GET_OBJ_COST(obj);
|
||||
if (!IS_GOD(ch))
|
||||
GET_QUESTPOINTS(ch) -= GET_OBJ_COST(obj);
|
||||
|
||||
|
|
@ -575,7 +575,7 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
while (obj && (GET_GOLD(ch) >= buy_price(obj, shop_nr, keeper, ch) || IS_GOD(ch))
|
||||
while (obj && (GET_COINS(ch) >= buy_price(obj, shop_nr, keeper, ch) || IS_GOD(ch))
|
||||
&& IS_CARRYING_N(ch) < CAN_CARRY_N(ch) && bought < buynum
|
||||
&& IS_CARRYING_W(ch) + GET_OBJ_WEIGHT(obj) <= CAN_CARRY_W(ch)) {
|
||||
int charged;
|
||||
|
|
@ -591,9 +591,9 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
|
|||
obj_to_char(obj, ch);
|
||||
|
||||
charged = buy_price(obj, shop_nr, keeper, ch);
|
||||
goldamt += charged;
|
||||
coins_amt += charged;
|
||||
if (!IS_GOD(ch))
|
||||
decrease_gold(ch, charged);
|
||||
decrease_coins(ch, charged);
|
||||
|
||||
last_obj = obj;
|
||||
obj = get_purchase_obj(ch, arg, keeper, shop_nr, FALSE);
|
||||
|
|
@ -607,7 +607,7 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
|
|||
if (!obj || !same_obj(last_obj, obj))
|
||||
snprintf(buf, sizeof(buf), "%s I only have %d to sell you.", GET_NAME(ch), bought);
|
||||
else if (!OBJ_FLAGGED(obj, ITEM_QUEST) &&
|
||||
GET_GOLD(ch) < buy_price(obj, shop_nr, keeper, ch))
|
||||
GET_COINS(ch) < buy_price(obj, shop_nr, keeper, ch))
|
||||
snprintf(buf, sizeof(buf), "%s You can only afford %d.", GET_NAME(ch), bought);
|
||||
else if (OBJ_FLAGGED(obj, ITEM_QUEST) &&
|
||||
GET_QUESTPOINTS(ch) < GET_OBJ_COST(obj))
|
||||
|
|
@ -622,11 +622,11 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
|
|||
do_tell(keeper, buf, cmd_tell, 0);
|
||||
}
|
||||
if (!IS_GOD(ch) && obj && !OBJ_FLAGGED(obj, ITEM_QUEST)) {
|
||||
increase_gold(keeper, goldamt);
|
||||
increase_coins(keeper, coins_amt);
|
||||
if (SHOP_USES_BANK(shop_nr))
|
||||
if (GET_GOLD(keeper) > MAX_OUTSIDE_BANK) {
|
||||
SHOP_BANK(shop_nr) += (GET_GOLD(keeper) - MAX_OUTSIDE_BANK);
|
||||
GET_GOLD(keeper) = MAX_OUTSIDE_BANK;
|
||||
if (GET_COINS(keeper) > MAX_OUTSIDE_BANK) {
|
||||
SHOP_BANK(shop_nr) += (GET_COINS(keeper) - MAX_OUTSIDE_BANK);
|
||||
GET_COINS(keeper) = MAX_OUTSIDE_BANK;
|
||||
}
|
||||
}
|
||||
strlcpy(tempstr, times_message(ch->carrying, 0, bought), sizeof(tempstr));
|
||||
|
|
@ -635,9 +635,9 @@ static void shopping_buy(char *arg, struct char_data *ch, struct char_data *keep
|
|||
act(tempbuf, FALSE, ch, obj, 0, TO_ROOM);
|
||||
|
||||
if (obj && OBJ_FLAGGED(obj, ITEM_QUEST))
|
||||
snprintf(tempbuf, sizeof(tempbuf), "%s That has cost you %d quest points.", GET_NAME(ch), goldamt);
|
||||
snprintf(tempbuf, sizeof(tempbuf), "%s That has cost you %d quest points.", GET_NAME(ch), coins_amt);
|
||||
else
|
||||
snprintf(tempbuf, sizeof(tempbuf), shop_index[shop_nr].message_buy, GET_NAME(ch), goldamt);
|
||||
snprintf(tempbuf, sizeof(tempbuf), shop_index[shop_nr].message_buy, GET_NAME(ch), coins_amt);
|
||||
|
||||
do_tell(keeper, tempbuf, cmd_tell, 0);
|
||||
|
||||
|
|
@ -748,7 +748,7 @@ static void shopping_sell(char *arg, struct char_data *ch, struct char_data *kee
|
|||
{
|
||||
char tempstr[MAX_INPUT_LENGTH - 10], name[MAX_INPUT_LENGTH], tempbuf[MAX_INPUT_LENGTH]; // - 10 to make room for constants in format
|
||||
struct obj_data *obj;
|
||||
int sellnum, sold = 0, goldamt = 0;
|
||||
int sellnum, sold = 0, coins_amt = 0;
|
||||
|
||||
if (!(is_ok(keeper, ch, shop_nr)))
|
||||
return;
|
||||
|
|
@ -771,19 +771,19 @@ static void shopping_sell(char *arg, struct char_data *ch, struct char_data *kee
|
|||
if (!(obj = get_selling_obj(ch, name, keeper, shop_nr, TRUE)))
|
||||
return;
|
||||
|
||||
if (!IS_SET(SHOP_BITVECTOR(shop_nr), HAS_UNLIMITED_CASH) && GET_GOLD(keeper) + SHOP_BANK(shop_nr) < sell_price(obj, shop_nr, keeper, ch)) {
|
||||
if (!IS_SET(SHOP_BITVECTOR(shop_nr), HAS_UNLIMITED_CASH) && GET_COINS(keeper) + SHOP_BANK(shop_nr) < sell_price(obj, shop_nr, keeper, ch)) {
|
||||
char buf[MAX_INPUT_LENGTH];
|
||||
|
||||
snprintf(buf, sizeof(buf), shop_index[shop_nr].missing_cash1, GET_NAME(ch));
|
||||
do_tell(keeper, buf, cmd_tell, 0);
|
||||
return;
|
||||
}
|
||||
while (obj && (IS_SET(SHOP_BITVECTOR(shop_nr), HAS_UNLIMITED_CASH) || GET_GOLD(keeper) + SHOP_BANK(shop_nr) >= sell_price(obj, shop_nr, keeper, ch)) && sold < sellnum) {
|
||||
while (obj && (IS_SET(SHOP_BITVECTOR(shop_nr), HAS_UNLIMITED_CASH) || GET_COINS(keeper) + SHOP_BANK(shop_nr) >= sell_price(obj, shop_nr, keeper, ch)) && sold < sellnum) {
|
||||
int charged = sell_price(obj, shop_nr, keeper, ch);
|
||||
|
||||
goldamt += charged;
|
||||
coins_amt += charged;
|
||||
if (!IS_SET(SHOP_BITVECTOR(shop_nr), HAS_UNLIMITED_CASH))
|
||||
decrease_gold(keeper, charged);
|
||||
decrease_coins(keeper, charged);
|
||||
|
||||
sold++;
|
||||
obj_from_char(obj);
|
||||
|
|
@ -796,28 +796,28 @@ static void shopping_sell(char *arg, struct char_data *ch, struct char_data *kee
|
|||
|
||||
if (!obj)
|
||||
snprintf(buf, sizeof(buf), "%s You only have %d of those.", GET_NAME(ch), sold);
|
||||
else if (GET_GOLD(keeper) + SHOP_BANK(shop_nr) < sell_price(obj, shop_nr, keeper, ch))
|
||||
else if (GET_COINS(keeper) + SHOP_BANK(shop_nr) < sell_price(obj, shop_nr, keeper, ch))
|
||||
snprintf(buf, sizeof(buf), "%s I can only afford to buy %d of those.", GET_NAME(ch), sold);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%s Something really screwy made me buy %d.", GET_NAME(ch), sold);
|
||||
|
||||
do_tell(keeper, buf, cmd_tell, 0);
|
||||
}
|
||||
increase_gold(ch, goldamt);
|
||||
increase_coins(ch, coins_amt);
|
||||
|
||||
strlcpy(tempstr, times_message(0, name, sold), sizeof(tempstr));
|
||||
snprintf(tempbuf, sizeof(tempbuf), "$n sells %s.", tempstr);
|
||||
act(tempbuf, FALSE, ch, obj, 0, TO_ROOM);
|
||||
|
||||
snprintf(tempbuf, sizeof(tempbuf), shop_index[shop_nr].message_sell, GET_NAME(ch), goldamt);
|
||||
snprintf(tempbuf, sizeof(tempbuf), shop_index[shop_nr].message_sell, GET_NAME(ch), coins_amt);
|
||||
do_tell(keeper, tempbuf, cmd_tell, 0);
|
||||
|
||||
send_to_char(ch, "The shopkeeper now has %s.\r\n", tempstr);
|
||||
|
||||
if (GET_GOLD(keeper) < MIN_OUTSIDE_BANK) {
|
||||
goldamt = MIN(MAX_OUTSIDE_BANK - GET_GOLD(keeper), SHOP_BANK(shop_nr));
|
||||
SHOP_BANK(shop_nr) -= goldamt;
|
||||
increase_gold(keeper, goldamt);
|
||||
if (GET_COINS(keeper) < MIN_OUTSIDE_BANK) {
|
||||
coins_amt = MIN(MAX_OUTSIDE_BANK - GET_COINS(keeper), SHOP_BANK(shop_nr));
|
||||
SHOP_BANK(shop_nr) -= coins_amt;
|
||||
increase_coins(keeper, coins_amt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1477,7 +1477,7 @@ static void list_detailed_shop(struct char_data *ch, int shop_nr)
|
|||
|
||||
if ((k = get_char_num(SHOP_KEEPER(shop_nr))))
|
||||
send_to_char(ch, "Coins: [%9d], Bank: [%9d] (Total: %d)\r\n",
|
||||
GET_GOLD(k), SHOP_BANK(shop_nr), GET_GOLD(k) + SHOP_BANK(shop_nr));
|
||||
GET_COINS(k), SHOP_BANK(shop_nr), GET_COINS(k) + SHOP_BANK(shop_nr));
|
||||
} else
|
||||
send_to_char(ch, "<NONE>\r\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ struct shop_data {
|
|||
room_vnum *in_room; /* Where is the shop? */
|
||||
int open1, open2; /* When does the shop open? */
|
||||
int close1, close2; /* When does the shop close? */
|
||||
int bankAccount; /* Store all gold over 15000 (disabled) */
|
||||
int bankAccount; /* Store all coins over 15000 (disabled) */
|
||||
int lastsort; /* How many items are sorted in inven? */
|
||||
SPECIAL (*func); /* Secondary spec_proc for shopkeeper */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ SPECIAL(mayor)
|
|||
|
||||
static void npc_steal(struct char_data *ch, struct char_data *victim)
|
||||
{
|
||||
int gold;
|
||||
int coins;
|
||||
|
||||
if (IS_NPC(victim))
|
||||
return;
|
||||
|
|
@ -270,10 +270,10 @@ static void npc_steal(struct char_data *ch, struct char_data *victim)
|
|||
act("$n tries to steal coins from $N.", TRUE, ch, 0, victim, TO_NOTVICT);
|
||||
} else {
|
||||
/* Steal some coins */
|
||||
gold = (GET_GOLD(victim) * rand_number(1, 10)) / 100;
|
||||
if (gold > 0) {
|
||||
increase_gold(ch, gold);
|
||||
decrease_gold(victim, gold);
|
||||
coins = (GET_COINS(victim) * rand_number(1, 10)) / 100;
|
||||
if (coins > 0) {
|
||||
increase_coins(ch, coins);
|
||||
decrease_coins(victim, coins);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -578,11 +578,11 @@ SPECIAL(pet_shops)
|
|||
send_to_char(ch, "There is no such pet!\r\n");
|
||||
return (TRUE);
|
||||
}
|
||||
if (GET_GOLD(ch) < PET_PRICE(pet)) {
|
||||
if (GET_COINS(ch) < PET_PRICE(pet)) {
|
||||
send_to_char(ch, "You don't have enough coins!\r\n");
|
||||
return (TRUE);
|
||||
}
|
||||
decrease_gold(ch, PET_PRICE(pet));
|
||||
decrease_coins(ch, PET_PRICE(pet));
|
||||
|
||||
pet = read_mobile(GET_MOB_RNUM(pet), REAL);
|
||||
GET_EXP(pet) = 0;
|
||||
|
|
@ -621,8 +621,8 @@ SPECIAL(bank)
|
|||
int amount;
|
||||
|
||||
if (CMD_IS("balance")) {
|
||||
if (GET_BANK_GOLD(ch) > 0)
|
||||
send_to_char(ch, "Your current balance is %d coins.\r\n", GET_BANK_GOLD(ch));
|
||||
if (GET_BANK_COINS(ch) > 0)
|
||||
send_to_char(ch, "Your current balance is %d coins.\r\n", GET_BANK_COINS(ch));
|
||||
else
|
||||
send_to_char(ch, "You currently have no money deposited.\r\n");
|
||||
return (TRUE);
|
||||
|
|
@ -631,12 +631,12 @@ SPECIAL(bank)
|
|||
send_to_char(ch, "How much do you want to deposit?\r\n");
|
||||
return (TRUE);
|
||||
}
|
||||
if (GET_GOLD(ch) < amount) {
|
||||
if (GET_COINS(ch) < amount) {
|
||||
send_to_char(ch, "You don't have that many coins!\r\n");
|
||||
return (TRUE);
|
||||
}
|
||||
decrease_gold(ch, amount);
|
||||
increase_bank(ch, amount);
|
||||
decrease_coins(ch, amount);
|
||||
increase_bank_coins(ch, amount);
|
||||
send_to_char(ch, "You deposit %d coins.\r\n", amount);
|
||||
act("$n makes a bank transaction.", TRUE, ch, 0, FALSE, TO_ROOM);
|
||||
return (TRUE);
|
||||
|
|
@ -645,12 +645,12 @@ SPECIAL(bank)
|
|||
send_to_char(ch, "How much do you want to withdraw?\r\n");
|
||||
return (TRUE);
|
||||
}
|
||||
if (GET_BANK_GOLD(ch) < amount) {
|
||||
if (GET_BANK_COINS(ch) < amount) {
|
||||
send_to_char(ch, "You don't have that many coins deposited!\r\n");
|
||||
return (TRUE);
|
||||
}
|
||||
increase_gold(ch, amount);
|
||||
decrease_bank(ch, amount);
|
||||
increase_coins(ch, amount);
|
||||
decrease_bank_coins(ch, amount);
|
||||
send_to_char(ch, "You withdraw %d coins.\r\n", amount);
|
||||
act("$n makes a bank transaction.", TRUE, ch, 0, FALSE, TO_ROOM);
|
||||
return (TRUE);
|
||||
|
|
|
|||
|
|
@ -263,17 +263,16 @@
|
|||
#define PRF_BUILDWALK 21 /**< Build new rooms while walking */
|
||||
#define PRF_AFK 22 /**< AFK flag */
|
||||
#define PRF_AUTOLOOT 23 /**< Loot everything from a corpse */
|
||||
#define PRF_AUTOGOLD 24 /**< Loot gold from a corpse */
|
||||
#define PRF_AUTOSPLIT 25 /**< Split gold with group */
|
||||
#define PRF_AUTOSAC 26 /**< Sacrifice a corpse */
|
||||
#define PRF_AUTOASSIST 27 /**< Auto-assist toggle */
|
||||
#define PRF_AUTOMAP 28 /**< Show map at the side of room descs */
|
||||
#define PRF_AUTOKEY 29 /**< Automatically unlock locked doors when opening */
|
||||
#define PRF_AUTODOOR 30 /**< Use the next available door */
|
||||
#define PRF_ZONERESETS 31 /**< Show when zones reset */
|
||||
#define PRF_VERBOSE 32 /**< Listings like where are more verbose */
|
||||
#define PRF_AUTOSPLIT 24 /**< Split coins with group */
|
||||
#define PRF_AUTOSAC 25 /**< Sacrifice a corpse */
|
||||
#define PRF_AUTOASSIST 26 /**< Auto-assist toggle */
|
||||
#define PRF_AUTOMAP 27 /**< Show map at the side of room descs */
|
||||
#define PRF_AUTOKEY 28 /**< Automatically unlock locked doors when opening */
|
||||
#define PRF_AUTODOOR 29 /**< Use the next available door */
|
||||
#define PRF_ZONERESETS 30 /**< Show when zones reset */
|
||||
#define PRF_VERBOSE 31 /**< Listings like where are more verbose */
|
||||
/** Total number of available PRF flags */
|
||||
#define NUM_PRF_FLAGS 33
|
||||
#define NUM_PRF_FLAGS 32
|
||||
|
||||
/* Affect bits: used in char_data.char_specials.saved.affected_by */
|
||||
/* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */
|
||||
|
|
@ -382,7 +381,7 @@
|
|||
#define ITEM_WEAPON 5 /**< Item is a weapon */
|
||||
#define ITEM_FURNITURE 6 /**< Sittable Furniture */
|
||||
#define ITEM_FREE 7 /**< Unimplemented */
|
||||
#define ITEM_TREASURE 8 /**< Item is a treasure, not gold */
|
||||
#define ITEM_TREASURE 8 /**< Item is a treasure, not coins */
|
||||
#define ITEM_ARMOR 9 /**< Item is armor */
|
||||
#define ITEM_POTION 10 /**< Item is a potion */
|
||||
#define ITEM_WORN 11 /**< Unimplemented */
|
||||
|
|
@ -465,7 +464,7 @@
|
|||
#define APPLY_MANA 12 /**< Apply to max mana */
|
||||
#define APPLY_HIT 13 /**< Apply to max hit points */
|
||||
#define APPLY_MOVE 14 /**< Apply to max move points */
|
||||
#define APPLY_GOLD 15 /**< Reserved */
|
||||
#define APPLY_COINS 15 /**< Reserved */
|
||||
#define APPLY_EXP 16 /**< Reserved */
|
||||
#define APPLY_AC 17 /**< Apply to Armor Class */
|
||||
#define APPLY_PROFICIENCY 18 /**< Apply to Proficiency Bonus */
|
||||
|
|
@ -638,8 +637,8 @@
|
|||
#define MAX_HELP_ENTRY MAX_STRING_LENGTH /**< Max size of help entry */
|
||||
#define MAX_COMPLETED_QUESTS 1024 /**< Maximum number of completed quests allowed */
|
||||
|
||||
#define MAX_GOLD 2140000000 /**< Maximum possible on hand gold (2.14 Billion) */
|
||||
#define MAX_BANK 2140000000 /**< Maximum possible in bank gold (2.14 Billion) */
|
||||
#define MAX_COINS 2140000000 /**< Maximum possible on hand coins (2.14 Billion) */
|
||||
#define MAX_BANK_COINS 2140000000 /**< Maximum possible in bank coins (2.14 Billion) */
|
||||
|
||||
/** Define the largest set of commands for a trigger.
|
||||
* 16k should be plenty and then some. */
|
||||
|
|
@ -789,7 +788,7 @@ struct save_info
|
|||
int time;
|
||||
int savecode; /**< How this character saved */
|
||||
int net_cost_per_diem; /**< ? Appears to be unused ? */
|
||||
int gold; /**< ? Appears to be unused ? */
|
||||
int coins; /**< ? Appears to be unused ? */
|
||||
int account; /**< ? Appears to be unused ? */
|
||||
int nitems; /**< ? Appears to be unused ? */
|
||||
int spare0;
|
||||
|
|
@ -947,8 +946,8 @@ struct char_point_data
|
|||
* Armor class. */
|
||||
sh_int armor;
|
||||
sh_int prof_mod; /**< Equipment/affect delta to proficiency bonus */
|
||||
int gold; /**< Current gold carried on character */
|
||||
int bank_gold; /**< Gold the char has in a bank account */
|
||||
int coins; /**< Current coins carried on character */
|
||||
int bank_coins; /**< Coins the char has in a bank account */
|
||||
int exp; /**< The experience points, or value, of the character. */
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ struct char_point_data_plrtoascii {
|
|||
sh_int max_move; /* Max move for PC/NPC */
|
||||
|
||||
sh_int armor; /* Internal -100..100, external -10..10 AC */
|
||||
int gold; /* Money carried */
|
||||
int bank_gold; /* Gold the char has in a bank account */
|
||||
int coins; /* Money carried */
|
||||
int bank_coins; /* Coins the char has in a bank account */
|
||||
int exp; /* The experience of the player */
|
||||
|
||||
};
|
||||
|
|
@ -291,10 +291,10 @@ void convert(char *filename)
|
|||
fprintf(outfile, "Move: %d/%d\n", cpd->move, cpd->max_move);
|
||||
if (cpd->armor != PFDEF_AC)
|
||||
fprintf(outfile, "Ac : %d\n", cpd->armor);
|
||||
if (cpd->gold != PFDEF_GOLD)
|
||||
fprintf(outfile, "Gold: %d\n", cpd->gold);
|
||||
if (cpd->bank_gold != PFDEF_BANK)
|
||||
fprintf(outfile, "Bank: %d\n", cpd->bank_gold);
|
||||
if (cpd->coins != PFDEF_COINS)
|
||||
fprintf(outfile, "Coin: %d\n", cpd->coins);
|
||||
if (cpd->bank_coins != PFDEF_BANK_COINS)
|
||||
fprintf(outfile, "BankCoins: %d\n", cpd->bank_coins);
|
||||
if (cpd->exp != PFDEF_EXP)
|
||||
fprintf(outfile, "Exp : %d\n", cpd->exp);
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ long atol(const char *str);
|
|||
#define MINDEX_DELETED FLAG(0) /* Mail has been marked for deletion */
|
||||
#define MINDEX_URGENT FLAG(1) /* Mail is flagged as urgent by sender */
|
||||
#define MINDEX_HAS_OBJ FLAG(2) /* Mail has an attached object */
|
||||
#define MINDEX_HAS_GOLD FLAG(3) /* Mail contains some gold coins */
|
||||
#define MINDEX_IS_COD FLAG(4) /* Mail requires some gold coins */
|
||||
#define MINDEX_HAS_COINS FLAG(3) /* Mail contains some coins */
|
||||
#define MINDEX_IS_COD FLAG(4) /* Mail requires some coins */
|
||||
#define MINDEX_FROM_MOB FLAG(5) /* Mail has been sent by using scripts */
|
||||
#define MINDEX_READ FLAG(6) /* Mail has been viewed but not received */
|
||||
#define MINDEX_DRAFT FLAG(7) /* Mail is an unsent draft copy */
|
||||
|
|
@ -159,8 +159,8 @@ int parse_mail_flags(FILE *plr_file) {
|
|||
if (IS_SET_AR(fl, MAIL_DRAFT)) SET_BIT(ret, MINDEX_DRAFT);
|
||||
}
|
||||
}
|
||||
if ((txt = findLine(plr_file, "Gold:")) != NULL) {
|
||||
if (atol(txt) > 0) SET_BIT(ret, MINDEX_HAS_GOLD);
|
||||
if ((txt = findLine(plr_file, "Coin:")) != NULL) {
|
||||
if (atol(txt) > 0) SET_BIT(ret, MINDEX_HAS_COINS);
|
||||
}
|
||||
if ((txt = findLine(plr_file, "Objs:")) != NULL) {
|
||||
SET_BIT(ret, MINDEX_HAS_OBJ);
|
||||
|
|
|
|||
16
src/utils.h
16
src/utils.h
|
|
@ -182,10 +182,10 @@ void gain_skill(struct char_data *ch, char *skill, bool success);
|
|||
void point_update(void);
|
||||
void update_pos(struct char_data *victim);
|
||||
void run_autowiz(void);
|
||||
int increase_gold(struct char_data *ch, int amt);
|
||||
int decrease_gold(struct char_data *ch, int amt);
|
||||
int increase_bank(struct char_data *ch, int amt);
|
||||
int decrease_bank(struct char_data *ch, int amt);
|
||||
int increase_coins(struct char_data *ch, int amt);
|
||||
int decrease_coins(struct char_data *ch, int amt);
|
||||
int increase_bank_coins(struct char_data *ch, int amt);
|
||||
int decrease_bank_coins(struct char_data *ch, int amt);
|
||||
|
||||
/* in class.c */
|
||||
void advance_level(struct char_data *ch);
|
||||
|
|
@ -602,10 +602,10 @@ do \
|
|||
#define GET_MANA(ch) ((ch)->points.mana)
|
||||
/** Maximum mana points (magic) of ch. */
|
||||
#define GET_MAX_MANA(ch) ((ch)->points.max_mana)
|
||||
/** Gold on ch. */
|
||||
#define GET_GOLD(ch) ((ch)->points.gold)
|
||||
/** Gold in bank of ch. */
|
||||
#define GET_BANK_GOLD(ch) ((ch)->points.bank_gold)
|
||||
/** Coins on ch. */
|
||||
#define GET_COINS(ch) ((ch)->points.coins)
|
||||
/** Coins in bank of ch. */
|
||||
#define GET_BANK_COINS(ch) ((ch)->points.bank_coins)
|
||||
|
||||
/** Current position (standing, sitting) of ch. */
|
||||
#define GET_POS(ch) ((ch)->char_specials.position)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue