Added Questpoints. --Rumble

This commit is contained in:
Rumble 2007-04-02 00:32:54 +00:00
parent 140fcc2be1
commit 48a2738d6a
16 changed files with 149 additions and 204 deletions

View file

@ -5,6 +5,8 @@ The Builder Academy
builderacademy.net 9091 builderacademy.net 9091
tbaMUD 3.52 tbaMUD 3.52
[Apr 02 2007] - Rumble
Added questpoints!
[Mar 30 2007] - Rumble [Mar 30 2007] - Rumble
Added unlimited fountains and containers (Thanks Adam Scriven). Added unlimited fountains and containers (Thanks Adam Scriven).
Removed object types MISSILE and FIRE WEAPON. Removed object types MISSILE and FIRE WEAPON.

View file

@ -882,7 +882,26 @@ another form of Unix:
example "C:\tbaMUD". "cd c:/tbaMUD" "dir" in the listed files you should see 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. 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 detect what programs and library functions are available, and create the
files "Makefile" and "conf.h" based on the results. 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. It really can not be stressed enough: READ EVERYTHING.
Credit where credit is due: Authors: Jeremy Elson, David Goldstein, Tony Robbins, and George Greer.
Some parts of this document have been derived or outright copied from other
files by: Jeremy Elson, David Goldstein, Tony Robbins, and George Greer
Rumble Rumble
Rumble@@builderacademy.net
The Builder Academy The Builder Academy
builderacademy.net 9091 builderacademy.net 9091
@ -1870,16 +1885,11 @@ See also: DATE, TIME
FOUNTAINS DRINK-UNITS OEDIT-FOUNTAINS FOUNTAINS DRINK-UNITS OEDIT-FOUNTAINS
After selecting object type FOUNTAIN you must then select C) Values to set 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 the capacity of the fountain. The first number is max capacity. The second is
quantity. When loading the fountain through zedit you should remove and then the current contents. To make a fountain contain that never runs out set the
load the fountain every zone reset. This can be done by choosing the R) 2nd number to -1.
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
See also: VALUES See also: VALUES
#31 #31
ALIGNMENT GOOD NEUTRAL EVIL %ACTOR.ALIGN% %ALIGN% %ALIGNMENT% ALIGNMENT GOOD NEUTRAL EVIL %ACTOR.ALIGN% %ALIGN% %ALIGNMENT%
@ -2508,6 +2518,7 @@ poofin LVL_IMMORT PC MISC Poofin
poofout LVL_IMMORT PC MISC Poofout poofout LVL_IMMORT PC MISC Poofout
practices LVL_GOD PC NUMBER # of practices practices LVL_GOD PC NUMBER # of practices
quest LVL_GOD PC BINARY QUEST flag quest LVL_GOD PC BINARY QUEST flag
questpoints LVL_GOD PC NUMBER Questpoints
room LVL_BUILDER BOTH NUMBER Move to room room LVL_BUILDER BOTH NUMBER Move to room
sex LVL_GOD BOTH MISC Sex sex LVL_GOD BOTH MISC Sex
showvnums LVL_BUILDER PC BINARY ShowVnums 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 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 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 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 one. This will prevent build up.
before they reload so it will be full after every reset.
Zedit can not currently give a container to a mob and then load an object to 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 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 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 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. it with one command, then lock it with another. @RHELP REDIT-EXIT@n.
R) Remove an object from the room R) Remove an object from the room
Important for refilling fountains and to load a single instance of an object Important for reloading containers that a player may have emptied and to load
with a maxload greater than 1. @RHELP FOUNTAIN@n, @RHELP ZEDIT-ADVANCED@n. 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) T) Assign a trigger (Advanced builders only)
Attach a trigger to a mob, obj, or room. Usually done through REDIT, MEDIT, 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 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. 3 WAND Item is a magical wand.
4 STAFF Item is a magical staff. 4 STAFF Item is a magical staff.
5 WEAPON Must be piercing to backstab. 5 WEAPON Must be piercing to backstab.
6 FIREWEAPON Not implemented. Do not use. @RHELP GUN@n. 6 FURNITURE Item may be sat on.
7 MISSILE Not implemented. Do not use. 7 UNDEFINED Not implemented. Do not use.
8 TREASURE Item is treasure other than gold coins (i.e. gems) 8 TREASURE Item is treasure other than gold coins (i.e. gems)
9 ARMOR Item is armor. 9 ARMOR Item is armor.
10 POTION Item is a magical potion. 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. 20 MONEY Value set in the C) Applies. Cost not used. Max 1000 coins.
21 PEN Item is a pen. 21 PEN Item is a pen.
22 BOAT Item is a boat; allows you to traverse water (noswim). 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. 24 CHAIR Item is a chair people can sit in.
Good items should be very rare, and hard to get. Lousy items should require 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 Also consider creating objects that are harmful to the owner. Objects that
lower certain stats, saving throws, or confer weaknesses make the game more 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 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 than a few incredibly powerful items, for the most part. Do not feel lim armor. A giant untakeable
items players consider useful, such as weapons and armor. A giant untakeable
monolith, and other strange and odd items can add a lot of atmosphere to an 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 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 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 12) blast 13) punch
14) stab 14) stab
FIREWEAPON - No values currently used. - not implemented. FURNITURE
MISSILE - No values currently used. - not implemented. value 0: Number of people that can sit on this object.
UNDEFINED - Not implemented.
TREASURE - No values currently used. TREASURE - No values currently used.
ARMOR ARMOR
@ -7091,7 +7103,7 @@ TRASH - No values currently used.
TRAP - No values currently used. - not implemented. TRAP - No values currently used. - not implemented.
CONTAINER 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 value 1: Container flag bitvector
1) CLOSEABLE Container can be closed and locked. 1) CLOSEABLE Container can be closed and locked.
2) PICKPROOF Lock on container cannot be picked. 2) PICKPROOF Lock on container cannot be picked.
@ -7119,7 +7131,7 @@ BOAT - No values currently used.
DRINKCON DRINKCON
FOUNTAIN FOUNTAIN
value 0: Capacity of container 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 2: see below
value 3: If the drink is poisoned, how long will the poison burn? 0 if not poisoned. 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 #31
DRUNK WINE LIQUID-CONTAINERS BEER SPIRITS DRINK-TYPES LIQUOR WHISKEY WHISKY LIQUIDS LIQ-CONTAINERS 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 When selecting object type FOUNTAIN or DRINK CONTAINER you will need to
to choose the type of liquid it contains from the following list: choose the type of liquid it contains from the following list:
0) water 1) beer 0) water 1) beer
2) wine 3) ale 2) wine 3) ale
@ -8203,15 +8215,16 @@ See also: NOSUMMON
#0 #0
DISPLAYS PROMPTS HIT-PNT-DISPLAY 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. Modify your prompt to show your hit points, mana, and/or movement points.
> display hv Display hit points and movement points > prompt hv Display hit points and movement points.
> display off Return to normal display > prompt off Return to no prompt.
> display all Display hit, mana, and move points > prompt all Display hit, mana, and movement points.
> display auto Display hit, mana, and move when they are below 30%
> prompt auto A seperate toggle that will only display your selected
prompt if the values drop below 30% of max.
See also: TOGGLE See also: TOGGLE
#0 #0
ASSIST ASSIST
@ -9081,7 +9094,7 @@ Level 31 builders can not drop objects outside of their assigned zone.
See also: DONATE, GET, JUNK See also: DONATE, GET, JUNK
#0 #0
EATING DRINKING SIP TASTE HUNGRY HUNGER THIRSTY FOOD EATING DRINKING SIP TASTE HUNGRY HUNGER THIRSTY FOOD NIBBLE
Usage: eat <item> Usage: eat <item>
taste [from] <item> taste [from] <item>
@ -9096,7 +9109,7 @@ If you're hungry or thirsty, these commands are for you!
> sip fountain > sip fountain
If you taste or sip, you don't get large portions and won't be 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 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. with 24 drink units will quench thirst for 24 hours. Same for food.

