mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-21 01:30:12 +01:00
Added Questpoints. --Rumble
This commit is contained in:
parent
140fcc2be1
commit
48a2738d6a
16 changed files with 149 additions and 204 deletions
|
|
@ -5,6 +5,8 @@ The Builder Academy
|
|||
builderacademy.net 9091
|
||||
|
||||
tbaMUD 3.52
|
||||
[Apr 02 2007] - Rumble
|
||||
Added questpoints!
|
||||
[Mar 30 2007] - Rumble
|
||||
Added unlimited fountains and containers (Thanks Adam Scriven).
|
||||
Removed object types MISSILE and FIRE WEAPON.
|
||||
|
|
|
|||
|
|
@ -882,7 +882,26 @@ another form of Unix:
|
|||
example "C:\tbaMUD". "cd c:/tbaMUD" "dir" in the listed files you should see
|
||||
one called configure. DO NOT go into the SRC directory yet.
|
||||
|
||||
4) Run the configure script by typing "./configure". This will automatically
|
||||
4) Make the following change to src/Makefile.in to make copyover work:
|
||||
|
||||
--- Makefile.in.old 2007-02-26 05:52:19.000000000 +0100
|
||||
+++ Makefile.in 2007-03-26 17:21:56.000000000 +0200
|
||||
@@ -61,6 +61,8 @@ circle:
|
||||
$(MAKE) $(BINDIR)/circle
|
||||
|
||||
$(BINDIR)/circle : $(OBJFILES)
|
||||
+ @-rm $(BINDIR)/circleold.exe
|
||||
+ @-mv $(BINDIR)/circle.exe $(BINDIR)/circleold.exe
|
||||
$(CC) -o $(BINDIR)/circle $(PROFILE) $(OBJFILES) $(LIBS)
|
||||
|
||||
clean:
|
||||
|
||||
The above is a "patch" file. All you need to do is add the two lines with
|
||||
the +'s to your file Makefile.in. If you are still confused check out these
|
||||
links on how to patch: http://www.circlemud.org/cdp/wtfaq/handpatch.html
|
||||
http://cwg.lazuras.org/modules.php?name=Forums&file=viewtopic&t=757
|
||||
|
||||
Run the configure script by typing "./configure". This will automatically
|
||||
detect what programs and library functions are available, and create the
|
||||
files "Makefile" and "conf.h" based on the results.
|
||||
|
||||
|
|
@ -911,13 +930,9 @@ reading the forums at http://cwg.lazuras.org/ or stop by TBA for assistance.
|
|||
|
||||
It really can not be stressed enough: READ EVERYTHING.
|
||||
|
||||
Credit where credit is due:
|
||||
|
||||
Some parts of this document have been derived or outright copied from other
|
||||
files by: Jeremy Elson, David Goldstein, Tony Robbins, and George Greer
|
||||
Authors: Jeremy Elson, David Goldstein, Tony Robbins, and George Greer.
|
||||
|
||||
Rumble
|
||||
Rumble@@builderacademy.net
|
||||
The Builder Academy
|
||||
builderacademy.net 9091
|
||||
|
||||
|
|
@ -1870,16 +1885,11 @@ See also: DATE, TIME
|
|||
FOUNTAINS DRINK-UNITS OEDIT-FOUNTAINS
|
||||
|
||||
After selecting object type FOUNTAIN you must then select C) Values to set
|
||||
the capacity of the fountain. A good number is 500 for both the capacity and
|
||||
quantity. When loading the fountain through zedit you should remove and then
|
||||
load the fountain every zone reset. This can be done by choosing the R)
|
||||
Remove an object option in zedit followed by the O) Load Object to room command.
|
||||
This way your fountain will reload every zone reset and always be full.
|
||||
|
||||
Example: @RAT 23429 STAT ROOM@n
|
||||
the capacity of the fountain. The first number is max capacity. The second is
|
||||
the current contents. To make a fountain contain that never runs out set the
|
||||
2nd number to -1.
|
||||
|
||||
See also: VALUES
|
||||
|
||||
#31
|
||||
ALIGNMENT GOOD NEUTRAL EVIL %ACTOR.ALIGN% %ALIGN% %ALIGNMENT%
|
||||
|
||||
|
|
@ -2508,6 +2518,7 @@ poofin LVL_IMMORT PC MISC Poofin
|
|||
poofout LVL_IMMORT PC MISC Poofout
|
||||
practices LVL_GOD PC NUMBER # of practices
|
||||
quest LVL_GOD PC BINARY QUEST flag
|
||||
questpoints LVL_GOD PC NUMBER Questpoints
|
||||
room LVL_BUILDER BOTH NUMBER Move to room
|
||||
sex LVL_GOD BOTH MISC Sex
|
||||
showvnums LVL_BUILDER PC BINARY ShowVnums
|
||||
|
|
@ -6228,8 +6239,7 @@ the command should be placed. Use the SAME number as the command which loads
|
|||
the rose. This will bump the command, which loads the rose down. Then you will
|
||||
be at a command options menu. Enter R for remove an object from a room. If no
|
||||
one comes along and gets the rose, the game will remove it and load another
|
||||
one. This will prevent build up. Also use the remove option to remove fountains
|
||||
before they reload so it will be full after every reset.
|
||||
one. This will prevent build up.
|
||||
Zedit can not currently give a container to a mob and then load an object to
|
||||
that container. A workaround for this is to load the object to the room before
|
||||
loading the mob. Then attach a load trigger to the mob that will force it to
|
||||
|
|
@ -6298,8 +6308,9 @@ D) Open/Close/Lock a Door
|
|||
use option 2). This will close and lock a door. It is not necessary to close
|
||||
it with one command, then lock it with another. @RHELP REDIT-EXIT@n.
|
||||
R) Remove an object from the room
|
||||
Important for refilling fountains and to load a single instance of an object
|
||||
with a maxload greater than 1. @RHELP FOUNTAIN@n, @RHELP ZEDIT-ADVANCED@n.
|
||||
Important for reloading containers that a player may have emptied and to load
|
||||
a single instance of an object with a maxload greater than 1. @RHELP FOUNTAIN@n,
|
||||
@RHELP ZEDIT-ADVANCED@n.
|
||||
T) Assign a trigger (Advanced builders only)
|
||||
Attach a trigger to a mob, obj, or room. Usually done through REDIT, MEDIT,
|
||||
or OEDIT. DO NOT USE THIS OPTION WITHOUT FIRST CLEARING IT WITH A LEVEL 33
|
||||
|
|
@ -6862,8 +6873,8 @@ of value0 through value4 (option C). The Type Flag must be one of the following:
|
|||
3 WAND Item is a magical wand.
|
||||
4 STAFF Item is a magical staff.
|
||||
5 WEAPON Must be piercing to backstab.
|
||||
6 FIREWEAPON Not implemented. Do not use. @RHELP GUN@n.
|
||||
7 MISSILE Not implemented. Do not use.
|
||||
6 FURNITURE Item may be sat on.
|
||||
7 UNDEFINED Not implemented. Do not use.
|
||||
8 TREASURE Item is treasure other than gold coins (i.e. gems)
|
||||
9 ARMOR Item is armor.
|
||||
10 POTION Item is a magical potion.
|
||||
|
|
@ -6879,7 +6890,7 @@ of value0 through value4 (option C). The Type Flag must be one of the following:
|
|||
20 MONEY Value set in the C) Applies. Cost not used. Max 1000 coins.
|
||||
21 PEN Item is a pen.
|
||||
22 BOAT Item is a boat; allows you to traverse water (noswim).
|
||||
23 FOUNTAIN Item is a fountain.
|
||||
23 FOUNTAIN Item is a fountain. Set Values to -1 to make it unlimited.
|
||||
24 CHAIR Item is a chair people can sit in.
|
||||
|
||||
Good items should be very rare, and hard to get. Lousy items should require
|
||||
|
|
@ -6891,8 +6902,7 @@ beneficial lying around. This may sound obvious, but it has been done.
|
|||
Also consider creating objects that are harmful to the owner. Objects that
|
||||
lower certain stats, saving throws, or confer weaknesses make the game more
|
||||
interesting. Remember that a lot of small items make an area more interesting
|
||||
than a few incredibly powerful items, for the most part. Do not feel limited to
|
||||
items players consider useful, such as weapons and armor. A giant untakeable
|
||||
than a few incredibly powerful items, for the most part. Do not feel lim armor. A giant untakeable
|
||||
monolith, and other strange and odd items can add a lot of atmosphere to an
|
||||
area. They can also be used to distract players. Most of the useless items are
|
||||
often best as trash, but can be worn, and do not feel that items should not get
|
||||
|
|
@ -7064,8 +7074,10 @@ WEAPON
|
|||
12) blast 13) punch
|
||||
14) stab
|
||||
|
||||
FIREWEAPON - No values currently used. - not implemented.
|
||||
MISSILE - No values currently used. - not implemented.
|
||||
FURNITURE
|
||||
value 0: Number of people that can sit on this object.
|
||||
|
||||
UNDEFINED - Not implemented.
|
||||
TREASURE - No values currently used.
|
||||
|
||||
ARMOR
|
||||
|
|
@ -7091,7 +7103,7 @@ TRASH - No values currently used.
|
|||
TRAP - No values currently used. - not implemented.
|
||||
|
||||
CONTAINER
|
||||
value 0: Capacity (max containable weight) of container
|
||||
value 0: Capacity (max containable weight) of container. -1 for unlimited.
|
||||
value 1: Container flag bitvector
|
||||
1) CLOSEABLE Container can be closed and locked.
|
||||
2) PICKPROOF Lock on container cannot be picked.
|
||||
|
|
@ -7119,7 +7131,7 @@ BOAT - No values currently used.
|
|||
DRINKCON
|
||||
FOUNTAIN
|
||||
value 0: Capacity of container
|
||||
value 1: Current quantity in container
|
||||
value 1: Current quantity in container. -1 for unlimited.
|
||||
value 2: see below
|
||||
value 3: If the drink is poisoned, how long will the poison burn? 0 if not poisoned.
|
||||
|
||||
|
|
@ -7660,8 +7672,8 @@ See also: OLC
|
|||
#31
|
||||
DRUNK WINE LIQUID-CONTAINERS BEER SPIRITS DRINK-TYPES LIQUOR WHISKEY WHISKY LIQUIDS LIQ-CONTAINERS
|
||||
|
||||
When selecting object type FOUNTAIN or DRINK CONTAINER you will need
|
||||
to choose the type of liquid it contains from the following list:
|
||||
When selecting object type FOUNTAIN or DRINK CONTAINER you will need to
|
||||
choose the type of liquid it contains from the following list:
|
||||
|
||||
0) water 1) beer
|
||||
2) wine 3) ale
|
||||
|
|
@ -8203,15 +8215,16 @@ See also: NOSUMMON
|
|||
#0
|
||||
DISPLAYS PROMPTS HIT-PNT-DISPLAY
|
||||
|
||||
Usage: display < H | M | V | all | auto | off >
|
||||
Usage: prompt < H | M | V | all | auto | off >
|
||||
|
||||
Modify your prompt to show your hit points, mana, and/or movement points.
|
||||
|
||||
> display hv Display hit points and movement points
|
||||
> display off Return to normal display
|
||||
> display all Display hit, mana, and move points
|
||||
> display auto Display hit, mana, and move when they are below 30%
|
||||
> prompt hv Display hit points and movement points.
|
||||
> prompt off Return to no prompt.
|
||||
> prompt all Display hit, mana, and movement points.
|
||||
|
||||
> prompt auto A seperate toggle that will only display your selected
|
||||
prompt if the values drop below 30% of max.
|
||||
See also: TOGGLE
|
||||
#0
|
||||
ASSIST
|
||||
|
|
@ -9081,7 +9094,7 @@ Level 31 builders can not drop objects outside of their assigned zone.
|
|||
|
||||
See also: DONATE, GET, JUNK
|
||||
#0
|
||||
EATING DRINKING SIP TASTE HUNGRY HUNGER THIRSTY FOOD
|
||||
EATING DRINKING SIP TASTE HUNGRY HUNGER THIRSTY FOOD NIBBLE
|
||||
|
||||
Usage: eat <item>
|
||||
taste [from] <item>
|
||||
|
|
@ -9096,7 +9109,7 @@ If you're hungry or thirsty, these commands are for you!
|
|||
> sip fountain
|
||||
|
||||
If you taste or sip, you don't get large portions and won't be
|
||||
hurt badly by poison. You don't get satisfied either, though.
|
||||
hurt badly by poison. You :Sdon't get satisfied either, though.
|
||||
|
||||
Thirst and Hunger are modified by objects in units of hours. So an object
|
||||
with 24 drink units will quench thirst for 24 hours. Same for food.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ email list staff~
|
|||
a list of the staff's emails~
|
||||
A list of the staff's emails has been left here.~
|
||||
~
|
||||
24 0 ao 0
|
||||
12 0 ao 0
|
||||
0 0 0 0
|
||||
1 1 0 0
|
||||
E
|
||||
|
|
@ -22,6 +22,7 @@ Shamra shamra@@builderacademy.net BlackdemonRahl
|
|||
Elorien elorien@@builderacademy.net
|
||||
Random random@@builderacademy.net 219948345
|
||||
Fyre fyre@@builderacademy.net
|
||||
Fizban mudaddict4life@@gmail.com Fizban1216 Fizban1216
|
||||
~
|
||||
#1201
|
||||
pamphlet trigedit~
|
||||
|
|
@ -74,13 +75,15 @@ Staff~
|
|||
1 3 3 31
|
||||
1 1 0 0
|
||||
#1209
|
||||
chair~
|
||||
squishy armchair chair~
|
||||
a squishy armchair~
|
||||
A large squishy armchair sits in front of the fireplace.~
|
||||
~
|
||||
6 0 a 0
|
||||
2 0 0 0
|
||||
1 1 0 0
|
||||
12 0 0 0
|
||||
0 0 0 0
|
||||
0 0 0 0
|
||||
T 1209
|
||||
T 1286
|
||||
E
|
||||
chair armchair squishy~
|
||||
This chair has large red leather cushions, on the seat and back. Strange
|
||||
|
|
@ -102,7 +105,7 @@ a spring well~
|
|||
A mountain spring bubbles up fresh water here.~
|
||||
~
|
||||
23 0 0 0
|
||||
-1 0 0 0
|
||||
500 500 15 0
|
||||
0 0 0 0
|
||||
E
|
||||
spring fountain water~
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ if %cmd.mudcommand% == sit && chair /= %arg%
|
|||
%force% %actor% sit
|
||||
else
|
||||
if %cmd.mudcommand% == sit && chair /= %arg%
|
||||
%echoaround% %actor% %actor.name% tries to sit in the chair but a macial force prevents him.
|
||||
%echoaround% %actor% %actor.name% tries to sit in the chair but a magical force prevents him.
|
||||
%send% %actor% You try to sit in the chair but a magical force prevents you.
|
||||
end
|
||||
end
|
||||
|
|
@ -214,10 +214,15 @@ else
|
|||
end
|
||||
~
|
||||
#1211
|
||||
FREE~
|
||||
1 b 3
|
||||
Questpoints Test~
|
||||
2 b 100
|
||||
~
|
||||
* No Script
|
||||
set actor %random.char%
|
||||
%echo% QP: %actor.questpoints%
|
||||
nop %actor.questpoints(2)%
|
||||
%echo% QP+2: %actor.questpoints%
|
||||
nop %actor.questpoints(-1)%
|
||||
%echo% QP-1: %actor.questpoints%
|
||||
~
|
||||
#1212
|
||||
Constant Raining~
|
||||
|
|
|
|||
|
|
@ -179,4 +179,5 @@
|
|||
325.trg
|
||||
326.trg
|
||||
345.trg
|
||||
|
||||
$
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
CircleMUD~
|
||||
God Simplex~
|
||||
1200 1299 10 0
|
||||
O 0 1209 1 1204 (a squishy armchair)
|
||||
R 0 1204 3098 -1 (a holy bulletin board)
|
||||
O 0 3098 99 1204 (a holy bulletin board)
|
||||
R 0 1293 1227 -1 (a staff bulletin board)
|
||||
|
|
|
|||
|
|
@ -367,10 +367,10 @@ void list_one_char(struct char_data *i, struct char_data *ch)
|
|||
send_to_char(ch, "%s", positions[(int) GET_POS(i)]);
|
||||
else {
|
||||
furniture = SITTING(i);
|
||||
send_to_char(ch, " is %s upon %s.", ((GET_POS(i) == POS_SLEEPING) ?
|
||||
"sleeping" : "sitting"), (CAN_SEE_OBJ(ch, furniture) ?
|
||||
furniture->short_description : "something"));
|
||||
}
|
||||
send_to_char(ch, " is %s upon %s.", (GET_POS(i) == POS_SLEEPING ?
|
||||
"sleeping" : (GET_POS(i) == POS_RESTING ? "resting" : "sitting")),
|
||||
OBJS(furniture, ch));
|
||||
}
|
||||
} else {
|
||||
if (FIGHTING(i)) {
|
||||
send_to_char(ch, " is here, fighting ");
|
||||
|
|
@ -789,8 +789,8 @@ ACMD(do_score)
|
|||
send_to_char(ch, "Your armor class is %d/10, and your alignment is %d.\r\n",
|
||||
compute_armor_class(ch), GET_ALIGNMENT(ch));
|
||||
|
||||
send_to_char(ch, "You have scored %d exp, and have %d gold coins.\r\n",
|
||||
GET_EXP(ch), GET_GOLD(ch));
|
||||
send_to_char(ch, "You have %d exp, %d gold coins, and %d questpoints.\r\n",
|
||||
GET_EXP(ch), GET_GOLD(ch), GET_QUESTPOINTS(ch));
|
||||
|
||||
if (GET_LEVEL(ch) < LVL_IMMORT)
|
||||
send_to_char(ch, "You need %d exp to reach your next level.\r\n",
|
||||
|
|
|
|||
|
|
@ -861,8 +861,8 @@ void do_stat_character(struct char_data *ch, struct char_data *k)
|
|||
CCGRN(ch, C_NRM), GET_MANA(k), GET_MAX_MANA(k), mana_gain(k), CCNRM(ch, C_NRM),
|
||||
CCGRN(ch, C_NRM), GET_MOVE(k), GET_MAX_MOVE(k), move_gain(k), CCNRM(ch, C_NRM));
|
||||
|
||||
send_to_char(ch, "Coins: [%9d], Bank: [%9d] (Total: %d)\r\n",
|
||||
GET_GOLD(k), GET_BANK_GOLD(k), GET_GOLD(k) + GET_BANK_GOLD(k));
|
||||
send_to_char(ch, "Gold: [%9d], Bank: [%9d] (Total: %d), Questpoints: [%d]\r\n",
|
||||
GET_GOLD(k), GET_BANK_GOLD(k), GET_GOLD(k) + GET_BANK_GOLD(k), GET_QUESTPOINTS(k));
|
||||
|
||||
send_to_char(ch, "AC: [%d%+d/10], Hitroll: [%2d], Damroll: [%2d], Saving throws: [%d/%d/%d/%d/%d]\r\n",
|
||||
GET_AC(k), dex_app[GET_DEX(k)].defensive, k->points.hitroll,
|
||||
|
|
@ -2747,6 +2747,7 @@ ACMD(do_show)
|
|||
{ "variable", LVL_GRGOD, PC, MISC },
|
||||
{ "weight", LVL_BUILDER, BOTH, NUMBER },
|
||||
{ "wis", LVL_BUILDER, BOTH, NUMBER },
|
||||
{ "questpoints", LVL_GOD, PC, NUMBER },
|
||||
{ "\n", 0, BOTH, MISC }
|
||||
};
|
||||
|
||||
|
|
@ -3121,6 +3122,9 @@ int perform_set(struct char_data *ch, struct char_data *vict, int mode, char *va
|
|||
vict->real_abils.wis = value;
|
||||
affect_total(vict);
|
||||
break;
|
||||
case 54: /* questpoints */
|
||||
GET_QUESTPOINTS(vict) = RANGE(0, 100000000);
|
||||
break;
|
||||
default:
|
||||
send_to_char(ch, "Can't set that!\r\n");
|
||||
return (0);
|
||||
|
|
|
|||
183
src/class.c
183
src/class.c
|
|
@ -8,18 +8,13 @@
|
|||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
************************************************************************ */
|
||||
|
||||
/*
|
||||
* This file attempts to concentrate most of the code which must be changed
|
||||
* in order for new classes to be added. If you're adding a new class,
|
||||
* you should go through this entire file from beginning to end and add
|
||||
* the appropriate new special cases for your new class.
|
||||
*/
|
||||
|
||||
|
||||
/* This file attempts to concentrate most of the code which must be changed
|
||||
* in order for new classes to be added. If you're adding a new class, you
|
||||
* should go through this entire file from beginning to end and add the
|
||||
* appropriate new special cases for your new class. */
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
|
||||
#include "structs.h"
|
||||
#include "db.h"
|
||||
#include "utils.h"
|
||||
|
|
@ -42,7 +37,6 @@ const char *title_male(int chclass, int level);
|
|||
const char *title_female(int chclass, int level);
|
||||
|
||||
/* Names first */
|
||||
|
||||
const char *class_abbrevs[] = {
|
||||
"Mu",
|
||||
"Cl",
|
||||
|
|
@ -51,7 +45,6 @@ const char *class_abbrevs[] = {
|
|||
"\n"
|
||||
};
|
||||
|
||||
|
||||
const char *pc_class_types[] = {
|
||||
"Magic User",
|
||||
"Cleric",
|
||||
|
|
@ -60,7 +53,6 @@ const char *pc_class_types[] = {
|
|||
"\n"
|
||||
};
|
||||
|
||||
|
||||
/* The menu for choosing a class in interpreter.c: */
|
||||
const char *class_menu =
|
||||
"\r\n"
|
||||
|
|
@ -70,13 +62,8 @@ const char *class_menu =
|
|||
" [W]arrior\r\n"
|
||||
" [M]agic-user\r\n";
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The code to interpret a class letter -- used in interpreter.c when a
|
||||
* new character is selecting a class and by 'set class' in act.wizard.c.
|
||||
*/
|
||||
|
||||
/* The code to interpret a class letter -- used in interpreter.c when a new
|
||||
* character is selecting a class and by 'set class' in act.wizard.c. */
|
||||
int parse_class(char arg)
|
||||
{
|
||||
arg = LOWER(arg);
|
||||
|
|
@ -90,12 +77,10 @@ int parse_class(char arg)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* bitvectors (i.e., powers of two) for each class, mainly for use in
|
||||
* do_who and do_users. Add new classes at the end so that all classes
|
||||
* use sequential powers of two (1 << 0, 1 << 1, 1 << 2, 1 << 3, 1 << 4,
|
||||
* 1 << 5, etc.) up to the limit of your bitvector_t, typically 0-31.
|
||||
*/
|
||||
/* bitvectors (i.e., powers of two) for each class, mainly for use in do_who
|
||||
* and do_users. Add new classes at the end so that all classes use sequential
|
||||
* powers of two (1 << 0, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, etc.) up to
|
||||
* the limit of your bitvector_t, typically 0-31. */
|
||||
bitvector_t find_class_bitvector(const char *arg)
|
||||
{
|
||||
size_t rpos, ret = 0;
|
||||
|
|
@ -106,30 +91,23 @@ bitvector_t find_class_bitvector(const char *arg)
|
|||
return (ret);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* These are definitions which control the guildmasters for each class.
|
||||
/* These are definitions which control the guildmasters for each class.
|
||||
* The first field (top line) controls the highest percentage skill level a
|
||||
* character of the class is allowed to attain in any skill. (After this
|
||||
* level, attempts to practice will say "You are already learned in this area."
|
||||
*
|
||||
* The first field (top line) controls the highest percentage skill level
|
||||
* a character of the class is allowed to attain in any skill. (After
|
||||
* this level, attempts to practice will say "You are already learned in
|
||||
* this area."
|
||||
* The second line controls the maximum percent gain in learnedness a character
|
||||
* is allowed per practice -- in other words, if the random die throw comes out
|
||||
* higher than this number, the gain will only be this number instead.
|
||||
*
|
||||
* The second line controls the maximum percent gain in learnedness a
|
||||
* character is allowed per practice -- in other words, if the random
|
||||
* die throw comes out higher than this number, the gain will only be
|
||||
* this number instead.
|
||||
* The third line controls the minimu percent gain in learnedness a character
|
||||
* is allowed per practice -- in other words, if the random die throw comes
|
||||
* out below this number, the gain will be set up to this number.
|
||||
*
|
||||
* The third line controls the minimu percent gain in learnedness a
|
||||
* character is allowed per practice -- in other words, if the random
|
||||
* die throw comes out below this number, the gain will be set up to
|
||||
* this number.
|
||||
*
|
||||
* The fourth line simply sets whether the character knows 'spells'
|
||||
* or 'skills'. This does not affect anything except the message given
|
||||
* to the character when trying to practice (i.e. "You know of the
|
||||
* following spells" vs. "You know of the following skills"
|
||||
*/
|
||||
* The fourth line simply sets whether the character knows 'spells' or 'skills'.
|
||||
* This does not affect anything except the message given to the character when
|
||||
* trying to practice (i.e. "You know of the following spells" vs. "You know of
|
||||
* the following skills" */
|
||||
|
||||
#define SPELL 0
|
||||
#define SKILL 1
|
||||
|
|
@ -147,44 +125,8 @@ int prac_params[4][NUM_CLASSES] = {
|
|||
{ SPELL, SPELL, SKILL, SKILL }, /* prac name */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* ...And the appropriate rooms for each guildmaster/guildguard; controls
|
||||
* which types of people the various guildguards let through. i.e., the
|
||||
* first line shows that from room 3017, only MAGIC_USERS are allowed
|
||||
* to go south.
|
||||
*
|
||||
* Don't forget to visit spec_assign.c if you create any new mobiles that
|
||||
* should be a guild master or guard so they can act appropriately. If you
|
||||
* "recycle" the existing mobs that are used in other guilds for your new
|
||||
* guild, then you don't have to change that file, only here.
|
||||
*/
|
||||
struct guild_info_type guild_info[] = {
|
||||
|
||||
/* Midgaard */
|
||||
{ CLASS_MAGIC_USER, 3017, SCMD_SOUTH },
|
||||
{ CLASS_CLERIC, 3004, SCMD_NORTH },
|
||||
{ CLASS_THIEF, 3027, SCMD_EAST },
|
||||
{ CLASS_WARRIOR, 3021, SCMD_EAST },
|
||||
|
||||
/* Brass Dragon */
|
||||
{ -999 /* all */ , 5065, SCMD_WEST },
|
||||
|
||||
/* this must go last -- add new guards above! */
|
||||
{ -1, NOWHERE, -1}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Saving throws for:
|
||||
* MCTW
|
||||
* PARA, ROD, PETRI, BREATH, SPELL
|
||||
* Levels 0-40
|
||||
*
|
||||
* Do not forget to change extern declaration in magic.c if you add to this.
|
||||
*/
|
||||
|
||||
/* Saving throws for : MCTW : PARA, ROD, PETRI, BREATH, SPELL. Levels 0-40. Do
|
||||
* not forget to change extern declaration in magic.c if you add to this. */
|
||||
byte saving_throws(int class_num, int type, int level)
|
||||
{
|
||||
switch (class_num) {
|
||||
|
|
@ -1387,11 +1329,9 @@ int thaco(int class_num, int level)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Roll the 6 stats for a character... each stat is made of the sum of
|
||||
* the best 3 out of 4 rolls of a 6-sided die. Each class then decides
|
||||
* which priority will be given for the best to worst stats.
|
||||
*/
|
||||
/* Roll the 6 stats for a character... each stat is made of the sum of the best
|
||||
* 3 out of 4 rolls of a 6-sided die. Each class then decides which priority
|
||||
* will be given for the best to worst stats. */
|
||||
void roll_real_abils(struct char_data *ch)
|
||||
{
|
||||
int i, j, k, temp;
|
||||
|
|
@ -1458,7 +1398,6 @@ void roll_real_abils(struct char_data *ch)
|
|||
ch->aff_abils = ch->real_abils;
|
||||
}
|
||||
|
||||
|
||||
/* Some initializations for characters, including initial skills */
|
||||
void do_start(struct char_data *ch)
|
||||
{
|
||||
|
|
@ -1508,12 +1447,8 @@ void do_start(struct char_data *ch)
|
|||
SET_BIT(PLR_FLAGS(ch), PLR_SITEOK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* This function controls the change to maxmove, maxmana, and maxhp for
|
||||
* each class every time they gain a level.
|
||||
*/
|
||||
/* This function controls the change to maxmove, maxmana, and maxhp for each
|
||||
* class every time they gain a level. */
|
||||
void advance_level(struct char_data *ch)
|
||||
{
|
||||
int add_hp, add_mana = 0, add_move = 0, i;
|
||||
|
|
@ -1571,12 +1506,10 @@ void advance_level(struct char_data *ch)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* This simply calculates the backstab multiplier based on a character's
|
||||
* level. This used to be an array, but was changed to be a function so
|
||||
* that it would be easier to add more levels to your MUD. This doesn't
|
||||
* really create a big performance hit because it's not used very often.
|
||||
*/
|
||||
/* This simply calculates the backstab multiplier based on a character's level.
|
||||
* This used to be an array, but was changed to be a function so that it would
|
||||
* be easier to add more levels to your MUD. This doesn't really create a big
|
||||
* performance hit because it's not used very often. */
|
||||
int backstab_mult(int level)
|
||||
{
|
||||
if (level <= 0)
|
||||
|
|
@ -1595,11 +1528,8 @@ int backstab_mult(int level)
|
|||
return 20; /* immortals */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* invalid_class is used by handler.c to determine if a piece of equipment is
|
||||
* usable by a particular class, based on the ITEM_ANTI_{class} bitvectors.
|
||||
*/
|
||||
/* invalid_class is used by handler.c to determine if a piece of equipment is
|
||||
* usable by a particular class, based on the ITEM_ANTI_{class} bitvectors. */
|
||||
int invalid_class(struct char_data *ch, struct obj_data *obj)
|
||||
{
|
||||
if (OBJ_FLAGGED(obj, ITEM_ANTI_MAGIC_USER) && IS_MAGIC_USER(ch))
|
||||
|
|
@ -1617,12 +1547,9 @@ int invalid_class(struct char_data *ch, struct obj_data *obj)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SPELLS AND SKILLS. This area defines which spells are assigned to
|
||||
* which classes, and the minimum level the character must be to use
|
||||
* the spell or skill.
|
||||
*/
|
||||
/* SPELLS AND SKILLS. This area defines which spells are assigned to which
|
||||
* classes, and the minimum level the character must be to use the spell or
|
||||
* skill. */
|
||||
void init_spell_levels(void)
|
||||
{
|
||||
/* MAGES */
|
||||
|
|
@ -1696,11 +1623,8 @@ void init_spell_levels(void)
|
|||
spell_level(SKILL_BASH, CLASS_WARRIOR, 12);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This is the exp given to implementors -- it must always be greater
|
||||
* than the exp required for immortality, plus at least 20,000 or so.
|
||||
*/
|
||||
/* This is the exp given to implementors -- it must always be greater than the
|
||||
* exp required for immortality, plus at least 20,000 or so. */
|
||||
#define EXP_MAX 10000000
|
||||
|
||||
/* Function to return the exp required for each class/level */
|
||||
|
|
@ -1711,16 +1635,13 @@ int level_exp(int chclass, int level)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Gods have exp close to EXP_MAX. This statement should never have to
|
||||
* changed, regardless of how many mortal or immortal levels exist.
|
||||
*/
|
||||
/* Gods have exp close to EXP_MAX. This statement should never have to
|
||||
* changed, regardless of how many mortal or immortal levels exist. */
|
||||
if (level > LVL_IMMORT) {
|
||||
return EXP_MAX - ((LVL_IMPL - level) * 1000);
|
||||
}
|
||||
|
||||
/* Exp required for normal mortals is below */
|
||||
|
||||
switch (chclass) {
|
||||
|
||||
case CLASS_MAGIC_USER:
|
||||
|
|
@ -1876,19 +1797,14 @@ int level_exp(int chclass, int level)
|
|||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* This statement should never be reached if the exp tables in this function
|
||||
/* This statement should never be reached if the exp tables in this function
|
||||
* are set up properly. If you see exp of 123456 then the tables above are
|
||||
* incomplete -- so, complete them!
|
||||
*/
|
||||
* incomplete. */
|
||||
log("SYSERR: XP tables not set up correctly in class.c!");
|
||||
return 123456;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Default titles of male characters.
|
||||
*/
|
||||
/* Default titles of male characters. */
|
||||
const char *title_male(int chclass, int level)
|
||||
{
|
||||
if (level <= 0 || level > LVL_IMPL)
|
||||
|
|
@ -2032,10 +1948,7 @@ const char *title_male(int chclass, int level)
|
|||
return "the Classless";
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Default titles of female characters.
|
||||
*/
|
||||
/* Default titles of female characters. */
|
||||
const char *title_female(int chclass, int level)
|
||||
{
|
||||
if (level <= 0 || level > LVL_IMPL)
|
||||
|
|
|
|||
|
|
@ -188,9 +188,8 @@ void new_hist_messg(struct descriptor_data *d, const char *msg);
|
|||
/* main game loop and related stuff */
|
||||
|
||||
#if defined(CIRCLE_WINDOWS) || defined(CIRCLE_MACINTOSH)
|
||||
/* Windows doesn't have gettimeofday, so we'll simulate it. The Mac doesn't
|
||||
* have gettimeofday either. Borland C++ warns: "Undefined structure
|
||||
* 'timezone'" */
|
||||
/* Windows and Mac do not have gettimeofday, so we'll simulate it. Borland C++
|
||||
* warns: "Undefined structure 'timezone'" */
|
||||
void gettimeofday(struct timeval *t, struct timezone *dummy)
|
||||
{
|
||||
#if defined(CIRCLE_WINDOWS)
|
||||
|
|
|
|||
|
|
@ -869,7 +869,16 @@ in the vault (vnum: 453) now and then. you can just use
|
|||
snprintf(str, slen, "%d", GET_PRACTICES(c));
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
case 'q':
|
||||
if (!str_cmp(field, "questpoints")) {
|
||||
if (subfield && *subfield) {
|
||||
int addition = atoi(subfield);
|
||||
GET_QUESTPOINTS(c) += addition;
|
||||
}
|
||||
snprintf(str, slen, "%d", GET_QUESTPOINTS(c));
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
if (!str_cmp(field, "room")) { /* in NOWHERE, return the void */
|
||||
/* see note in dg_scripts.h */
|
||||
#ifdef ACTOR_ROOM_IS_UID
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
#define PFDEF_DRUNK 0
|
||||
#define PFDEF_OLC NOWHERE
|
||||
#define PFDEF_PAGELENGTH 22
|
||||
#define PFDEF_QUESTPOINTS 0
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -297,6 +297,7 @@ int load_char(const char *name, struct char_data *ch)
|
|||
GET_ALIASES(ch) = NULL;
|
||||
SITTING(ch) = NULL;
|
||||
NEXT_SITTING(ch) = NULL;
|
||||
GET_QUESTPOINTS(ch) = PFDEF_QUESTPOINTS;
|
||||
|
||||
while (get_line(fl, line)) {
|
||||
tag_argument(line, tag);
|
||||
|
|
@ -605,6 +606,7 @@ void save_char(struct char_data * ch)
|
|||
if (GET_DAMROLL(ch) != PFDEF_DAMROLL) fprintf(fl, "Drol: %d\n", GET_DAMROLL(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));
|
||||
if (GET_QUESTPOINTS(ch) != PFDEF_QUESTPOINTS) fprintf(fl, "Qstp: %d\n", GET_QUESTPOINTS(ch));
|
||||
|
||||
/* Save skills */
|
||||
if (GET_LEVEL(ch) < LVL_IMMORT) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
/* external vars */
|
||||
extern struct time_info_data time_info;
|
||||
extern struct spell_info_type spell_info[];
|
||||
extern struct guild_info_type guild_info[];
|
||||
|
||||
/* extern functions */
|
||||
ACMD(do_drop);
|
||||
|
|
|
|||
|
|
@ -773,6 +773,7 @@ struct player_special_data_saved {
|
|||
ubyte page_length;
|
||||
int spells_to_learn; /* How many can you learn yet this level*/
|
||||
int olc_zone;
|
||||
int questpoints;
|
||||
};
|
||||
|
||||
/* Specials needed only by PCs, not NPCs. Space for this structure is
|
||||
|
|
@ -1017,12 +1018,6 @@ struct trig_proto_list {
|
|||
struct trig_proto_list *next; /* next trigger */
|
||||
};
|
||||
|
||||
struct guild_info_type {
|
||||
int pc_class;
|
||||
room_vnum guild_room;
|
||||
int direction;
|
||||
};
|
||||
|
||||
/* Config structs */
|
||||
|
||||
/* The game configuration structure used for configurating the game play
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ size_t sprinttype(int type, const char *names[], char *result, size_t reslen);
|
|||
int get_line(FILE *fl, char *buf);
|
||||
int get_filename(char *filename, size_t fbufsize, int mode, const char *orig_name);
|
||||
time_t mud_time_to_secs(struct time_info_data *now);
|
||||
struct time_info_data *age(struct char_data *ch);
|
||||
struct time_info_data *age(struct char_data *ch);
|
||||
int num_pc_in_room(struct room_data *room);
|
||||
void core_dump_real(const char *, int);
|
||||
int count_color_chars(char *string);
|
||||
|
|
@ -310,6 +310,8 @@ void char_from_furniture(struct char_data *ch);
|
|||
#define GET_PREF(ch) ((ch)->pref)
|
||||
#define GET_HOST(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->host))
|
||||
#define GET_HISTORY(ch, i) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.comm_hist[i]))
|
||||
#define GET_PAGE_LENGTH(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.page_length))
|
||||
#define GET_QUESTPOINTS(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.questpoints))
|
||||
|
||||
#define GET_SKILL(ch, i) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.skills[i]))
|
||||
#define SET_SKILL(ch, i, pct) do { CHECK_PLAYER_SPECIAL((ch), (ch)->player_specials->saved.skills[i]) = pct; } while(0)
|
||||
|
|
@ -577,5 +579,3 @@ void char_from_furniture(struct char_data *ch);
|
|||
#define CONFIG_USE_AUTOWIZ config_info.autowiz.use_autowiz
|
||||
#define CONFIG_MIN_WIZLIST_LEV config_info.autowiz.min_wizlist_lev
|
||||
|
||||
#define GET_PAGE_LENGTH(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->saved.page_length))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue