forked from kyonshi/grenzland-mud
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
544afc796b | ||
|
|
0bb51e2bc2 | ||
|
|
51fa6bc2af | ||
|
|
045e7fa515 | ||
|
|
38cdaf535d | ||
|
|
08f5eb8947 | ||
|
|
954d5f2639 | ||
|
|
27a2f4bdc8 | ||
|
|
dec0c5af1f | ||
|
|
75d8b58029 | ||
|
|
324cfdd415 | ||
|
|
fc4c64c782 | ||
|
|
08374524d0 | ||
|
|
702612ba53 | ||
|
|
dafa4491e4 |
@@ -10,6 +10,7 @@ to rec.games.mud.diku which originally announced CircleMUD as a publicly
|
||||
available MUD source code.
|
||||
|
||||
tbaMUD Release history:
|
||||
Version 2018 release: January, 2018
|
||||
Version 3.68 release: February, 2017
|
||||
Version 3.67 release: January, 2016
|
||||
Version 3.66 release: January, 2015
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
T B A M U D
|
||||
3 . 6 8
|
||||
T B A M U D
|
||||
2 0 1 8
|
||||
|
||||
Based on CircleMUD by Jeremy Elson and DikuMUD by Hans-Henrik Staerfeldt,
|
||||
Katja Nyboe, Tom Madsen, Michael Seifert, and Sebastian Hammer
|
||||
|
||||
@@ -22,100 +22,6 @@ See Examples: @RTSTAT 7505, 154@n
|
||||
|
||||
Example: @RTSTAT 19, 20@n
|
||||
#31
|
||||
TBA-ADMIN
|
||||
|
||||
Help and World files are the "master" versions. Before a release I copy the help file and World files to /tbamud
|
||||
Only difference from stock is do_cheat, help files viewable by any level, do_advance is LVL_GOD, and 600+ zones.
|
||||
tbamud.com is the latest Joomla version with Kunena as our forums. Download section is Google Drive.
|
||||
Builder Applications can be viewed here: goo.gl/0FBsys
|
||||
Backups are done monthly of /tba and using the Akeeba component in Joomla, I keep an archive. Github is our version control system but I like backups of backups. Please do reasonable backups of your own.
|
||||
|
||||
To setup a trial vnum (in this case test for 61165:
|
||||
advance test 31
|
||||
set test nohassle off
|
||||
set test olc 611
|
||||
set test title has trial vnum 61165
|
||||
set test loadroom 3
|
||||
set test gold 1000000
|
||||
restore test
|
||||
redit 61165
|
||||
1
|
||||
test's Trial Vnum
|
||||
q
|
||||
y
|
||||
toggle nohassle off
|
||||
load obj 1332
|
||||
set self level 32
|
||||
tbalim test 61165
|
||||
return
|
||||
toggle nohassle on
|
||||
|
||||
To setup test with zone 348
|
||||
return
|
||||
saveall
|
||||
set test olc 348
|
||||
set file test olc 348
|
||||
set test title has zone 348
|
||||
set file test title has zone 348
|
||||
set test loadroom 348
|
||||
set file test loadroom 348
|
||||
set test gold 1000000
|
||||
wiznet Okay test, you have zone 348 vnum's 34800 to 34899. Help buildwalk and help dig to learn how to create and link your rooms. If you have any questions just ask.
|
||||
toggle nohassle off
|
||||
load obj 1332
|
||||
set self level 32
|
||||
tbalim test purge
|
||||
return
|
||||
restore test
|
||||
toggle nohassle on
|
||||
redit 34800
|
||||
1
|
||||
test's Zone Description Room
|
||||
q
|
||||
y
|
||||
zedit 34800
|
||||
1
|
||||
test
|
||||
z
|
||||
Name Me - test
|
||||
q
|
||||
y
|
||||
redit 34800
|
||||
2
|
||||
return
|
||||
saveall
|
||||
set test olc 348
|
||||
set test title has zone 348
|
||||
set test loadroom 348
|
||||
set test gold 1000000
|
||||
wiznet Okay test, you have zone 348 vnum's 34800 to 34899. Help buildwalk and help dig to learn how
|
||||
to create and link your rooms. If you have any questions just ask.
|
||||
toggle nohassle off
|
||||
load obj 1332
|
||||
set self level 32
|
||||
tbalim test purge
|
||||
return
|
||||
restore test
|
||||
toggle nohassle on
|
||||
redit 34800
|
||||
1
|
||||
test's Zone Description Room
|
||||
q
|
||||
y
|
||||
zedit 34800
|
||||
1
|
||||
test
|
||||
z
|
||||
Name Me - test
|
||||
q
|
||||
y
|
||||
redit 34800
|
||||
2
|
||||
<paste zone proposal here>
|
||||
q
|
||||
y
|
||||
See Also: TBA-STAFF, TBA-ZONES
|
||||
#32
|
||||
%DAMAGE% ODAMAGE MDAMAGE WDAMAGE TRIGEDIT-DAMAGE TRIGEDIT-ROOM-DAMAGE TRIG-DAMAGE
|
||||
|
||||
%damage% %victim% amount
|
||||
@@ -7891,97 +7797,6 @@ The following terrains may be selected (only one):
|
||||
10) Underwater Underwater requires AFF_SCUBA. 5
|
||||
|
||||
#31
|
||||
RELEASES
|
||||
|
||||
If you have any additions, corrections, ideas, or bug reports please stop by the
|
||||
Builder Academy at telnet://tbamud.com:9091 or email rumblebamud.com -- Rumble
|
||||
|
||||
CircleMUD Release History
|
||||
Originally by Jeremy Elson
|
||||
|
||||
Abstract
|
||||
|
||||
This document lists the release history of CircleMUD and at the end is the post
|
||||
to rec.games.mud.diku which originally anounced CircleMUD as a publically
|
||||
available MUD source code.
|
||||
|
||||
Release history:
|
||||
Version 3.63 release: April, 2012
|
||||
Version 3.62 release: September, 2010
|
||||
Version 3.61 release: January, 2010
|
||||
Version 3.60 release: September, 2009
|
||||
Version 3.59 release: April, 2009
|
||||
Version 3.58 release: January, 2009
|
||||
Version 3.57 release: August, 2008
|
||||
Version 3.56 release: April, 2008
|
||||
Version 3.55 release: January, 2008
|
||||
Version 3.54 release: December, 2007
|
||||
Version 3.53 release: July, 2007
|
||||
Version 3.52 release: April, 2007
|
||||
Version 3.51 release: February, 2007
|
||||
Version 3.5 release: December, 2006
|
||||
Version 3.1 (yes, no beta pl): November 18, 2002
|
||||
Version 3.00 beta pl22 release: October 4, 2002
|
||||
Version 3.00 beta pl21 release: April 15, 2002
|
||||
Version 3.00 beta pl20 release: January 15, 2002
|
||||
Version 3.00 beta pl19 release: August 14, 2001
|
||||
Version 3.00 beta pl18 release: March 18, 2001
|
||||
Version 3.00 beta pl17 release: January 23, 2000
|
||||
Version 3.00 beta pl16 release: August 30, 1999
|
||||
Version 3.00 beta pl15 release: March 16, 1999
|
||||
Version 3.00 beta pl14 release: July 3, 1998
|
||||
Version 3.00 beta pl13a release: June 4, 1998
|
||||
Version 3.00 beta pl13 release: June 1, 1998
|
||||
Version 3.00 beta pl12 release: October 29, 1997
|
||||
Version 3.00 beta pl11 release: April 14, 1996
|
||||
Version 3.00 beta pl10 release: March 11, 1996
|
||||
Version 3.00 beta pl9 release: February 6, 1996
|
||||
Version 3.00 beta pl8 release: May 23, 1995
|
||||
Version 3.00 beta pl7 release: March 9, 1995
|
||||
Version 3.00 beta pl6 release: March 6, 1995
|
||||
Version 3.00 beta pl5 release: February 23, 1995
|
||||
Version 3.00 beta pl4 release: September 28, 1994
|
||||
Version 3.00 beta pl1-3, internal releases for beta-testers.
|
||||
Version 3.00 alpha: Ran on net for testing. Code not released.
|
||||
Version 2.20 release: November 17, 1993
|
||||
Version 2.11 release: September 19, 1993
|
||||
Version 2.10 release: September 1, 1993
|
||||
Version 2.02 release: Late August 1993
|
||||
Version 2.01 release: Early August 1993
|
||||
Version 2.00 release: July 16, 1993 (Initial public release)
|
||||
|
||||
The CircleMUD ?press release? is included below, in case you haven?t seen it
|
||||
and want to.
|
||||
|
||||
Wake the kids and find the dog, because it?s the FTP release of
|
||||
|
||||
CIRCLEMUD 2.0
|
||||
|
||||
That?s right --CircleMUD 2.0 is done and is now available for anonymous FTP
|
||||
at ftp.cs.jhu.edu!
|
||||
|
||||
CircleMUD is highly developed from the programming side, but highly UNdeveloped
|
||||
on the game-playing side. So, if you?re looking for a huge MUD with billions
|
||||
of spells, skills, classes, races, and areas, Circle will probably disappoint
|
||||
you severely. Circle still has only the 4 original Diku classes, the original
|
||||
spells, the original skills, and about a dozen areas.
|
||||
|
||||
On the other hand, if you?re looking for a highly stable, well-developed,
|
||||
well-organized "blank slate" MUD on which you can put your OWN ideas for
|
||||
spells, skills, classes, and areas, then Circle might be just what you?re
|
||||
looking for.
|
||||
|
||||
"Multi-user WHAT?" --My Mom
|
||||
Give it a try --what do you have to lose other than your GPA/job, friends,
|
||||
and life?
|
||||
|
||||
Good luck, and happy Mudding,
|
||||
|
||||
Jeremy Elson aka Ras
|
||||
|
||||
Circle and tbaMUD?s complete source code and areas are available at
|
||||
http://www.tbamud.com.
|
||||
#0
|
||||
RELOAD
|
||||
|
||||
Usage: reload < '*' | all | file >
|
||||
@@ -8657,8 +8472,7 @@ See also: HIDE
|
||||
#0
|
||||
SERVERS FREE-SERVERS HOSTINGS FREE-HOSTS
|
||||
|
||||
http://amber.org.uk
|
||||
www.frostmud.com
|
||||
https://www.funcity.org/ - hosted by Jason "Opie" Babo
|
||||
|
||||
If you have any additions or deletions please mudmail rumble.
|
||||
|
||||
@@ -9966,6 +9780,143 @@ be an object a mobile or a player. Usually used in conjunction with another
|
||||
command.
|
||||
|
||||
#31
|
||||
TBA TBAMUD PROJECT BACKGROUND STORY HISTORY INTRODUCTION ACADEMY COMMUNITY OVERVIEW VISION TBA-VISION
|
||||
|
||||
TBA stands for The Builder Academy.
|
||||
@RGOTO 3@n to enter the Builder Academy tutorial.
|
||||
|
||||
The Builder Academy (TBA) was created in October of 2000 on the MUD Cruel World. It began
|
||||
with a combination of my own MUDding experience and the work of numerous others from the
|
||||
MUDding community and evolved into an extensive tutorial zone, help files, and examples.
|
||||
|
||||
|
||||
TBA now has two main missions. It originally was meant to be a training MUD open to anyone
|
||||
willing to learn or teach how to create your own text-based World. 1,000's of builder's have
|
||||
gone through our training and many MUDs require new builders to complete training at TBA before
|
||||
they can apply to their MUD. TBA's other mission is the development of the codebase formerly
|
||||
known as CircleMUD. Due to CircleMUD's stagnation TBA staff decided to release our codebase under
|
||||
the name tbaMUD and we have been updating it tirelessly for over 10 years.
|
||||
|
||||
TBA is a low stress, no deadline, training environment where anyone with motivation can work at
|
||||
their own pace to learn as much or as little as they wish. Numerous people are available to answer
|
||||
questions and give advice.
|
||||
|
||||
1000's of builders served and counting.
|
||||
|
||||
The most challenging aspect of running a MUD is finding good builders. You will hear this from the
|
||||
admin of every MUD that has ever been. In the past it has always been up to each individual MUD to
|
||||
find and usually train their own builders. This works, but I think the MUDding community can come up
|
||||
with something better. That is why we created The Builder's Academy. No pressure, no deadline, just
|
||||
come and learn or help teach. Give something back to the community we have all taken so much from.
|
||||
TBA is a MUDding community resource, please submit any lessons learned or building tips and tricks
|
||||
so we can improve our codebase and training.
|
||||
|
||||
TBA can also be used by other MUDs as a builder's port. Just send us your newbie builders. We will
|
||||
teach them and then you can have them back with the zones they built.
|
||||
|
||||
We are always open to anyone willing to learn or help teach so we can continue to improve the tbaMUD
|
||||
codebase.
|
||||
|
||||
- Rumble
|
||||
The Builder Academy
|
||||
tbamud.com 9091
|
||||
|
||||
See also: NEWBIE
|
||||
#0
|
||||
TBA-ADMIN
|
||||
|
||||
Help and World files are the "master" versions. Before a release I copy the help file and World files to /tbamud
|
||||
Only difference from stock is do_cheat, help files viewable by any level, do_advance is LVL_GOD, and 600+ zones.
|
||||
tbamud.com is the latest Joomla version with Kunena as our forums. Download section is Google Drive.
|
||||
Builder Applications can be viewed here: goo.gl/0FBsys
|
||||
Backups are done monthly of /tba and using the Akeeba component in Joomla, I keep an archive. Github is our version control system but I like backups of backups. Please do reasonable backups of your own.
|
||||
|
||||
To setup a trial vnum (in this case test for 61165:
|
||||
advance test 31
|
||||
set test nohassle off
|
||||
set test olc 611
|
||||
set test title has trial vnum 61165
|
||||
set test loadroom 3
|
||||
set test gold 1000000
|
||||
restore test
|
||||
redit 61165
|
||||
1
|
||||
test's Trial Vnum
|
||||
q
|
||||
y
|
||||
toggle nohassle off
|
||||
load obj 1332
|
||||
set self level 32
|
||||
tbalim test 61165
|
||||
return
|
||||
toggle nohassle on
|
||||
|
||||
To setup test with zone 348
|
||||
return
|
||||
saveall
|
||||
set test olc 348
|
||||
set file test olc 348
|
||||
set test title has zone 348
|
||||
set file test title has zone 348
|
||||
set test loadroom 348
|
||||
set file test loadroom 348
|
||||
set test gold 1000000
|
||||
wiznet Okay test, you have zone 348 vnum's 34800 to 34899. Help buildwalk and help dig to learn how to create and link your rooms. If you have any questions just ask.
|
||||
toggle nohassle off
|
||||
load obj 1332
|
||||
set self level 32
|
||||
tbalim test purge
|
||||
return
|
||||
restore test
|
||||
toggle nohassle on
|
||||
redit 34800
|
||||
1
|
||||
test's Zone Description Room
|
||||
q
|
||||
y
|
||||
zedit 34800
|
||||
1
|
||||
test
|
||||
z
|
||||
Name Me - test
|
||||
q
|
||||
y
|
||||
redit 34800
|
||||
2
|
||||
return
|
||||
saveall
|
||||
set test olc 348
|
||||
set test title has zone 348
|
||||
set test loadroom 348
|
||||
set test gold 1000000
|
||||
wiznet Okay test, you have zone 348 vnum's 34800 to 34899. Help buildwalk and help dig to learn how
|
||||
to create and link your rooms. If you have any questions just ask.
|
||||
toggle nohassle off
|
||||
load obj 1332
|
||||
set self level 32
|
||||
tbalim test purge
|
||||
return
|
||||
restore test
|
||||
toggle nohassle on
|
||||
redit 34800
|
||||
1
|
||||
test's Zone Description Room
|
||||
q
|
||||
y
|
||||
zedit 34800
|
||||
1
|
||||
test
|
||||
z
|
||||
Name Me - test
|
||||
q
|
||||
y
|
||||
redit 34800
|
||||
2
|
||||
<paste zone proposal here>
|
||||
q
|
||||
y
|
||||
See Also: TBA-STAFF, TBA-ZONES
|
||||
#32
|
||||
TBA-ADVERTISING
|
||||
|
||||
Mud Created: 2000
|
||||
@@ -10035,49 +9986,6 @@ TBAMAPS TBA-MAPS
|
||||
|
||||
See also: CARTOGRAPHY, ASCII
|
||||
#31
|
||||
TBA TBAMUD PROJECT BACKGROUND STORY HISTORY INTRODUCTION ACADEMY COMMUNITY OVERVIEW VISION TBA-VISION
|
||||
|
||||
TBA stands for The Builder Academy.
|
||||
@RGOTO 3@n to enter the Builder Academy tutorial.
|
||||
|
||||
The Builder Academy (TBA) was created in October of 2000 on the MUD Cruel World. It began
|
||||
with a combination of my own MUDding experience and the work of numerous others from the
|
||||
MUDding community and evolved into an extensive tutorial zone, help files, and examples.
|
||||
|
||||
|
||||
TBA now has two main missions. It originally was meant to be a training MUD open to anyone
|
||||
willing to learn or teach how to create your own text-based World. 1,000's of builder's have
|
||||
gone through our training and many MUDs require new builders to complete training at TBA before
|
||||
they can apply to their MUD. TBA's other mission is the development of the codebase formerly
|
||||
known as CircleMUD. Due to CircleMUD's stagnation TBA staff decided to release our codebase under
|
||||
the name tbaMUD and we have been updating it tirelessly for over 10 years.
|
||||
|
||||
TBA is a low stress, no deadline, training environment where anyone with motivation can work at
|
||||
their own pace to learn as much or as little as they wish. Numerous people are available to answer
|
||||
questions and give advice.
|
||||
|
||||
1000's of builders served and counting.
|
||||
|
||||
The most challenging aspect of running a MUD is finding good builders. You will hear this from the
|
||||
admin of every MUD that has ever been. In the past it has always been up to each individual MUD to
|
||||
find and usually train their own builders. This works, but I think the MUDding community can come up
|
||||
with something better. That is why we created The Builder's Academy. No pressure, no deadline, just
|
||||
come and learn or help teach. Give something back to the community we have all taken so much from.
|
||||
TBA is a MUDding community resource, please submit any lessons learned or building tips and tricks
|
||||
so we can improve our codebase and training.
|
||||
|
||||
TBA can also be used by other MUDs as a builder's port. Just send us your newbie builders. We will
|
||||
teach them and then you can have them back with the zones they built.
|
||||
|
||||
We are always open to anyone willing to learn or help teach so we can continue to improve the tbaMUD
|
||||
codebase.
|
||||
|
||||
- Rumble
|
||||
The Builder Academy
|
||||
tbamud.com 9091
|
||||
|
||||
See also: NEWBIE
|
||||
#0
|
||||
TEDITOR
|
||||
|
||||
Usage: tedit [file]
|
||||
@@ -10220,6 +10128,11 @@ MOB: 1322
|
||||
^^^//\\_^^//\\_^ ^(\_\_\_\)
|
||||
^^^ ^^ ^^^ ^^
|
||||
#31
|
||||
RELEASES
|
||||
|
||||
The complete release history of tbaMUD is available at:
|
||||
https://github.com/tbamud/tbamud/blob/master/doc/releases.txt
|
||||
#0
|
||||
THE-MUD-CONNECTOR TMC MUD-CONNECTOR MUDCONNECTOR
|
||||
|
||||
Most of our traffic comes through word of mouth or TMC reviews. If you are so
|
||||
@@ -12756,7 +12669,7 @@ Examples:
|
||||
>; @ - shows all gods that are on and visible to you.
|
||||
- also shows if the gods who are visible to you are writing.
|
||||
>;#<level> <text> - sends text to everyone <level> and above.
|
||||
- ;#2 only God and above will see this.
|
||||
- ;#32 only God and above will see this.
|
||||
|
||||
See also: NOWIZ
|
||||
#31
|
||||
|
||||
@@ -31,6 +31,10 @@ The email listing of the gods is pinned against the wall.~
|
||||
0 0 0 0
|
||||
1 1 0 30 0
|
||||
E
|
||||
emails listing~
|
||||
HELP CONTACT
|
||||
~
|
||||
E
|
||||
wizlist~
|
||||
Implementors
|
||||
~~~~~~~~~~~
|
||||
@@ -47,10 +51,6 @@ wizlist~
|
||||
Santa Shamra Shimmer Silvanos Smaug Snowlock Talgard Taylor
|
||||
Theophilus Tocamat Torpidai Treestump Tuskony Zizazat
|
||||
~
|
||||
E
|
||||
emails listing~
|
||||
HELP CONTACT
|
||||
~
|
||||
#5
|
||||
foraged berries~
|
||||
some foraged berries~
|
||||
@@ -1208,6 +1208,7 @@ A bright orange plastic bracelet was left here.~
|
||||
12 0 0 0 0 am 0 0 0 0 0 0 0
|
||||
0 0 0 0
|
||||
1 1 0 0 0
|
||||
T 195
|
||||
E
|
||||
idleout timer stayalive bracelet~
|
||||
The bracelet is made of a garish orange plastic with the letters STAYALIVE
|
||||
|
||||
@@ -1 +1,14 @@
|
||||
#4
|
||||
Undefined Quest~
|
||||
Quest definition is incomplete.~
|
||||
There is no information on this quest.
|
||||
~
|
||||
You have completed the quest.
|
||||
~
|
||||
You have abandoned the quest.
|
||||
~
|
||||
-1 35804 0 -1 -1 -1 -1
|
||||
0 0 0 34 -1 -1 1
|
||||
0 0 65535
|
||||
S
|
||||
$~
|
||||
|
||||
@@ -574,7 +574,7 @@ done
|
||||
~
|
||||
#24
|
||||
Room While Teleport Example~
|
||||
2 b 100
|
||||
2 bg 100
|
||||
~
|
||||
* By Rumble of The Builder Academy tbamud.com 9091
|
||||
* Target the first person or mob in the room.
|
||||
|
||||
@@ -11,7 +11,7 @@ if %actor.is_pc% && %actor.level% == 1
|
||||
wait 2 sec
|
||||
say If you are interested in learning how to build, or want to teach others, then you have come to the right place.
|
||||
wait 2 sec
|
||||
say Please fill out the application at: geocities.com/buildersacademy/
|
||||
say Please fill out the application at: http://tbamud.com
|
||||
set mortal_greeting_for_TBA 1
|
||||
remote mortal_greeting_for_TBA %actor.id%
|
||||
end
|
||||
@@ -99,7 +99,7 @@ tbalim~
|
||||
* Make sure name matches a player, purge mobs or use 0.name if you have
|
||||
* troubles. They are given an assigner in the mortal start room.
|
||||
* Usage: tbalim player vnum | purge
|
||||
if !%actor.is_pc% || %actor.level% < 30
|
||||
if !%actor.is_pc% || %actor.level% < 32
|
||||
%send% %actor% Only human staff can use this limiter.
|
||||
else
|
||||
set victim %arg.car%
|
||||
@@ -107,8 +107,12 @@ else
|
||||
if purge /= %arg.cdr% && %victim.has_item(1332)%
|
||||
%send% %actor% %arg.car%'s assigner has been %arg.cdr%'d.
|
||||
eval TBA_trial_vnum %victim.TBA_trial_vnum% - (2 * %victim.TBA_trial_vnum%)
|
||||
remote TBA_trial_vnum %victim.id%
|
||||
if %TBA_trial_vnum% < 0
|
||||
remote TBA_trial_vnum %victim.id%
|
||||
end
|
||||
%purge% %victim.inventory(1332)%
|
||||
elseif purge /= %arg.cdr%
|
||||
%send% %actor% They do not have a trial vnum assigner for you to purge.
|
||||
else
|
||||
set TBA_trial_vnum %arg.cdr%
|
||||
remote TBA_trial_vnum %victim.id%
|
||||
|
||||
@@ -132,14 +132,26 @@ HELP BALANCE
|
||||
HELP BREATHE@n
|
||||
~
|
||||
0 8 0 0 0 0
|
||||
D0
|
||||
~
|
||||
~
|
||||
0 0 24
|
||||
D1
|
||||
~
|
||||
~
|
||||
0 0 7
|
||||
D2
|
||||
~
|
||||
~
|
||||
0 0 25
|
||||
D3
|
||||
~
|
||||
~
|
||||
0 0 5
|
||||
D4
|
||||
~
|
||||
~
|
||||
0 0 26
|
||||
S
|
||||
#7
|
||||
Writing Good Descriptions~
|
||||
@@ -200,6 +212,10 @@ D3
|
||||
~
|
||||
~
|
||||
0 0 7
|
||||
D4
|
||||
~
|
||||
~
|
||||
0 0 27
|
||||
S
|
||||
#9
|
||||
How to Use Oedit~
|
||||
@@ -430,12 +446,8 @@ D2
|
||||
S
|
||||
#17
|
||||
Overview of the MUD World~
|
||||
The first thing you need to build is a good telnet client. Everyone has
|
||||
their preferences. Some work better than others. A few clients can not understand
|
||||
color codes and other important special characters like the backslash. I highly
|
||||
recommend ZMUD. It is even worth the 25$ registration fee. If that is too
|
||||
much, download the free version. You can see an in-depth list of clients under:
|
||||
@RHELP TELNET@n
|
||||
The first thing you need to build is a good telnet client.
|
||||
@RHELP TELNET@n for a list.
|
||||
|
||||
Once you have a good client you must understand a few basics:
|
||||
@RHELP VIRTUAL-NUMBERS@n
|
||||
@@ -547,58 +559,6 @@ D2
|
||||
S
|
||||
#33
|
||||
Rumble's Room~
|
||||
...you'll find that you're not the first person who was ever confused and
|
||||
frighteneed and even sickened by human behavior. You're by no means alone on
|
||||
that score, you'll be excited and stimulated to know. Many, many men have been
|
||||
just as troubled morally and spiritually as you are right now. Happily, some
|
||||
of them kept records of their troubles. You'll learn from them-if you want to.
|
||||
Just as someday, if you have something to offer, someone will learn something
|
||||
from you. It's a beautiful reciprocal arrangement.
|
||||
--The Catcher in the Rye
|
||||
@(HELP QUOTE@)
|
||||
~
|
||||
0 8 0 0 0 0
|
||||
E
|
||||
july4~
|
||||
On July 4, 1776, we claimed our independence from England and Democracy was
|
||||
born. Every day thousands leave their homeland to come to the "land of the
|
||||
free and the home of the brave" so they can begin their American Dream. The
|
||||
United States is truly a diverse nation made up of dynamic people. Each year
|
||||
on July 4, Americans celebrate that freedom and indepen-dence with barbecues,
|
||||
picnics, and family ga-therings. Through the Internet we are learning about
|
||||
and communicat-ing with people of different nations, with different languages
|
||||
and different races throughout the world. Bringing the world closer with
|
||||
understanding and knowledge can only benefit all nations. We invite all
|
||||
nations to celebrate with Americans online this Fourth of July. Happy
|
||||
Birthday, America!
|
||||
~
|
||||
E
|
||||
oath~
|
||||
I do solemnly swear that I will support and defend the Constitution of the
|
||||
United States against all enemies, foreign and domestic, and to bear true faith
|
||||
and allegiance to the same that I take this obligation freely, without any
|
||||
mental reservation or purpose of evasion, and that I will well and faithfully
|
||||
discharge the duties of the office upon which I am about to enter.
|
||||
~
|
||||
E
|
||||
builder~
|
||||
|
||||
There is one timeless way of building.
|
||||
|
||||
It is thousands of years old, and the same today as it has always been.
|
||||
|
||||
The great traditional buildings of the past, the villages and tents and
|
||||
temples in which man feels at home, have always been made by people who were
|
||||
very close to the center of this way. It is not possible to make great
|
||||
buildings, or great towns, beautiful places, places where you feel yourself,
|
||||
places where you feel alive, except by following this way. And, as you will
|
||||
see, this way will lead anyone who looks for it to buildings which are
|
||||
themselves as ancient in their form, as the trees and hills, and as our faces
|
||||
are.
|
||||
--The Timeless Way of Building
|
||||
~
|
||||
E
|
||||
war~
|
||||
War is an ugly thing, but not the ugliest of things. The decayed and
|
||||
degraded state of moral and patriotic feeling which thinks that nothing is
|
||||
worth war is much worse. The person who has nothing for which he is willing to
|
||||
@@ -606,51 +566,9 @@ fight, nothing which is more important than his own personal safety, is a
|
||||
miserable creature and has no chance of being free unless made and kept so by
|
||||
the exertions of better men than himself.
|
||||
John Stuart Mill
|
||||
@(HELP QUOTE@)
|
||||
~
|
||||
E
|
||||
old glory flag~
|
||||
I fly atop the world's tallest buildings. I stand watch in America's Halls
|
||||
of Justice. I fly majestically over great institutions of learning. I stand
|
||||
guard with the greatest military power in the world. Look up and see me! I
|
||||
stand for peace, honor, truth, and justice. I stand for freedom. I am
|
||||
confident, I am arrogant, I am proud. When I am flown with my banners, my head
|
||||
is a little higher, my colors a little truer, I bow to no one! I am recognized
|
||||
all over the world. I am worshipped, I am loved, and I am feared! I have
|
||||
fought in every battle of every war for more than 200 years: Gettysburg,
|
||||
Shiloh, Appomattox, San Juan Hill, the trenches of France, the Argonne Forest,
|
||||
Anzio, Rome, the beaches of Normandy, Guam, Okinawa, Japan, Korea, Vietnam, the
|
||||
Persian Gulf, and a score of places long forgotten by all, but those who were
|
||||
there with me... I was there! I led my Soldiers, Sailors, Airmen, and
|
||||
Marines. I followed them and watched over them. They loved me. I was on a
|
||||
small hill in Iwo Jima. I was dirty, battle-worn, and tired. But my Soldiers
|
||||
cheered me! And I was proud! I have been soiled, burned, torn, and trampled
|
||||
on the streets of countries that I have helped set free. It does not hurt, for
|
||||
I am invincible. I have also been soiled, burned, torn, and trampled on the
|
||||
streets of my own country and, when it is by those whom I have served with in
|
||||
battle-it hurts. But I shall overcome, for I am strong! I have slipped the
|
||||
bonds of Earth and, from my vantage point on the Moon, I stand watch over the
|
||||
uncharted new frontiers of Space. I have been a silent witness to all of
|
||||
America's finest hours. But my finest hour comes when I am torn in strips to
|
||||
be used as bandages for my wounded comrades on the field of battle-when I fly
|
||||
at half-mast to honor my Soldiers, Sailors, Airmen, and Marines, and-when I lie
|
||||
in the trembling arms of a grieving mother, at the gravesite of her fallen son
|
||||
or daughter-I am proud. My name is Old Glory-long may I wave. Dear God, long
|
||||
may I wave.
|
||||
~
|
||||
E
|
||||
Catcher Rye~
|
||||
The mark of the immature man is that he wants to die nobly for a cause,
|
||||
while the mark of the mature man is that he wants to live humbly for one.
|
||||
--Wilhelm Stekel
|
||||
...you'll find that you're not the first person who was ever confused and
|
||||
frighteneed and even sickened by human behavior. You're by no means alone on
|
||||
that score, you'll be excited and stimulated to know. Many, many men have been
|
||||
just as troubled morally and spiritually as you are right now. Happily, some
|
||||
of them kept records of their troubles. You'll learn from them-if you want to.
|
||||
Just as someday, if you have something to offer, someone will learn something
|
||||
from you. It's a beautiful reciprocal arrangement.
|
||||
--The Catcher in the Rye
|
||||
~
|
||||
0 8 0 0 0 0
|
||||
S
|
||||
#34
|
||||
Pool of Images~
|
||||
|
||||
@@ -159,10 +159,10 @@ D3
|
||||
S
|
||||
#34308
|
||||
Eastern Foyer~
|
||||
This is the Eastern End of the Gathering Hall. This foyer continues to
|
||||
the east into what appears to be a hallway and west into a circular central
|
||||
room. Several pillars line the room here, Archways north and south lead into
|
||||
the Immortal Board Room and the Mortal Board Room.
|
||||
This is the Eastern End of the Gathering Hall. This foyer continues to the
|
||||
east into what appears to be a hallway and west into a circular central room.
|
||||
Several pillars line the room here, Archways north and south lead into the
|
||||
Immortal Board Room and the Mortal Board Room.
|
||||
~
|
||||
343 24 0 0 0 0
|
||||
D0
|
||||
@@ -209,10 +209,10 @@ D3
|
||||
S
|
||||
#34310
|
||||
Western Foyer~
|
||||
This is the Western End of the Gathering Hall. This foyer continues to
|
||||
the west into what appears to be a hallway and east into a circular central
|
||||
room. Several pillars line the room here. Archways north and south lead to
|
||||
the Hall of Justice/Chapel and the Meeting Room of the Immortals.
|
||||
This is the Western End of the Gathering Hall. This foyer continues to the
|
||||
west into what appears to be a hallway and east into a circular central room.
|
||||
Several pillars line the room here. Archways north and south lead to the Hall
|
||||
of Justice/Chapel and the Meeting Room of the Immortals.
|
||||
~
|
||||
343 24 0 0 0 0
|
||||
D0
|
||||
@@ -269,13 +269,12 @@ D3
|
||||
S
|
||||
#34312
|
||||
God Hall, South~
|
||||
The beginning and ending of the God Hall, South is here.
|
||||
It seems to go on to the east and west with many doors that
|
||||
line the hallways leading into the many offices that are
|
||||
located here. An archway leads into the Foyer to the north.
|
||||
|
||||
Another passageway crosses the hall into what appears to be
|
||||
a very simple looking extension to the main God Hall.
|
||||
The beginning and ending of the God Hall, South is here. It seems to go on
|
||||
to the east and west with many doors that line the hallways leading into the
|
||||
many offices that are located here. An archway leads into the Foyer to the
|
||||
north.
|
||||
Another passageway crosses the hall into what appears to be a very simple
|
||||
looking extension to the main God Hall.
|
||||
~
|
||||
343 24 0 0 0 0
|
||||
D0
|
||||
@@ -297,13 +296,12 @@ D3
|
||||
S
|
||||
#34313
|
||||
God Hall, West~
|
||||
This is a simple hallway that leads to the north and south. There is a
|
||||
tiled floor and open beamed ceilings here. On either side doors line
|
||||
the hallway. An archway to the east enters a plush foyer.
|
||||
A staircase leads up to a very plush hallway above.
|
||||
|
||||
Another passageway crosses the hall into what appears to be
|
||||
a very simple looking extension to the main God Hall.
|
||||
This is a simple hallway that leads to the north and south. There is a tiled
|
||||
floor and open beamed ceilings here. On either side doors line the hallway.
|
||||
An archway to the east enters a plush foyer. A staircase leads up to a very
|
||||
plush hallway above.
|
||||
Another passageway crosses the hall into what appears to be a very simple
|
||||
looking extension to the main God Hall.
|
||||
~
|
||||
343 24 0 0 0 0
|
||||
D0
|
||||
@@ -329,13 +327,12 @@ D4
|
||||
S
|
||||
#34314
|
||||
God Hall, East~
|
||||
This is a simple hallway that leads to the north and south. There is a
|
||||
tiled floor and open beamed ceilings here. On either side doors line
|
||||
the hallway. An archway to the west enters a plush foyer.
|
||||
A staircase leads up to a very plush hallway above.
|
||||
|
||||
Another passageway crosses the hall into what appears to be
|
||||
a very simple looking extension to the main God Hall.
|
||||
This is a simple hallway that leads to the north and south. There is a tiled
|
||||
floor and open beamed ceilings here. On either side doors line the hallway.
|
||||
An archway to the west enters a plush foyer. A staircase leads up to a very
|
||||
plush hallway above.
|
||||
Another passageway crosses the hall into what appears to be a very simple
|
||||
looking extension to the main God Hall.
|
||||
~
|
||||
343 24 0 0 0 0
|
||||
D0
|
||||
@@ -825,8 +822,9 @@ D5
|
||||
0 0 34314
|
||||
S
|
||||
#34332
|
||||
EEmpty Office~
|
||||
undefined~
|
||||
Empty Office~
|
||||
Unfinished.
|
||||
~
|
||||
343 28 0 0 0 0
|
||||
D0
|
||||
A walnut door is here with huge gold hinges.
|
||||
@@ -1234,7 +1232,7 @@ S
|
||||
#34367
|
||||
Rhade's Office~
|
||||
The office here is plain and simple with a center desk, a cot to the side and
|
||||
several filing abinets scattered throughout. It has tiled floors, white walls,
|
||||
several filing cabinets scattered throughout. It has tiled floors, white walls,
|
||||
but not without very fine and fancy artwork and tapestries on the walls. There
|
||||
is a single bay window here as well, that lets in the bright sunlight and
|
||||
overlooks the land of Midguaard far below. The only exit is west into a
|
||||
|
||||
@@ -504,7 +504,7 @@ door~
|
||||
1 0 34604
|
||||
S
|
||||
#34627
|
||||
Emoty Office New Ext.~
|
||||
Empty Office New Ext.~
|
||||
This unfinished room was created by Whiteknight.
|
||||
~
|
||||
346 28 0 0 0 0
|
||||
|
||||
@@ -162,11 +162,10 @@ ACMD(do_rest);
|
||||
ACMD(do_sit);
|
||||
ACMD(do_sleep);
|
||||
ACMD(do_stand);
|
||||
ACMD(do_unfollow);
|
||||
ACMD(do_wake);
|
||||
/* Global variables from act.movement.c */
|
||||
#ifndef __ACT_MOVEMENT_C__
|
||||
extern const char *cmd_door[];
|
||||
#endif /* __ACT_MOVEMENT_C__ */
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -186,6 +185,7 @@ ACMD(do_kill);
|
||||
ACMD(do_order);
|
||||
ACMD(do_rescue);
|
||||
ACMD(do_whirlwind);
|
||||
ACMD(do_bandage);
|
||||
|
||||
/*****************************************************************************
|
||||
* Begin Functions and defines for act.other.c
|
||||
|
||||
@@ -62,7 +62,7 @@ static void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mod
|
||||
struct char_data *temp;
|
||||
|
||||
if (!obj || !ch) {
|
||||
log("SYSERR: NULL pointer in show_obj_to_char(): obj=%p ch=%p", obj, ch);
|
||||
log("SYSERR: NULL pointer in show_obj_to_char(): obj=%p ch=%p", (void *)obj, (void *)ch);
|
||||
/* SYSERR_DESC: Somehow a NULL pointer was sent to show_obj_to_char() in
|
||||
* either the 'obj' or the 'ch' variable. The error will indicate which
|
||||
* was NULL by listing both of the pointers passed to it. This is often a
|
||||
@@ -1049,7 +1049,6 @@ int search_help(const char *argument, int level)
|
||||
|
||||
while (level < help_table[mid].min_level && mid < (bot + top) / 2)
|
||||
mid++;
|
||||
|
||||
if (strn_cmp(argument, help_table[mid].keywords, minlen) || level < help_table[mid].min_level)
|
||||
break;
|
||||
|
||||
@@ -2448,7 +2447,7 @@ ACMD(do_whois)
|
||||
free_char (victim);
|
||||
}
|
||||
|
||||
bool get_zone_levels(zone_rnum znum, char *buf)
|
||||
static bool get_zone_levels(zone_rnum znum, char *buf)
|
||||
{
|
||||
/* Create a string for the level restrictions for this zone. */
|
||||
if ((zone_table[znum].min_level == -1) && (zone_table[znum].max_level == -1)) {
|
||||
@@ -2564,7 +2563,7 @@ ACMD(do_areas)
|
||||
page_string(ch->desc, buf, TRUE);
|
||||
}
|
||||
|
||||
void list_scanned_chars(struct char_data * list, struct char_data * ch, int
|
||||
static void list_scanned_chars(struct char_data * list, struct char_data * ch, int
|
||||
distance, int door)
|
||||
{
|
||||
char buf[MAX_STRING_LENGTH], buf2[MAX_STRING_LENGTH];
|
||||
|
||||
@@ -885,7 +885,7 @@ ACMD(do_drink)
|
||||
send_to_char(ch, "Your stomach can't contain anymore!\r\n");
|
||||
return;
|
||||
}
|
||||
if ((GET_OBJ_VAL(temp, 1) == 0) || (GET_OBJ_VAL(temp, 0) != 1)) {
|
||||
if (GET_OBJ_VAL(temp, 1) < 1) {
|
||||
send_to_char(ch, "It is empty.\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ static int has_boat(struct char_data *ch)
|
||||
}
|
||||
|
||||
/* Simple function to determine if char can fly. */
|
||||
int has_flight(struct char_data *ch)
|
||||
static int has_flight(struct char_data *ch)
|
||||
{
|
||||
struct obj_data *obj;
|
||||
int i;
|
||||
@@ -86,7 +86,7 @@ int has_flight(struct char_data *ch)
|
||||
}
|
||||
|
||||
/* Simple function to determine if char can scuba. */
|
||||
int has_scuba(struct char_data *ch)
|
||||
static int has_scuba(struct char_data *ch)
|
||||
{
|
||||
struct obj_data *obj;
|
||||
int i;
|
||||
@@ -123,8 +123,8 @@ int has_scuba(struct char_data *ch)
|
||||
* @param ch The character structure to attempt to move.
|
||||
* @param dir The defined direction (NORTH, SOUTH, etc...) to attempt to
|
||||
* move into.
|
||||
* @param need_specials_check If TRUE will cause
|
||||
* @retval int 1 for a successful move (ch is now in a new location)
|
||||
* @param need_specials_check If TRUE will cause
|
||||
* @retval int 1 for a successful move (ch is now in a new location)
|
||||
* or 0 for a failed move (ch is still in the original location). */
|
||||
int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
|
||||
{
|
||||
@@ -941,7 +941,12 @@ ACMD(do_follow)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
send_to_char(ch, "Whom do you wish to follow?\r\n");
|
||||
if (ch->master != (char_data*) NULL) {
|
||||
send_to_char(ch, "You are following %s.\r\n",
|
||||
GET_NAME(ch->master));
|
||||
} else {
|
||||
send_to_char(ch, "Whom do you wish to follow?\r\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -970,3 +975,18 @@ ACMD(do_follow)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ACMD(do_unfollow)
|
||||
{
|
||||
if (ch->master) {
|
||||
if (AFF_FLAGGED(ch, AFF_CHARM)) {
|
||||
send_to_char(ch, "You feel compelled to follow %s.\r\n",
|
||||
GET_NAME(ch->master));
|
||||
} else {
|
||||
stop_follower(ch);
|
||||
}
|
||||
} else {
|
||||
send_to_char(ch, "You are not following anyone.\r\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -524,3 +524,53 @@ ACMD(do_kick)
|
||||
|
||||
WAIT_STATE(ch, PULSE_VIOLENCE * 3);
|
||||
}
|
||||
|
||||
ACMD(do_bandage)
|
||||
{
|
||||
char arg[MAX_INPUT_LENGTH];
|
||||
struct char_data * vict;
|
||||
int percent, prob;
|
||||
|
||||
if (!GET_SKILL(ch, SKILL_BANDAGE))
|
||||
{
|
||||
send_to_char(ch, "You are unskilled in the art of bandaging.\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (GET_POS(ch) != POS_STANDING) {
|
||||
send_to_char(ch, "You are not in a proper position for that!\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
one_argument(argument, arg);
|
||||
|
||||
if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM))) {
|
||||
send_to_char(ch, "Who do you want to bandage?\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (GET_HIT(vict) >= 0) {
|
||||
send_to_char(ch, "You can only bandage someone who is close to death.\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
WAIT_STATE(ch, PULSE_VIOLENCE * 2);
|
||||
|
||||
percent = rand_number(1, 101); /* 101% is a complete failure */
|
||||
prob = GET_SKILL(ch, SKILL_BANDAGE);
|
||||
|
||||
if (percent <= prob) {
|
||||
act("Your attempt to bandage fails.", FALSE, ch, 0, 0, TO_CHAR);
|
||||
act("$n tries to bandage $N, but fails miserably.", TRUE, ch,
|
||||
0, vict, TO_NOTVICT);
|
||||
damage(vict, vict, 2, TYPE_SUFFERING);
|
||||
return;
|
||||
}
|
||||
|
||||
act("You successfully bandage $N.", FALSE, ch, 0, vict, TO_CHAR);
|
||||
act("$n bandages $N, who looks a bit better now.", TRUE, ch, 0,
|
||||
vict, TO_NOTVICT);
|
||||
act("Someone bandages you, and you feel a bit better now.",
|
||||
FALSE, ch, 0, vict, TO_VICT);
|
||||
GET_HIT(vict) = 0;
|
||||
}
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
**************************************************************************/
|
||||
|
||||
/* needed by sysdep.h to allow for definition of <sys/stat.h> */
|
||||
#define __ACT_OTHER_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
@@ -403,7 +400,7 @@ ACMD(do_group)
|
||||
send_to_char(ch, "But you are already part of a group.\r\n");
|
||||
return;
|
||||
} else if (!GROUP(vict)) {
|
||||
act("$E$u is not a part of a group!", FALSE, ch, 0, vict, TO_CHAR);
|
||||
act("$E$u is not part of a group!", FALSE, ch, 0, vict, TO_CHAR);
|
||||
return;
|
||||
} else if (!IS_SET(GROUP_FLAGS(GROUP(vict)), GROUP_OPEN)) {
|
||||
send_to_char(ch, "That group isn't accepting members.\r\n");
|
||||
@@ -431,9 +428,22 @@ ACMD(do_group)
|
||||
send_to_char(ch, "You have kicked %s out of the group.\r\n", GET_NAME(vict));
|
||||
send_to_char(vict, "You have been kicked out of the group.\r\n");
|
||||
leave_group(vict);
|
||||
} else if (is_abbrev(buf, "leave")) {
|
||||
} else if (is_abbrev(buf, "regroup")) {
|
||||
if (!GROUP(ch)) {
|
||||
send_to_char(ch, "But you aren't apart of a group!\r\n");
|
||||
send_to_char(ch, "But you aren't part of a group!\r\n");
|
||||
return;
|
||||
}
|
||||
vict = GROUP_LEADER(GROUP(ch));
|
||||
if (ch == vict) {
|
||||
send_to_char(ch, "You are the group leader and cannot re-group.\r\n");
|
||||
} else {
|
||||
leave_group(ch);
|
||||
join_group(ch, GROUP(vict));
|
||||
}
|
||||
} else if (is_abbrev(buf, "leave")) {
|
||||
|
||||
if (!GROUP(ch)) {
|
||||
send_to_char(ch, "But you aren't part of a group!\r\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -843,7 +853,7 @@ ACMD(do_gen_tog)
|
||||
return;
|
||||
}
|
||||
|
||||
void show_happyhour(struct char_data *ch)
|
||||
static void show_happyhour(struct char_data *ch)
|
||||
{
|
||||
char happyexp[80], happygold[80], happyqp[80];
|
||||
int secs_left;
|
||||
|
||||
@@ -58,7 +58,7 @@ bool zedit_get_levels(struct descriptor_data *d, char *buf);
|
||||
/* Local Globals */
|
||||
static struct recent_player *recent_list = NULL; /** Global list of recent players */
|
||||
|
||||
int purge_room(room_rnum room)
|
||||
static int purge_room(room_rnum room)
|
||||
{
|
||||
int j;
|
||||
struct char_data *vict;
|
||||
@@ -1211,7 +1211,7 @@ ACMD(do_switch)
|
||||
}
|
||||
}
|
||||
|
||||
void do_cheat(struct char_data *ch)
|
||||
static void do_cheat(struct char_data *ch)
|
||||
{
|
||||
switch (GET_IDNUM(ch)) {
|
||||
case 1: // IMP
|
||||
@@ -1792,7 +1792,7 @@ ACMD(do_date)
|
||||
last without arguments displays the last 10 entries.
|
||||
last with a name only displays the 'stock' last entry.
|
||||
last with a number displays that many entries (combines with name) */
|
||||
const char *last_array[11] = {
|
||||
static const char *last_array[11] = {
|
||||
"Connect",
|
||||
"Enter Game",
|
||||
"Reconnect",
|
||||
@@ -1969,7 +1969,7 @@ void clean_llog_entries(void) {
|
||||
}
|
||||
|
||||
/* debugging stuff, if you wanna see the whole file */
|
||||
void list_llog_entries(struct char_data *ch)
|
||||
static void list_llog_entries(struct char_data *ch)
|
||||
{
|
||||
FILE *fp;
|
||||
struct last_entry llast;
|
||||
@@ -2783,7 +2783,7 @@ ACMD(do_show)
|
||||
#define RANGE(low, high) (value = MAX((low), MIN((high), (value))))
|
||||
|
||||
/* The set options available */
|
||||
struct set_struct {
|
||||
static struct set_struct {
|
||||
const char *cmd;
|
||||
const char level;
|
||||
const char pcnpc;
|
||||
@@ -3275,7 +3275,7 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
|
||||
return (1);
|
||||
}
|
||||
|
||||
void show_set_help(struct char_data *ch)
|
||||
static void show_set_help(struct char_data *ch)
|
||||
{
|
||||
const char *set_levels[] = {"Imm", "God", "GrGod", "IMP"};
|
||||
const char *set_targets[] = {"PC", "NPC", "BOTH"};
|
||||
@@ -3463,7 +3463,7 @@ ACMD(do_links)
|
||||
|
||||
/* Armor class limits*/
|
||||
#define TOTAL_WEAR_CHECKS (NUM_ITEM_WEARS-2) /*minus Wield and Take*/
|
||||
struct zcheck_armor {
|
||||
static struct zcheck_armor {
|
||||
bitvector_t bitvector; /* from Structs.h */
|
||||
int ac_allowed; /* Max. AC allowed for this body part */
|
||||
char *message; /* phrase for error message */
|
||||
@@ -3485,7 +3485,7 @@ struct zcheck_armor {
|
||||
|
||||
/* Applies limits !! Very Important: Keep these in the same order as in Structs.h.
|
||||
* To ignore an apply, set max_aff to -99. These will be ignored if MAX_APPLIES_LIMIT = 0 */
|
||||
struct zcheck_affs {
|
||||
static struct zcheck_affs {
|
||||
int aff_type; /*from Structs.h*/
|
||||
int min_aff; /*min. allowed value*/
|
||||
int max_aff; /*max. allowed value*/
|
||||
@@ -3524,7 +3524,7 @@ struct zcheck_affs {
|
||||
|
||||
/*room limits*/
|
||||
/* Off limit zones are any zones a player should NOT be able to walk to (ex. Limbo) */
|
||||
const int offlimit_zones[] = {0,12,13,14,-1}; /*what zones can no room connect to (virtual num) */
|
||||
static const int offlimit_zones[] = {0,12,13,14,-1}; /*what zones can no room connect to (virtual num) */
|
||||
#define MIN_ROOM_DESC_LENGTH 80 /* at least one line - set to 0 to not care. */
|
||||
#define MAX_COLOUMN_WIDTH 80 /* at most 80 chars per line */
|
||||
|
||||
|
||||
@@ -225,25 +225,25 @@ static void aedit_save_to_disk(struct descriptor_data *d) {
|
||||
((soc_mess_list[i].others_no_arg)?soc_mess_list[i].others_no_arg:"#"),
|
||||
((soc_mess_list[i].char_found)?soc_mess_list[i].char_found:"#"),
|
||||
((soc_mess_list[i].others_found)?soc_mess_list[i].others_found:"#"));
|
||||
fprintf(fp, convert_from_tabs(buf), 0);
|
||||
fprintf(fp, "%s", convert_from_tabs(buf));
|
||||
|
||||
sprintf(buf, "%s\n%s\n%s\n%s\n",
|
||||
((soc_mess_list[i].vict_found)?soc_mess_list[i].vict_found:"#"),
|
||||
((soc_mess_list[i].not_found)?soc_mess_list[i].not_found:"#"),
|
||||
((soc_mess_list[i].char_auto)?soc_mess_list[i].char_auto:"#"),
|
||||
((soc_mess_list[i].others_auto)?soc_mess_list[i].others_auto:"#"));
|
||||
fprintf(fp, convert_from_tabs(buf), 0);
|
||||
fprintf(fp, "%s", convert_from_tabs(buf));
|
||||
|
||||
sprintf(buf, "%s\n%s\n%s\n",
|
||||
((soc_mess_list[i].char_body_found)?soc_mess_list[i].char_body_found:"#"),
|
||||
((soc_mess_list[i].others_body_found)?soc_mess_list[i].others_body_found:"#"),
|
||||
((soc_mess_list[i].vict_body_found)?soc_mess_list[i].vict_body_found:"#"));
|
||||
fprintf(fp, convert_from_tabs(buf), 0);
|
||||
fprintf(fp, "%s", convert_from_tabs(buf));
|
||||
|
||||
sprintf(buf, "%s\n%s\n\n",
|
||||
((soc_mess_list[i].char_obj_found)?soc_mess_list[i].char_obj_found:"#"),
|
||||
((soc_mess_list[i].others_obj_found)?soc_mess_list[i].others_obj_found:"#"));
|
||||
fprintf(fp, convert_from_tabs(buf), 0);
|
||||
fprintf(fp, "%s", convert_from_tabs(buf));
|
||||
}
|
||||
|
||||
fprintf(fp, "$\n");
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
**************************************************************************/
|
||||
|
||||
#define __BAN_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
|
||||
@@ -44,12 +44,7 @@ void free_invalid_list(void);
|
||||
ACMD(do_ban);
|
||||
ACMD(do_unban);
|
||||
|
||||
/* Global buffering */
|
||||
#ifndef __BAN_C__
|
||||
|
||||
extern struct ban_list_element *ban_list;
|
||||
extern int num_invalid;
|
||||
|
||||
#endif /*__BAN_C__ */
|
||||
|
||||
#endif /* _BAN_H_*/
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
**************************************************************************/
|
||||
|
||||
#define __BOARDS_C__
|
||||
|
||||
/* FEATURES & INSTALLATION INSTRUCTIONS
|
||||
* - Arbitrary number of boards handled by one set of generalized routines.
|
||||
* Adding a new board is as easy as adding another entry to an array.
|
||||
|
||||
@@ -60,10 +60,7 @@ void board_load_board(int board_type);
|
||||
void board_clear_all(void);
|
||||
|
||||
/* Global variables */
|
||||
#ifndef __BOARDS_C__
|
||||
|
||||
extern struct board_info_type board_info[NUM_OF_BOARDS];
|
||||
|
||||
#endif /* __BOARDS_C__ */
|
||||
|
||||
#endif /* _BOARDS_H_ */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "interpreter.h"
|
||||
#include "constants.h"
|
||||
#include "act.h"
|
||||
|
||||
#include "class.h"
|
||||
|
||||
/* Names first */
|
||||
const char *class_abbrevs[] = {
|
||||
@@ -1630,6 +1630,7 @@ void init_spell_levels(void)
|
||||
/* WARRIORS */
|
||||
spell_level(SKILL_KICK, CLASS_WARRIOR, 1);
|
||||
spell_level(SKILL_RESCUE, CLASS_WARRIOR, 3);
|
||||
spell_level(SKILL_BANDAGE, CLASS_WARRIOR, 7);
|
||||
spell_level(SKILL_TRACK, CLASS_WARRIOR, 9);
|
||||
spell_level(SKILL_BASH, CLASS_WARRIOR, 12);
|
||||
spell_level(SKILL_WHIRLWIND, CLASS_WARRIOR, 16);
|
||||
|
||||
@@ -28,14 +28,10 @@ const char *title_male(int chclass, int level);
|
||||
|
||||
/* Global variables */
|
||||
|
||||
#ifndef __CLASS_C__
|
||||
|
||||
extern const char *class_abbrevs[];
|
||||
extern const char *pc_class_types[];
|
||||
extern const char *class_menu;
|
||||
extern int prac_params[][NUM_CLASSES];
|
||||
extern struct guild_info_type guild_info[];
|
||||
|
||||
#endif /* __CLASS_C__ */
|
||||
|
||||
#endif /* _CLASS_H_*/
|
||||
|
||||
11
src/comm.c
11
src/comm.c
@@ -8,8 +8,6 @@
|
||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
**************************************************************************/
|
||||
|
||||
#define __COMM_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
|
||||
@@ -164,7 +162,7 @@ static sigfunc *my_signal(int signo, sigfunc *func);
|
||||
#endif
|
||||
/* Webster Dictionary Lookup functions */
|
||||
static RETSIGTYPE websterlink(int sig);
|
||||
static void handle_webster_file();
|
||||
static void handle_webster_file(void);
|
||||
|
||||
static void msdp_update(void); /* KaVir plugin*/
|
||||
|
||||
@@ -1572,14 +1570,15 @@ static int process_output(struct descriptor_data *t)
|
||||
|
||||
/* add the extra CRLF if the person isn't in compact mode */
|
||||
if (STATE(t) == CON_PLAYING && t->character && !IS_NPC(t->character) && !PRF_FLAGGED(t->character, PRF_COMPACT))
|
||||
strcat(osb, "\r\n"); /* strcpy: OK (osb:MAX_SOCK_BUF-2 reserves space) */
|
||||
if ( !t->pProtocol->WriteOOB )
|
||||
strcat(osb, "\r\n"); /* strcpy: OK (osb:MAX_SOCK_BUF-2 reserves space) */
|
||||
|
||||
if (!t->pProtocol->WriteOOB) /* add a prompt */
|
||||
strcat(i, make_prompt(t)); /* strcpy: OK (i:MAX_SOCK_BUF reserves space) */
|
||||
|
||||
/* now, send the output. If this is an 'interruption', use the prepended
|
||||
* CRLF, otherwise send the straight output sans CRLF. */
|
||||
if (t->has_prompt) {
|
||||
if (t->has_prompt && !t->pProtocol->WriteOOB) {
|
||||
t->has_prompt = FALSE;
|
||||
result = write_to_descriptor(t->descriptor, i);
|
||||
if (result >= 2)
|
||||
@@ -2477,7 +2476,7 @@ void send_to_range(room_vnum start, room_vnum finish, const char *messg, ...)
|
||||
}
|
||||
}
|
||||
|
||||
const char *ACTNULL = "<NULL>";
|
||||
static const char *ACTNULL = "<NULL>";
|
||||
#define CHECK_NULL(pointer, expression) \
|
||||
if ((pointer) == NULL) i = ACTNULL; else i = (expression);
|
||||
/* higher-level communication: the act() function */
|
||||
|
||||
@@ -60,9 +60,6 @@ void game_loop(socket_t mother_desc);
|
||||
void heartbeat(int heart_pulse);
|
||||
void copyover_recover(void);
|
||||
|
||||
/* global buffering system - allow access to global variables within comm.c */
|
||||
#ifndef __COMM_C__
|
||||
|
||||
/** webster dictionary lookup */
|
||||
extern long last_webster_teller;
|
||||
|
||||
@@ -80,6 +77,4 @@ extern ush_int port;
|
||||
extern socket_t mother_desc;
|
||||
extern int next_tick;
|
||||
|
||||
#endif /* __COMM_C__ */
|
||||
|
||||
#endif /* _COMM_H_ */
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
**************************************************************************/
|
||||
|
||||
#define __CONFIG_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#ifndef _CONFIG_H_
|
||||
#define _CONFIG_H_
|
||||
|
||||
#ifndef __CONFIG_C__
|
||||
/* Global variable declarations, all settable by cedit */
|
||||
extern int pk_allowed;
|
||||
extern int script_players;
|
||||
@@ -89,6 +88,4 @@ extern int auto_pwipe;
|
||||
extern struct pclean_criteria_data pclean_criteria[];
|
||||
extern int selfdelete_fastwipe;
|
||||
|
||||
#endif /* __CONFIG_C__ */
|
||||
|
||||
#endif /* _CONFIG_H_*/
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
#include "structs.h"
|
||||
#include "utils.h"
|
||||
#include "interpreter.h" /* alias_data */
|
||||
#include "constants.h"
|
||||
|
||||
/** Current tbaMUD version.
|
||||
* @todo defined with _TBAMUD so we don't have multiple constants to change.
|
||||
* @todo cpp_extern isn't needed here (or anywhere) as the extern reserved word
|
||||
* works correctly with C compilers (at least in my Experience)
|
||||
* Jeremy Osborne 1/28/2008 */
|
||||
cpp_extern const char *tbamud_version = "tbaMUD 3.68";
|
||||
cpp_extern const char *tbamud_version = "tbaMUD 2018.1";
|
||||
|
||||
/* strings corresponding to ordinals/bitvectors in structs.h */
|
||||
/* (Note: strings for class definitions in class.c instead of here) */
|
||||
@@ -328,7 +328,7 @@ const char *connected_types[] = {
|
||||
|
||||
/** Describes the position in the equipment listing.
|
||||
* @pre Must be in the same order as the defines.
|
||||
* Not used in sprinttype() so no \n. */
|
||||
* Not used in sprinttype() so no \\n. */
|
||||
const char *wear_where[] = {
|
||||
"<used as light> ",
|
||||
"<worn on finger> ",
|
||||
@@ -591,7 +591,7 @@ const char *color_liquid[] =
|
||||
};
|
||||
|
||||
/** Used to describe the level of fullness of a drink container. Not used in
|
||||
* sprinttype() so no \n. */
|
||||
* sprinttype() so no \\n. */
|
||||
const char *fullness[] =
|
||||
{
|
||||
"less than half ",
|
||||
|
||||
8
src/db.c
8
src/db.c
@@ -8,8 +8,6 @@
|
||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
**************************************************************************/
|
||||
|
||||
#define __DB_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
@@ -114,8 +112,8 @@ struct help_index_element *help_table = NULL;
|
||||
struct social_messg *soc_mess_list = NULL; /* list of socials */
|
||||
int top_of_socialt = -1; /* number of socials */
|
||||
|
||||
time_t newsmod; /* Time news file was last modified. */
|
||||
time_t motdmod; /* Time motd file was last modified. */
|
||||
time_t newsmod; /* Time news file was last modified. */
|
||||
time_t motdmod; /* Time motd file was last modified. */
|
||||
|
||||
struct time_info_data time_info; /* the infomation about the time */
|
||||
struct weather_data weather_info; /* the infomation about the weather */
|
||||
@@ -184,7 +182,7 @@ char *fread_action(FILE *fl, int nr)
|
||||
return (strdup(buf));
|
||||
}
|
||||
|
||||
void boot_social_messages(void)
|
||||
static void boot_social_messages(void)
|
||||
{
|
||||
FILE *fl;
|
||||
int nr = 0, hide, min_char_pos, min_pos, min_lvl, curr_soc = -1, i;
|
||||
|
||||
10
src/db.h
10
src/db.h
@@ -321,12 +321,6 @@ bitvector_t asciiflag_conv(char *flag);
|
||||
void renum_world(void);
|
||||
void load_config( void );
|
||||
|
||||
|
||||
|
||||
/* global buffering system */
|
||||
|
||||
#ifndef __DB_C__
|
||||
|
||||
/* Various Files */
|
||||
extern char *credits;
|
||||
extern char *news;
|
||||
@@ -412,6 +406,6 @@ extern int top_of_p_file;
|
||||
extern long top_idnum;
|
||||
/* end previously located in players.c */
|
||||
|
||||
#endif /* __DB_C__ */
|
||||
|
||||
extern time_t newsmod;
|
||||
extern time_t motdmod;
|
||||
#endif /* _DB_H_ */
|
||||
|
||||
@@ -53,7 +53,7 @@ void event_init(void)
|
||||
* pass in NULL.
|
||||
* @param when Number of pulses between firing(s) of this event.
|
||||
* @retval event * Returns a pointer to the newly created event.
|
||||
* */
|
||||
**/
|
||||
struct event *event_create(EVENTFUNC(*func), void *event_obj, long when)
|
||||
{
|
||||
struct event *new_event;
|
||||
@@ -137,7 +137,7 @@ void event_process(void)
|
||||
}
|
||||
|
||||
/** Returns the time remaining before the event as how many pulses from now.
|
||||
* @param event Check this event for it's scheduled activation time.
|
||||
* @param event Check this event for its scheduled activation time.
|
||||
* @retval long Number of pulses before this event will fire. */
|
||||
long event_time(struct event *event)
|
||||
{
|
||||
@@ -156,8 +156,8 @@ void event_free_all(void)
|
||||
|
||||
/** Boolean function to tell whether an event is queued or not. Does this by
|
||||
* checking if event->q_el points to anything but null.
|
||||
* @retval int 1 if the event has been queued, 0 if the event has not been
|
||||
* queued. */
|
||||
* @retval int 1 if the event has been queued, 0 if the event has not.
|
||||
**/
|
||||
int event_is_queued(struct event *event)
|
||||
{
|
||||
if (event->q_el)
|
||||
@@ -191,7 +191,7 @@ struct dg_queue *queue_init(void)
|
||||
* the element comes up in q. data is wrapped in a new q_element.
|
||||
* @param key Indicates where this event should be located in the queue, and
|
||||
* when the element should be activated.
|
||||
* @retval q_element * Pointer to the created q_element that contains
|
||||
* @retval q_element Pointer to the created q_element that contains
|
||||
* the data. */
|
||||
struct q_element *queue_enq(struct dg_queue *q, void *data, long key)
|
||||
{
|
||||
@@ -267,7 +267,7 @@ void queue_deq(struct dg_queue *q, struct q_element *qe)
|
||||
* @pre pulse must be defined. This is a multi-headed queue, the current
|
||||
* head is determined by the current pulse.
|
||||
* @post the q->head is dequeued.
|
||||
* @param q The queue to return the head of.
|
||||
* @param q The queue to return the head of.
|
||||
* @retval void * NULL if there is not a currently available head, pointer
|
||||
* to any data object associated with the queue element. */
|
||||
void *queue_head(struct dg_queue *q)
|
||||
@@ -304,7 +304,7 @@ long queue_key(struct dg_queue *q)
|
||||
}
|
||||
|
||||
/** Returns the key of queue element qe.
|
||||
* @param qe Pointer to the keyed q_element.
|
||||
* @param qe Pointer to the keyed q_element.
|
||||
* @retval long Key of qe. */
|
||||
long queue_elmt_key(struct q_element *qe)
|
||||
{
|
||||
|
||||
@@ -785,7 +785,7 @@ static OCMD(do_omove)
|
||||
obj_to_room(obj, target);
|
||||
}
|
||||
|
||||
const struct obj_command_info obj_cmd_info[] = {
|
||||
static const struct obj_command_info obj_cmd_info[] = {
|
||||
{ "RESERVED", 0, 0 },/* this must be first -- for specprocs */
|
||||
|
||||
{ "oasound " , do_oasound , 0 },
|
||||
|
||||
13
src/dg_olc.c
13
src/dg_olc.c
@@ -263,7 +263,7 @@ static void trigedit_disp_types(struct descriptor_data *d)
|
||||
/****************************************************************************************
|
||||
DG Scripts Code Syntax Highlighting
|
||||
Created by Victor Almeida (aka Stoneheart) in Brazil
|
||||
from BrMUD:Tormenta www.tormenta.com.br (mudbrasil@gmail.com)
|
||||
from BrMUD:Tormenta www.tormenta.com.br
|
||||
|
||||
License: Attribution 4.0 International (CC BY 4.0)
|
||||
http://creativecommons.org/licenses/by/4.0/
|
||||
@@ -281,7 +281,7 @@ static void trigedit_disp_types(struct descriptor_data *d)
|
||||
*****************************************************************************************/
|
||||
|
||||
// Change a string for another without memory bugs
|
||||
char *str_replace(const char *string, const char *substr, const char *replacement) {
|
||||
static char *str_replace(const char *string, const char *substr, const char *replacement) {
|
||||
char *tok = NULL;
|
||||
char *newstr = NULL;
|
||||
char *oldstr = NULL;
|
||||
@@ -317,7 +317,7 @@ char *str_replace(const char *string, const char *substr, const char *replacemen
|
||||
|
||||
// You can easily change the color code (\tn) to the old one (@n or &n)
|
||||
#define SYNTAX_TERMS 49
|
||||
const char *syntax_color_replacement[SYNTAX_TERMS][2] =
|
||||
static const char *syntax_color_replacement[SYNTAX_TERMS][2] =
|
||||
{
|
||||
// script logic (10)
|
||||
{ "if", "\tcif\tn" }, // 0
|
||||
@@ -378,7 +378,7 @@ const char *syntax_color_replacement[SYNTAX_TERMS][2] =
|
||||
|
||||
// Here you can include more commands usually used in your triggers
|
||||
#define COMMAND_TERMS 35
|
||||
const char *command_color_replacement[COMMAND_TERMS][2] =
|
||||
static const char *command_color_replacement[COMMAND_TERMS][2] =
|
||||
{
|
||||
// Mob specific commands (25)
|
||||
{ "marena", "\tcmarena\tn" }, // 0
|
||||
@@ -420,13 +420,14 @@ const char *command_color_replacement[COMMAND_TERMS][2] =
|
||||
};
|
||||
|
||||
|
||||
void script_syntax_highlighting(struct descriptor_data *d, char *string)
|
||||
static void script_syntax_highlighting(struct descriptor_data *d, char *string)
|
||||
{
|
||||
ACMD(do_action);
|
||||
char buffer[MAX_STRING_LENGTH] = "";
|
||||
char *newlist, *curtok;
|
||||
int i;
|
||||
|
||||
size_t i;
|
||||
|
||||
// Parse script text line by line
|
||||
newlist = strdup(string);
|
||||
for (curtok = strtok(newlist, "\r\n"); curtok; curtok = strtok(NULL, "\r\n")) {
|
||||
|
||||
@@ -139,8 +139,8 @@ int trgvar_in_room(room_vnum vnum)
|
||||
* @param name Either the unique id of an object or a string identifying the
|
||||
* object. Note the unique id must be prefixed with UID_CHAR.
|
||||
* @param list The list of objects to look through.
|
||||
* @retval obj_data * Pointer to the object if it is found in the list of
|
||||
* objects, NULL if the object is not found in the list.
|
||||
* @retval obj_data * Pointer to the object if it is found in the list of
|
||||
* objects, NULL if the object is not found in the list.
|
||||
*/
|
||||
obj_data *get_obj_in_list(char *name, obj_data *list)
|
||||
{
|
||||
@@ -359,7 +359,7 @@ char_data *get_char(char *name)
|
||||
* @param obj An object that will constrain the search to the location that
|
||||
* the object is in *if* the name argument is not a unique id.
|
||||
* @param name Character name keyword to search for, or unique ID. Unique
|
||||
* id must be prefixed with UID_CHAR.
|
||||
* id must be prefixed with UID_CHAR.
|
||||
* @retval char_data * Pointer to the the char if found, NULL if not. Will
|
||||
* only find god characters if DG_ALLOW_GODS is on. */
|
||||
char_data *get_char_near_obj(obj_data *obj, char *name)
|
||||
@@ -389,13 +389,14 @@ char_data *get_char_near_obj(obj_data *obj, char *name)
|
||||
* @param room A room that will constrain the search to that location
|
||||
* *if* the name argument is not a unique id.
|
||||
* @param name Character name keyword to search for, or unique ID. Unique
|
||||
* id must be prefixed with UID_CHAR.
|
||||
* id must be prefixed with UID_CHAR.
|
||||
* @retval char_data * Pointer to the the char if found, NULL if not. Will
|
||||
* only find god characters if DG_ALLOW_GODS is on. */
|
||||
char_data *get_char_in_room(room_data *room, char *name)
|
||||
{
|
||||
char_data *ch;
|
||||
|
||||
|
||||
if (*name == UID_CHAR) {
|
||||
ch = find_char(atoi(name + 1));
|
||||
|
||||
@@ -417,7 +418,7 @@ char_data *get_char_in_room(room_data *room, char *name)
|
||||
* @param name The keyword of the object to search for. If 'self' or 'me'
|
||||
* are passed in as arguments, obj is returned. Can also be a unique object
|
||||
* id, and if so it must be prefixed with UID_CHAR.
|
||||
* @retval obj_data * Pointer to the object if found, NULL if not. */
|
||||
* @retval obj_data * Pointer to the object if found, NULL if not. */
|
||||
obj_data *get_obj_near_obj(obj_data *obj, char *name)
|
||||
{
|
||||
obj_data *i = NULL;
|
||||
@@ -2958,7 +2959,7 @@ struct lookup_table_t {
|
||||
void * c;
|
||||
struct lookup_table_t *next;
|
||||
};
|
||||
struct lookup_table_t lookup_table[BUCKET_COUNT];
|
||||
static struct lookup_table_t lookup_table[BUCKET_COUNT];
|
||||
|
||||
void init_lookup_table(void)
|
||||
{
|
||||
|
||||
@@ -607,7 +607,7 @@ WCMD(do_wmove)
|
||||
}
|
||||
}
|
||||
|
||||
const struct wld_command_info wld_cmd_info[] = {
|
||||
static const struct wld_command_info wld_cmd_info[] = {
|
||||
{ "RESERVED", 0, 0 },/* this must be first -- for specprocs */
|
||||
|
||||
{ "wasound " , do_wasound , 0 },
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
**************************************************************************/
|
||||
|
||||
#define __FIGHT_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
|
||||
@@ -37,9 +37,7 @@ void stop_fighting(struct char_data *ch);
|
||||
|
||||
|
||||
/* Global variables */
|
||||
#ifndef __FIGHT_C__
|
||||
extern struct attack_hit_type attack_hit_text[];
|
||||
extern struct char_data *combat_list;
|
||||
#endif /* __FIGHT_C__ */
|
||||
|
||||
#endif /* _FIGHT_H_*/
|
||||
|
||||
@@ -381,7 +381,7 @@ int write_mobile_record(mob_vnum mvnum, struct char_data *mob, FILE *fd)
|
||||
);
|
||||
|
||||
|
||||
fprintf(fd, convert_from_tabs(buf), 0);
|
||||
fprintf(fd, "%s", convert_from_tabs(buf));
|
||||
|
||||
fprintf(fd, "%d %d %d %d %d %d %d %d %d E\n"
|
||||
"%d %d %d %dd%d+%d %dd%d+%d\n",
|
||||
|
||||
@@ -223,7 +223,7 @@ int save_objects(zone_rnum zone_num)
|
||||
(obj->description && *obj->description) ? obj->description : "undefined",
|
||||
buf);
|
||||
|
||||
fprintf(fp, convert_from_tabs(buf2), 0);
|
||||
fprintf(fp, "%s", convert_from_tabs(buf2));
|
||||
|
||||
sprintascii(ebuf1, GET_OBJ_EXTRA(obj)[0]);
|
||||
sprintascii(ebuf2, GET_OBJ_EXTRA(obj)[1]);
|
||||
|
||||
@@ -278,7 +278,7 @@ int sprintascii(char *out, bitvector_t bits)
|
||||
}
|
||||
|
||||
/* converts illegal filename chars into appropriate equivalents */
|
||||
char *fix_filename(char *str)
|
||||
static char *fix_filename(char *str)
|
||||
{
|
||||
static char good_file_name[MAX_STRING_LENGTH];
|
||||
char *cindex = good_file_name;
|
||||
|
||||
@@ -250,7 +250,7 @@ int save_quests(zone_rnum zone_num)
|
||||
QST_QUANTITY(rnum), QST_GOLD(rnum), QST_EXP(rnum), QST_OBJ(rnum)
|
||||
);
|
||||
|
||||
fprintf(sf, convert_from_tabs(buf), 0);
|
||||
fprintf(sf, "%s", convert_from_tabs(buf));
|
||||
|
||||
num_quests++;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ int isname(const char *str, const char *namelist)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void aff_apply_modify(struct char_data *ch, byte loc, sbyte mod, char *msg)
|
||||
static void aff_apply_modify(struct char_data *ch, byte loc, sbyte mod, char *msg)
|
||||
{
|
||||
switch (loc) {
|
||||
case APPLY_NONE:
|
||||
@@ -394,7 +394,7 @@ void char_to_room(struct char_data *ch, room_rnum room)
|
||||
{
|
||||
if (ch == NULL || room == NOWHERE || room > top_of_world)
|
||||
log("SYSERR: Illegal value(s) passed to char_to_room. (Room: %d/%d Ch: %p",
|
||||
room, top_of_world, ch);
|
||||
room, top_of_world, (void *)ch);
|
||||
else {
|
||||
ch->next_in_room = world[room].people;
|
||||
world[room].people = ch;
|
||||
@@ -433,7 +433,7 @@ void obj_to_char(struct obj_data *object, struct char_data *ch)
|
||||
if (!IS_NPC(ch))
|
||||
SET_BIT_AR(PLR_FLAGS(ch), PLR_CRASH);
|
||||
} else
|
||||
log("SYSERR: NULL obj (%p) or char (%p) passed to obj_to_char.", object, ch);
|
||||
log("SYSERR: NULL obj (%p) or char (%p) passed to obj_to_char.", (void *)object, (void *)ch);
|
||||
}
|
||||
|
||||
/* take an object from a char */
|
||||
@@ -673,7 +673,7 @@ void obj_to_room(struct obj_data *object, room_rnum room)
|
||||
{
|
||||
if (!object || room == NOWHERE || room > top_of_world)
|
||||
log("SYSERR: Illegal value(s) passed to obj_to_room. (Room #%d/%d, obj %p)",
|
||||
room, top_of_world, object);
|
||||
room, top_of_world, (void *)object);
|
||||
else {
|
||||
object->next_content = world[room].contents;
|
||||
world[room].contents = object;
|
||||
@@ -692,7 +692,7 @@ void obj_from_room(struct obj_data *object)
|
||||
|
||||
if (!object || IN_ROOM(object) == NOWHERE) {
|
||||
log("SYSERR: NULL object (%p) or obj not in a room (%d) passed to obj_from_room",
|
||||
object, IN_ROOM(object));
|
||||
(void *)object, IN_ROOM(object));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -720,7 +720,7 @@ void obj_to_obj(struct obj_data *obj, struct obj_data *obj_to)
|
||||
|
||||
if (!obj || !obj_to || obj == obj_to) {
|
||||
log("SYSERR: NULL object (%p) or same source (%p) and target (%p) obj passed to obj_to_obj.",
|
||||
obj, obj, obj_to);
|
||||
(void *)obj, (void *)obj, (void *)obj_to);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ void House_boot(void)
|
||||
}
|
||||
|
||||
/* "House Control" functions */
|
||||
const char *HCONTROL_FORMAT =
|
||||
static const char *HCONTROL_FORMAT =
|
||||
"Usage: hcontrol build <house vnum> <exit direction> <player name>\r\n"
|
||||
" hcontrol destroy <house vnum>\r\n"
|
||||
" hcontrol pay <house vnum>\r\n"
|
||||
|
||||
12
src/ibt.c
12
src/ibt.c
@@ -43,7 +43,7 @@ IBT_DATA * last_idea = NULL;
|
||||
IBT_DATA * first_typo = NULL;
|
||||
IBT_DATA * last_typo = NULL;
|
||||
|
||||
const char *ibt_types[]={
|
||||
static const char *ibt_types[]={
|
||||
"Bug",
|
||||
"Idea",
|
||||
"Typo",
|
||||
@@ -374,7 +374,8 @@ static IBT_DATA *get_last_ibt(int mode)
|
||||
}
|
||||
return (last_ibt);
|
||||
}
|
||||
IBT_DATA *get_ibt_by_num(int mode, int target_num)
|
||||
|
||||
static IBT_DATA *get_ibt_by_num(int mode, int target_num)
|
||||
{
|
||||
int no=0;
|
||||
IBT_DATA *target_ibt, *first_ibt;
|
||||
@@ -391,7 +392,7 @@ IBT_DATA *get_ibt_by_num(int mode, int target_num)
|
||||
}
|
||||
|
||||
/* Search the IBT list, and return true if ibt is found there */
|
||||
bool ibt_in_list(int mode, IBT_DATA *ibt)
|
||||
static bool ibt_in_list(int mode, IBT_DATA *ibt)
|
||||
{
|
||||
IBT_DATA *target_ibt, *first_ibt;
|
||||
|
||||
@@ -407,7 +408,7 @@ bool ibt_in_list(int mode, IBT_DATA *ibt)
|
||||
|
||||
/* Free up an IBT struct, removing it from the list if necessary */
|
||||
/* returns TRUE on success */
|
||||
bool free_ibt(int mode, IBT_DATA *ibtData)
|
||||
static bool free_ibt(int mode, IBT_DATA *ibtData)
|
||||
{
|
||||
if (ibtData == NULL) return FALSE;
|
||||
|
||||
@@ -454,7 +455,8 @@ ACMD(do_ibt)
|
||||
{
|
||||
char arg[MAX_STRING_LENGTH], arg2[MAX_STRING_LENGTH];
|
||||
char buf[MAX_STRING_LENGTH], *arg_text, imp[30], timestr[128];
|
||||
int i, num_res, num_unres, len = 0;
|
||||
int i, num_res, num_unres;
|
||||
size_t len = 0;
|
||||
IBT_DATA *ibtData, *first_ibt, *last_ibt;
|
||||
int ano=0;
|
||||
|
||||
|
||||
@@ -98,6 +98,6 @@ void save_ibt_file(int mode);
|
||||
void load_ibt_file(int mode);
|
||||
void ibtedit_parse(struct descriptor_data *d, char *arg);
|
||||
void ibtedit_string_cleanup(struct descriptor_data *d, int terminator);
|
||||
void free_ibt_lists();
|
||||
void free_ibt_lists(void);
|
||||
void free_olc_ibt(IBT_DATA *toFree);
|
||||
void clean_ibt_list(int mode);
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
**************************************************************************/
|
||||
|
||||
#define __INTERPRETER_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
@@ -105,6 +103,7 @@ cpp_extern const struct command_info cmd_info[] = {
|
||||
|
||||
{ "backstab" , "ba" , POS_STANDING, do_backstab , 1, 0 },
|
||||
{ "ban" , "ban" , POS_DEAD , do_ban , LVL_GRGOD, 0 },
|
||||
{ "bandage" , "band" , POS_RESTING , do_bandage , 1, 0 },
|
||||
{ "balance" , "bal" , POS_STANDING, do_not_here , 1, 0 },
|
||||
{ "bash" , "bas" , POS_FIGHTING, do_bash , 1, 0 },
|
||||
{ "brief" , "br" , POS_DEAD , do_gen_tog , 0, SCMD_BRIEF },
|
||||
@@ -325,6 +324,7 @@ cpp_extern const struct command_info cmd_info[] = {
|
||||
{ "unlock" , "unlock" , POS_SITTING , do_gen_door , 0, SCMD_UNLOCK },
|
||||
{ "unban" , "unban" , POS_DEAD , do_unban , LVL_GRGOD, 0 },
|
||||
{ "unaffect" , "unaffect", POS_DEAD , do_wizutil , LVL_GOD, SCMD_UNAFFECT },
|
||||
{ "unfollow" , "unf" , POS_RESTING , do_unfollow , 0, 0 },
|
||||
{ "uptime" , "uptime" , POS_DEAD , do_date , LVL_GOD, SCMD_UPTIME },
|
||||
{ "use" , "use" , POS_SITTING , do_use , 1, SCMD_USE },
|
||||
{ "users" , "users" , POS_DEAD , do_users , LVL_GOD, 0 },
|
||||
@@ -368,7 +368,7 @@ cpp_extern const struct command_info cmd_info[] = {
|
||||
|
||||
/* Thanks to Melzaren for this change to allow DG Scripts to be attachable
|
||||
*to player's while still disallowing them to manually use the DG-Commands. */
|
||||
const struct mob_script_command_t mob_script_commands[] = {
|
||||
static const struct mob_script_command_t mob_script_commands[] = {
|
||||
|
||||
/* DG trigger commands. minimum_level should be set to -1. */
|
||||
{ "masound" , do_masound , 0 },
|
||||
@@ -420,7 +420,7 @@ int script_command_interpreter(struct char_data *ch, char *arg) {
|
||||
return 1; // We took care of execution. Let caller know.
|
||||
}
|
||||
|
||||
const char *fill[] =
|
||||
static const char *fill[] =
|
||||
{
|
||||
"in",
|
||||
"from",
|
||||
@@ -432,7 +432,7 @@ const char *fill[] =
|
||||
"\n"
|
||||
};
|
||||
|
||||
const char *reserved[] =
|
||||
static const char *reserved[] =
|
||||
{
|
||||
"a",
|
||||
"an",
|
||||
|
||||
@@ -120,13 +120,9 @@ struct alias_data {
|
||||
|
||||
/* Necessary for CMD_IS macro. Borland needs the structure defined first
|
||||
* so it has been moved down here. */
|
||||
/* Global buffering system */
|
||||
#ifndef __INTERPRETER_C__
|
||||
|
||||
extern int *cmd_sort_info;
|
||||
extern struct command_info *complete_cmd_info;
|
||||
extern const struct command_info cmd_info[];
|
||||
|
||||
#endif /* __INTERPRETER_C__ */
|
||||
|
||||
#endif /* _INTERPRETER_H_ */
|
||||
|
||||
14
src/lists.c
14
src/lists.c
@@ -41,7 +41,7 @@ struct list_data * create_list(void)
|
||||
return (pNewList);
|
||||
}
|
||||
|
||||
struct item_data * create_item(void)
|
||||
static struct item_data * create_item(void)
|
||||
{
|
||||
struct item_data *pNewItem;
|
||||
|
||||
@@ -235,18 +235,6 @@ void clear_simple_list(void)
|
||||
pLastList = NULL;
|
||||
}
|
||||
|
||||
/** This is the "For Dummies" function, as although it's not as flexible,
|
||||
* it is even easier applied for list searches then using your own iterators
|
||||
* and next_in_list()
|
||||
* @usage Common usage would be as follows:
|
||||
*
|
||||
* while ((var = (struct XXX_data *) simple_list(XXX_list))) {
|
||||
* blah blah....
|
||||
* }
|
||||
* @return Will return the next list content until it hits the end, in which
|
||||
* will detach itself from the list.
|
||||
* */
|
||||
|
||||
void * simple_list(struct list_data * pList)
|
||||
{
|
||||
void * pContent;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/**
|
||||
* @file msgedit.h
|
||||
*
|
||||
* Copyright 2012 Joseph Arnusch
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -83,8 +83,6 @@ EVENTFUNC(event_countdown)
|
||||
break;
|
||||
case eNULL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -235,39 +233,3 @@ void clear_char_event_list(struct char_data * ch)
|
||||
event_cancel(pEvent);
|
||||
}
|
||||
}
|
||||
|
||||
/* change_event_duration contributed by Ripley */
|
||||
void change_event_duration(struct char_data * ch, event_id iId, long time)
|
||||
{
|
||||
struct event * pEvent;
|
||||
struct mud_event_data * pMudEvent = 0;
|
||||
bool found = FALSE;
|
||||
|
||||
if (ch->events == NULL)
|
||||
return;
|
||||
|
||||
if (ch->events->iSize == 0)
|
||||
return;
|
||||
|
||||
clear_simple_list();
|
||||
|
||||
while ((pEvent = (struct event *) simple_list(ch->events)) != NULL) {
|
||||
if (!pEvent->isMudEvent)
|
||||
continue;
|
||||
|
||||
pMudEvent = (struct mud_event_data * ) pEvent->event_obj;
|
||||
|
||||
if (pMudEvent->iId == iId) {
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (found) {
|
||||
/* So we found the offending event, now build a new one, with the new time */
|
||||
attach_mud_event(new_mud_event(iId, pMudEvent->pStruct, pMudEvent->sVariables), time);
|
||||
event_cancel(pEvent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
20
src/oasis.c
20
src/oasis.c
@@ -28,26 +28,6 @@
|
||||
#include "ibt.h"
|
||||
#include "msgedit.h"
|
||||
|
||||
/* Internal Data Structures */
|
||||
/** @deprecated olc_scmd_info appears to be deprecated. Commented out for now.
|
||||
static struct olc_scmd_info_t {
|
||||
const char *text;
|
||||
int con_type;
|
||||
} olc_scmd_info[] = {
|
||||
{ "room", CON_REDIT },
|
||||
{ "object", CON_OEDIT },
|
||||
{ "zone", CON_ZEDIT },
|
||||
{ "mobile", CON_MEDIT },
|
||||
{ "shop", CON_SEDIT },
|
||||
{ "config", CON_CEDIT },
|
||||
{ "trigger", CON_TRIGEDIT },
|
||||
{ "action", CON_AEDIT },
|
||||
{ "help", CON_HEDIT },
|
||||
{ "quest", CON_QEDIT },
|
||||
{ "\n", -1 }
|
||||
};
|
||||
*/
|
||||
|
||||
/* Global variables defined here, used elsewhere */
|
||||
const char *nrm, *grn, *cyn, *yel;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ static void list_objects(struct char_data *ch, zone_rnum rnum, obj_vnum vmin , o
|
||||
static void list_shops(struct char_data *ch , zone_rnum rnum, shop_vnum vmin, shop_vnum vmax);
|
||||
static void list_zones(struct char_data *ch, zone_rnum rnum, zone_vnum vmin, zone_vnum vmax, char *name);
|
||||
|
||||
void perform_mob_flag_list(struct char_data * ch, char *arg)
|
||||
static void perform_mob_flag_list(struct char_data * ch, char *arg)
|
||||
{
|
||||
int num, mob_flag, found = 0;
|
||||
size_t len;
|
||||
@@ -76,7 +76,7 @@ void perform_mob_flag_list(struct char_data * ch, char *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
void perform_mob_level_list(struct char_data * ch, char *arg)
|
||||
static void perform_mob_level_list(struct char_data * ch, char *arg)
|
||||
{
|
||||
int num, mob_level, found = 0;
|
||||
size_t len;
|
||||
@@ -112,7 +112,7 @@ void perform_mob_level_list(struct char_data * ch, char *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
void add_to_obj_list(struct obj_list_item *lst, int num_items, obj_vnum nvo, int nval)
|
||||
static void add_to_obj_list(struct obj_list_item *lst, int num_items, obj_vnum nvo, int nval)
|
||||
{
|
||||
int j, tmp_v;
|
||||
obj_vnum tmp_ov;
|
||||
@@ -131,7 +131,7 @@ void add_to_obj_list(struct obj_list_item *lst, int num_items, obj_vnum nvo, int
|
||||
}
|
||||
}
|
||||
|
||||
void perform_obj_type_list(struct char_data * ch, char *arg)
|
||||
static void perform_obj_type_list(struct char_data * ch, char *arg)
|
||||
{
|
||||
int num, itemtype, v1, v2, found = 0;
|
||||
size_t len = 0, tmp_len = 0;
|
||||
@@ -246,7 +246,7 @@ void perform_obj_type_list(struct char_data * ch, char *arg)
|
||||
page_string(ch->desc, buf, TRUE);
|
||||
}
|
||||
|
||||
void perform_obj_aff_list(struct char_data * ch, char *arg)
|
||||
static void perform_obj_aff_list(struct char_data * ch, char *arg)
|
||||
{
|
||||
int num, i, apply, v1 = 0, found = 0;
|
||||
size_t len = 0, tmp_len = 0;
|
||||
@@ -331,7 +331,7 @@ void perform_obj_aff_list(struct char_data * ch, char *arg)
|
||||
page_string(ch->desc, buf, TRUE);
|
||||
}
|
||||
|
||||
void perform_obj_name_list(struct char_data * ch, char *arg)
|
||||
static void perform_obj_name_list(struct char_data * ch, char *arg)
|
||||
{
|
||||
int num, found = 0;
|
||||
size_t len = 0, tmp_len = 0;
|
||||
|
||||
@@ -1016,7 +1016,7 @@ obj_save_data *objsave_parse_objects(FILE *fl)
|
||||
/* Do nothing. */
|
||||
} else if (temp != NULL && current->obj != NULL) {
|
||||
if (temp != current->obj)
|
||||
log("inconsistent object pointers in objsave_parse_objects: %p/%p", temp, current->obj);
|
||||
log("inconsistent object pointers in objsave_parse_objects: %p/%p", (void *)temp, (void *)current->obj);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1213,7 +1213,7 @@ static int Crash_load_objs(struct char_data *ch) {
|
||||
|
||||
if (rentcode == RENT_RENTED || rentcode == RENT_TIMEDOUT) {
|
||||
sprintf(str, "%d", SECS_PER_REAL_DAY);
|
||||
num_of_days = (int)((float) (time(0) - timed) / (float)atoi(str));
|
||||
num_of_days = (int)((float) (time(0) - timed) / atoi(str));
|
||||
cost = (unsigned int) (netcost * num_of_days);
|
||||
if (cost > (unsigned int)GET_GOLD(ch) + (unsigned int)GET_BANK_GOLD(ch)) {
|
||||
fclose(fl);
|
||||
|
||||
@@ -34,17 +34,6 @@
|
||||
#define PT_FLAGS(i) (player_table[(i)].flags)
|
||||
#define PT_LLAST(i) (player_table[(i)].last)
|
||||
|
||||
/* 'global' vars defined here and used externally */
|
||||
/** @deprecated Since this file really is basically a functional extension
|
||||
* of the database handling in db.c, until the day that the mud is broken
|
||||
* down to be less monolithic, I don't see why the following should be defined
|
||||
* anywhere but there.
|
||||
struct player_index_element *player_table = NULL;
|
||||
int top_of_p_table = 0;
|
||||
int top_of_p_file = 0;
|
||||
long top_idnum = 0;
|
||||
*/
|
||||
|
||||
/* local functions */
|
||||
static void load_affects(FILE *fl, struct char_data *ch);
|
||||
static void load_skills(FILE *fl, struct char_data *ch);
|
||||
@@ -127,7 +116,7 @@ int create_entry(char *name)
|
||||
|
||||
/* Remove an entry from the in-memory player index table. *
|
||||
* Requires the 'pos' value returned by the get_ptable_by_name function */
|
||||
void remove_player_from_index(int pos)
|
||||
static void remove_player_from_index(int pos)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ static void Write( descriptor_t *apDescriptor, const char *apData )
|
||||
{
|
||||
if ( apDescriptor != NULL)
|
||||
{
|
||||
if ( apDescriptor->pProtocol->WriteOOB > 0)
|
||||
if ( apDescriptor->pProtocol->WriteOOB > 0 || *(apDescriptor->output) == '\0' )
|
||||
{
|
||||
apDescriptor->pProtocol->WriteOOB = 2;
|
||||
}
|
||||
@@ -2498,15 +2498,19 @@ static bool_t IsValidColour( const char *apArgument )
|
||||
|
||||
static bool_t MatchString( const char *apFirst, const char *apSecond )
|
||||
{
|
||||
while ( *apFirst && tolower(*apFirst) == tolower(*apSecond) )
|
||||
++apFirst, ++apSecond;
|
||||
while ( *apFirst && tolower(*apFirst) == tolower(*apSecond) ) {
|
||||
++apFirst;
|
||||
++apSecond;
|
||||
}
|
||||
return ( !*apFirst && !*apSecond );
|
||||
}
|
||||
|
||||
static bool_t PrefixString( const char *apPart, const char *apWhole )
|
||||
{
|
||||
while ( *apPart && tolower(*apPart) == tolower(*apWhole) )
|
||||
++apPart, ++apWhole;
|
||||
while ( *apPart && tolower(*apPart) == tolower(*apWhole) ) {
|
||||
++apPart;
|
||||
++apWhole;
|
||||
}
|
||||
return ( !*apPart );
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ typedef struct
|
||||
{
|
||||
const char *pName; /* The name of the MSSP variable */
|
||||
const char *pValue; /* The value of the MSSP variable */
|
||||
const char *(*pFunction)();/* Optional function to return the value */
|
||||
const char *(*pFunction)(void); /* Optional function to return the value */
|
||||
} MSSP_t;
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -352,7 +352,7 @@ static void qedit_disp_menu(struct descriptor_data *d)
|
||||
OLC_MODE(d) = QEDIT_MAIN_MENU;
|
||||
}
|
||||
/* For quest type. */
|
||||
void qedit_disp_type_menu(struct descriptor_data *d)
|
||||
static void qedit_disp_type_menu(struct descriptor_data *d)
|
||||
{
|
||||
clear_screen(d);
|
||||
column_list(d->character, 0, quest_types, NUM_AQ_TYPES, TRUE);
|
||||
@@ -360,7 +360,7 @@ void qedit_disp_type_menu(struct descriptor_data *d)
|
||||
OLC_MODE(d) = QEDIT_TYPES;
|
||||
}
|
||||
/* For quest flags. */
|
||||
void qedit_disp_flag_menu(struct descriptor_data *d)
|
||||
static void qedit_disp_flag_menu(struct descriptor_data *d)
|
||||
{
|
||||
char bits[MAX_STRING_LENGTH];
|
||||
|
||||
|
||||
14
src/quest.c
14
src/quest.c
@@ -8,8 +8,6 @@
|
||||
* Copyright (C) 1997 MS *
|
||||
*********************************************************************** */
|
||||
|
||||
#define __QUEST_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
|
||||
@@ -478,7 +476,7 @@ void list_quests(struct char_data *ch, zone_rnum zone, qst_vnum vmin, qst_vnum v
|
||||
send_to_char(ch, "None found.\r\n");
|
||||
}
|
||||
|
||||
void quest_hist(struct char_data *ch)
|
||||
static void quest_hist(struct char_data *ch)
|
||||
{
|
||||
int i = 0, counter = 0;
|
||||
qst_rnum rnum = NOTHING;
|
||||
@@ -498,7 +496,7 @@ void quest_hist(struct char_data *ch)
|
||||
send_to_char(ch, "You haven't completed any quests yet.\r\n");
|
||||
}
|
||||
|
||||
void quest_join(struct char_data *ch, struct char_data *qm, char argument[MAX_INPUT_LENGTH])
|
||||
static void quest_join(struct char_data *ch, struct char_data *qm, char argument[MAX_INPUT_LENGTH])
|
||||
{
|
||||
qst_vnum vnum;
|
||||
qst_rnum rnum;
|
||||
@@ -582,7 +580,7 @@ void quest_list(struct char_data *ch, struct char_data *qm, char argument[MAX_IN
|
||||
send_to_char(ch, "There is no further information on that quest.\r\n");
|
||||
}
|
||||
|
||||
void quest_quit(struct char_data *ch)
|
||||
static void quest_quit(struct char_data *ch)
|
||||
{
|
||||
qst_rnum rnum;
|
||||
|
||||
@@ -608,7 +606,7 @@ void quest_quit(struct char_data *ch)
|
||||
}
|
||||
}
|
||||
|
||||
void quest_progress(struct char_data *ch)
|
||||
static void quest_progress(struct char_data *ch)
|
||||
{
|
||||
qst_rnum rnum;
|
||||
|
||||
@@ -632,7 +630,7 @@ void quest_progress(struct char_data *ch)
|
||||
}
|
||||
}
|
||||
|
||||
void quest_show(struct char_data *ch, mob_vnum qm)
|
||||
static void quest_show(struct char_data *ch, mob_vnum qm)
|
||||
{
|
||||
qst_rnum rnum;
|
||||
int counter = 0;
|
||||
@@ -650,7 +648,7 @@ void quest_show(struct char_data *ch, mob_vnum qm)
|
||||
send_to_char(ch, "There are no quests available here at the moment.\r\n");
|
||||
}
|
||||
|
||||
void quest_stat(struct char_data *ch, char argument[MAX_STRING_LENGTH])
|
||||
static void quest_stat(struct char_data *ch, char argument[MAX_STRING_LENGTH])
|
||||
{
|
||||
qst_rnum rnum;
|
||||
mob_rnum qmrnum;
|
||||
|
||||
@@ -141,9 +141,7 @@ int save_quests(zone_rnum zone_num);
|
||||
/* ******************************************************************** */
|
||||
|
||||
/* AQ Global Variables ************************************************ */
|
||||
#ifndef __QUEST_C__
|
||||
extern const char *aq_flags[]; /* names for quest flags (quest.c) */
|
||||
extern const char *quest_types[]; /* named for quest types (quest.c) */
|
||||
#endif /* __QUEST_C__ */
|
||||
|
||||
#endif /* _QUEST_H_ */
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* By Jeff Fink. *
|
||||
**************************************************************************/
|
||||
|
||||
#define __SHOP_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
@@ -465,8 +463,8 @@ static int buy_price(struct obj_data *obj, int shop_nr, struct char_data *keeper
|
||||
we don't buy for more than we sell for, to prevent infinite money-making. */
|
||||
static int sell_price(struct obj_data *obj, int shop_nr, struct char_data *keeper, struct char_data *seller)
|
||||
{
|
||||
float sell_cost_modifier = SHOP_SELLPROFIT(shop_nr) * (1 - (GET_CHA(keeper) - GET_CHA(seller)) / (float)70);
|
||||
float buy_cost_modifier = SHOP_BUYPROFIT(shop_nr) * (1 + (GET_CHA(keeper) - GET_CHA(seller)) / (float)70);
|
||||
float sell_cost_modifier = SHOP_SELLPROFIT(shop_nr) * (1 - (GET_CHA(keeper) - GET_CHA(seller)) / 70.0);
|
||||
float buy_cost_modifier = SHOP_BUYPROFIT(shop_nr) * (1 + (GET_CHA(keeper) - GET_CHA(seller)) / 70.0);
|
||||
|
||||
if (sell_cost_modifier > buy_cost_modifier)
|
||||
sell_cost_modifier = buy_cost_modifier;
|
||||
|
||||
@@ -151,11 +151,8 @@ struct stack_data {
|
||||
#define MSG_CANT_KILL_KEEPER "Get out of here before I call the guards!"
|
||||
|
||||
/* Global variables */
|
||||
#ifndef __SHOP_C__
|
||||
|
||||
extern const char *trade_letters[];
|
||||
extern const char *shop_bits[];
|
||||
|
||||
#endif /* __SHOP_C__ */
|
||||
|
||||
#endif /* _SHOP_H_ */
|
||||
|
||||
@@ -172,7 +172,7 @@ struct spec_func_data {
|
||||
SPECIAL(*func);
|
||||
};
|
||||
|
||||
struct spec_func_data spec_func_list[] = {
|
||||
static struct spec_func_data spec_func_list[] = {
|
||||
{"Mayor", mayor },
|
||||
{"Snake", snake },
|
||||
{"Thief", thief },
|
||||
|
||||
@@ -81,7 +81,7 @@ static const char *how_good(int percent)
|
||||
return " (superb)";
|
||||
}
|
||||
|
||||
const char *prac_types[] = {
|
||||
static const char *prac_types[] = {
|
||||
"spell",
|
||||
"skill"
|
||||
};
|
||||
|
||||
@@ -26,12 +26,16 @@ void assign_mobiles(void);
|
||||
void assign_objects(void);
|
||||
void assign_rooms(void);
|
||||
|
||||
#include "structs.h"
|
||||
const char *get_spec_func_name(SPECIAL(*func));
|
||||
|
||||
/*****************************************************************************
|
||||
* Begin Functions and defines for spec_procs.c
|
||||
****************************************************************************/
|
||||
/* Utility functions */
|
||||
void sort_spells(void);
|
||||
void list_skills(struct char_data *ch);
|
||||
|
||||
/* Special functions */
|
||||
SPECIAL(guild);
|
||||
SPECIAL(dump);
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
**************************************************************************/
|
||||
|
||||
#define __SPELL_PARSER_C__
|
||||
|
||||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
#include "structs.h"
|
||||
@@ -958,5 +956,6 @@ void mag_assign_spells(void)
|
||||
skillo(SKILL_STEAL, "steal");
|
||||
skillo(SKILL_TRACK, "track");
|
||||
skillo(SKILL_WHIRLWIND, "whirlwind");
|
||||
skillo(SKILL_BANDAGE, "bandage");
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ ASPELL(spell_summon)
|
||||
}
|
||||
|
||||
/* Used by the locate object spell to check the alias list on objects */
|
||||
int isname_obj(char *search, char *list)
|
||||
static int isname_obj(char *search, char *list)
|
||||
{
|
||||
char *found_in_list; /* But could be something like 'ring' in 'shimmering.' */
|
||||
char searchname[128];
|
||||
|
||||
10
src/spells.h
10
src/spells.h
@@ -109,7 +109,9 @@
|
||||
#define SKILL_RESCUE 137 /* Reserved Skill[] DO NOT CHANGE */
|
||||
#define SKILL_SNEAK 138 /* Reserved Skill[] DO NOT CHANGE */
|
||||
#define SKILL_STEAL 139 /* Reserved Skill[] DO NOT CHANGE */
|
||||
#define SKILL_TRACK 140 /* Reserved Skill[] DO NOT CHANGE */
|
||||
#define SKILL_TRACK 140 /* Reserved Skill[] DO NOT CHANGE */
|
||||
#define SKILL_BANDAGE 141 /* Reserved Skill[] DO NOT CHANGE */
|
||||
|
||||
/* New skills may be added here up to MAX_SKILLS (200) */
|
||||
|
||||
/* NON-PLAYER AND OBJECT SPELLS AND SKILLS: The practice levels for the spells
|
||||
@@ -282,13 +284,9 @@ ACMD(do_cast);
|
||||
void unused_spell(int spl);
|
||||
void mag_assign_spells(void);
|
||||
|
||||
/* Global variables exported */
|
||||
#ifndef __SPELL_PARSER_C__
|
||||
|
||||
/* Global variables */
|
||||
extern struct spell_info_type spell_info[];
|
||||
extern char cast_arg2[];
|
||||
extern const char *unused_spellname;
|
||||
|
||||
#endif /* __SPELL_PARSER_C__ */
|
||||
|
||||
#endif /* _SPELLS_H_ */
|
||||
|
||||
@@ -15,15 +15,6 @@
|
||||
#include "protocol.h" /* Kavir Plugin*/
|
||||
#include "lists.h"
|
||||
|
||||
/** Intended use of this macro is to allow external packages to work with a
|
||||
* variety of versions without modifications. For instance, an IS_CORPSE()
|
||||
* macro was introduced in pl13. Any future code add-ons could take into
|
||||
* account the version and supply their own definition for the macro if used
|
||||
* on an older version. You are supposed to compare this with the macro
|
||||
* TBAMUD_VERSION() in utils.h.
|
||||
* It is read as Major/Minor/Patchlevel - MMmmPP */
|
||||
#define _TBAMUD 0x030680
|
||||
|
||||
/** If you want equipment to be automatically equipped to the same place
|
||||
* it was when players rented, set the define below to 1 because
|
||||
* TRUE/FALSE aren't defined yet. */
|
||||
|
||||
15
src/sysdep.h
15
src/sysdep.h
@@ -171,9 +171,6 @@ extern void abort (), exit ();
|
||||
#define assert(arg)
|
||||
#endif
|
||||
|
||||
/* Header files only used in comm.c and some of the utils */
|
||||
#if defined(__COMM_C__) || defined(CIRCLE_UTIL)
|
||||
|
||||
#ifndef HAVE_STRUCT_IN_ADDR
|
||||
struct in_addr {
|
||||
unsigned long int s_addr; /* for inet_addr, etc. */
|
||||
@@ -230,17 +227,10 @@ struct in_addr {
|
||||
# include <sys/uio.h>
|
||||
#endif
|
||||
|
||||
#endif /* __COMM_C__ && CIRCLE_UNIX */
|
||||
|
||||
/* Header files that are only used in act.other.c */
|
||||
#ifdef __ACT_OTHER_C__
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#endif /* __ACT_OTHER_C__ */
|
||||
|
||||
/* Basic system dependencies. */
|
||||
#if CIRCLE_GNU_LIBC_MEMORY_TRACK && !defined(HAVE_MCHECK_H)
|
||||
#error "Cannot use GNU C library memory tracking without <mcheck.h>"
|
||||
@@ -464,9 +454,6 @@ struct in_addr {
|
||||
int remove(const char *path);
|
||||
#endif
|
||||
|
||||
/* Function prototypes that are only used in comm.c and some of the utils */
|
||||
#if defined(__COMM_C__) || defined(CIRCLE_UTIL)
|
||||
|
||||
#ifdef NEED_ACCEPT_PROTO
|
||||
int accept(socket_t s, struct sockaddr *addr, int *addrlen);
|
||||
#endif
|
||||
@@ -574,8 +561,6 @@ struct in_addr {
|
||||
ssize_t write(int fildes, const void *buf, size_t nbyte);
|
||||
#endif
|
||||
|
||||
#endif /* __COMM_C__ */
|
||||
|
||||
#endif /* NO_LIBRARY_PROTOTYPES */
|
||||
|
||||
#endif /* _SYSDEP_H_ */
|
||||
|
||||
108
src/utils.c
108
src/utils.c
@@ -26,8 +26,7 @@
|
||||
|
||||
/** Aportable random number function.
|
||||
* @param from The lower bounds of the random number.
|
||||
* @param to The upper bounds of the random number.
|
||||
* @retval int The resulting randomly generated number. */
|
||||
* @param to The upper bounds of the random number. */
|
||||
int rand_number(int from, int to)
|
||||
{
|
||||
/* error checking in case people call this incorrectly */
|
||||
@@ -50,8 +49,7 @@ int rand_number(int from, int to)
|
||||
/** Simulates a single dice roll from one to many of a certain sized die.
|
||||
* @param num The number of dice to roll.
|
||||
* @param size The number of sides each die has, and hence the number range
|
||||
* of the die.
|
||||
* @retval int The sum of all the dice rolled. A random number. */
|
||||
* of the die. */
|
||||
int dice(int num, int size)
|
||||
{
|
||||
int sum = 0;
|
||||
@@ -67,8 +65,7 @@ int dice(int num, int size)
|
||||
|
||||
/** Return the smaller number. Original note: Be wary of sign issues with this.
|
||||
* @param a The first number.
|
||||
* @param b The second number.
|
||||
* @retval int The smaller of the two, a or b. */
|
||||
* @param b The second number. */
|
||||
int MIN(int a, int b)
|
||||
{
|
||||
return (a < b ? a : b);
|
||||
@@ -76,16 +73,14 @@ int MIN(int a, int b)
|
||||
|
||||
/** Return the larger number. Original note: Be wary of sign issues with this.
|
||||
* @param a The first number.
|
||||
* @param b The second number.
|
||||
* @retval int The larger of the two, a or b. */
|
||||
* @param b The second number. */
|
||||
int MAX(int a, int b)
|
||||
{
|
||||
return (a > b ? a : b);
|
||||
}
|
||||
|
||||
/** Used to capitalize a string. Will not change any mud specific color codes.
|
||||
* @param txt The string to capitalize.
|
||||
* @retval char* Pointer to the capitalized string. */
|
||||
* @param txt The string to capitalize. */
|
||||
char *CAP(char *txt)
|
||||
{
|
||||
char *p = txt;
|
||||
@@ -132,9 +127,9 @@ char *strdup(const char *source)
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Strips "\r\n" from just the end of a string. Will not remove internal
|
||||
* "\r\n" values to the string.
|
||||
* @post Replaces any "\r\n" values at the end of the string with null.
|
||||
/** Strips "\\r\\n" from just the end of a string. Will not remove internal
|
||||
* "\\r\\n" values to the string.
|
||||
* @post Replaces any "\\r\\n" values at the end of the string with null.
|
||||
* @param txt The writable string to prune. */
|
||||
void prune_crlf(char *txt)
|
||||
{
|
||||
@@ -153,7 +148,7 @@ int str_cmp(const char *arg1, const char *arg2)
|
||||
int chk, i;
|
||||
|
||||
if (arg1 == NULL || arg2 == NULL) {
|
||||
log("SYSERR: str_cmp() passed a NULL pointer, %p or %p.", arg1, arg2);
|
||||
log("SYSERR: str_cmp() passed a NULL pointer, %p or %p.", (void *)arg1, (void *)arg2);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -174,7 +169,7 @@ int strn_cmp(const char *arg1, const char *arg2, int n)
|
||||
int chk, i;
|
||||
|
||||
if (arg1 == NULL || arg2 == NULL) {
|
||||
log("SYSERR: strn_cmp() passed a NULL pointer, %p or %p.", arg1, arg2);
|
||||
log("SYSERR: strn_cmp() passed a NULL pointer, %p or %p.", (void *)arg1, (void *)arg2);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -233,9 +228,7 @@ void basic_mud_log(const char *format, ...)
|
||||
/** Essentially the touch command. Create an empty file or update the modified
|
||||
* time of a file.
|
||||
* @param path The filepath to "touch." This filepath is relative to the /lib
|
||||
* directory relative to the root of the mud distribution.
|
||||
* @retval int 0 on a success, -1 on a failure; standard system call exit
|
||||
* values. */
|
||||
* directory relative to the root of the mud distribution. */
|
||||
int touch(const char *path)
|
||||
{
|
||||
FILE *fl;
|
||||
@@ -302,12 +295,12 @@ void mudlog(int type, int level, int file, const char *str, ...)
|
||||
/** Take a bitvector and return a human readable
|
||||
* description of which bits are set in it.
|
||||
* @pre The final element in the names array must contain a one character
|
||||
* string consisting of a single newline character "\n". Caller of function is
|
||||
* string consisting of a single newline character "\\n". Caller of function is
|
||||
* responsible for creating the memory buffer for the result string.
|
||||
* @param[in] bitvector The bitvector to test for set bits.
|
||||
* @param[in] names An array of human readable strings describing each possible
|
||||
* bit. The final element in this array must be a string made of a single
|
||||
* newline character (eg "\n").
|
||||
* newline character (eg "\\n").
|
||||
* If you don't have a 'const' array for the names param, cast it as such.
|
||||
* @param[out] result Holds the names of the set bits in bitvector. The bit
|
||||
* names will be delimited by a single space.
|
||||
@@ -315,8 +308,7 @@ void mudlog(int type, int level, int file, const char *str, ...)
|
||||
* Will be set to "NOBITS" if no bits are set in bitvector (ie bitvector = 0).
|
||||
* @param[in] reslen The length of the available memory in the result buffer.
|
||||
* Ideally, results will be large enough to hold the description of every bit
|
||||
* that could possibly be set in bitvector.
|
||||
* @retval size_t The length of the string copied into result. */
|
||||
* that could possibly be set in bitvector. */
|
||||
size_t sprintbit(bitvector_t bitvector, const char *names[], char *result, size_t reslen)
|
||||
{
|
||||
size_t len = 0;
|
||||
@@ -345,18 +337,17 @@ size_t sprintbit(bitvector_t bitvector, const char *names[], char *result, size_
|
||||
|
||||
/** Return the human readable name of a defined type.
|
||||
* @pre The final element in the names array must contain a one character
|
||||
* string consisting of a single newline character "\n". Caller of function is
|
||||
* string consisting of a single newline character "\\n". Caller of function is
|
||||
* responsible for creating the memory buffer for the result string.
|
||||
* @param[in] type The type number to be translated.
|
||||
* @param[in] names An array of human readable strings describing each possible
|
||||
* bit. The final element in this array must be a string made of a single
|
||||
* newline character (eg "\n").
|
||||
* newline character (eg "\\n").
|
||||
* @param[out] result Holds the translated name of the type.
|
||||
* Caller of sprintbit is responsible for creating the buffer for result.
|
||||
* Will be set to "UNDEFINED" if the type is greater than the number of names
|
||||
* available.
|
||||
* @param[in] reslen The length of the available memory in the result buffer.
|
||||
* @retval size_t The length of the string copied into result. */
|
||||
* @param[in] reslen The length of the available memory in the result buffer. */
|
||||
size_t sprinttype(int type, const char *names[], char *result, size_t reslen)
|
||||
{
|
||||
int nr = 0;
|
||||
@@ -372,14 +363,14 @@ size_t sprinttype(int type, const char *names[], char *result, size_t reslen)
|
||||
/** Take a bitarray and return a human readable description of which bits are
|
||||
* set in it.
|
||||
* @pre The final element in the names array must contain a one character
|
||||
* string consisting of a single newline character "\n". Caller of function is
|
||||
* string consisting of a single newline character "\\n". Caller of function is
|
||||
* responsible for creating the memory buffer for the result string large enough
|
||||
* to hold all possible bit translations. There is no error checking for
|
||||
* possible array overflow for result.
|
||||
* @param[in] bitvector The bitarray in which to test for set bits.
|
||||
* @param[in] names An array of human readable strings describing each possible
|
||||
* bit. The final element in this array must be a string made of a single
|
||||
* newline character (eg "\n").
|
||||
* newline character (eg "\\n").
|
||||
* If you don't have a 'const' array for the names param, cast it as such.
|
||||
* @param[in] maxar The number of 'bytes' in the bitarray. This number will
|
||||
* usually be pre-defined for the particular bitarray you are using.
|
||||
@@ -427,10 +418,7 @@ void sprintbitarray(int bitvector[], const char *names[], int maxar, char *resul
|
||||
* @todo Recommend making this function foresightedly useful by calculating
|
||||
* real months and years, too.
|
||||
* @param t2 The later time.
|
||||
* @param t1 The earlier time.
|
||||
* @retval time_info_data The real hours and days passed between t2 and t1. Only
|
||||
* the hours and days are returned, months and years are ignored and returned
|
||||
* as -1 values. */
|
||||
* @param t1 The earlier time. */
|
||||
struct time_info_data *real_time_passed(time_t t2, time_t t1)
|
||||
{
|
||||
long secs;
|
||||
@@ -452,10 +440,7 @@ struct time_info_data *real_time_passed(time_t t2, time_t t1)
|
||||
|
||||
/** Calculate the MUD time passed between two time invervals.
|
||||
* @param t2 The later time.
|
||||
* @param t1 The earlier time.
|
||||
* @retval time_info_data A pointer to the mud hours, days, months and years
|
||||
* that have passed between the two time intervals. DO NOT FREE the structure
|
||||
* pointed to by the return value. */
|
||||
* @param t1 The earlier time. */
|
||||
struct time_info_data *mud_time_passed(time_t t2, time_t t1)
|
||||
{
|
||||
long secs;
|
||||
@@ -478,9 +463,7 @@ struct time_info_data *mud_time_passed(time_t t2, time_t t1)
|
||||
}
|
||||
|
||||
/** Translate the current mud time to real seconds (in type time_t).
|
||||
* @param now The current mud time to translate into a real time unit.
|
||||
* @retval time_t The real time that would have had to have passed
|
||||
* to represent the mud time represented by the now parameter. */
|
||||
* @param now The current mud time to translate into a real time unit. */
|
||||
time_t mud_time_to_secs(struct time_info_data *now)
|
||||
{
|
||||
time_t when = 0;
|
||||
@@ -495,9 +478,7 @@ time_t mud_time_to_secs(struct time_info_data *now)
|
||||
/** Calculate a player's MUD age.
|
||||
* @todo The minimum starting age of 17 is hardcoded in this function. Recommend
|
||||
* changing the minimum age to a property (variable) external to this function.
|
||||
* @param ch A valid player character.
|
||||
* @retval time_info_data A pointer to the mud age in years of the player
|
||||
* character. DO NOT FREE the structure pointed to by the return value. */
|
||||
* @param ch A valid player character. */
|
||||
struct time_info_data *age(struct char_data *ch)
|
||||
{
|
||||
static struct time_info_data player_age;
|
||||
@@ -513,9 +494,7 @@ struct time_info_data *age(struct char_data *ch)
|
||||
* essence, this prevents someone from following a character in a group that
|
||||
* is already being lead by the character.
|
||||
* @param ch The character trying to follow.
|
||||
* @param victim The character being followed.
|
||||
* @retval bool TRUE if ch is already leading someone in victims group, FALSE
|
||||
* if it is okay for ch to follow victim. */
|
||||
* @param victim The character being followed. */
|
||||
bool circle_follow(struct char_data *ch, struct char_data *victim)
|
||||
{
|
||||
struct char_data *k;
|
||||
@@ -556,7 +535,8 @@ void stop_follower(struct char_data *ch)
|
||||
} else {
|
||||
act("You stop following $N.", FALSE, ch, 0, ch->master, TO_CHAR);
|
||||
act("$n stops following $N.", TRUE, ch, 0, ch->master, TO_NOTVICT);
|
||||
act("$n stops following you.", TRUE, ch, 0, ch->master, TO_VICT);
|
||||
if (CAN_SEE(ch->master, ch))
|
||||
act("$n stops following you.", TRUE, ch, 0, ch->master, TO_VICT);
|
||||
}
|
||||
|
||||
if (ch->master->followers->follower == ch) { /* Head of follower-list? */
|
||||
@@ -578,7 +558,6 @@ void stop_follower(struct char_data *ch)
|
||||
/** Finds the number of follows that are following, and charmed by, the
|
||||
* character (PC or NPC).
|
||||
* @param ch The character to check for charmed followers.
|
||||
* @retval int The number of followers that are also charmed by the character.
|
||||
*/
|
||||
int num_followers_charmed(struct char_data *ch)
|
||||
{
|
||||
@@ -649,8 +628,7 @@ void add_follower(struct char_data *ch, struct char_data *leader)
|
||||
* returned in buf.
|
||||
* @param[in] fl The file to be read from.
|
||||
* @param[out] buf The next non-blank line read from the file. Buffer given must
|
||||
* be at least READ_SIZE (256) characters large.
|
||||
* @retval int The number of lines advanced in the file. */
|
||||
* be at least READ_SIZE (256) characters large. */
|
||||
int get_line(FILE *fl, char *buf)
|
||||
{
|
||||
char temp[READ_SIZE];
|
||||
@@ -685,8 +663,7 @@ int get_line(FILE *fl, char *buf)
|
||||
* @param[in] mode What type of files can be created. Currently, recognized
|
||||
* modes are CRASH_FILE, ETEXT_FILE, SCRIPT_VARS_FILE and PLR_FILE.
|
||||
* @param[in] orig_name The player name to create the filepath (of type mode)
|
||||
* for.
|
||||
* @retval int 0 if filename cannot be created, 1 if it can. */
|
||||
* for. */
|
||||
int get_filename(char *filename, size_t fbufsize, int mode, const char *orig_name)
|
||||
{
|
||||
const char *prefix, *middle, *suffix;
|
||||
@@ -694,7 +671,7 @@ int get_filename(char *filename, size_t fbufsize, int mode, const char *orig_nam
|
||||
|
||||
if (orig_name == NULL || *orig_name == '\0' || filename == NULL) {
|
||||
log("SYSERR: NULL pointer or empty string passed to get_filename(), %p or %p.",
|
||||
orig_name, filename);
|
||||
(const void *)orig_name, (void *)filename);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -796,8 +773,7 @@ void core_dump_real(const char *who, int line)
|
||||
|
||||
/** Count the number bytes taken up by color codes in a string that will be
|
||||
* empty space once the color codes are converted and made non-printable.
|
||||
* @param string The string in which to check for color codes.
|
||||
* @retval int the number of color codes found. */
|
||||
* @param string The string in which to check for color codes. */
|
||||
int count_color_chars(char *string)
|
||||
{
|
||||
int i, len;
|
||||
@@ -855,8 +831,7 @@ int count_non_protocol_chars(char * str)
|
||||
* Inside and City rooms are always lit. Outside rooms are dark at sunset and
|
||||
* night.
|
||||
* @todo Make the return value a bool.
|
||||
* @param room The real room to test for.
|
||||
* @retval int FALSE if the room is lit, TRUE if the room is dark. */
|
||||
* @param room The real room to test for. */
|
||||
int room_is_dark(room_rnum room)
|
||||
{
|
||||
if (!VALID_ROOM_RNUM(room)) {
|
||||
@@ -886,8 +861,7 @@ int room_is_dark(room_rnum room)
|
||||
* down the possible choices. For more information about Levenshtein distance,
|
||||
* recommend doing an internet or wikipedia search.
|
||||
* @param s1 The input string.
|
||||
* @param s2 The string to be compared to.
|
||||
* @retval int The Levenshtein distance between s1 and s2. */
|
||||
* @param s2 The string to be compared to. */
|
||||
int levenshtein_distance(const char *s1, const char *s2)
|
||||
{
|
||||
int **d, i, j;
|
||||
@@ -1049,8 +1023,6 @@ void column_list(struct char_data *ch, int num_cols, const char **list, int list
|
||||
* @param flag_list An array of flag name strings. The final element must
|
||||
* be a string made up of a single newline.
|
||||
* @param flag_name The name to search in flag_list.
|
||||
* @retval int Returns the element number in flag_list of flag_name or
|
||||
* NOFLAG (-1) if no match.
|
||||
*/
|
||||
int get_flag_by_name(const char *flag_list[], char *flag_name)
|
||||
{
|
||||
@@ -1078,10 +1050,6 @@ int get_flag_by_name(const char *flag_list[], char *flag_name)
|
||||
* @param[in] bufsize The total size of the buffer.
|
||||
* @param[in] lines_to_read The number of lines to be read from the front of
|
||||
* the file.
|
||||
* @retval int The number of lines actually read from the file. Can be used
|
||||
* the compare with the number of lines requested to be read to determine if the
|
||||
* entire file was read. If lines_to_read is <= 0, no processing occurs
|
||||
* and lines_to_read is returned.
|
||||
*/
|
||||
int file_head( FILE *file, char *buf, size_t bufsize, int lines_to_read )
|
||||
{
|
||||
@@ -1159,10 +1127,6 @@ int file_head( FILE *file, char *buf, size_t bufsize, int lines_to_read )
|
||||
* @param[in] bufsize The total size of the buffer.
|
||||
* @param[in] lines_to_read The number of lines to be read from the back of
|
||||
* the file.
|
||||
* @retval int The number of lines actually read from the file. Can be used
|
||||
* the compare with the number of lines requested to be read to determine if the
|
||||
* entire file was read. If lines_to_read is <= 0, no processing occurs
|
||||
* and lines_to_read is returned.
|
||||
*/
|
||||
int file_tail( FILE *file, char *buf, size_t bufsize, int lines_to_read )
|
||||
{
|
||||
@@ -1244,8 +1208,6 @@ int file_tail( FILE *file, char *buf, size_t bufsize, int lines_to_read )
|
||||
* @pre file parameter must already be opened.
|
||||
* @post file will be rewound.
|
||||
* @param file The file to determine the size of.
|
||||
* @retval size_t The byte size of the file (we assume no errors will be
|
||||
* encountered in this function).
|
||||
*/
|
||||
size_t file_sizeof( FILE *file )
|
||||
{
|
||||
@@ -1269,14 +1231,12 @@ size_t file_sizeof( FILE *file )
|
||||
return numbytes;
|
||||
}
|
||||
|
||||
/** Returns the number of newlines '\n' in a file, which we equate to number of
|
||||
/** Returns the number of newlines "\\n" in a file, which we equate to number of
|
||||
* lines. We assume the int type more than adequate to count the number of lines
|
||||
* and do not make checks for overrunning INT_MAX.
|
||||
* @pre file parameter must already be opened.
|
||||
* @post file will be rewound.
|
||||
* @param file The file to determine the size of.
|
||||
* @retval size_t The byte size of the file (we assume no errors will be
|
||||
* encountered in this function).
|
||||
*/
|
||||
int file_numlines( FILE *file )
|
||||
{
|
||||
@@ -1305,7 +1265,6 @@ int file_numlines( FILE *file )
|
||||
* @pre Assumes that NOWHERE, NOTHING, NOBODY, NOFLAG, etc are all equal.
|
||||
* @param str_to_conv A string of characters to attempt to convert to an
|
||||
* IDXTYPE number.
|
||||
* @retval IDXTYPE A valid index number, or NOWHERE if not valid.
|
||||
*/
|
||||
IDXTYPE atoidx( const char *str_to_conv )
|
||||
{
|
||||
@@ -1456,7 +1415,6 @@ char *strfrmt(char *str, int w, int h, int justify, int hpad, int vpad)
|
||||
@param str1 The string to be displayed on the left.
|
||||
@param str2 The string to be displayed on the right.
|
||||
@param joiner ???.
|
||||
@retval char * Pointer to the output to be displayed?
|
||||
*/
|
||||
char *strpaste(char *str1, char *str2, char *joiner)
|
||||
{
|
||||
|
||||
@@ -371,7 +371,7 @@ static int start_change_command(struct descriptor_data *d, int pos)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
void zedit_disp_flag_menu(struct descriptor_data *d)
|
||||
static void zedit_disp_flag_menu(struct descriptor_data *d)
|
||||
{
|
||||
char bits[MAX_STRING_LENGTH];
|
||||
|
||||
@@ -385,7 +385,7 @@ void zedit_disp_flag_menu(struct descriptor_data *d)
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
bool zedit_get_levels(struct descriptor_data *d, char *buf)
|
||||
static bool zedit_get_levels(struct descriptor_data *d, char *buf)
|
||||
{
|
||||
/* Create a string for the recommended levels for this zone. */
|
||||
if ((OLC_ZONE(d)->min_level == -1) && (OLC_ZONE(d)->max_level == -1)) {
|
||||
@@ -688,7 +688,7 @@ static void zedit_disp_arg3(struct descriptor_data *d)
|
||||
/*
|
||||
* Print the recommended levels menu and setup response catch.
|
||||
*/
|
||||
void zedit_disp_levels(struct descriptor_data *d)
|
||||
static void zedit_disp_levels(struct descriptor_data *d)
|
||||
{
|
||||
char lev_string[50];
|
||||
bool levels_set = FALSE;
|
||||
|
||||
@@ -30,7 +30,7 @@ static unsigned char endPad[4] = {
|
||||
0xde, 0xad, 0xde, 0xad };
|
||||
#endif
|
||||
|
||||
FILE *zfd = NULL;
|
||||
static FILE *zfd = NULL;
|
||||
|
||||
typedef struct meminfo {
|
||||
struct meminfo *next;
|
||||
@@ -49,7 +49,7 @@ static meminfo *memlist[NUM_ZBUCKETS];
|
||||
* 2 = errors with dumps
|
||||
* 3 = all of the above plus all mallocs/frees
|
||||
*/
|
||||
int zmalloclogging = 2;
|
||||
static int zmalloclogging = 2;
|
||||
|
||||
/* functions: */
|
||||
unsigned char *zmalloc(int len, char *file, int line);
|
||||
@@ -129,7 +129,7 @@ unsigned char *zmalloc(int len, char *file, int line)
|
||||
#endif
|
||||
|
||||
if (zmalloclogging > 2)
|
||||
fprintf(zfd,"zmalloc: 0x%p %d bytes %s:%d\n", ret, len, file, line);
|
||||
fprintf(zfd,"zmalloc: 0x%p %d bytes %s:%d\n", (void *)ret, len, file, line);
|
||||
|
||||
m = (meminfo *) calloc(1, sizeof(meminfo));
|
||||
if (!m) {
|
||||
@@ -167,7 +167,7 @@ unsigned char *zrealloc(unsigned char *what, int len, char *file, int line)
|
||||
if (!ret) {
|
||||
fprintf(zfd,"zrealloc: FAILED for 0x%p %d bytes mallocd at %s:%d,\n"
|
||||
" %d bytes reallocd at %s:%d.\n",
|
||||
m->addr, m->size, m->file, m->line, len, file, line);
|
||||
(void *)m->addr, m->size, m->file, m->line, len, file, line);
|
||||
if (zmalloclogging > 1) zdump(m);
|
||||
return NULL;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ unsigned char *zrealloc(unsigned char *what, int len, char *file, int line)
|
||||
#endif
|
||||
if (zmalloclogging > 2)
|
||||
fprintf(zfd,"zrealloc: 0x%p %d bytes mallocd at %s:%d, %d bytes reallocd at %s:%d.\n",
|
||||
m->addr, m->size, m->file, m->line, len, file, line);
|
||||
(void *)m->addr, m->size, m->file, m->line, len, file, line);
|
||||
|
||||
m->addr = ret;
|
||||
m->size = len;
|
||||
@@ -206,7 +206,7 @@ unsigned char *zrealloc(unsigned char *what, int len, char *file, int line)
|
||||
|
||||
/* NULL or invalid pointer given */
|
||||
fprintf(zfd,"zrealloc: invalid pointer 0x%p, %d bytes to realloc at %s:%d.\n",
|
||||
what, len, file, line);
|
||||
(void *)what, len, file, line);
|
||||
|
||||
return (zmalloc(len, file, line));
|
||||
}
|
||||
@@ -228,7 +228,7 @@ void zfree(unsigned char *what, char *file, int line)
|
||||
/* got it. Print it if verbose: */
|
||||
if (zmalloclogging > 2) {
|
||||
fprintf(zfd,"zfree: Freed 0x%p %d bytes mallocd at %s:%d, freed at %s:%d\n",
|
||||
m->addr, m->size, m->file, m->line, file, line);
|
||||
(void *)m->addr, m->size, m->file, m->line, file, line);
|
||||
}
|
||||
/* check the padding: */
|
||||
pad_check(m);
|
||||
@@ -240,7 +240,7 @@ void zfree(unsigned char *what, char *file, int line)
|
||||
if (m->frees > 1) {
|
||||
fprintf(zfd,"zfree: ERR: multiple frees! 0x%p %d bytes\n"
|
||||
" mallocd at %s:%d, freed at %s:%d.\n",
|
||||
m->addr, m->size, m->file, m->line, file, line);
|
||||
(void *)m->addr, m->size, m->file, m->line, file, line);
|
||||
if (zmalloclogging > 1) zdump(m);
|
||||
}
|
||||
gotit++;
|
||||
@@ -249,11 +249,11 @@ void zfree(unsigned char *what, char *file, int line)
|
||||
|
||||
if (!gotit) {
|
||||
fprintf(zfd,"zfree: ERR: attempt to free unallocated memory 0x%p at %s:%d.\n",
|
||||
what, file, line);
|
||||
(void *)what, file, line);
|
||||
}
|
||||
if (gotit > 1) {
|
||||
/* this shouldn't happen, eh? */
|
||||
fprintf(zfd,"zfree: ERR: Multiply-allocd memory 0x%p.\n", what);
|
||||
fprintf(zfd,"zfree: ERR: Multiply-allocd memory 0x%p.\n", (void *)what);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ void zmalloc_check()
|
||||
next_m = m->next;
|
||||
if (m->addr != 0 && m->frees <= 0) {
|
||||
fprintf(zfd,"zmalloc: UNfreed memory 0x%p %d bytes mallocd at %s:%d\n",
|
||||
m->addr, m->size, m->file, m->line);
|
||||
(void *)m->addr, m->size, m->file, m->line);
|
||||
if (zmalloclogging > 1) zdump(m);
|
||||
|
||||
/* check padding on un-freed memory too: */
|
||||
|
||||
Reference in New Issue
Block a user