View file

@ -3,7 +3,7 @@ email list staff~
a list of the staff's emails~ a list of the staff's emails~
A list of the staff's emails has been left here.~ A list of the staff's emails has been left here.~
~ ~
24 0 ao 0 12 0 ao 0
0 0 0 0 0 0 0 0
1 1 0 0 1 1 0 0
E E
@ -22,6 +22,7 @@ Shamra shamra@@builderacademy.net BlackdemonRahl
Elorien elorien@@builderacademy.net Elorien elorien@@builderacademy.net
Random random@@builderacademy.net 219948345 Random random@@builderacademy.net 219948345
Fyre fyre@@builderacademy.net Fyre fyre@@builderacademy.net
Fizban mudaddict4life@@gmail.com Fizban1216 Fizban1216
~ ~
#1201 #1201
pamphlet trigedit~ pamphlet trigedit~
@ -74,13 +75,15 @@ Staff~
1 3 3 31 1 3 3 31
1 1 0 0 1 1 0 0
#1209 #1209
chair~ squishy armchair chair~
a squishy armchair~ a squishy armchair~
A large squishy armchair sits in front of the fireplace.~ A large squishy armchair sits in front of the fireplace.~
~ ~
6 0 a 0 12 0 0 0
2 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0
T 1209
T 1286
E E
chair armchair squishy~ chair armchair squishy~
This chair has large red leather cushions, on the seat and back. Strange 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.~ A mountain spring bubbles up fresh water here.~
~ ~
23 0 0 0 23 0 0 0
-1 0 0 0 500 500 15 0
0 0 0 0 0 0 0 0
E E
spring fountain water~ spring fountain water~

View file

@ -195,7 +195,7 @@ if %cmd.mudcommand% == sit && chair /= %arg%
%force% %actor% sit %force% %actor% sit
else else
if %cmd.mudcommand% == sit && chair /= %arg% 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. %send% %actor% You try to sit in the chair but a magical force prevents you.
end end
end end
@ -214,10 +214,15 @@ else
end end
~ ~
#1211 #1211
FREE~ Questpoints Test~
1 b 3 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 #1212
Constant Raining~ Constant Raining~

View file

@ -179,4 +179,5 @@
325.trg 325.trg
326.trg 326.trg
345.trg 345.trg
$ $

View file

@ -2,7 +2,6 @@
CircleMUD~ CircleMUD~
God Simplex~ God Simplex~
1200 1299 10 0 1200 1299 10 0
O 0 1209 1 1204 (a squishy armchair)
R 0 1204 3098 -1 (a holy bulletin board) R 0 1204 3098 -1 (a holy bulletin board)
O 0 3098 99 1204 (a holy bulletin board) O 0 3098 99 1204 (a holy bulletin board)
R 0 1293 1227 -1 (a staff bulletin board) R 0 1293 1227 -1 (a staff bulletin board)

View file

@ -367,9 +367,9 @@ void list_one_char(struct char_data *i, struct char_data *ch)
send_to_char(ch, "%s", positions[(int) GET_POS(i)]); send_to_char(ch, "%s", positions[(int) GET_POS(i)]);
else { else {
furniture = SITTING(i); furniture = SITTING(i);
send_to_char(ch, " is %s upon %s.", ((GET_POS(i) == POS_SLEEPING) ? send_to_char(ch, " is %s upon %s.", (GET_POS(i) == POS_SLEEPING ?
"sleeping" : "sitting"), (CAN_SEE_OBJ(ch, furniture) ? "sleeping" : (GET_POS(i) == POS_RESTING ? "resting" : "sitting")),
furniture->short_description : "something")); OBJS(furniture, ch));
} }
} else { } else {
if (FIGHTING(i)) { if (FIGHTING(i)) {
@ -789,8 +789,8 @@ ACMD(do_score)
send_to_char(ch, "Your armor class is %d/10, and your alignment is %d.\r\n", send_to_char(ch, "Your armor class is %d/10, and your alignment is %d.\r\n",
compute_armor_class(ch), GET_ALIGNMENT(ch)); compute_armor_class(ch), GET_ALIGNMENT(ch));
send_to_char(ch, "You have scored %d exp, and have %d gold coins.\r\n", send_to_char(ch, "You have %d exp, %d gold coins, and %d questpoints.\r\n",
GET_EXP(ch), GET_GOLD(ch)); GET_EXP(ch), GET_GOLD(ch), GET_QUESTPOINTS(ch));
if (GET_LEVEL(ch) < LVL_IMMORT) if (GET_LEVEL(ch) < LVL_IMMORT)
send_to_char(ch, "You need %d exp to reach your next level.\r\n", send_to_char(ch, "You need %d exp to reach your next level.\r\n",

View file

@ -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_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)); 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", 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_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", 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, GET_AC(k), dex_app[GET_DEX(k)].defensive, k->points.hitroll,
@ -2747,6 +2747,7 @@ ACMD(do_show)
{ "variable", LVL_GRGOD, PC, MISC }, { "variable", LVL_GRGOD, PC, MISC },
{ "weight", LVL_BUILDER, BOTH, NUMBER }, { "weight", LVL_BUILDER, BOTH, NUMBER },
{ "wis", LVL_BUILDER, BOTH, NUMBER }, { "wis", LVL_BUILDER, BOTH, NUMBER },
{ "questpoints", LVL_GOD, PC, NUMBER },
{ "\n", 0, BOTH, MISC } { "\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; vict->real_abils.wis = value;
affect_total(vict); affect_total(vict);
break; break;
case 54: /* questpoints */
GET_QUESTPOINTS(vict) = RANGE(0, 100000000);
break;
default: default:
send_to_char(ch, "Can't set that!\r\n"); send_to_char(ch, "Can't set that!\r\n");
return (0); return (0);

View file

@ -8,18 +8,13 @@
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. * * CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
************************************************************************ */ ************************************************************************ */
/* /* This file attempts to concentrate most of the code which must be changed
* 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
* in order for new classes to be added. If you're adding a new class, * should go through this entire file from beginning to end and add the
* you should go through this entire file from beginning to end and add * appropriate new special cases for your new class. */
* the appropriate new special cases for your new class.
*/
#include "conf.h" #include "conf.h"
#include "sysdep.h" #include "sysdep.h"
#include "structs.h" #include "structs.h"
#include "db.h" #include "db.h"
#include "utils.h" #include "utils.h"
@ -42,7 +37,6 @@ const char *title_male(int chclass, int level);
const char *title_female(int chclass, int level); const char *title_female(int chclass, int level);
/* Names first */ /* Names first */
const char *class_abbrevs[] = { const char *class_abbrevs[] = {
"Mu", "Mu",
"Cl", "Cl",
@ -51,7 +45,6 @@ const char *class_abbrevs[] = {
"\n" "\n"
}; };
const char *pc_class_types[] = { const char *pc_class_types[] = {
"Magic User", "Magic User",
"Cleric", "Cleric",
@ -60,7 +53,6 @@ const char *pc_class_types[] = {
"\n" "\n"
}; };
/* The menu for choosing a class in interpreter.c: */ /* The menu for choosing a class in interpreter.c: */
const char *class_menu = const char *class_menu =
"\r\n" "\r\n"
@ -70,13 +62,8 @@ const char *class_menu =
" [W]arrior\r\n" " [W]arrior\r\n"
" [M]agic-user\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) int parse_class(char arg)
{ {
arg = LOWER(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
* bitvectors (i.e., powers of two) for each class, mainly for use in * and do_users. Add new classes at the end so that all classes use sequential
* do_who and do_users. Add new classes at the end so that all classes * powers of two (1 << 0, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, etc.) up to
* use sequential powers of two (1 << 0, 1 << 1, 1 << 2, 1 << 3, 1 << 4, * the limit of your bitvector_t, typically 0-31. */
* 1 << 5, etc.) up to the limit of your bitvector_t, typically 0-31.
*/
bitvector_t find_class_bitvector(const char *arg) bitvector_t find_class_bitvector(const char *arg)
{ {
size_t rpos, ret = 0; size_t rpos, ret = 0;
@ -106,30 +91,23 @@ bitvector_t find_class_bitvector(const char *arg)
return (ret); return (ret);
} }
/* These are definitions which control the guildmasters for each class.
/* * The first field (top line) controls the highest percentage skill level a
* These are definitions which control the guildmasters for each class. * 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 * The second line controls the maximum percent gain in learnedness a character
* a character of the class is allowed to attain in any skill. (After * is allowed per practice -- in other words, if the random die throw comes out
* this level, attempts to practice will say "You are already learned in * higher than this number, the gain will only be this number instead.
* this area."
* *
* The second line controls the maximum percent gain in learnedness a * The third line controls the minimu percent gain in learnedness a character
* character is allowed per practice -- in other words, if the random * is allowed per practice -- in other words, if the random die throw comes
* die throw comes out higher than this number, the gain will only be * out below this number, the gain will be set up to this number.
* this number instead.
* *
* The third line controls the minimu percent gain in learnedness a * The fourth line simply sets whether the character knows 'spells' or 'skills'.
* character is allowed per practice -- in other words, if the random * This does not affect anything except the message given to the character when
* die throw comes out below this number, the gain will be set up to * trying to practice (i.e. "You know of the following spells" vs. "You know of
* this number. * 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 SPELL 0
#define SKILL 1 #define SKILL 1
@ -147,44 +125,8 @@ int prac_params[4][NUM_CLASSES] = {
{ SPELL, SPELL, SKILL, SKILL }, /* prac name */ { SPELL, SPELL, SKILL, SKILL }, /* prac name */
}; };
/* 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. */
* ...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.
*/
byte saving_throws(int class_num, int type, int level) byte saving_throws(int class_num, int type, int level)
{ {
switch (class_num) { 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
* Roll the 6 stats for a character... each stat is made of the sum of * 3 out of 4 rolls of a 6-sided die. Each class then decides which priority
* the best 3 out of 4 rolls of a 6-sided die. Each class then decides * will be given for the best to worst stats. */
* which priority will be given for the best to worst stats.
*/
void roll_real_abils(struct char_data *ch) void roll_real_abils(struct char_data *ch)
{ {
int i, j, k, temp; int i, j, k, temp;
@ -1458,7 +1398,6 @@ void roll_real_abils(struct char_data *ch)
ch->aff_abils = ch->real_abils; ch->aff_abils = ch->real_abils;
} }
/* Some initializations for characters, including initial skills */ /* Some initializations for characters, including initial skills */
void do_start(struct char_data *ch) 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); 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) void advance_level(struct char_data *ch)
{ {
int add_hp, add_mana = 0, add_move = 0, i; 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 simply calculates the backstab multiplier based on a character's * This used to be an array, but was changed to be a function so that it would
* level. This used to be an array, but was changed to be a function so * be easier to add more levels to your MUD. This doesn't really create a big
* that it would be easier to add more levels to your MUD. This doesn't * performance hit because it's not used very often. */
* really create a big performance hit because it's not used very often.
*/
int backstab_mult(int level) int backstab_mult(int level)
{ {
if (level <= 0) if (level <= 0)
@ -1595,11 +1528,8 @@ int backstab_mult(int level)
return 20; /* immortals */ 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) int invalid_class(struct char_data *ch, struct obj_data *obj)
{ {
if (OBJ_FLAGGED(obj, ITEM_ANTI_MAGIC_USER) && IS_MAGIC_USER(ch)) 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; 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
* SPELLS AND SKILLS. This area defines which spells are assigned to * skill. */
* which classes, and the minimum level the character must be to use
* the spell or skill.
*/
void init_spell_levels(void) void init_spell_levels(void)
{ {
/* MAGES */ /* MAGES */
@ -1696,11 +1623,8 @@ void init_spell_levels(void)
spell_level(SKILL_BASH, CLASS_WARRIOR, 12); 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 #define EXP_MAX 10000000
/* Function to return the exp required for each class/level */ /* Function to return the exp required for each class/level */
@ -1711,16 +1635,13 @@ int level_exp(int chclass, int level)
return 0; return 0;
} }
/* /* Gods have exp close to EXP_MAX. This statement should never have to
* Gods have exp close to EXP_MAX. This statement should never have to * changed, regardless of how many mortal or immortal levels exist. */
* changed, regardless of how many mortal or immortal levels exist.
*/
if (level > LVL_IMMORT) { if (level > LVL_IMMORT) {
return EXP_MAX - ((LVL_IMPL - level) * 1000); return EXP_MAX - ((LVL_IMPL - level) * 1000);
} }
/* Exp required for normal mortals is below */ /* Exp required for normal mortals is below */
switch (chclass) { switch (chclass) {
case CLASS_MAGIC_USER: case CLASS_MAGIC_USER:
@ -1876,19 +1797,14 @@ int level_exp(int chclass, int level)
break; 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 * 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!"); log("SYSERR: XP tables not set up correctly in class.c!");
return 123456; return 123456;
} }
/* Default titles of male characters. */
/*
* Default titles of male characters.
*/
const char *title_male(int chclass, int level) const char *title_male(int chclass, int level)
{ {
if (level <= 0 || level > LVL_IMPL) if (level <= 0 || level > LVL_IMPL)
@ -2032,10 +1948,7 @@ const char *title_male(int chclass, int level)
return "the Classless"; return "the Classless";
} }
/* Default titles of female characters. */
/*
* Default titles of female characters.
*/
const char *title_female(int chclass, int level) const char *title_female(int chclass, int level)
{ {
if (level <= 0 || level > LVL_IMPL) if (level <= 0 || level > LVL_IMPL)

View file

@ -188,9 +188,8 @@ void new_hist_messg(struct descriptor_data *d, const char *msg);
/* main game loop and related stuff */ /* main game loop and related stuff */
#if defined(CIRCLE_WINDOWS) || defined(CIRCLE_MACINTOSH) #if defined(CIRCLE_WINDOWS) || defined(CIRCLE_MACINTOSH)
/* Windows doesn't have gettimeofday, so we'll simulate it. The Mac doesn't /* Windows and Mac do not have gettimeofday, so we'll simulate it. Borland C++
* have gettimeofday either. Borland C++ warns: "Undefined structure * warns: "Undefined structure 'timezone'" */
* 'timezone'" */
void gettimeofday(struct timeval *t, struct timezone *dummy) void gettimeofday(struct timeval *t, struct timezone *dummy)
{ {
#if defined(CIRCLE_WINDOWS) #if defined(CIRCLE_WINDOWS)

View file

@ -869,6 +869,15 @@ in the vault (vnum: 453) now and then. you can just use
snprintf(str, slen, "%d", GET_PRACTICES(c)); snprintf(str, slen, "%d", GET_PRACTICES(c));
} }
break; break;
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': case 'r':
if (!str_cmp(field, "room")) { /* in NOWHERE, return the void */ if (!str_cmp(field, "room")) { /* in NOWHERE, return the void */
/* see note in dg_scripts.h */ /* see note in dg_scripts.h */

View file

@ -51,6 +51,7 @@
#define PFDEF_DRUNK 0 #define PFDEF_DRUNK 0
#define PFDEF_OLC NOWHERE #define PFDEF_OLC NOWHERE
#define PFDEF_PAGELENGTH 22 #define PFDEF_PAGELENGTH 22
#define PFDEF_QUESTPOINTS 0
#endif #endif

View file

@ -297,6 +297,7 @@ int load_char(const char *name, struct char_data *ch)
GET_ALIASES(ch) = NULL; GET_ALIASES(ch) = NULL;
SITTING(ch) = NULL; SITTING(ch) = NULL;
NEXT_SITTING(ch) = NULL; NEXT_SITTING(ch) = NULL;
GET_QUESTPOINTS(ch) = PFDEF_QUESTPOINTS;
while (get_line(fl, line)) { while (get_line(fl, line)) {
tag_argument(line, tag); 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_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_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_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 */ /* Save skills */
if (GET_LEVEL(ch) < LVL_IMMORT) { if (GET_LEVEL(ch) < LVL_IMMORT) {

View file

@ -22,7 +22,6 @@
/* external vars */ /* external vars */
extern struct time_info_data time_info; extern struct time_info_data time_info;
extern struct spell_info_type spell_info[]; extern struct spell_info_type spell_info[];
extern struct guild_info_type guild_info[];
/* extern functions */ /* extern functions */
ACMD(do_drop); ACMD(do_drop);

View file

@ -773,6 +773,7 @@ struct player_special_data_saved {
ubyte page_length; ubyte page_length;
int spells_to_learn; /* How many can you learn yet this level*/ int spells_to_learn; /* How many can you learn yet this level*/
int olc_zone; int olc_zone;
int questpoints;
}; };
/* Specials needed only by PCs, not NPCs. Space for this structure is /* 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 trig_proto_list *next; /* next trigger */
}; };
struct guild_info_type {
int pc_class;
room_vnum guild_room;
int direction;
};
/* Config structs */ /* Config structs */
/* The game configuration structure used for configurating the game play /* The game configuration structure used for configurating the game play

View file

@ -310,6 +310,8 @@ void char_from_furniture(struct char_data *ch);
#define GET_PREF(ch) ((ch)->pref) #define GET_PREF(ch) ((ch)->pref)
#define GET_HOST(ch) CHECK_PLAYER_SPECIAL((ch), ((ch)->player_specials->host)) #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_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 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) #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_USE_AUTOWIZ config_info.autowiz.use_autowiz
#define CONFIG_MIN_WIZLIST_LEV config_info.autowiz.min_wizlist_lev #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))