mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
MUD 3.53
[Sep 13 2007] - Rumble Changed binary search functions (real_xxxx, real_zone_by_thing), except real_shop. (thanks Neme) script_proto list freed when exiting without saving in oedit/medit/redit. (thanks Neme) dg_olc.c, trigedit_save(): trig name and arg duping removed. (thanks Neme) genobj.c, update_all_obects(): object ID copied, no more 0 uid. (thanks Neme) CLEANUP_ALL in redit after saving a room. (thanks Neme) new function in genolc.c: free_save_list(), called during shutdown. (thanks Neme) Event_free_all() now frees all events. (thanks Neme) Fixed memory leak in perform_act(). (thanks Rhade) Changed NUM_BOARDS from 10 to 7 (the actual num of boards). (thanks Neme) Removed the Keywords option in hedit since they have to be in the body. [Sep 12 2007] - Rumble Fixed crash bug caused by olist with no objects. (Thanks Rhade) Several changes made to compile clean on older versions of GCC. (Thanks Neme) ?Sep 10 2007] - Rumble Fixed items with rnum = NOTHING or NOBODY being changed to rnum = 0. (Thanks Neme) Fixed memory leak in dg_olc.c trigedit save. (Thanks Neme) [Sep 04 2007] - Rumble Changed CLSOLC to LVL_BUILDER. removed delete_doubledollar from do_say. (thanks Rhade) [Sep 01 2007] - Rumble Made Puff a hidden mob since she is used on room entry trigs to do dg_cast. Fixed dg_affect to not add 1 to the desired affect duration. Fixed dg_affect to work with 128 bits.
This commit is contained in:
parent
f95bff93e5
commit
6c84a36236
54 changed files with 14481 additions and 14187 deletions
39
changelog
39
changelog
|
@ -5,9 +5,46 @@ The Builder Academy
|
|||
builderacademy.net 9091
|
||||
|
||||
tbaMUD 3.53
|
||||
[Jun 28 2007]
|
||||
[Sep 13 2007] - Rumble
|
||||
Changed binary search functions (real_xxxx, real_zone_by_thing), except real_shop. (thanks Neme)
|
||||
script_proto list freed when exiting without saving in oedit/medit/redit. (thanks Neme)
|
||||
dg_olc.c, trigedit_save(): trig name and arg duping removed. (thanks Neme)
|
||||
genobj.c, update_all_obects(): object ID copied, no more 0 uid. (thanks Neme)
|
||||
CLEANUP_ALL in redit after saving a room. (thanks Neme)
|
||||
new function in genolc.c: free_save_list(), called during shutdown. (thanks Neme)
|
||||
Event_free_all() now frees all events. (thanks Neme)
|
||||
Fixed memory leak in perform_act(). (thanks Rhade)
|
||||
Changed NUM_BOARDS from 10 to 7 (the actual num of boards). (thanks Neme)
|
||||
Removed the Keywords option in hedit since they have to be in the body.
|
||||
[Sep 12 2007] - Rumble
|
||||
Fixed crash bug caused by olist with no objects. (Thanks Rhade)
|
||||
Several changes made to compile clean on older versions of GCC. (Thanks Neme)
|
||||
[Sep 10 2007] - Rumble
|
||||
Fixed items with rnum = NOTHING or NOBODY being changed to rnum = 0. (Thanks Neme)
|
||||
Fixed memory leak in dg_olc.c trigedit save. (Thanks Neme)
|
||||
[Sep 04 2007] - Rumble
|
||||
Changed CLSOLC to LVL_BUILDER.
|
||||
removed delete_doubledollar from do_say. (thanks Rhade)
|
||||
[Sep 01 2007] - Rumble
|
||||
Made Puff a hidden mob since she is used on room entry trigs to do dg_cast.
|
||||
Fixed dg_affect to not add 1 to the desired affect duration.
|
||||
Fixed dg_affect to work with 128 bits.
|
||||
[Aug 17 2007] - Rumble
|
||||
128 bit fixes: pfile conversion, world sector conversion, and player flags. Thanks Jamdog
|
||||
Added stop_fighting calls in do_flee to fix stock bug. Thanks Juras
|
||||
[Jul 01 2007] - Rumble
|
||||
Added run_autowiz to do_cheat. (thanks Fizban)
|
||||
Updated World and files for 3.53 release.
|
||||
[Jul 30 2007] - Rumble
|
||||
Fixed bad color counting in shop listing. (thanks Ziz)
|
||||
Stat zone without arg displays current zone.
|
||||
[Jun 29 2007] - Rumble
|
||||
Added new object variable wearflag.
|
||||
[Jun 28 2007] - Rumble
|
||||
Removed char_from_furniture in do_sit. (Thanks Jamdog)
|
||||
Replaced strcasecmp and strncasecmp with str_cmp and strn_cmp. (Thanks Khorlane)
|
||||
[Jun 26 2007] - Rumble
|
||||
Added Jamdog's "complete" screen.h. (Thanks Jamdog)
|
||||
Updated hedit to Rhade's cleaner version. (thanks Rhade)
|
||||
[Jun 25 2007] - Rumble
|
||||
Added questpoints to load_char and set autoexit on by default. (thanks Trulight)
|
||||
|
|
21113
lib/text/help/help.hlp
21113
lib/text/help/help.hlp
File diff suppressed because it is too large
Load diff
|
@ -4,4 +4,5 @@
|
|||
|
||||
Immortals
|
||||
~~~~~~~~~
|
||||
Testdet
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
Implementors
|
||||
~~~~~~~~~~~~
|
||||
Detta Rumble
|
||||
|
||||
Greater Gods
|
||||
~~~~~~~~~~~~
|
||||
|
|
|
@ -563,7 +563,6 @@ It looks unfinished.
|
|||
0 0
|
||||
8 8 0
|
||||
E
|
||||
T 1133
|
||||
#1997
|
||||
sexy stripper~
|
||||
a sexy stripper~
|
||||
|
|
|
@ -481,7 +481,7 @@ glances around at everything, flickers of emotion passing over his face like
|
|||
windblown clouds.
|
||||
~
|
||||
253962 0 0 0 0 0 0 0 0 E
|
||||
10 17 4 2d2+100 1d2+1
|
||||
10 17 4 2d0+100 1d2+1
|
||||
100 10000
|
||||
8 8 1
|
||||
E
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
6.mob
|
||||
7.mob
|
||||
9.mob
|
||||
11.mob
|
||||
12.mob
|
||||
13.mob
|
||||
14.mob
|
||||
|
|
|
@ -200,8 +200,8 @@ test object~
|
|||
the test object~
|
||||
A test object.~
|
||||
~
|
||||
12 0 0 0 0 a 0 0 0 0 0 0 0
|
||||
0 0 0 0
|
||||
15 0 0 0 0 a 0 0 0 0 0 0 0
|
||||
1 0 0 0
|
||||
1 1 0 0
|
||||
#1233
|
||||
trial vnum assigner limiter~
|
||||
|
@ -315,14 +315,14 @@ A piece of fireworks is planted in a champagne bottle.~
|
|||
0 0 0 0
|
||||
T 1297
|
||||
E
|
||||
firework new year piece~
|
||||
This large rocket is about to go up! Strange colours will fill the sky!
|
||||
~
|
||||
E
|
||||
bottle champagne~
|
||||
The bottle is filled partially with water so it doesn't tilt over. Someone
|
||||
has obviously drunk the champagne first.
|
||||
~
|
||||
E
|
||||
firework new year piece~
|
||||
This large rocket is about to go up! Strange colours will fill the sky!
|
||||
~
|
||||
#1299
|
||||
christmas tree~
|
||||
a christmas tree~
|
||||
|
|
|
@ -352,7 +352,7 @@ The filled horn (or a receptacle resembling it) has long served as a traditional
|
|||
symbol in art and decoration to suggest a store of abundance.
|
||||
~
|
||||
#1332
|
||||
trial vnum assigner~
|
||||
trial vnum assigner limiter~
|
||||
the trial vnum assigner~
|
||||
A trial vnum assigner helps people work on thier trial vnum.~
|
||||
~
|
||||
|
@ -550,6 +550,11 @@ A tapered pyramid of dark stone rises from floor to ceiling.~
|
|||
0 0 0 0
|
||||
0 0 0 0
|
||||
E
|
||||
plaque base~
|
||||
To the memory of the thousands who died, and for the hundreds of millions
|
||||
who wept.
|
||||
~
|
||||
E
|
||||
memorial pyramid stone~
|
||||
A tapered spire of dark grey marble rises from its four sided base to a
|
||||
blunted tip near the ceiling. Two adjacent sides of the spire have been
|
||||
|
@ -559,11 +564,6 @@ blasted sides of the spire. Each of the hundreds of figures is a shade of
|
|||
either white, black, brown, yellow or red. A bronze plaque has been set in to
|
||||
the base of the monument.
|
||||
~
|
||||
E
|
||||
plaque base~
|
||||
To the memory of the thousands who died, and for the hundreds of millions
|
||||
who wept.
|
||||
~
|
||||
#1370
|
||||
flag american mast half~
|
||||
the American flag~
|
||||
|
|
|
@ -889,9 +889,9 @@ something remember~
|
|||
something to remember~
|
||||
Something to remember is left here.~
|
||||
~
|
||||
0 0 0 0 0 a 0 0 0 0 0 0 0
|
||||
5 0 0 0 0 a 0 0 0 0 0 0 0
|
||||
0 0 0 0
|
||||
1 1 0 0
|
||||
1 100 0 0
|
||||
E
|
||||
something to remember~
|
||||
Oh yeah, you won't forget this!
|
||||
|
|
|
@ -20,16 +20,16 @@ A glistening black axe is lying here.~
|
|||
2 2 6 3
|
||||
5 100 0 5
|
||||
E
|
||||
evil runes~
|
||||
The runes are unreadable but unmistakably Khan-li in origin, testifying to
|
||||
the evil magic bestowed upon this weapon.
|
||||
~
|
||||
E
|
||||
blackened axe black glistening~
|
||||
This incredibly sharp axe looks to be made of some normal metal which has
|
||||
then been blackened with magic. Only the handle appears naturally dark, carved
|
||||
out of glistening obsidian and inscribed with evil runes.
|
||||
~
|
||||
E
|
||||
evil runes~
|
||||
The runes are unreadable but unmistakably Khan-li in origin, testifying to
|
||||
the evil magic bestowed upon this weapon.
|
||||
~
|
||||
A
|
||||
1 2
|
||||
A
|
||||
|
@ -100,20 +100,12 @@ A ragged book has been left here.~
|
|||
0 0 0 0
|
||||
5 1 0 0
|
||||
E
|
||||
1~
|
||||
@gEntry 1@n
|
||||
I have lost all interest in keeping this diary. Since the sorceress has
|
||||
taken over, life has not been worth writing about. I shall instead record
|
||||
anything I observe that may aid in her demise, though it will mean my death
|
||||
should this book be found.
|
||||
~
|
||||
E
|
||||
2~
|
||||
@gEntry 2@n
|
||||
Someone came to help us today, he told me he knew how to destroy the
|
||||
sorceress once and for all. I thought he would be the one to succeed but he
|
||||
was killed by the toothy one. Now the abominable creature has holed itself
|
||||
into a cave from which there is no return... or so it is claimed.
|
||||
ragged diary~
|
||||
This dark leather book is almost falling apart, although there appears to be
|
||||
very little written inside it. The word @gPRIVATE@n has been carefully carved
|
||||
into the cover.
|
||||
|
||||
(type look 1, 2, or 3 to view pages)
|
||||
~
|
||||
E
|
||||
3~
|
||||
|
@ -124,12 +116,20 @@ I do not yet know, but I know that the sorceress has a particular way of
|
|||
keeping her secrets, and it does not involve the survival of witnesses.
|
||||
~
|
||||
E
|
||||
ragged diary~
|
||||
This dark leather book is almost falling apart, although there appears to be
|
||||
very little written inside it. The word @gPRIVATE@n has been carefully carved
|
||||
into the cover.
|
||||
|
||||
(type look 1, 2, or 3 to view pages)
|
||||
2~
|
||||
@gEntry 2@n
|
||||
Someone came to help us today, he told me he knew how to destroy the
|
||||
sorceress once and for all. I thought he would be the one to succeed but he
|
||||
was killed by the toothy one. Now the abominable creature has holed itself
|
||||
into a cave from which there is no return... or so it is claimed.
|
||||
~
|
||||
E
|
||||
1~
|
||||
@gEntry 1@n
|
||||
I have lost all interest in keeping this diary. Since the sorceress has
|
||||
taken over, life has not been worth writing about. I shall instead record
|
||||
anything I observe that may aid in her demise, though it will mean my death
|
||||
should this book be found.
|
||||
~
|
||||
#2707
|
||||
carcass stone~
|
||||
|
@ -297,15 +297,15 @@ A mouldy puddle stagnates in the corner.~
|
|||
50 5 -1 0
|
||||
0 0 0 0
|
||||
E
|
||||
loose floorboards~
|
||||
These floorboards look a little loose, as though they have been pried open
|
||||
and set carefully back into place.
|
||||
~
|
||||
E
|
||||
mouldy puddle~
|
||||
This looks like it may have once been water, but has turned into a greenish
|
||||
glob of undrinkable slime from the influence of mould and various fungi.
|
||||
~
|
||||
E
|
||||
loose floorboards~
|
||||
These floorboards look a little loose, as though they have been pried open
|
||||
and set carefully back into place.
|
||||
~
|
||||
#2721
|
||||
white bone key~
|
||||
a white bone key~
|
||||
|
@ -969,31 +969,26 @@ A silver-leafed book lies here.~
|
|||
0 0 0 0
|
||||
1 1 0 0
|
||||
E
|
||||
silver-leafed book time~
|
||||
This beautiful shimmering book is bound with leather and overlaid with fine
|
||||
silver leafing. Carefully scrawled letters glow vaguely phosphorescent on the
|
||||
cover, spelling out Book of Time. There appears to be three chapters (look 1,
|
||||
2, or 3).
|
||||
~
|
||||
E
|
||||
1 one~
|
||||
FIRST AGE - AGE OF SORROW
|
||||
3 three~
|
||||
THIRD AGE - AGE OF REBIRTH
|
||||
|
||||
This is an accounting of things past, the first age.
|
||||
This is an accounting of things future, the third age.
|
||||
|
||||
The first efforts of the Cui in shaping their world resulted in the separating
|
||||
of Denuo into two major root forms - Khan'li, those of darkness, and Dynar,
|
||||
those of light, the intention being that the interactions between the two would
|
||||
allow for motion of forces whilst keeping the balance relatively stable.
|
||||
With the canvass wiped clean and the hearts of the Cui weighed heavy with
|
||||
grief and regret, they will invest their last energies in creating a new race. A
|
||||
form of life that embodies the whole scope of the balance, having the ability to
|
||||
sway itself to dark or light as it pleases.
|
||||
|
||||
However, the Cui were not prepared for the outright carnage that resulted.
|
||||
Dynar and Khan'li both working to slaughter the other and spilling oceans of
|
||||
blood, destroying many of their sub-races that Cui had sacrificed themselves to
|
||||
create.
|
||||
The internal nature of these opposing forces means that the race will have to
|
||||
keep peace within itself or suffer complete self-inflicted destruction. Thus,
|
||||
along with the power to choose, this life will have the burning desire of its
|
||||
Cui makers to continue itself, to survive, to flourish and grow.
|
||||
|
||||
Dismayed, the Cui sought to make peace between the two, realising that all
|
||||
they had worked for was about to destroy itself. Finally, they sought to make
|
||||
a more drastic change...
|
||||
With only one of the Cui remaining, this race is left almost entirely to its own
|
||||
devices, only a few perceiving and heeding the whisperings of their sole
|
||||
remaining parent and the occassional Ve offspring.
|
||||
|
||||
Beyond this point no speaking creature can see.
|
||||
|
||||
~
|
||||
E
|
||||
|
@ -1025,27 +1020,32 @@ and uninhabited the third age will begin.
|
|||
|
||||
~
|
||||
E
|
||||
3 three~
|
||||
THIRD AGE - AGE OF REBIRTH
|
||||
1 one~
|
||||
FIRST AGE - AGE OF SORROW
|
||||
|
||||
This is an accounting of things future, the third age.
|
||||
This is an accounting of things past, the first age.
|
||||
|
||||
With the canvass wiped clean and the hearts of the Cui weighed heavy with
|
||||
grief and regret, they will invest their last energies in creating a new race. A
|
||||
form of life that embodies the whole scope of the balance, having the ability to
|
||||
sway itself to dark or light as it pleases.
|
||||
The first efforts of the Cui in shaping their world resulted in the separating
|
||||
of Denuo into two major root forms - Khan'li, those of darkness, and Dynar,
|
||||
those of light, the intention being that the interactions between the two would
|
||||
allow for motion of forces whilst keeping the balance relatively stable.
|
||||
|
||||
The internal nature of these opposing forces means that the race will have to
|
||||
keep peace within itself or suffer complete self-inflicted destruction. Thus,
|
||||
along with the power to choose, this life will have the burning desire of its
|
||||
Cui makers to continue itself, to survive, to flourish and grow.
|
||||
However, the Cui were not prepared for the outright carnage that resulted.
|
||||
Dynar and Khan'li both working to slaughter the other and spilling oceans of
|
||||
blood, destroying many of their sub-races that Cui had sacrificed themselves to
|
||||
create.
|
||||
|
||||
With only one of the Cui remaining, this race is left almost entirely to its own
|
||||
devices, only a few perceiving and heeding the whisperings of their sole
|
||||
remaining parent and the occassional Ve offspring.
|
||||
|
||||
Beyond this point no speaking creature can see.
|
||||
Dismayed, the Cui sought to make peace between the two, realising that all
|
||||
they had worked for was about to destroy itself. Finally, they sought to make
|
||||
a more drastic change...
|
||||
|
||||
~
|
||||
E
|
||||
silver-leafed book time~
|
||||
This beautiful shimmering book is bound with leather and overlaid with fine
|
||||
silver leafing. Carefully scrawled letters glow vaguely phosphorescent on the
|
||||
cover, spelling out Book of Time. There appears to be three chapters (look 1,
|
||||
2, or 3).
|
||||
~
|
||||
#2766
|
||||
strip white meat~
|
||||
|
@ -1323,5 +1323,4 @@ A spider ball sits here.~
|
|||
0 0 0 0 0 a 0 0 0 0 0 0 0
|
||||
0 0 0 0
|
||||
1 100 0 0
|
||||
T 1133
|
||||
$~
|
||||
|
|
|
@ -200,13 +200,13 @@ A small sword lies here.~
|
|||
0 1 6 11
|
||||
3 60 0 0
|
||||
E
|
||||
sword small~
|
||||
The small sword seems to have an inscription of some sort inscription...
|
||||
~
|
||||
E
|
||||
inscription~
|
||||
It says: 'May this sword be a good companion. '
|
||||
~
|
||||
E
|
||||
sword small~
|
||||
The small sword seems to have an inscription of some sort inscription...
|
||||
~
|
||||
#322
|
||||
sword long~
|
||||
a long sword~
|
||||
|
@ -612,13 +612,13 @@ A large, sociable bulletin board is mounted on a wall here.~
|
|||
0 0 0 0
|
||||
0 0 0 0
|
||||
E
|
||||
board~
|
||||
If you can read this, the board is not working.
|
||||
~
|
||||
E
|
||||
social bulletin~
|
||||
Use 'look board' to read the board.
|
||||
~
|
||||
E
|
||||
board~
|
||||
If you can read this, the board is not working.
|
||||
~
|
||||
#397
|
||||
board frozen bulletin~
|
||||
a frozen bulletin board~
|
||||
|
@ -628,13 +628,13 @@ A large bulletin board is here, carved from a block of ice.~
|
|||
0 0 0 0
|
||||
0 0 0 0
|
||||
E
|
||||
board~
|
||||
If you can read this, the board is not working.
|
||||
~
|
||||
E
|
||||
freeze bulletin~
|
||||
Use 'look board' to read the board.
|
||||
~
|
||||
E
|
||||
board~
|
||||
If you can read this, the board is not working.
|
||||
~
|
||||
#398
|
||||
board holy bulletin~
|
||||
a holy bulletin board~
|
||||
|
@ -644,13 +644,13 @@ A large bulletin board is mounted on a wall here. It glows with a faint aura.~
|
|||
0 0 0 0
|
||||
0 0 0 0
|
||||
E
|
||||
board~
|
||||
If you can read this, the board is not working.
|
||||
~
|
||||
E
|
||||
holy bulletin~
|
||||
Use 'look board' to read the board.
|
||||
~
|
||||
E
|
||||
board~
|
||||
If you can read this, the board is not working.
|
||||
~
|
||||
#399
|
||||
board bulletin~
|
||||
a bulletin board~
|
||||
|
@ -660,11 +660,11 @@ A large bulletin board is mounted on a wall here.~
|
|||
0 0 0 0
|
||||
0 0 0 0
|
||||
E
|
||||
board~
|
||||
If you can read this, the board is not working.
|
||||
~
|
||||
E
|
||||
bulletin~
|
||||
Use 'look board' to read the board.
|
||||
~
|
||||
E
|
||||
board~
|
||||
If you can read this, the board is not working.
|
||||
~
|
||||
$~
|
||||
|
|
|
@ -202,4 +202,42 @@ painting~
|
|||
Color flowers fills your eyes as they stretch off the canvas of the
|
||||
painting. The picture gives the room a cheerful feeling.
|
||||
~
|
||||
#484
|
||||
stream water~
|
||||
a stream of water~
|
||||
A stream of water babbles as it rushes past.~
|
||||
~
|
||||
23 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
-1 -1 15 0
|
||||
0 0 0 0
|
||||
E
|
||||
stream water~
|
||||
This clear water looks refreshing and safe to drink.
|
||||
~
|
||||
#485
|
||||
pool murky water~
|
||||
a pool of murky water~
|
||||
A pool of murky water stagnates slowly.~
|
||||
~
|
||||
23 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
-1 -1 0 0
|
||||
0 0 0 0
|
||||
E
|
||||
pool murky water~
|
||||
This water looks as though it has been stewing for a long time, a slight
|
||||
greenish film coating its surface, though it is probably still safe to drink.
|
||||
~
|
||||
#486
|
||||
stone well~
|
||||
a stone well~
|
||||
A stone well stands here.~
|
||||
~
|
||||
23 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
-1 -1 0 0
|
||||
0 0 0 0
|
||||
E
|
||||
stone well~
|
||||
This basic stone well appears reasonably well maintained, a simple wooden
|
||||
bucket allowing water to be drawn from it.
|
||||
~
|
||||
$~
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
6.obj
|
||||
7.obj
|
||||
9.obj
|
||||
11.obj
|
||||
12.obj
|
||||
13.obj
|
||||
14.obj
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
5.shp
|
||||
6.shp
|
||||
7.shp
|
||||
11.shp
|
||||
13.shp
|
||||
14.shp
|
||||
16.shp
|
||||
|
|
|
@ -1770,7 +1770,7 @@ set txt[4] The purpose of power is to permit moral ideas to take root.
|
|||
set txt[5] Rights incur obligations.
|
||||
set txt[6] In war, the moral is to the physical as three is to one.
|
||||
set txt[7] Education is what's left over after you've forgotten all the facts you learned.
|
||||
set txt[8] We have devised a series of operating signals. The first one says "no," "danger," "stop," or any connotation of the negative. For this use any one signal - a signle thump, a signle noise, a single flash, a single wave.
|
||||
set txt[8] We have devised a series of operating signals. The first one says "no," "danger," "stop," or any connotation of the negative. For this use any one signal - a single thump, a single noise, a single flash, a single wave.
|
||||
set txt[9] There are advantages to a commander when his troops know he cannot be contacted. They cannot ask for relief.
|
||||
set txt[10] Those who expect to reap the blessing of freedom must, like men, undergo the fatigue of supporting it.
|
||||
set txt[11] Sentiment rules the world, and he who fails to take that into account can never hope to lead.
|
||||
|
@ -2140,7 +2140,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/builderapplication
|
||||
set TBA_mortal_greeting 1
|
||||
remote TBA_mortal_greeting %actor.id%
|
||||
if !%actor.has_item(1332)%
|
||||
|
|
|
@ -93,6 +93,8 @@ else
|
|||
if %victim.is_pc%
|
||||
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%
|
||||
%purge% %victim.inventory(1332)%
|
||||
else
|
||||
set TBA_trial_vnum %arg.cdr%
|
||||
|
@ -1822,6 +1824,9 @@ Trial Vnum Assigner - 1332~
|
|||
*~
|
||||
* Player must have nohassle off! To junk assigner use tbalim purge <player>.
|
||||
if %actor.varexists(TBA_trial_vnum)% && %actor.level% == 31
|
||||
if %actor.TBA_trial_vnum% < 0
|
||||
return 0
|
||||
end
|
||||
if (%cmd.mudcommand% == redit && ((%arg% && %arg% != %actor.TBA_trial_vnum%) || (%actor.room.vnum% != %actor.TBA_trial_vnum%)))
|
||||
%send% %actor% GOTO %actor.TBA_trial_vnum% to edit your room.
|
||||
elseif %cmd.mudcommand% == oedit && %arg% != %actor.TBA_trial_vnum%
|
||||
|
@ -1832,7 +1837,7 @@ if %actor.varexists(TBA_trial_vnum)% && %actor.level% == 31
|
|||
%send% %actor% GOTO %actor.TBA_trial_vnum% to edit your trial vnums zone information.
|
||||
elseif %cmd.mudcommand% == purge && ((%arg% && %arg% != %actor.TBA_trial_vnum%) || (%actor.room.vnum% != %actor.TBA_trial_vnum%)))
|
||||
%send% %actor% GOTO %actor.TBA_trial_vnum% to purge your room.
|
||||
elseif %cmd.mudcommand% == nohassle || (%cmd.mudcommand% == toggle && nohassle /= %arg.car%)
|
||||
elseif %cmd.mudcommand% == nohassle || (%cmd.mudcommand% == toggle && nohassle /= %arg.car%)
|
||||
%send% %actor% You cannot enable nohassle until you finish your trial vnum.
|
||||
elseif %cmd.mudcommand% == sedit || %cmd.mudcommand% == trigedit || %cmd.mudcommand% == buildwalk || %cmd.mudcommand% == dig || %cmd.mudcommand% == rclone || %cmd.mudcommand% == attach || %cmd.mudcommand% == detach || %cmd.mudcommand% == vdelete
|
||||
%send% %actor% Sedit, Trigedit, Buildwalk, Dig, Rclone, Attach, Detach, and Vdelete are not required for your trial vnum.
|
||||
|
|
|
@ -883,51 +883,55 @@ eval numOne %random.8%
|
|||
eval numTwo %random.6%
|
||||
eval numThr %random.16%
|
||||
*
|
||||
set fruit[1] apple
|
||||
set fruit[2] banana
|
||||
set fruit[3] pear
|
||||
set fruit[4] orange
|
||||
set fruit[5] kiwi
|
||||
set fruit[6] starfruit
|
||||
set fruit[7] peach
|
||||
set fruit[8] strawberry
|
||||
set color[1] red
|
||||
set color[2] orange
|
||||
set color[3] yellow
|
||||
set color[4] green
|
||||
set color[5] blue
|
||||
set color[6] purple
|
||||
set spell[1] cure light
|
||||
set spell[2] heal
|
||||
set spell[3] poison
|
||||
set spell[4] blind
|
||||
set spell[5] curse
|
||||
set spell[6] cure blind
|
||||
set spell[7] armor
|
||||
set spell[8] bless
|
||||
set spell[9] cure light
|
||||
set spell[10] invisibility
|
||||
set spell[11] strength
|
||||
set spell[12] sense life
|
||||
set spell[13] bless
|
||||
set spell[14] sleep
|
||||
set spell[15] sanc
|
||||
set spell[16] chill touch
|
||||
set fruit1 apple
|
||||
set fruit2 banana
|
||||
set fruit3 pear
|
||||
set fruit4 orange
|
||||
set fruit5 kiwi
|
||||
set fruit6 starfruit
|
||||
set fruit7 peach
|
||||
set fruit8 strawberry
|
||||
set color1 @Rred@n
|
||||
set color2 @ybrown@n
|
||||
set color3 @Yyellow@n
|
||||
set color4 @Ggreen@n
|
||||
set color5 @Bblue@n
|
||||
set color6 @Mpurple@n
|
||||
set spell1 cure light
|
||||
set spell2 heal
|
||||
set spell3 poison
|
||||
set spell4 blind
|
||||
set spell5 bestow curse
|
||||
set spell6 remove blind
|
||||
set spell7 inflict light
|
||||
set spell8 bless
|
||||
set spell9 cure light
|
||||
set spell10 invisibility
|
||||
set spell11 bull strength
|
||||
set spell12 sense life
|
||||
set spell13 bless
|
||||
set spell14 sleep
|
||||
set spell15 sanc
|
||||
set spell16 chill touch
|
||||
*
|
||||
set type %%fruit[%numOne%]%%
|
||||
set desc %%color[%numTwo%]%%
|
||||
set affect %%spell[%numThr%]%%
|
||||
set type %%fruit%numOne%%%
|
||||
set desc %%color%numTwo%%%
|
||||
set affect %%spell%numThr%%%
|
||||
*
|
||||
eval type %type%
|
||||
eval desc %desc%
|
||||
eval affect %affect%
|
||||
eval target %random.char%
|
||||
*
|
||||
%send% %target% A %desc% %type% falls from the tree and hits you.
|
||||
%echoaround% %target% A %desc% %type% falls from the tree and hits %target.name%.
|
||||
dg_cast '%affect%' %target%
|
||||
wait 1 sec
|
||||
%echo% The %type% falls to the ground and vanishes.
|
||||
eval thisRoom %self.vnum%
|
||||
eval total %%people.%thisRoom%%%
|
||||
if %total% != 0
|
||||
%send% %target% A %desc% %type% falls from the tree and hits you.
|
||||
%echoaround% %target% A %desc% %type% falls from the tree and hits %target.name%.
|
||||
dg_cast '%affect%' %target%
|
||||
wait 1 sec
|
||||
%echo% The %type% falls to the ground and vanishes.
|
||||
end
|
||||
~
|
||||
#13018
|
||||
ray of light portal back to midgaard~
|
||||
|
|
|
@ -109,6 +109,19 @@ eval say %%speech[%r%]%%
|
|||
eval say %say%
|
||||
say %say%
|
||||
~
|
||||
#205
|
||||
Crystal Ball to Locate a Mob.~
|
||||
1 c 7
|
||||
locate~
|
||||
set find %arg%
|
||||
if !%find.is_pc%
|
||||
eval rname %find.room%
|
||||
%send% %actor% As you gaze into the ring, it starts to glow. You see an image of %find.name% in %rname.name%.
|
||||
else
|
||||
%send% %actor% All that you see is a blurry haze.
|
||||
end
|
||||
%echoaround% %actor% %actor.name% peers into %actor.hisher% gently glowing ring.
|
||||
~
|
||||
#212
|
||||
Phoenix Rising - 219~
|
||||
1 c 4
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
6.trg
|
||||
7.trg
|
||||
9.trg
|
||||
11.trg
|
||||
12.trg
|
||||
13.trg
|
||||
14.trg
|
||||
|
@ -179,5 +180,4 @@
|
|||
325.trg
|
||||
326.trg
|
||||
345.trg
|
||||
|
||||
$
|
||||
|
|
|
@ -7,7 +7,7 @@ a strange portal located above you.
|
|||
D4
|
||||
~
|
||||
~
|
||||
0 0 100
|
||||
0 0 -1
|
||||
S
|
||||
T 1200
|
||||
#1
|
||||
|
@ -21,7 +21,7 @@ D5
|
|||
A strange portal in the floor is the only exit.
|
||||
~
|
||||
~
|
||||
0 0 100
|
||||
0 0 -1
|
||||
S
|
||||
#2
|
||||
Welcome to the Builder Academy~
|
||||
|
@ -38,7 +38,7 @@ patience, and the ability to take constructive criticism.
|
|||
|
||||
Your first task is to apply for builder status at:
|
||||
|
||||
http://geocities.com/buildersacademy/
|
||||
http://www.geocities.com/buildersacademy/
|
||||
|
||||
When you finish and submit the application tell anyone level 32 or higher
|
||||
and they will advance you to begin your training.
|
||||
|
@ -553,7 +553,7 @@ D2
|
|||
0 0 21
|
||||
S
|
||||
#33
|
||||
Rumble's Room~
|
||||
6~
|
||||
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
|
||||
|
@ -702,7 +702,7 @@ D3
|
|||
D4
|
||||
~
|
||||
trapdoor~
|
||||
1 0 130
|
||||
1 0 -1
|
||||
S
|
||||
#90
|
||||
Epictetus' Prison Cell~
|
||||
|
|
|
@ -92,19 +92,19 @@ D5
|
|||
~
|
||||
0 0 100
|
||||
E
|
||||
altar~
|
||||
The altar is made from black granite and has been carved into a small basin
|
||||
with a high back. Almost as if it was meant to be some sort of seat.
|
||||
Inscriptions in some foreign tongue are written on every square inch of the
|
||||
altar. You wonder what they must say and who could have written it.
|
||||
~
|
||||
E
|
||||
statue~
|
||||
As you examine the statues more closely you realize they must resemble the
|
||||
two gods responsible for the creation and ongoing protection of Sanctus, Ferret
|
||||
and Rumble. They both radiate a strength and power that resembles the solid
|
||||
white marble they were crafted from.
|
||||
~
|
||||
E
|
||||
altar~
|
||||
The altar is made from black granite and has been carved into a small basin
|
||||
with a high back. Almost as if it was meant to be some sort of seat.
|
||||
Inscriptions in some foreign tongue are written on every square inch of the
|
||||
altar. You wonder what they must say and who could have written it.
|
||||
~
|
||||
S
|
||||
T 158
|
||||
T 163
|
||||
|
@ -239,17 +239,17 @@ D5
|
|||
~
|
||||
0 0 142
|
||||
E
|
||||
table~
|
||||
The table is made out of cherry. It is worn from years of use. The glass
|
||||
top allows for an excellent view of the map protected within.
|
||||
~
|
||||
E
|
||||
map~
|
||||
The map is a geographic representation of Sanctus. Not even really a map,
|
||||
more of a scaled model. The walls and buildings of the city are raised higher
|
||||
than the rest of the map to give it a third dimension. Small soldiers are
|
||||
scattered around the top of the table to help the War Master place his men.
|
||||
|
||||
~
|
||||
E
|
||||
table~
|
||||
The table is made out of cherry. It is worn from years of use. The glass
|
||||
top allows for an excellent view of the map protected within.
|
||||
~
|
||||
S
|
||||
#109
|
||||
|
@ -318,6 +318,10 @@ that have become common names throughout the realm. It is said that completing
|
|||
a quest is a prerequisite towards immortality.
|
||||
~
|
||||
1 8 0 0 0 0
|
||||
D1
|
||||
~
|
||||
~
|
||||
0 0 -1
|
||||
D2
|
||||
~
|
||||
~
|
||||
|
@ -383,18 +387,18 @@ D1
|
|||
~
|
||||
0 0 100
|
||||
E
|
||||
hole~
|
||||
You can look out over the inner wall to the western side of Sanctus. The
|
||||
smell of charred human remains and smoldering plaster makes your eyes water so
|
||||
it is difficult to see much else through the tiny hole.
|
||||
~
|
||||
E
|
||||
man silhouette~
|
||||
The distinct outline of a human body that must have taken the brunt of the
|
||||
blast when the portal imploded. You wonder what or who it might have been.
|
||||
You can still see pieces of cloth and bone buried deeply into the wall inside
|
||||
the shadow of the unlucky man.
|
||||
~
|
||||
E
|
||||
hole~
|
||||
You can look out over the inner wall to the western side of Sanctus. The
|
||||
smell of charred human remains and smoldering plaster makes your eyes water so
|
||||
it is difficult to see much else through the tiny hole.
|
||||
~
|
||||
S
|
||||
#117
|
||||
Travelling Room~
|
||||
|
@ -530,19 +534,19 @@ D2
|
|||
~
|
||||
0 0 129
|
||||
E
|
||||
shrine~
|
||||
A beutiful shrine. It has two white marble figures facing each other with a
|
||||
painting of the city below them. The two figures seem to be looking down at
|
||||
the city with looks of worry and hopelessness. An unlit candle and mirror lay
|
||||
on the floor beside the small shrine.
|
||||
~
|
||||
E
|
||||
table desk chair~
|
||||
The table, desk, and chair are made from solid oak of the highest quality.
|
||||
A thin goose down mattress and pillow are the only comfortable looking items in
|
||||
the room. The desk is bare and all the drawers are empty. It is as if no one
|
||||
even lives here.
|
||||
~
|
||||
E
|
||||
shrine~
|
||||
A beutiful shrine. It has two white marble figures facing each other with a
|
||||
painting of the city below them. The two figures seem to be looking down at
|
||||
the city with looks of worry and hopelessness. An unlit candle and mirror lay
|
||||
on the floor beside the small shrine.
|
||||
~
|
||||
S
|
||||
#125
|
||||
Plane of the Magi~
|
||||
|
@ -815,10 +819,14 @@ D0
|
|||
~
|
||||
0 0 128
|
||||
E
|
||||
bed~
|
||||
The bed is made of a sturdy pine. A thin mattress covered in a white sheet
|
||||
with a down pillow overlaying it. The mattress is too thin to hold anything of
|
||||
value.
|
||||
window~
|
||||
Overlooking the western gate you can see the shimmering protective dome.
|
||||
You hope it lasts, peace and tranquility is a good thing.
|
||||
~
|
||||
E
|
||||
chair~
|
||||
It's just your standard wooden chair. Uncomfortable and only real
|
||||
usefulness would be as firewood.
|
||||
~
|
||||
E
|
||||
desk~
|
||||
|
@ -828,14 +836,10 @@ centered on the top of the desk. The desk has three drawers. All of them are
|
|||
empty.
|
||||
~
|
||||
E
|
||||
chair~
|
||||
It's just your standard wooden chair. Uncomfortable and only real
|
||||
usefulness would be as firewood.
|
||||
~
|
||||
E
|
||||
window~
|
||||
Overlooking the western gate you can see the shimmering protective dome.
|
||||
You hope it lasts, peace and tranquility is a good thing.
|
||||
bed~
|
||||
The bed is made of a sturdy pine. A thin mattress covered in a white sheet
|
||||
with a down pillow overlaying it. The mattress is too thin to hold anything of
|
||||
value.
|
||||
~
|
||||
S
|
||||
#136
|
||||
|
|
|
@ -39,57 +39,6 @@ D5
|
|||
~
|
||||
0 0 1999
|
||||
E
|
||||
spoilers~
|
||||
Ahhh, cheater!! Don't you want to enjoy the zone?! *sniff*, ok, if you
|
||||
really have to look there are a few little neat zone inclusions listed here to
|
||||
spoil your zone exploring pleasure. Just type look and then the number to look
|
||||
at each one (look 1 for example).
|
||||
|
||||
1: The Leviathan
|
||||
|
||||
2: Spider Cocoons
|
||||
|
||||
3: The Dark Candleholder
|
||||
|
||||
4: The Metal Contraption
|
||||
|
||||
~
|
||||
E
|
||||
1~
|
||||
This is just a little trigger that sets off in room 1911 when you enter. A
|
||||
series of messages goes off and then the leviathan mob emerges. If you move
|
||||
more than one room away in the middle of fighting the creature it will disappear
|
||||
again, reloading fully restored. This is just the framework so far for a little
|
||||
quest I'm creating around it. Ooh, additionally the room that the leviathan
|
||||
loads in will only let you leave 90% of the time due to slippery mud.
|
||||
~
|
||||
E
|
||||
2~
|
||||
The spider's cocoons are used to trap people.. Both players and mobs alike.
|
||||
If you fight the whisper spider in room 1993 it will start sending messages
|
||||
about wrapping web around you. Ultimately if you do not flee or kill the spider
|
||||
quickly you will find yourself wrapped in a cocoon, unable to move or see
|
||||
anything. In this state all you can do is send tells, and wriggle which makes
|
||||
the cocoon visibly move to everyone else (as immortal you can also use the goto
|
||||
command). To open one of these cocoons another player must have a fire torch
|
||||
(object 1905) and type burn. This will set it on fire and release the trapped
|
||||
mob or player. If a trapped player is not freed within about 5 minutes he/she
|
||||
will die.
|
||||
~
|
||||
E
|
||||
3~
|
||||
In room 1982, a dark candleholder can be found. On zone reset a candle loads
|
||||
inside, and if this is taken, a passage opens up to the north. Once on the
|
||||
other side (room 1983), the passage closes and a voice can be heard telling you
|
||||
to "leave what you have taken", in reference of course to the candle. If the
|
||||
candle is not dropped and you continue on to any other room, it will be purged
|
||||
and the voice will kindly remind you of your doom, as you are now essentially
|
||||
trapped. However, dropping the candle like a good mudder will cause a drow
|
||||
spirit to reveal herself, explaining that she will open the way if you call on
|
||||
the name of Eilistraee. Naturally, saying the word Eilistraee causes the spirit
|
||||
to vanish and the passage out to reopen.. Albeit for a limited time.
|
||||
~
|
||||
E
|
||||
4~
|
||||
In room 1990 there is a large metal contraption, that essentially produces
|
||||
potions when the right ingredients are put into it. PRESS empties the machine
|
||||
|
@ -114,6 +63,57 @@ an empty vial placed into the contraption and the mixture poured out.
|
|||
If any combination of ingredients other than those listed are combined,
|
||||
a black potion will be produced which lowers all three attributes.
|
||||
|
||||
~
|
||||
E
|
||||
3~
|
||||
In room 1982, a dark candleholder can be found. On zone reset a candle loads
|
||||
inside, and if this is taken, a passage opens up to the north. Once on the
|
||||
other side (room 1983), the passage closes and a voice can be heard telling you
|
||||
to "leave what you have taken", in reference of course to the candle. If the
|
||||
candle is not dropped and you continue on to any other room, it will be purged
|
||||
and the voice will kindly remind you of your doom, as you are now essentially
|
||||
trapped. However, dropping the candle like a good mudder will cause a drow
|
||||
spirit to reveal herself, explaining that she will open the way if you call on
|
||||
the name of Eilistraee. Naturally, saying the word Eilistraee causes the spirit
|
||||
to vanish and the passage out to reopen.. Albeit for a limited time.
|
||||
~
|
||||
E
|
||||
2~
|
||||
The spider's cocoons are used to trap people.. Both players and mobs alike.
|
||||
If you fight the whisper spider in room 1993 it will start sending messages
|
||||
about wrapping web around you. Ultimately if you do not flee or kill the spider
|
||||
quickly you will find yourself wrapped in a cocoon, unable to move or see
|
||||
anything. In this state all you can do is send tells, and wriggle which makes
|
||||
the cocoon visibly move to everyone else (as immortal you can also use the goto
|
||||
command). To open one of these cocoons another player must have a fire torch
|
||||
(object 1905) and type burn. This will set it on fire and release the trapped
|
||||
mob or player. If a trapped player is not freed within about 5 minutes he/she
|
||||
will die.
|
||||
~
|
||||
E
|
||||
1~
|
||||
This is just a little trigger that sets off in room 1911 when you enter. A
|
||||
series of messages goes off and then the leviathan mob emerges. If you move
|
||||
more than one room away in the middle of fighting the creature it will disappear
|
||||
again, reloading fully restored. This is just the framework so far for a little
|
||||
quest I'm creating around it. Ooh, additionally the room that the leviathan
|
||||
loads in will only let you leave 90% of the time due to slippery mud.
|
||||
~
|
||||
E
|
||||
spoilers~
|
||||
Ahhh, cheater!! Don't you want to enjoy the zone?! *sniff*, ok, if you
|
||||
really have to look there are a few little neat zone inclusions listed here to
|
||||
spoil your zone exploring pleasure. Just type look and then the number to look
|
||||
at each one (look 1 for example).
|
||||
|
||||
1: The Leviathan
|
||||
|
||||
2: Spider Cocoons
|
||||
|
||||
3: The Dark Candleholder
|
||||
|
||||
4: The Metal Contraption
|
||||
|
||||
~
|
||||
S
|
||||
#1901
|
||||
|
@ -149,16 +149,16 @@ this direction.
|
|||
~
|
||||
0 0 1903
|
||||
E
|
||||
fungus~
|
||||
These tiny sprouting mushrooms are typical swamp flora, thriving on the damp
|
||||
rotting wood of the abandoned sign.
|
||||
~
|
||||
E
|
||||
old broken crossroads sign~
|
||||
This old splintered sign has long lost any visible markings, black rivulets
|
||||
of ink staining the rotting wood that stands uselessly here, just a remnant of
|
||||
past inhabitants.
|
||||
~
|
||||
E
|
||||
fungus~
|
||||
These tiny sprouting mushrooms are typical swamp flora, thriving on the damp
|
||||
rotting wood of the abandoned sign.
|
||||
~
|
||||
S
|
||||
#1902
|
||||
Squelching Ground~
|
||||
|
@ -270,16 +270,16 @@ wafting on the western air.
|
|||
~
|
||||
0 0 1906
|
||||
E
|
||||
scarlet stains~
|
||||
These large dark patches in the mud glisten slightly crimson in any light,
|
||||
the faded blood stains of many fallen warriors.
|
||||
~
|
||||
E
|
||||
glimpses metal armour weapons~
|
||||
Small pieces of weaponry and armour protrude from the ground like shrapnel,
|
||||
so deeply rusted and swallowed in mud that they are practically irretrievable
|
||||
and are obviously of no further use for warring.
|
||||
~
|
||||
E
|
||||
scarlet stains~
|
||||
These large dark patches in the mud glisten slightly crimson in any light,
|
||||
the faded blood stains of many fallen warriors.
|
||||
~
|
||||
S
|
||||
T 1971
|
||||
#1906
|
||||
|
@ -309,18 +309,18 @@ ripple in the restless breeze.
|
|||
~
|
||||
0 0 1912
|
||||
E
|
||||
scattered pools slime~
|
||||
These slippery pools are coated with floating algae and slime of various
|
||||
organic kinds. The water is presumably toxic as it is so saturated with rust
|
||||
and rot that it glints scarlet in the light.
|
||||
~
|
||||
E
|
||||
old rusted weapons armour rotted~
|
||||
These battered pieces of metal and algae-encrusted leather are all that is
|
||||
left of an obviously mighty battle. There are no corpses to be found, all that
|
||||
died presumably devoured by creatures here or rotted long before these metals
|
||||
began to rust.
|
||||
~
|
||||
E
|
||||
scattered pools slime~
|
||||
These slippery pools are coated with floating algae and slime of various
|
||||
organic kinds. The water is presumably toxic as it is so saturated with rust
|
||||
and rot that it glints scarlet in the light.
|
||||
~
|
||||
S
|
||||
T 1971
|
||||
#1907
|
||||
|
@ -383,17 +383,17 @@ overturned tree's skeletal branches grasping at the air.
|
|||
~
|
||||
0 0 1909
|
||||
E
|
||||
thin layers slime old unidentifiable stains~
|
||||
The slick green coating of algae is obvious over all of these rocks, decaying
|
||||
plant slime as well as darker and more ominous stains paint the jagged surfaces
|
||||
various shades of red and black.
|
||||
~
|
||||
E
|
||||
small jagged peaks sharp rocks~
|
||||
These rocks look almost like the remnants of a huge embedded boulder or
|
||||
statue that has been broken away by some massive force. Firmly entrenched in
|
||||
the mud, the rough-edged base spikes out like several rows of teeth.
|
||||
~
|
||||
E
|
||||
thin layers slime old unidentifiable stains~
|
||||
The slick green coating of algae is obvious over all of these rocks, decaying
|
||||
plant slime as well as darker and more ominous stains paint the jagged surfaces
|
||||
various shades of red and black.
|
||||
~
|
||||
S
|
||||
T 1971
|
||||
#1909
|
||||
|
@ -460,16 +460,16 @@ impossible.
|
|||
~
|
||||
0 0 1910
|
||||
E
|
||||
ominous shadows~
|
||||
Dark rippling shadows stir unnaturally beneath the water, the movements of
|
||||
some hidden creature no doubt.
|
||||
~
|
||||
E
|
||||
insects~
|
||||
These simple swamp insects flit so fast it is hard to see them properly, tiny
|
||||
and plated with defensive exoskeletons they pause only to feed on the smaller
|
||||
zooplankton in the water.
|
||||
~
|
||||
E
|
||||
ominous shadows~
|
||||
Dark rippling shadows stir unnaturally beneath the water, the movements of
|
||||
some hidden creature no doubt.
|
||||
~
|
||||
S
|
||||
T 1908
|
||||
T 1993
|
||||
|
@ -494,16 +494,16 @@ the air with an eye-watering metallic scent.
|
|||
~
|
||||
0 0 1906
|
||||
E
|
||||
glimpses shiny metal~
|
||||
Old broken pieces of weapons and shields float in shards amongst the bubbling
|
||||
water, stirring as though in some cauldron of death.
|
||||
~
|
||||
E
|
||||
splintered bone~
|
||||
Pieces of decaying bone are all that remain of any organic corpses, bleached
|
||||
almost white from the alkaline water here and stripped by predators of all flesh
|
||||
that hadn't rotted away naturally.
|
||||
~
|
||||
E
|
||||
glimpses shiny metal~
|
||||
Old broken pieces of weapons and shields float in shards amongst the bubbling
|
||||
water, stirring as though in some cauldron of death.
|
||||
~
|
||||
S
|
||||
T 1971
|
||||
#1913
|
||||
|
@ -769,16 +769,16 @@ roots sticking high into the air further south.
|
|||
~
|
||||
0 0 1917
|
||||
E
|
||||
weak trunks branches leaves willows bark~
|
||||
These frail looking trees look as though they are barely surviving off of the
|
||||
watery soil and fog shrouded sunlight, bending weakly in the slightest breeze.
|
||||
|
||||
~
|
||||
E
|
||||
moss grasses~
|
||||
The plant life here is abundant but miserable looking, as though there is
|
||||
constant competition to survive, nutrients being scavenged by almost every form
|
||||
of life imaginable.
|
||||
~
|
||||
E
|
||||
weak trunks branches leaves willows bark~
|
||||
These frail looking trees look as though they are barely surviving off of the
|
||||
watery soil and fog shrouded sunlight, bending weakly in the slightest breeze.
|
||||
|
||||
~
|
||||
S
|
||||
T 1971
|
||||
|
@ -823,18 +823,18 @@ other, forming a bridge that extends to the east.
|
|||
~
|
||||
0 0 1922
|
||||
E
|
||||
fungus~
|
||||
This is the same miserable organism that grows abundantly on every surface on
|
||||
sight, flat and sickly green, they are just another indication that the entire
|
||||
place is rotting.
|
||||
~
|
||||
E
|
||||
shelled creatures~
|
||||
Little snails, and the encrustations of crabs and mollusks decorate the
|
||||
surfaces with their coloured remains. It is impossible to tell which of these
|
||||
are alive and which are long dead, most seem perfectly content to stay
|
||||
completely motionless.
|
||||
~
|
||||
E
|
||||
fungus~
|
||||
This is the same miserable organism that grows abundantly on every surface on
|
||||
sight, flat and sickly green, they are just another indication that the entire
|
||||
place is rotting.
|
||||
~
|
||||
S
|
||||
T 1971
|
||||
#1924
|
||||
|
@ -1068,9 +1068,10 @@ with what looks like a wooden padlock.
|
|||
bamboogates~
|
||||
1 1906 1931
|
||||
E
|
||||
great fire~
|
||||
This raging fire seems to be kept continually going, the sickly smell of
|
||||
flesh and burning leather wafting in the smokey air around it.
|
||||
swords crude jewelled throne~
|
||||
These rather beautiful swords have been carelessly bent and fastened together
|
||||
to form a slightly unusual but attractive throne, coloured gems sparkling in the
|
||||
hilts and firelight reflecting off the still shiny metal.
|
||||
~
|
||||
E
|
||||
pieces broken armour decoration walls~
|
||||
|
@ -1078,10 +1079,9 @@ pieces broken armour decoration walls~
|
|||
doubt serving the secondary purpose of displaying the vanquishing of foes.
|
||||
~
|
||||
E
|
||||
swords crude jewelled throne~
|
||||
These rather beautiful swords have been carelessly bent and fastened together
|
||||
to form a slightly unusual but attractive throne, coloured gems sparkling in the
|
||||
hilts and firelight reflecting off the still shiny metal.
|
||||
great fire~
|
||||
This raging fire seems to be kept continually going, the sickly smell of
|
||||
flesh and burning leather wafting in the smokey air around it.
|
||||
~
|
||||
S
|
||||
#1934
|
||||
|
@ -1149,17 +1149,17 @@ be heard, as though some hidden cave lies beneath.
|
|||
~
|
||||
0 0 1937
|
||||
E
|
||||
rudimentary shelter stiff reeds~
|
||||
This primitive enclosure is of only basic use in shielding rainfall and heavy
|
||||
winds. Open on one side, it seems for the most part abandoned, as though the
|
||||
creatures who made it only gather here for certain occasions.
|
||||
~
|
||||
E
|
||||
cooking utensils simple clay pots~
|
||||
These recently used tools have been dumped on the ground with pieces of flesh
|
||||
still clinging to them, the smell of rotting is almost unbearable and flies buzz
|
||||
almost frantically around the filthy surfaces.
|
||||
~
|
||||
E
|
||||
rudimentary shelter stiff reeds~
|
||||
This primitive enclosure is of only basic use in shielding rainfall and heavy
|
||||
winds. Open on one side, it seems for the most part abandoned, as though the
|
||||
creatures who made it only gather here for certain occasions.
|
||||
~
|
||||
S
|
||||
T 1971
|
||||
#1937
|
||||
|
@ -1678,7 +1678,7 @@ surrounding trees acting as footholds. It seems as though the brittle wood
|
|||
moans gently, complaining at the cruelty of the wind, restless breezes scurrying
|
||||
here and there as though being chased.
|
||||
~
|
||||
19 0 0 0 0 0
|
||||
19 0 0 0 0 3
|
||||
D2
|
||||
A line of trees continues around, curving as if to form a large circle that
|
||||
shrouds the outside from view.
|
||||
|
@ -1698,7 +1698,7 @@ Drowned Path~
|
|||
pool. Dirt and grit settle slowly at the bottom, covering partially what appear
|
||||
to be the carefully set slate tiles of an ancient road running north and south.
|
||||
~
|
||||
19 0 0 0 0 0
|
||||
19 0 0 0 0 3
|
||||
D0
|
||||
A small junction lies ahead, this path meeting with a larger west-to-east
|
||||
trail.
|
||||
|
@ -1801,7 +1801,7 @@ Drizzling Path~
|
|||
make up this old path, creeping algae and swamp slime give it a carpeted look,
|
||||
tinting both the stone and the water slightly green.
|
||||
~
|
||||
19 0 0 0 0 0
|
||||
19 0 0 0 0 2
|
||||
D1
|
||||
~
|
||||
~
|
||||
|
@ -1823,7 +1823,7 @@ surface of these dark waters. Small fish dart nervously about, hiding instantly
|
|||
at the sight of any shadow, and bulrushes sway gently, spreading ripples
|
||||
throughout the pool.
|
||||
~
|
||||
19 4 0 0 0 0
|
||||
19 4 0 0 0 2
|
||||
D1
|
||||
~
|
||||
~
|
||||
|
@ -1865,7 +1865,7 @@ Place of Meeting~
|
|||
rocks are placed strategically all around the center as if making up some sort
|
||||
of seating. Beside the fire, a crude wooden platform has been erected.
|
||||
~
|
||||
19 0 0 0 0 0
|
||||
19 0 0 0 0 2
|
||||
D0
|
||||
~
|
||||
~
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -7,6 +7,7 @@
|
|||
6.wld
|
||||
7.wld
|
||||
9.wld
|
||||
11.wld
|
||||
12.wld
|
||||
13.wld
|
||||
14.wld
|
||||
|
|
|
@ -2,6 +2,36 @@
|
|||
Unknown~
|
||||
Jade Forest~
|
||||
400 499 30 2
|
||||
R 0 496 486 -1 (a stone well)
|
||||
O 0 486 99 496 (a stone well)
|
||||
R 0 440 485 -1 (a pool of murky water)
|
||||
O 0 485 99 440 (a pool of murky water)
|
||||
M 0 440 3 440 (bullfrog)
|
||||
R 0 439 485 -1 (a pool of murky water)
|
||||
O 0 485 99 439 (a pool of murky water)
|
||||
R 0 437 485 -1 (a pool of murky water)
|
||||
O 0 485 99 437 (a pool of murky water)
|
||||
R 0 436 485 -1 (a pool of murky water)
|
||||
O 0 485 99 436 (a pool of murky water)
|
||||
R 0 435 485 -1 (a pool of murky water)
|
||||
O 0 485 99 435 (a pool of murky water)
|
||||
M 0 435 2 435 (leech)
|
||||
R 0 431 485 -1 (a pool of murky water)
|
||||
O 0 485 99 431 (a pool of murky water)
|
||||
M 0 466 2 467 (rabbit)
|
||||
M 0 466 2 467 (rabbit)
|
||||
R 0 466 484 -1 (a stream of water)
|
||||
O 0 484 99 466 (a stream of water)
|
||||
R 0 465 484 -1 (a stream of water)
|
||||
O 0 484 99 465 (a stream of water)
|
||||
R 0 464 484 -1 (a stream of water)
|
||||
O 0 484 99 464 (a stream of water)
|
||||
R 0 463 484 -1 (a stream of water)
|
||||
O 0 484 99 463 (a stream of water)
|
||||
R 0 462 484 -1 (a stream of water)
|
||||
O 0 484 99 462 (a stream of water)
|
||||
R 0 461 484 -1 (a stream of water)
|
||||
O 0 484 99 461 (a stream of water)
|
||||
M 0 400 1 400 (Grass Snake)
|
||||
M 0 430 2 430 (rat)
|
||||
M 0 481 1 481 (zachary)
|
||||
|
@ -37,14 +67,11 @@ M 0 480 2 487 (ghost)
|
|||
M 0 480 2 480 (ghost)
|
||||
M 0 475 1 475 (coyote)
|
||||
M 0 471 1 471 (raccoon)
|
||||
M 0 466 2 466 (rabbit)
|
||||
M 0 460 2 460 (caterpillar)
|
||||
M 0 444 1 444 (grasshopper)
|
||||
M 0 441 2 441 (crow)
|
||||
M 0 440 3 440 (bullfrog)
|
||||
M 0 434 1 434 (muskrat)
|
||||
M 0 416 2 416 (mouse)
|
||||
M 0 435 2 435 (leech)
|
||||
M 0 423 2 423 (skeleton)
|
||||
M 0 422 1 422 (ghoul)
|
||||
M 0 421 2 421 (zombie)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
6.zon
|
||||
7.zon
|
||||
9.zon
|
||||
11.zon
|
||||
12.zon
|
||||
13.zon
|
||||
14.zon
|
||||
|
|
|
@ -47,11 +47,11 @@ ACMD(do_say)
|
|||
send_to_char(ch, "Yes, but WHAT do you want to say?\r\n");
|
||||
else {
|
||||
char buf[MAX_INPUT_LENGTH + 14], *msg;
|
||||
struct char_data *vict;
|
||||
|
||||
snprintf(buf, sizeof(buf), "$n@n says, '%s@n'", argument);
|
||||
msg = act(buf, FALSE, ch, 0, 0, TO_ROOM | DG_NO_TRIG);
|
||||
|
||||
struct char_data *vict;
|
||||
for (vict = world[IN_ROOM(ch)].people; vict; vict = vict->next_in_room)
|
||||
if (vict != ch && GET_POS(vict) > POS_SLEEPING)
|
||||
add_history(vict, msg, HIST_SAY);
|
||||
|
@ -59,7 +59,6 @@ ACMD(do_say)
|
|||
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT))
|
||||
send_to_char(ch, "%s", CONFIG_OK);
|
||||
else {
|
||||
delete_doubledollar(argument);
|
||||
sprintf(buf, "You say, '%s@n'", argument);
|
||||
msg = act(buf, FALSE, ch, 0, 0, TO_CHAR | DG_NO_TRIG);
|
||||
add_history(ch, msg, HIST_SAY);
|
||||
|
|
|
@ -1048,10 +1048,10 @@ ACMD(do_help)
|
|||
space_to_minus(argument);
|
||||
|
||||
if ((mid = search_help(argument, GET_LEVEL(ch))) == NOWHERE) {
|
||||
int i, found = 0;
|
||||
send_to_char(ch, "There is no help on that word.\r\n");
|
||||
mudlog(NRM, MAX(LVL_IMPL, GET_INVIS_LEV(ch)), TRUE,
|
||||
"%s tried to get help on %s", GET_NAME(ch), argument);
|
||||
int i, found = 0;
|
||||
for (i = 0; i <= top_of_helpt; i++) {
|
||||
if (help_table[i].min_level > GET_LEVEL(ch))
|
||||
continue;
|
||||
|
@ -1086,6 +1086,17 @@ ACMD(do_who)
|
|||
int showclass = 0, short_list = 0, outlaws = 0;
|
||||
int who_room = 0, showgroup = 0, showleader = 0;
|
||||
|
||||
struct {
|
||||
char *disp;
|
||||
int min_level;
|
||||
int max_level;
|
||||
int count; /* must always start as 0 */
|
||||
} rank[] = {
|
||||
{ "Immortals\r\n---------\r\n", LVL_IMMORT, LVL_IMPL, 0},
|
||||
{ "Mortals\r\n-------\r\n", 1, LVL_IMMORT - 1, 0 },
|
||||
{ "\n", 0, 0, 0 }
|
||||
};
|
||||
|
||||
skip_spaces(&argument);
|
||||
strcpy(buf, argument); /* strcpy: OK (sizeof: argument == buf) */
|
||||
name_search[0] = '\0';
|
||||
|
@ -1145,17 +1156,6 @@ ACMD(do_who)
|
|||
}
|
||||
}
|
||||
|
||||
struct {
|
||||
char *disp;
|
||||
int min_level;
|
||||
int max_level;
|
||||
int count; /* must always start as 0 */
|
||||
} rank[] = {
|
||||
{ "Immortals\r\n---------\r\n", LVL_IMMORT, LVL_IMPL, 0},
|
||||
{ "Mortals\r\n-------\r\n", 1, LVL_IMMORT - 1, 0 },
|
||||
{ "\n", 0, 0, 0 }
|
||||
};
|
||||
|
||||
for (d = descriptor_list; d && !short_list; d = d->next) {
|
||||
if (d->original)
|
||||
tch = d->original;
|
||||
|
@ -1733,6 +1733,95 @@ ACMD(do_toggle)
|
|||
int toggle, tp, wimp_lev, result = 0, len = 0;
|
||||
const char *types[] = { "off", "brief", "normal", "on", "\n" };
|
||||
|
||||
const struct {
|
||||
char *command;
|
||||
bitvector_t toggle; /* this needs changing once hashmaps are implemented */
|
||||
char min_level;
|
||||
char *disable_msg;
|
||||
char *enable_msg;
|
||||
} tog_messages[] = {
|
||||
{"summonable", PRF_SUMMONABLE, 0,
|
||||
"You are now safe from summoning by other players.\r\n",
|
||||
"You may now be summoned by other players.\r\n"},
|
||||
{"nohassle", PRF_NOHASSLE, LVL_IMMORT,
|
||||
"Nohassle disabled.\r\n",
|
||||
"Nohassle enabled.\r\n"},
|
||||
{"brief", PRF_BRIEF, 0,
|
||||
"Brief mode off.\r\n",
|
||||
"Brief mode on.\r\n"},
|
||||
{"compact", PRF_COMPACT, 0,
|
||||
"Compact mode off.\r\n",
|
||||
"Compact mode on.\r\n"},
|
||||
{"notell", PRF_NOTELL, 0,
|
||||
"You can now hear tells.\r\n",
|
||||
"You are now deaf to tells.\r\n"},
|
||||
{"noauction", PRF_NOAUCT, 0,
|
||||
"You can now hear auctions.\r\n",
|
||||
"You are now deaf to auctions.\r\n"},
|
||||
{"noshout", PRF_NOSHOUT, 0,
|
||||
"You can now hear shouts.\r\n",
|
||||
"You are now deaf to shouts.\r\n"},
|
||||
{"nogossip", PRF_NOGOSS, 0,
|
||||
"You can now hear gossip.\r\n",
|
||||
"You are now deaf to gossip.\r\n"},
|
||||
{"nograts", PRF_NOGRATZ, 0,
|
||||
"You can now hear gratz.\r\n",
|
||||
"You are now deaf to gratz.\r\n"},
|
||||
{"nowiz", PRF_NOWIZ, LVL_IMMORT,
|
||||
"You can now hear the Wiz-channel.\r\n",
|
||||
"You are now deaf to the Wiz-channel.\r\n"},
|
||||
{"quest", PRF_QUEST, 0,
|
||||
"Okay, you are part of the Quest.\r\n",
|
||||
"You are no longer part of the Quest.\r\n"},
|
||||
{"showvnums", PRF_SHOWVNUMS, LVL_IMMORT,
|
||||
"You will no longer see the vnums.\r\n",
|
||||
"You will now see the vnums.\r\n"},
|
||||
{"norepeat", PRF_NOREPEAT, 0,
|
||||
"You will now have your communication repeated.\r\n",
|
||||
"You will no longer have your communication repeated.\r\n"},
|
||||
{"holylight", PRF_HOLYLIGHT, LVL_IMMORT,
|
||||
"HolyLight mode off.\r\n",
|
||||
"HolyLight mode on.\r\n"},
|
||||
{"slownameserver", 0, LVL_IMPL,
|
||||
"Nameserver_is_slow changed to OFF; IP addresses will now be resolved.\r\n",
|
||||
"Nameserver_is_slow changed to ON; sitenames will no longer be resolved.\r\n"},
|
||||
{"autoexits", PRF_AUTOEXIT, 0,
|
||||
"Autoexits disabled.\r\n",
|
||||
"Autoexits enabled.\r\n"},
|
||||
{"trackthru", 0, LVL_IMPL,
|
||||
"Players can no longer track through doors.\r\n",
|
||||
"Players can now track through doors.\r\n"},
|
||||
{"clsolc", PRF_CLS, LVL_BUILDER,
|
||||
"You will no longer clear screen in OLC.\r\n",
|
||||
"You will now clear screen in OLC.\r\n"},
|
||||
{"buildwalk", PRF_BUILDWALK, LVL_BUILDER,
|
||||
"Buildwalk is now Off.\r\n",
|
||||
"Buildwalk is now On.\r\n"},
|
||||
{"afk", PRF_AFK, 0,
|
||||
"AFK is now Off.\r\n",
|
||||
"AFK is now On.\r\n"},
|
||||
{"color", 0, 0, "\n", "\n"},
|
||||
{"syslog", 0, LVL_IMMORT, "\n", "\n"},
|
||||
{"wimpy", 0, 0, "\n", "\n"},
|
||||
{"pagelength", 0, 0, "\n", "\n"},
|
||||
{"autoloot", PRF_AUTOLOOT, 0,
|
||||
"Autoloot disabled.\r\n",
|
||||
"Autoloot enabled.\r\n"},
|
||||
{"autogold", PRF_AUTOGOLD, 0,
|
||||
"Autogold disabled.\r\n",
|
||||
"Autogold enabled.\r\n"},
|
||||
{"autosplit", PRF_AUTOSPLIT, 0,
|
||||
"Autosplit disabled.\r\n",
|
||||
"Autosplit enabled.\r\n"},
|
||||
{"autosac", PRF_AUTOSAC, 0,
|
||||
"Autosac disabled.\r\n",
|
||||
"Autosac enabled.\r\n"},
|
||||
{"autoassist", PRF_AUTOASSIST, 0,
|
||||
"Autoassist disabled.\r\n",
|
||||
"Autoassist enabled.\r\n"},
|
||||
{"\n", 0, -1, "\n", "\n"} /* must be last */
|
||||
};
|
||||
|
||||
if (IS_NPC(ch))
|
||||
return;
|
||||
|
||||
|
@ -1839,95 +1928,6 @@ ACMD(do_toggle)
|
|||
return;
|
||||
}
|
||||
|
||||
const struct {
|
||||
char *command;
|
||||
bitvector_t toggle; /* this needs changing once hashmaps are implemented */
|
||||
char min_level;
|
||||
char *disable_msg;
|
||||
char *enable_msg;
|
||||
} tog_messages[] = {
|
||||
{"summonable", PRF_SUMMONABLE, 0,
|
||||
"You are now safe from summoning by other players.\r\n",
|
||||
"You may now be summoned by other players.\r\n"},
|
||||
{"nohassle", PRF_NOHASSLE, LVL_IMMORT,
|
||||
"Nohassle disabled.\r\n",
|
||||
"Nohassle enabled.\r\n"},
|
||||
{"brief", PRF_BRIEF, 0,
|
||||
"Brief mode off.\r\n",
|
||||
"Brief mode on.\r\n"},
|
||||
{"compact", PRF_COMPACT, 0,
|
||||
"Compact mode off.\r\n",
|
||||
"Compact mode on.\r\n"},
|
||||
{"notell", PRF_NOTELL, 0,
|
||||
"You can now hear tells.\r\n",
|
||||
"You are now deaf to tells.\r\n"},
|
||||
{"noauction", PRF_NOAUCT, 0,
|
||||
"You can now hear auctions.\r\n",
|
||||
"You are now deaf to auctions.\r\n"},
|
||||
{"noshout", PRF_NOSHOUT, 0,
|
||||
"You can now hear shouts.\r\n",
|
||||
"You are now deaf to shouts.\r\n"},
|
||||
{"nogossip", PRF_NOGOSS, 0,
|
||||
"You can now hear gossip.\r\n",
|
||||
"You are now deaf to gossip.\r\n"},
|
||||
{"nograts", PRF_NOGRATZ, 0,
|
||||
"You can now hear gratz.\r\n",
|
||||
"You are now deaf to gratz.\r\n"},
|
||||
{"nowiz", PRF_NOWIZ, LVL_IMMORT,
|
||||
"You can now hear the Wiz-channel.\r\n",
|
||||
"You are now deaf to the Wiz-channel.\r\n"},
|
||||
{"quest", PRF_QUEST, 0,
|
||||
"Okay, you are part of the Quest.\r\n",
|
||||
"You are no longer part of the Quest.\r\n"},
|
||||
{"showvnums", PRF_SHOWVNUMS, LVL_IMMORT,
|
||||
"You will no longer see the vnums.\r\n",
|
||||
"You will now see the vnums.\r\n"},
|
||||
{"norepeat", PRF_NOREPEAT, 0,
|
||||
"You will now have your communication repeated.\r\n",
|
||||
"You will no longer have your communication repeated.\r\n"},
|
||||
{"holylight", PRF_HOLYLIGHT, LVL_IMMORT,
|
||||
"HolyLight mode off.\r\n",
|
||||
"HolyLight mode on.\r\n"},
|
||||
{"slownameserver", 0, LVL_IMPL,
|
||||
"Nameserver_is_slow changed to OFF; IP addresses will now be resolved.\r\n",
|
||||
"Nameserver_is_slow changed to ON; sitenames will no longer be resolved.\r\n"},
|
||||
{"autoexits", PRF_AUTOEXIT, 0,
|
||||
"Autoexits disabled.\r\n",
|
||||
"Autoexits enabled.\r\n"},
|
||||
{"trackthru", 0, LVL_IMPL,
|
||||
"Players can no longer track through doors.\r\n",
|
||||
"Players can now track through doors.\r\n"},
|
||||
{"clsolc", PRF_CLS, LVL_BUILDER,
|
||||
"You will no longer clear screen in OLC.\r\n",
|
||||
"You will now clear screen in OLC.\r\n"},
|
||||
{"buildwalk", PRF_BUILDWALK, LVL_BUILDER,
|
||||
"Buildwalk is now Off.\r\n",
|
||||
"Buildwalk is now On.\r\n"},
|
||||
{"afk", PRF_AFK, 0,
|
||||
"AFK is now Off.\r\n",
|
||||
"AFK is now On.\r\n"},
|
||||
{"color", 0, 0, "\n", "\n"},
|
||||
{"syslog", 0, LVL_IMMORT, "\n", "\n"},
|
||||
{"wimpy", 0, 0, "\n", "\n"},
|
||||
{"pagelength", 0, 0, "\n", "\n"},
|
||||
{"autoloot", PRF_AUTOLOOT, 0,
|
||||
"Autoloot disabled.\r\n",
|
||||
"Autoloot enabled.\r\n"},
|
||||
{"autogold", PRF_AUTOGOLD, 0,
|
||||
"Autogold disabled.\r\n",
|
||||
"Autogold enabled.\r\n"},
|
||||
{"autosplit", PRF_AUTOSPLIT, 0,
|
||||
"Autosplit disabled.\r\n",
|
||||
"Autosplit enabled.\r\n"},
|
||||
{"autosac", PRF_AUTOSAC, 0,
|
||||
"Autosac disabled.\r\n",
|
||||
"Autosac enabled.\r\n"},
|
||||
{"autoassist", PRF_AUTOASSIST, 0,
|
||||
"Autoassist disabled.\r\n",
|
||||
"Autoassist enabled.\r\n"},
|
||||
{"\n", 0, -1, "\n", "\n"} /* must be last */
|
||||
};
|
||||
|
||||
len = strlen(arg);
|
||||
for (toggle = 0; *tog_messages[toggle].command != '\n'; toggle++)
|
||||
if (!strncmp(arg, tog_messages[toggle].command, len))
|
||||
|
@ -2149,10 +2149,11 @@ void free_history(struct char_data *ch, int type)
|
|||
ACMD(do_history)
|
||||
{
|
||||
char arg[MAX_INPUT_LENGTH];
|
||||
int type;
|
||||
|
||||
one_argument(argument, arg);
|
||||
|
||||
int type = search_block(arg, history_types, FALSE);
|
||||
type = search_block(arg, history_types, FALSE);
|
||||
if (!*arg || type < 0) {
|
||||
int i;
|
||||
|
||||
|
@ -2184,12 +2185,14 @@ void add_history(struct char_data *ch, char *str, int type)
|
|||
{
|
||||
int i = 0;
|
||||
char time_str[MAX_STRING_LENGTH], buf[MAX_STRING_LENGTH];
|
||||
struct txt_block *tmp;
|
||||
time_t ct;
|
||||
|
||||
if (IS_NPC(ch))
|
||||
return;
|
||||
|
||||
struct txt_block *tmp = GET_HISTORY(ch, type);
|
||||
time_t ct = time(0);
|
||||
tmp = GET_HISTORY(ch, type);
|
||||
ct = time(0);
|
||||
strftime(time_str, sizeof(time_str), "%H:%M ", localtime(&ct));
|
||||
|
||||
sprintf(buf, "%s%s", time_str, str);
|
||||
|
|
|
@ -269,12 +269,12 @@ ACMD(do_flee)
|
|||
was_fighting = FIGHTING(ch);
|
||||
if (do_simple_move(ch, attempt, TRUE)) {
|
||||
send_to_char(ch, "You flee head over heels.\r\n");
|
||||
stop_fighting(ch);
|
||||
stop_fighting(was_fighting);
|
||||
if (was_fighting && !IS_NPC(ch)) {
|
||||
if (was_fighting && !IS_NPC(ch)) {
|
||||
loss = GET_MAX_HIT(was_fighting) - GET_HIT(was_fighting);
|
||||
loss *= GET_LEVEL(was_fighting);
|
||||
gain_exp(ch, -loss);
|
||||
stop_fighting(ch);
|
||||
stop_fighting(was_fighting);
|
||||
}
|
||||
} else {
|
||||
act("$n tries to flee, but can't!", TRUE, ch, 0, 0, TO_ROOM);
|
||||
|
|
|
@ -85,7 +85,7 @@ ACMD(do_action)
|
|||
if (action->char_auto)
|
||||
send_to_char(ch, "%s\r\n", action->char_auto);
|
||||
else
|
||||
send_to_char(ch, "Erm, no.");
|
||||
send_to_char(ch, "Erm, no.\r\n");
|
||||
act(action->others_auto, action->hide, ch, 0, 0, TO_ROOM);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
|
||||
**************************************************************************/
|
||||
|
||||
#define NUM_OF_BOARDS 10 /* change if needed! */
|
||||
#define NUM_OF_BOARDS 7 /* change if needed! */
|
||||
#define MAX_BOARD_MESSAGES 60 /* arbitrary -- change if needed */
|
||||
#define MAX_MESSAGE_LENGTH 4096 /* arbitrary -- change if needed */
|
||||
|
||||
|
|
37
src/comm.c
37
src/comm.c
|
@ -109,6 +109,7 @@ static bool fCopyOver; /* Are we booting in copyover mode? */
|
|||
ush_int port;
|
||||
socket_t mother_desc;
|
||||
int log_this_messg;
|
||||
char *last_act_message = NULL;
|
||||
|
||||
/* local functions */
|
||||
RETSIGTYPE reread_wizlists(int sig);
|
||||
|
@ -172,6 +173,7 @@ void board_clear_all(void);
|
|||
void free_social_messages(void);
|
||||
void free_invalid_list(void);
|
||||
void free_command_list(void);
|
||||
void free_save_list(void);
|
||||
void load_config(void);
|
||||
void new_hist_messg(struct descriptor_data *d, const char *msg);
|
||||
#ifdef __CXREF__
|
||||
|
@ -210,6 +212,10 @@ int main(int argc, char **argv)
|
|||
int pos = 1;
|
||||
const char *dir;
|
||||
|
||||
#ifdef MEMORY_DEBUG
|
||||
zmalloc_init();
|
||||
#endif
|
||||
|
||||
#if CIRCLE_GNU_LIBC_MEMORY_TRACK
|
||||
mtrace(); /* This must come before any use of malloc(). */
|
||||
#endif
|
||||
|
@ -373,9 +379,13 @@ int main(int argc, char **argv)
|
|||
free_social_messages(); /* act.social.c */
|
||||
free_help_table(); /* db.c */
|
||||
free_invalid_list(); /* ban.c */
|
||||
free_save_list(); /* genolc.c */
|
||||
free_strings(&config_info, OASIS_CFG); /* oasis_delete.c */
|
||||
}
|
||||
|
||||
if (last_act_message)
|
||||
free(last_act_message);
|
||||
|
||||
/* probably should free the entire config here.. */
|
||||
free(CONFIG_CONFFILE);
|
||||
|
||||
|
@ -2402,7 +2412,7 @@ const char *ACTNULL = "<NULL>";
|
|||
#define CHECK_NULL(pointer, expression) \
|
||||
if ((pointer) == NULL) i = ACTNULL; else i = (expression);
|
||||
/* higher-level communication: the act() function */
|
||||
char *perform_act(const char *orig, struct char_data *ch, struct obj_data *obj,
|
||||
void perform_act(const char *orig, struct char_data *ch, struct obj_data *obj,
|
||||
const void *vict_obj, const struct char_data *to)
|
||||
{
|
||||
const char *i = NULL;
|
||||
|
@ -2525,13 +2535,14 @@ char *perform_act(const char *orig, struct char_data *ch, struct obj_data *obj,
|
|||
if ((IS_NPC(to) && dg_act_check) && (to != ch))
|
||||
act_mtrigger(to, lbuf, ch, dg_victim, obj, dg_target, dg_arg);
|
||||
|
||||
return strdup(lbuf);
|
||||
if (last_act_message)
|
||||
free(last_act_message);
|
||||
last_act_message = strdup(lbuf);
|
||||
}
|
||||
|
||||
char *act(const char *str, int hide_invisible, struct char_data *ch,
|
||||
struct obj_data *obj, const void *vict_obj, int type)
|
||||
{
|
||||
char *msg = NULL;
|
||||
const struct char_data *to;
|
||||
int to_sleeping;
|
||||
|
||||
|
@ -2556,14 +2567,18 @@ char *act(const char *str, int hide_invisible, struct char_data *ch,
|
|||
REMOVE_BIT(type, DG_NO_TRIG);
|
||||
|
||||
if (type == TO_CHAR) {
|
||||
if (ch && SENDOK(ch))
|
||||
return perform_act(str, ch, obj, vict_obj, ch);
|
||||
if (ch && SENDOK(ch)) {
|
||||
perform_act(str, ch, obj, vict_obj, ch);
|
||||
return last_act_message;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (type == TO_VICT) {
|
||||
if ((to = (const struct char_data *) vict_obj) != NULL && SENDOK(to))
|
||||
return perform_act(str, ch, obj, vict_obj, to);
|
||||
if ((to = (const struct char_data *) vict_obj) != NULL && SENDOK(to)) {
|
||||
perform_act(str, ch, obj, vict_obj, to);
|
||||
return last_act_message;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -2579,10 +2594,10 @@ char *act(const char *str, int hide_invisible, struct char_data *ch,
|
|||
!ROOM_FLAGGED(IN_ROOM(i->character), ROOM_SOUNDPROOF)) {
|
||||
|
||||
sprintf(buf, "%s%s%s", CCYEL(i->character, C_NRM), str, CCNRM(i->character, C_NRM));
|
||||
msg = perform_act(buf, ch, obj, vict_obj, i->character);
|
||||
perform_act(buf, ch, obj, vict_obj, i->character);
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
return last_act_message;
|
||||
}
|
||||
/* ASSUMPTION: at this point we know type must be TO_NOTVICT or TO_ROOM */
|
||||
|
||||
|
@ -2602,9 +2617,9 @@ char *act(const char *str, int hide_invisible, struct char_data *ch,
|
|||
continue;
|
||||
if (type != TO_ROOM && to == vict_obj)
|
||||
continue;
|
||||
msg = perform_act(str, ch, obj, vict_obj, to);
|
||||
perform_act(str, ch, obj, vict_obj, to);
|
||||
}
|
||||
return msg;
|
||||
return last_act_message;
|
||||
}
|
||||
|
||||
/* Prefer the file over the descriptor. */
|
||||
|
|
|
@ -24,7 +24,7 @@ void send_to_range(room_vnum start, room_vnum finish, const char *messg, ...)
|
|||
__attribute__ ((format (printf, 3, 4)));
|
||||
|
||||
void close_socket(struct descriptor_data *d);
|
||||
char * perform_act(const char *orig, struct char_data *ch, struct obj_data *obj, const void *vict_obj, const struct char_data *to);
|
||||
void perform_act(const char *orig, struct char_data *ch, struct obj_data *obj, const void *vict_obj, const struct char_data *to);
|
||||
char * act(const char *str, int hide_invisible, struct char_data *ch, struct obj_data *obj, const void *vict_obj, int type);
|
||||
|
||||
#define TO_ROOM 1
|
||||
|
|
51
src/db.c
51
src/db.c
|
@ -2086,7 +2086,8 @@ void get_one_line(FILE *fl, char *buf)
|
|||
buf[strlen(buf) - 1] = '\0'; /* take off the trailing \n */
|
||||
}
|
||||
|
||||
void free_help(struct help_index_element *help) {
|
||||
void free_help(struct help_index_element *help)
|
||||
{
|
||||
if (help->keywords)
|
||||
free(help->keywords);
|
||||
if (help->entry && !help->duplicate)
|
||||
|
@ -2762,13 +2763,13 @@ void free_char(struct char_data *ch)
|
|||
free(ch->player.long_descr);
|
||||
if (ch->player.description)
|
||||
free(ch->player.description);
|
||||
if (ch->player_specials)
|
||||
free(ch->player_specials);
|
||||
|
||||
for (i = 0; i < NUM_HIST; i++)
|
||||
if (GET_HISTORY(ch, i))
|
||||
free(GET_HISTORY(ch, i));
|
||||
|
||||
if (ch->player_specials)
|
||||
free(ch->player_specials);
|
||||
|
||||
/* free script proto list */
|
||||
free_proto_script(ch, MOB_TRIGGER);
|
||||
|
||||
|
@ -3052,21 +3053,21 @@ room_rnum real_room(room_vnum vnum)
|
|||
bot = 0;
|
||||
top = top_of_world;
|
||||
|
||||
if (world[bot].number > vnum || world[top].number < vnum)
|
||||
return (NOWHERE);
|
||||
|
||||
/* perform binary search on world-table */
|
||||
for (;;) {
|
||||
while (bot<= top) {
|
||||
mid = (bot + top) / 2;
|
||||
|
||||
if ((world + mid)->number == vnum)
|
||||
return (mid);
|
||||
if (bot > top)
|
||||
return (NOWHERE);
|
||||
if (top == 0)
|
||||
return (NOWHERE);
|
||||
if ((world + mid)->number > vnum)
|
||||
top = mid - 1;
|
||||
else
|
||||
bot = mid + 1;
|
||||
}
|
||||
return (NOWHERE);
|
||||
}
|
||||
|
||||
/* returns the real number of the monster with given virtual number */
|
||||
|
@ -3077,21 +3078,22 @@ mob_rnum real_mobile(mob_vnum vnum)
|
|||
bot = 0;
|
||||
top = top_of_mobt;
|
||||
|
||||
/* quickly reject out-of-range vnums */
|
||||
if (mob_index[bot].vnum > vnum || mob_index[top].vnum < vnum)
|
||||
return (NOBODY);
|
||||
|
||||
/* perform binary search on mob-table */
|
||||
for (;;) {
|
||||
while (bot <= top) {
|
||||
mid = (bot + top) / 2;
|
||||
|
||||
if ((mob_index + mid)->vnum == vnum)
|
||||
return (mid);
|
||||
if (bot > top)
|
||||
return (NOBODY);
|
||||
if (top == 0)
|
||||
return (NOBODY);
|
||||
if ((mob_index + mid)->vnum > vnum)
|
||||
top = mid - 1;
|
||||
else
|
||||
bot = mid + 1;
|
||||
}
|
||||
return (NOBODY);
|
||||
}
|
||||
|
||||
/* returns the real number of the object with given virtual number */
|
||||
|
@ -3102,21 +3104,22 @@ obj_rnum real_object(obj_vnum vnum)
|
|||
bot = 0;
|
||||
top = top_of_objt;
|
||||
|
||||
/* quickly reject out-of-range vnums */
|
||||
if (obj_index[bot].vnum > vnum || obj_index[top].vnum < vnum)
|
||||
return (NOTHING);
|
||||
|
||||
/* perform binary search on obj-table */
|
||||
for (;;) {
|
||||
while (bot <= top) {
|
||||
mid = (bot + top) / 2;
|
||||
|
||||
if ((obj_index + mid)->vnum == vnum)
|
||||
return (mid);
|
||||
if (bot > top)
|
||||
return (NOTHING);
|
||||
if (top == 0)
|
||||
return (NOTHING);
|
||||
if ((obj_index + mid)->vnum > vnum)
|
||||
top = mid - 1;
|
||||
else
|
||||
bot = mid + 1;
|
||||
}
|
||||
return (NOTHING);
|
||||
}
|
||||
|
||||
/* returns the real number of the zone with given virtual number */
|
||||
|
@ -3127,21 +3130,21 @@ zone_rnum real_zone(zone_vnum vnum)
|
|||
bot = 0;
|
||||
top = top_of_zone_table;
|
||||
|
||||
if (zone_table[bot].number > vnum || zone_table[top].number < vnum)
|
||||
return (NOWHERE);
|
||||
|
||||
/* perform binary search on zone-table */
|
||||
for (;;) {
|
||||
while (bot <= top) {
|
||||
mid = (bot + top) / 2;
|
||||
|
||||
if ((zone_table + mid)->number == vnum)
|
||||
return (mid);
|
||||
if (bot > top)
|
||||
return (NOWHERE);
|
||||
if (top == 0)
|
||||
return (NOWHERE);
|
||||
if ((zone_table + mid)->number > vnum)
|
||||
top = mid - 1;
|
||||
else
|
||||
bot = mid + 1;
|
||||
}
|
||||
return (NOWHERE);
|
||||
}
|
||||
|
||||
/* Extend later to include more checks and add checks for unknown bitvectors. */
|
||||
|
|
|
@ -99,14 +99,6 @@ long event_time(struct event *event)
|
|||
/* frees all events in the queue */
|
||||
void event_free_all(void)
|
||||
{
|
||||
struct event *the_event;
|
||||
|
||||
while ((the_event = (struct event *) queue_head(event_q))) {
|
||||
if (the_event->event_obj)
|
||||
free(the_event->event_obj);
|
||||
free(the_event);
|
||||
}
|
||||
|
||||
queue_free(event_q);
|
||||
}
|
||||
|
||||
|
@ -237,13 +229,19 @@ void queue_free(struct queue *q)
|
|||
{
|
||||
int i;
|
||||
struct q_element *qe, *next_qe;
|
||||
struct event *event;
|
||||
|
||||
for (i = 0; i < NUM_EVENT_QUEUES; i++)
|
||||
for (qe = q->head[i]; qe; qe = next_qe) {
|
||||
next_qe = qe->next;
|
||||
if ((event = (struct event *) qe->data) != NULL) {
|
||||
if (event->event_obj)
|
||||
free(event->event_obj);
|
||||
free(event);
|
||||
}
|
||||
free(qe);
|
||||
}
|
||||
|
||||
free(q);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ void do_dg_affect(void *go, struct script_data *sc, trig_data *trig,
|
|||
|
||||
/* add the affect */
|
||||
af.type = SPELL_DG_AFFECT;
|
||||
af.duration = duration;
|
||||
af.duration = duration -1;
|
||||
af.modifier = value;
|
||||
|
||||
if (type == APPLY_TYPE) {
|
||||
|
@ -238,7 +238,7 @@ void do_dg_affect(void *go, struct script_data *sc, trig_data *trig,
|
|||
af.bitvector = 0;
|
||||
} else {
|
||||
af.location = 0;
|
||||
af.bitvector = (1<<i);
|
||||
af.bitvector = (i);
|
||||
}
|
||||
|
||||
affect_to_char(ch, &af);
|
||||
|
|
12
src/dg_olc.c
12
src/dg_olc.c
|
@ -513,11 +513,6 @@ void trigedit_save(struct descriptor_data *d)
|
|||
new_index[rnum]->proto = proto;
|
||||
trig_data_copy(proto, trig);
|
||||
|
||||
if (trig->name)
|
||||
proto->name = strdup(trig->name);
|
||||
if (trig->arglist)
|
||||
proto->arglist = strdup(trig->arglist);
|
||||
|
||||
new_index[rnum + 1] = trig_index[rnum];
|
||||
|
||||
proto = trig_index[rnum]->proto;
|
||||
|
@ -543,11 +538,6 @@ void trigedit_save(struct descriptor_data *d)
|
|||
CREATE(proto, struct trig_data, 1);
|
||||
new_index[rnum]->proto = proto;
|
||||
trig_data_copy(proto, trig);
|
||||
|
||||
if (trig->name)
|
||||
proto->name = strdup(trig->name);
|
||||
if (trig->arglist)
|
||||
proto->arglist = strdup(trig->arglist);
|
||||
}
|
||||
|
||||
free(trig_index);
|
||||
|
@ -557,7 +547,7 @@ void trigedit_save(struct descriptor_data *d)
|
|||
|
||||
/* HERE IT HAS TO GO THROUGH AND FIX ALL SCRIPTS/TRIGS OF HIGHER RNUM */
|
||||
for (live_trig = trigger_list; live_trig; live_trig = live_trig->next_in_world)
|
||||
GET_TRIG_RNUM(live_trig) += (GET_TRIG_RNUM(live_trig) > rnum);
|
||||
GET_TRIG_RNUM(live_trig) += (GET_TRIG_RNUM(live_trig) != NOTHING && GET_TRIG_RNUM(live_trig) > rnum);
|
||||
|
||||
/* Update other trigs being edited. */
|
||||
for (dsc = descriptor_list; dsc; dsc = dsc->next)
|
||||
|
|
|
@ -2625,25 +2625,26 @@ int script_driver(void *go_adress, trig_data *trig, int type, int mode)
|
|||
/* returns the real number of the trigger with given virtual number */
|
||||
trig_rnum real_trigger(trig_vnum vnum)
|
||||
{
|
||||
int bot = 0, mid;
|
||||
int top = top_of_trigt-1;
|
||||
trig_rnum bot, top, mid;
|
||||
|
||||
bot = 0;
|
||||
top = top_of_trigt - 1;
|
||||
|
||||
if (!top_of_trigt || trig_index[bot]->vnum > vnum || trig_index[top]->vnum < vnum)
|
||||
return (NOTHING);
|
||||
|
||||
/* perform binary search on trigger-table */
|
||||
for (;;) {
|
||||
while (bot <= top) {
|
||||
mid = (bot + top) / 2;
|
||||
|
||||
/* Thanks to Derek Fisk for fixing this loop */
|
||||
if (bot > top)
|
||||
return (NOTHING);
|
||||
if (trig_index[mid]->vnum == vnum)
|
||||
return (mid);
|
||||
if (top == 0)
|
||||
return (NOTHING);
|
||||
if (trig_index[mid]->vnum > vnum)
|
||||
top = mid - 1;
|
||||
else
|
||||
bot = mid + 1;
|
||||
}
|
||||
return (NOTHING);
|
||||
}
|
||||
|
||||
ACMD(do_tstat)
|
||||
|
|
|
@ -72,7 +72,7 @@ int add_mobile(struct char_data *mob, mob_vnum vnum)
|
|||
|
||||
/* Update live mobile rnums. */
|
||||
for (live_mob = character_list; live_mob; live_mob = live_mob->next)
|
||||
GET_MOB_RNUM(live_mob) += (GET_MOB_RNUM(live_mob) >= found);
|
||||
GET_MOB_RNUM(live_mob) += (GET_MOB_RNUM(live_mob) != NOTHING && GET_MOB_RNUM(live_mob) >= found);
|
||||
|
||||
/* Update zone table. */
|
||||
for (zone = 0; zone <= top_of_zone_table; zone++)
|
||||
|
@ -83,7 +83,7 @@ int add_mobile(struct char_data *mob, mob_vnum vnum)
|
|||
/* Update shop keepers. */
|
||||
if (shop_index)
|
||||
for (shop = 0; shop <= top_shop - top_shop_offset; shop++)
|
||||
SHOP_KEEPER(shop) += (SHOP_KEEPER(shop) >= found);
|
||||
SHOP_KEEPER(shop) += (SHOP_KEEPER(shop) != NOTHING && SHOP_KEEPER(shop) >= found);
|
||||
|
||||
add_to_save_list(zone_table[real_zone_by_thing(vnum)].number, SL_MOB);
|
||||
return found;
|
||||
|
|
|
@ -65,6 +65,7 @@ int update_all_objects(struct obj_data *refobj)
|
|||
*obj = *refobj;
|
||||
|
||||
/* Copy game-time dependent variables over. */
|
||||
GET_ID(obj) = swap.id;
|
||||
IN_ROOM(obj) = swap.in_room;
|
||||
obj->carried_by = swap.carried_by;
|
||||
obj->worn_by = swap.worn_by;
|
||||
|
@ -96,7 +97,7 @@ obj_rnum adjust_objects(obj_rnum refpt)
|
|||
|
||||
/* Renumber live objects. */
|
||||
for (obj = object_list; obj; obj = obj->next)
|
||||
GET_OBJ_RNUM(obj) += (GET_OBJ_RNUM(obj) >= refpt);
|
||||
GET_OBJ_RNUM(obj) += (GET_OBJ_RNUM(obj) != NOTHING && GET_OBJ_RNUM(obj) >= refpt);
|
||||
|
||||
/* Renumber zone table. */
|
||||
for (zone = 0; zone <= top_of_zone_table; zone++) {
|
||||
|
@ -374,15 +375,16 @@ int copy_object_main(struct obj_data *to, struct obj_data *from, int free_object
|
|||
int delete_object(obj_rnum rnum)
|
||||
{
|
||||
obj_rnum i;
|
||||
zone_rnum zrnum;
|
||||
struct obj_data *obj, *tmp;
|
||||
int shop, j;
|
||||
int shop, j, zone, cmd_no;
|
||||
|
||||
if (rnum == NOTHING || rnum > top_of_objt)
|
||||
return NOTHING;
|
||||
|
||||
obj = &obj_proto[rnum];
|
||||
|
||||
zone_rnum zrnum = real_zone_by_thing(GET_OBJ_VNUM(obj));
|
||||
zrnum = real_zone_by_thing(GET_OBJ_VNUM(obj));
|
||||
|
||||
/* This is something you might want to read about in the logs. */
|
||||
log("GenOLC: delete_object: Deleting object #%d (%s).", GET_OBJ_VNUM(obj), obj->short_description);
|
||||
|
@ -443,7 +445,6 @@ int delete_object(obj_rnum rnum)
|
|||
SHOP_PRODUCT(shop, j) -= (SHOP_PRODUCT(shop, j) > rnum);
|
||||
|
||||
/* Renumber zone table. */
|
||||
int zone, cmd_no;
|
||||
for (zone = 0; zone <= top_of_zone_table; zone++) {
|
||||
for (cmd_no = 0; ZCMD(zone, cmd_no).command != 'S'; cmd_no++) {
|
||||
switch (ZCMD(zone, cmd_no).command) {
|
||||
|
|
10
src/genolc.c
10
src/genolc.c
|
@ -189,6 +189,16 @@ int in_save_list(zone_vnum zone, int type)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void free_save_list(void)
|
||||
{
|
||||
struct save_list_data *sld, *next_sld;
|
||||
|
||||
for (sld = save_list; sld; sld = next_sld) {
|
||||
next_sld = sld->next;
|
||||
free(sld);
|
||||
}
|
||||
}
|
||||
|
||||
/* Used from do_show(), ideally. */
|
||||
ACMD(do_show_save_list)
|
||||
{
|
||||
|
|
|
@ -27,8 +27,11 @@ zone_rnum real_zone_by_thing(room_vnum vznum)
|
|||
bot = 0;
|
||||
top = top_of_zone_table;
|
||||
|
||||
if (genolc_zone_bottom(bot) > vznum || zone_table[top].top < vznum)
|
||||
return (NOWHERE);
|
||||
|
||||
/* perform binary search on zone-table */
|
||||
for (;;) {
|
||||
while (bot <= top) {
|
||||
mid = (bot + top) / 2;
|
||||
|
||||
/* Upper/lower bounds of the zone. */
|
||||
|
@ -37,13 +40,12 @@ zone_rnum real_zone_by_thing(room_vnum vznum)
|
|||
|
||||
if (low <= vznum && vznum <= high)
|
||||
return mid;
|
||||
if (bot >= top)
|
||||
return NOWHERE;
|
||||
if (low > vznum)
|
||||
top = mid - 1;
|
||||
else
|
||||
bot = mid + 1;
|
||||
}
|
||||
return (NOWHERE);
|
||||
}
|
||||
|
||||
zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top, const char **error)
|
||||
|
|
18
src/hedit.c
18
src/hedit.c
|
@ -112,7 +112,7 @@ void hedit_setup_new(struct descriptor_data *d)
|
|||
CREATE(OLC_HELP(d), struct help_index_element, 1);
|
||||
|
||||
OLC_HELP(d)->keywords = strdup(OLC_STORAGE(d));
|
||||
OLC_HELP(d)->entry = strdup("This help file is unfinished.\r\n");
|
||||
OLC_HELP(d)->entry = strdup("KEYWORDS\r\n\r\nThis help file is unfinished.\r\n");
|
||||
OLC_HELP(d)->min_level = 0;
|
||||
OLC_HELP(d)->duplicate = 0;
|
||||
OLC_VAL(d) = 0;
|
||||
|
@ -138,9 +138,9 @@ void hedit_save_internally(struct descriptor_data *d)
|
|||
struct help_index_element *new_help_table = NULL;
|
||||
|
||||
if (OLC_ZNUM(d) > top_of_helpt) {
|
||||
int i;
|
||||
CREATE(new_help_table, struct help_index_element, top_of_helpt + 2);
|
||||
|
||||
int i;
|
||||
for (i = 0; i <= top_of_helpt; i++)
|
||||
new_help_table[i] = help_table[i];
|
||||
new_help_table[++top_of_helpt] = *OLC_HELP(d);
|
||||
|
@ -157,6 +157,7 @@ void hedit_save_to_disk(struct descriptor_data *d)
|
|||
{
|
||||
FILE *fp;
|
||||
char buf1[MAX_STRING_LENGTH], index_name[READ_SIZE];
|
||||
int i;
|
||||
|
||||
snprintf(index_name, sizeof(index_name), "%s%s", HLP_PREFIX, HELP_FILE);
|
||||
if (!(fp = fopen(index_name, "w"))) {
|
||||
|
@ -164,7 +165,6 @@ void hedit_save_to_disk(struct descriptor_data *d)
|
|||
return;
|
||||
}
|
||||
|
||||
int i;
|
||||
for (i = 0; i <= top_of_helpt; i++) {
|
||||
if (help_table[i].duplicate)
|
||||
continue;
|
||||
|
@ -192,13 +192,11 @@ void hedit_disp_menu(struct descriptor_data *d)
|
|||
|
||||
write_to_output(d,
|
||||
"%s-- Help file editor\r\n"
|
||||
"%s1%s) Keywords : %s%s\r\n"
|
||||
"%s2%s) Entry :\r\n%s%s"
|
||||
"%s3%s) Min Level : %s%d\r\n"
|
||||
"%s1%s) Entry :\r\n%s%s"
|
||||
"%s2%s) Min Level : %s%d\r\n"
|
||||
"%sQ%s) Quit\r\n"
|
||||
"Enter choice : ",
|
||||
nrm,
|
||||
grn, nrm, yel, OLC_HELP(d)->keywords,
|
||||
grn, nrm, yel, OLC_HELP(d)->entry,
|
||||
grn, nrm, yel, OLC_HELP(d)->min_level,
|
||||
grn, nrm
|
||||
|
@ -301,10 +299,6 @@ void hedit_parse(struct descriptor_data *d, char *arg)
|
|||
}
|
||||
break;
|
||||
case '1':
|
||||
write_to_output(d, "Enter keywords:-\r\n] ");
|
||||
OLC_MODE(d) = HEDIT_KEYWORDS;
|
||||
break;
|
||||
case '2':
|
||||
OLC_MODE(d) = HEDIT_ENTRY;
|
||||
clear_screen(d);
|
||||
send_editor_help(d);
|
||||
|
@ -316,7 +310,7 @@ void hedit_parse(struct descriptor_data *d, char *arg)
|
|||
string_write(d, &OLC_HELP(d)->entry, MAX_MESSAGE_LENGTH, 0, oldtext);
|
||||
OLC_VAL(d) = 1;
|
||||
break;
|
||||
case '3':
|
||||
case 'M':
|
||||
write_to_output(d, "Enter min level : ");
|
||||
OLC_MODE(d) = HEDIT_MIN_LEVEL;
|
||||
break;
|
||||
|
|
|
@ -479,6 +479,7 @@ int format_text(char **ptr_string, int mode, struct descriptor_data *d, unsigned
|
|||
int line_chars, cap_next = TRUE, cap_next_next = FALSE, color_chars = 0, i, pass_line = 0;
|
||||
char *flow, *start = NULL, temp;
|
||||
char formatted[MAX_STRING_LENGTH] = "";
|
||||
char str[MAX_STRING_LENGTH];
|
||||
|
||||
/* Fix memory overrun. */
|
||||
if (d->max_str > MAX_STRING_LENGTH) {
|
||||
|
@ -490,7 +491,6 @@ int format_text(char **ptr_string, int mode, struct descriptor_data *d, unsigned
|
|||
if ((flow = *ptr_string) == NULL)
|
||||
return 0;
|
||||
|
||||
char str[MAX_STRING_LENGTH];
|
||||
strcpy(str, flow);
|
||||
|
||||
for (i = 0; i < low - 1; i++) {
|
||||
|
|
|
@ -279,7 +279,7 @@ cpp_extern const struct command_info cmd_info[] = {
|
|||
{ "close" , "cl" , POS_SITTING , do_gen_door , 0, SCMD_CLOSE },
|
||||
{ "clear" , "cle" , POS_DEAD , do_gen_ps , 0, SCMD_CLEAR },
|
||||
{ "cls" , "cls" , POS_DEAD , do_gen_ps , 0, SCMD_CLEAR },
|
||||
{ "clsolc" , "clsolc" , POS_DEAD , do_gen_tog , 0, SCMD_CLS },
|
||||
{ "clsolc" , "clsolc" , POS_DEAD , do_gen_tog , LVL_BUILDER, SCMD_CLS },
|
||||
{ "consider" , "con" , POS_RESTING , do_consider , 0, 0 },
|
||||
{ "commands" , "com" , POS_DEAD , do_commands , 0, SCMD_COMMANDS },
|
||||
{ "compact" , "comp" , POS_DEAD , do_gen_tog , 0, SCMD_COMPACT },
|
||||
|
@ -1193,8 +1193,10 @@ int perform_dupe_check(struct descriptor_data *d)
|
|||
|
||||
/* no target for switching into was found - allow login to continue */
|
||||
if (!target) {
|
||||
GET_PREF(d->character)= rand_number(1, 128000);
|
||||
GET_HOST(d->character)= strdup(d->host);
|
||||
GET_PREF(d->character) = rand_number(1, 128000);
|
||||
if (GET_HOST(d->character))
|
||||
free(GET_HOST(d->character));
|
||||
GET_HOST(d->character) = strdup(d->host);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1340,7 +1342,7 @@ void nanny(struct descriptor_data *d, char *arg)
|
|||
CREATE(d->character, struct char_data, 1);
|
||||
clear_char(d->character);
|
||||
CREATE(d->character->player_specials, struct player_special_data, 1);
|
||||
GET_HOST(d->character) = strdup(d->host);
|
||||
GET_HOST(d->character) = strdup(d->host);
|
||||
d->character->desc = d;
|
||||
}
|
||||
if (!*arg)
|
||||
|
|
|
@ -263,7 +263,7 @@ char *read_delete(long recipient)
|
|||
to = get_name_by_id(record_to_keep->recipient);
|
||||
|
||||
snprintf(buf, sizeof(buf),
|
||||
" * * * * Midgaard Mail System * * * *\r\n"
|
||||
" * * * * tbaMUD Mail System * * * *\r\n"
|
||||
"Date: %s\r\n"
|
||||
"To : %s\r\n"
|
||||
"From: %s\r\n"
|
||||
|
|
11
src/medit.c
11
src/medit.c
|
@ -281,9 +281,9 @@ void medit_save_internally(struct descriptor_data *d)
|
|||
/* Update keepers in shops being edited and other mobs being edited. */
|
||||
for (dsc = descriptor_list; dsc; dsc = dsc->next) {
|
||||
if (STATE(dsc) == CON_SEDIT)
|
||||
S_KEEPER(OLC_SHOP(dsc)) += (S_KEEPER(OLC_SHOP(dsc)) >= new_rnum);
|
||||
S_KEEPER(OLC_SHOP(dsc)) += (S_KEEPER(OLC_SHOP(dsc)) != NOTHING && S_KEEPER(OLC_SHOP(dsc)) >= new_rnum);
|
||||
else if (STATE(dsc) == CON_MEDIT)
|
||||
GET_MOB_RNUM(OLC_MOB(dsc)) += (GET_MOB_RNUM(OLC_MOB(dsc)) >= new_rnum);
|
||||
GET_MOB_RNUM(OLC_MOB(dsc)) += (GET_MOB_RNUM(OLC_MOB(dsc)) != NOTHING && GET_MOB_RNUM(OLC_MOB(dsc)) >= new_rnum);
|
||||
}
|
||||
|
||||
/* Update other people in zedit too. From: C.Raehl 4/27/99 */
|
||||
|
@ -470,9 +470,14 @@ void medit_parse(struct descriptor_data *d, char *arg)
|
|||
write_to_output(d, "Mobile saved to disk.\r\n");
|
||||
} else
|
||||
write_to_output(d, "Mobile saved to memory.\r\n");
|
||||
/* FALL THROUGH */
|
||||
cleanup_olc(d, CLEANUP_ALL);
|
||||
return;
|
||||
case 'n':
|
||||
case 'N':
|
||||
/* If not saving, we must free the script_proto list. We do so by
|
||||
* assigning it to the edited mob and letting free_mobile in
|
||||
* cleanup_olc handle it. */
|
||||
OLC_MOB(d)->proto_script = OLC_SCRIPT(d);
|
||||
cleanup_olc(d, CLEANUP_ALL);
|
||||
return;
|
||||
default:
|
||||
|
|
|
@ -152,6 +152,9 @@ void list_rooms(struct char_data *ch, zone_rnum rnum, room_vnum vmin, room_vnum
|
|||
"Index VNum Room Name Exits\r\n"
|
||||
"----- ------- ---------------------------------------- -----\r\n");
|
||||
|
||||
if (!top_of_world)
|
||||
return;
|
||||
|
||||
for (i = 0; i <= top_of_world; i++) {
|
||||
|
||||
/** Check to see if this room is one of the ones needed to be listed. **/
|
||||
|
@ -202,6 +205,9 @@ void list_mobiles(struct char_data *ch, zone_rnum rnum, mob_vnum vmin, mob_vnum
|
|||
"Index VNum Mobile Name Level\r\n"
|
||||
"----- ------- --------------------------------------------- -----\r\n");
|
||||
|
||||
if (!top_of_mobt)
|
||||
return;
|
||||
|
||||
for (i = 0; i <= top_of_mobt; i++) {
|
||||
if (mob_index[i].vnum >= bottom && mob_index[i].vnum <= top) {
|
||||
counter++;
|
||||
|
@ -238,6 +244,9 @@ void list_objects(struct char_data *ch, zone_rnum rnum, room_vnum vmin, room_vnu
|
|||
"Index VNum Object Name Object Type\r\n"
|
||||
"----- ------- -------------------------------------------- ----------------\r\n");
|
||||
|
||||
if (!top_of_objt)
|
||||
return;
|
||||
|
||||
for (i = 0; i <= top_of_objt; i++) {
|
||||
if (obj_index[i].vnum >= bottom && obj_index[i].vnum <= top) {
|
||||
counter++;
|
||||
|
@ -320,6 +329,9 @@ void list_zones(struct char_data *ch, zone_rnum rnum, zone_vnum vmin, zone_vnum
|
|||
"VNum Zone Name Builder(s)\r\n"
|
||||
"----- ------------------------------ --------------------------------------\r\n");
|
||||
|
||||
if (!top_of_zone_table)
|
||||
return;
|
||||
|
||||
for (i = 0; i <= top_of_zone_table; i++) {
|
||||
if (zone_table[i].number >= bottom && zone_table[i].number <= top) {
|
||||
send_to_char(ch, "[%s%3d%s] %s%-*s %s%-1s%s\r\n",
|
||||
|
|
|
@ -711,10 +711,13 @@ void oedit_parse(struct descriptor_data *d, char *arg)
|
|||
write_to_output(d, "Object saved to disk.\r\n");
|
||||
} else
|
||||
write_to_output(d, "Object saved to memory.\r\n");
|
||||
|
||||
/* Fall through. */
|
||||
cleanup_olc(d, CLEANUP_ALL);
|
||||
return;
|
||||
case 'n':
|
||||
case 'N':
|
||||
/* If not saving, we must free the script_proto list. */
|
||||
OLC_OBJ(d)->proto_script = OLC_SCRIPT(d);
|
||||
free_proto_script(OLC_OBJ(d), OBJ_TRIGGER);
|
||||
cleanup_olc(d, CLEANUP_ALL);
|
||||
return;
|
||||
case 'a': /* abort quit */
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "pfdefaults.h"
|
||||
#include "dg_scripts.h"
|
||||
#include "comm.h"
|
||||
#include "interpreter.h"
|
||||
|
||||
#define LOAD_HIT 0
|
||||
#define LOAD_MANA 1
|
||||
|
@ -258,7 +259,6 @@ int load_char(const char *name, struct char_data *ch)
|
|||
GET_MOVE(ch) = PFDEF_MOVE;
|
||||
GET_MAX_MOVE(ch) = PFDEF_MAXMOVE;
|
||||
GET_OLC_ZONE(ch) = PFDEF_OLC;
|
||||
GET_HOST(ch) = NULL;
|
||||
GET_PAGE_LENGTH(ch) = PFDEF_PAGELENGTH;
|
||||
GET_ALIASES(ch) = NULL;
|
||||
SITTING(ch) = NULL;
|
||||
|
@ -334,8 +334,12 @@ int load_char(const char *name, struct char_data *ch)
|
|||
case 'H':
|
||||
if (!strcmp(tag, "Hit ")) load_HMVS(ch, line, LOAD_HIT);
|
||||
else if (!strcmp(tag, "Hite")) GET_HEIGHT(ch) = atoi(line);
|
||||
else if (!strcmp(tag, "Host")) GET_HOST(ch) = strdup(line);
|
||||
else if (!strcmp(tag, "Hrol")) GET_HITROLL(ch) = atoi(line);
|
||||
else if (!strcmp(tag, "Host")) {
|
||||
if (GET_HOST(ch))
|
||||
free(GET_HOST(ch));
|
||||
GET_HOST(ch) = strdup(line);
|
||||
}
|
||||
else if (!strcmp(tag, "Hrol")) GET_HITROLL(ch) = atoi(line);
|
||||
else if (!strcmp(tag, "Hung")) GET_COND(ch, HUNGER) = atoi(line);
|
||||
break;
|
||||
|
||||
|
@ -370,13 +374,22 @@ int load_char(const char *name, struct char_data *ch)
|
|||
else if (!strcmp(tag, "Plyd")) ch->player.time.played = atoi(line);
|
||||
else if (!strcmp(tag, "PfIn")) POOFIN(ch) = strdup(line);
|
||||
else if (!strcmp(tag, "PfOt")) POOFOUT(ch) = strdup(line);
|
||||
else if (!strcmp(tag, "Pref"))
|
||||
/* else if (!strcmp(tag, "Pref"))
|
||||
sscanf(line, "%s %s %s %s", f1, f2, f3, f4);
|
||||
PRF_FLAGS(ch)[0] = asciiflag_conv(f1);
|
||||
PRF_FLAGS(ch)[1] = asciiflag_conv(f2);
|
||||
PRF_FLAGS(ch)[2] = asciiflag_conv(f3);
|
||||
PRF_FLAGS(ch)[3] = asciiflag_conv(f4);
|
||||
break;
|
||||
*/
|
||||
else if (!strcmp(tag, "Pref")) {
|
||||
char *temp = line;
|
||||
temp = one_argument(temp, line);
|
||||
for (i = 0; *line && i < PR_ARRAY_MAX; i++) {
|
||||
PRF_FLAGS(ch)[i] = asciiflag_conv(line);
|
||||
temp = one_argument(temp, line);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'Q':
|
||||
if (!strcmp(tag, "Qstp")) GET_QUESTPOINTS(ch) = atoi(line);
|
||||
|
|
|
@ -483,12 +483,15 @@ void redit_parse(struct descriptor_data *d, char *arg)
|
|||
write_to_output(d, "Room saved to disk.\r\n");
|
||||
} else
|
||||
write_to_output(d, "Room saved to memory.\r\n");
|
||||
/* Do NOT free strings! Just the room structure. */
|
||||
cleanup_olc(d, CLEANUP_STRUCTS);
|
||||
/* Free everything. */
|
||||
cleanup_olc(d, CLEANUP_ALL);
|
||||
break;
|
||||
case 'n':
|
||||
case 'N':
|
||||
/* Free everything up, including strings, etc. */
|
||||
/* If not saving, we must free the script_proto list. We do so by
|
||||
* assigning it to the edited room and letting free_room in
|
||||
* cleanup_olc handle it. */
|
||||
OLC_ROOM(d)->proto_script = OLC_SCRIPT(d);
|
||||
cleanup_olc(d, CLEANUP_ALL);
|
||||
break;
|
||||
default:
|
||||
|
|
513
src/zmalloc.c
513
src/zmalloc.c
|
@ -5,8 +5,18 @@
|
|||
* Version 2. Copyright 1996, 1998, 1999, 2000 Eric Murray. *
|
||||
**************************************************************************/
|
||||
|
||||
/* local functions */
|
||||
void zfree_special (int *, char *, int);
|
||||
/*
|
||||
** Zmalloc, a simple memory-allocation monitor.
|
||||
**
|
||||
** Copyright 1996,1998,1999,2000 Eric Murray, ericm@lne.com
|
||||
** You may make free use of this code but please give me credit.
|
||||
** Documentation: http://www.lne.com/ericm/zmalloc
|
||||
*
|
||||
* Usage: to enable call zmalloc_init() at the very start of your
|
||||
* program to open the logfile and call zmalloc_check() at the end
|
||||
* to display memory leaks and free all allocated mem.
|
||||
* See the main() test function at the bottom for an example.
|
||||
*/
|
||||
|
||||
/* protect our calloc() and free() calls from recursive redefinition: */
|
||||
#define ZMALLOC_H
|
||||
|
@ -14,8 +24,9 @@ void zfree_special (int *, char *, int);
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
/* #define NO_MEMORY_PADDING */
|
||||
//#define NO_MEMORY_PADDING
|
||||
|
||||
#ifndef NO_MEMORY_PADDING
|
||||
static unsigned char beginPad[4] = {
|
||||
|
@ -25,238 +36,236 @@ static unsigned char endPad[4] = {
|
|||
0xde, 0xad, 0xde, 0xad };
|
||||
#endif
|
||||
|
||||
extern int errno;
|
||||
|
||||
FILE * zfd;
|
||||
FILE *zfd = NULL;
|
||||
|
||||
typedef struct meminfo {
|
||||
struct meminfo *next;
|
||||
int size; /* number of bytes malloced */
|
||||
long addr; /* address of memory returned */
|
||||
unsigned char *addr; /* address of memory returned */
|
||||
int frees; /* number of times that 'free' was called on this memory */
|
||||
char *file; /* file where malloc was called */
|
||||
int line; /* line in the code where malloc was called */
|
||||
} meminfo;
|
||||
|
||||
static meminfo memlist;
|
||||
/* -1 not checked yet, 0 = no zmalloc, 1 = zmalloc */
|
||||
int zmallocstatus = -1;
|
||||
static meminfo *memlist = NULL;
|
||||
|
||||
/*
|
||||
* 0 = only end summary
|
||||
* 1 = show errors
|
||||
* 2 = errors with dumps
|
||||
* 3 = all of the above plus all mallocs/frees
|
||||
*/
|
||||
int zmalloclogging = 2;
|
||||
|
||||
/* functions: */
|
||||
int getzmallocstatus(void);
|
||||
int * zmalloc(int len,char * file,int line);
|
||||
void zfree_special(int * what, char * file,int line);
|
||||
void zfree(int * what, char * file,int line);
|
||||
unsigned char *zmalloc(int len, char *file, int line);
|
||||
unsigned char *zrealloc(unsigned char *what, int len, char *file, int line);
|
||||
void zdump(meminfo *m);
|
||||
void zfree(unsigned char *what, char *file, int line);
|
||||
char *zstrdup(const char *src, char *file, int line);
|
||||
void zmalloc_check( void );
|
||||
void zmalloc_init(void);
|
||||
void zmalloc_check(void);
|
||||
void pad_check(meminfo *m);
|
||||
void zmalloc_free_list(meminfo *m);
|
||||
|
||||
/* a chopped down version that works */
|
||||
int getzmallocstatus()
|
||||
{
|
||||
if (zmallocstatus == -1) {
|
||||
zfd = fopen("test.log","w+");
|
||||
zmallocstatus = 1;
|
||||
}
|
||||
return(zmallocstatus);
|
||||
|
||||
void zmalloc_init(void) {
|
||||
zfd = fopen("zmalloc.log","w+");
|
||||
}
|
||||
|
||||
int * zmalloc(int len,char * file,int line)
|
||||
|
||||
void zdump(meminfo *m)
|
||||
{
|
||||
unsigned char * ret;
|
||||
#define MAX_ZDUMP_SIZE 32
|
||||
const unsigned char *hextab = (unsigned char *)"0123456789ABCDEF";
|
||||
unsigned char hexline[37], ascline[17], *hexp, *ascp, *inp;
|
||||
int len, c = 1;
|
||||
|
||||
if (m->addr == NULL || m->size <= 0)
|
||||
return;
|
||||
|
||||
hexp = hexline;
|
||||
ascp = ascline;
|
||||
inp = m->addr;
|
||||
len = (m->size > MAX_ZDUMP_SIZE ? MAX_ZDUMP_SIZE : m->size);
|
||||
|
||||
for ( ; len > 0; len--, inp++, c++) {
|
||||
*(hexp++) = hextab[(int) (*inp & 0xF0) >> 4]; /* high 4 bit */
|
||||
*(hexp++) = hextab[(int) (*inp & 0x0F)]; /* low 4 bit */
|
||||
if (c % 4 == 0) *(hexp++) = ' ';
|
||||
*(ascp++) = isprint(*inp) ? *inp : '.';
|
||||
if (c % 16 == 0 || len <= 1) {
|
||||
*hexp = '\0';
|
||||
*ascp = '\0';
|
||||
fprintf(zfd, " %-40.40s%s\n", hexline, ascline);
|
||||
hexp = hexline;
|
||||
ascp = ascline;
|
||||
}
|
||||
}
|
||||
fprintf(zfd, "\n");
|
||||
}
|
||||
|
||||
|
||||
unsigned char *zmalloc(int len, char *file, int line)
|
||||
{
|
||||
unsigned char *ret;
|
||||
meminfo *m;
|
||||
|
||||
if (!zmallocstatus) {
|
||||
/* zmalloc turned off */
|
||||
ret = (unsigned char *)calloc(1,len);
|
||||
return((int *)ret);
|
||||
}
|
||||
|
||||
#ifndef NO_MEMORY_PADDING
|
||||
ret = (unsigned char *)calloc(1,len + sizeof(beginPad) + sizeof(endPad));
|
||||
ret = (unsigned char *) calloc(1, len + sizeof(beginPad) + sizeof(endPad));
|
||||
#else
|
||||
ret = (unsigned char *)calloc(1,len);
|
||||
ret = (unsigned char *) calloc(1, len);
|
||||
#endif
|
||||
|
||||
if (!ret)
|
||||
if (!ret) {
|
||||
fprintf(zfd,"zmalloc: malloc FAILED");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#ifndef NO_MEMORY_PADDING
|
||||
/* insert begin and end padding to detect buffer under/overruns: */
|
||||
memcpy(ret,beginPad,sizeof(beginPad));
|
||||
memcpy(ret, beginPad, sizeof(beginPad));
|
||||
ret += sizeof(beginPad); /* make ret skip begin pad */
|
||||
memcpy(ret + len,endPad,sizeof(endPad));
|
||||
memcpy(ret + len, endPad, sizeof(endPad));
|
||||
#endif
|
||||
|
||||
if (getzmallocstatus() > 1)
|
||||
if (zmalloclogging > 2)
|
||||
fprintf(zfd,"zmalloc: 0x%4.4x %d bytes %s:%d\n",(int)ret,len,file,line);
|
||||
|
||||
m = (meminfo *)calloc(1,sizeof(meminfo));
|
||||
m = (meminfo *) calloc(1, sizeof(meminfo));
|
||||
if (!m) {
|
||||
fprintf(zfd,"zmalloc: FAILED mem alloc for zmalloc struct... bailing!\n");
|
||||
return((int*)0);
|
||||
return NULL;
|
||||
}
|
||||
m->next = &memlist;
|
||||
m->addr = (long)ret;
|
||||
m->size = (int)len;
|
||||
m->file = (char *)strdup(file);
|
||||
m->addr = ret;
|
||||
m->size = len;
|
||||
m->frees = 0;
|
||||
m->file = strdup(file);
|
||||
if (!m->file) {
|
||||
fprintf(zfd,"zmalloc: FAILED mem alloc for zmalloc struct... bailing!\n");
|
||||
return((int*)0);
|
||||
free(m);
|
||||
return NULL;
|
||||
}
|
||||
m->line = line;
|
||||
return((int *)ret);
|
||||
m->next = memlist;
|
||||
memlist = m;
|
||||
return (ret);
|
||||
}
|
||||
|
||||
void zfree_special(int * what, char * file,int line)
|
||||
unsigned char *zrealloc(unsigned char *what, int len, char *file, int line)
|
||||
{
|
||||
meminfo *m, *old;
|
||||
unsigned char *addr;
|
||||
int gotit = 0;
|
||||
unsigned char *ret;
|
||||
meminfo *m;
|
||||
|
||||
if (what == 0) {
|
||||
fprintf(zfd,"zmalloc: Null pointer free'd: %s:%d\n", file, line);
|
||||
return;
|
||||
}
|
||||
if (what) {
|
||||
for (m = memlist; m; m = m->next) {
|
||||
if (m->addr == what) {
|
||||
#ifndef NO_MEMORY_PADDING
|
||||
ret = (unsigned char *) realloc(what - sizeof(beginPad), len + sizeof(beginPad) + sizeof(endPad));
|
||||
#else
|
||||
ret = (unsigned char *) realloc(what, len);
|
||||
#endif
|
||||
if (!ret) {
|
||||
fprintf(zfd,"zrealloc: FAILED for 0x%4.4x %d bytes mallocd at %s:%d,\n"
|
||||
" %d bytes reallocd at %s:%d.\n",
|
||||
(int)m->addr, m->size, m->file, m->line, len, file, line);
|
||||
if (zmalloclogging > 1) zdump(m);
|
||||
return NULL;
|
||||
}
|
||||
#ifndef NO_MEMORY_PADDING
|
||||
/* insert begin and end padding to detect buffer under/overruns: */
|
||||
memcpy(ret, beginPad, sizeof(beginPad));
|
||||
ret += sizeof(beginPad); /* make ret skip begin pad */
|
||||
memcpy(ret + len, endPad, sizeof(endPad));
|
||||
#endif
|
||||
if (zmalloclogging > 2)
|
||||
fprintf(zfd,"zrealloc: 0x%4.4x %d bytes mallocd at %s:%d, %d bytes reallocd at %s:%d.\n",
|
||||
(int)m->addr, m->size, m->file, m->line, len, file, line);
|
||||
|
||||
if (!getzmallocstatus()) {
|
||||
free(what);
|
||||
} else {
|
||||
/* look up allocated mem in list: */
|
||||
old = m = &memlist;
|
||||
if (m == (meminfo *)0) {
|
||||
/* no memlist */
|
||||
free(what);
|
||||
} else {
|
||||
for(; m ; m = m->next) {
|
||||
if (m->addr == (long)what) {
|
||||
/* got it. Print it if verbose: */
|
||||
addr = (unsigned char *)m->addr;
|
||||
|
||||
fprintf(zfd,"zmalloc: Freed 0x%4.4x %d bytes mallocd@%s:%d\n",
|
||||
(int)addr,m->size,m->file,m->line);
|
||||
fprintf(zfd," free'd from %s:%d\n",
|
||||
file, line);
|
||||
|
||||
|
||||
/* check the padding: */
|
||||
pad_check(m);
|
||||
|
||||
/* note that we freed the memory */
|
||||
m->frees++;
|
||||
|
||||
/* check to see if it was freed > once */
|
||||
if (m->frees > 1) {
|
||||
fprintf(zfd," ERR: multiple frees! 0x%4.4x %d bytes: %s:%d\n",
|
||||
(int)addr, m->size, m->file, m->line);
|
||||
fprintf(zfd," free'd from %s:%d\n",
|
||||
file, line);
|
||||
}
|
||||
gotit++;
|
||||
if (!m)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!gotit && m) {
|
||||
fprintf(zfd,"zmalloc: ERR: Freed unallocated memory");
|
||||
fprintf(zfd," @0x%4.4x %d bytes %s:%d\n",
|
||||
(int)what,m->size,m->file,m->line);
|
||||
}
|
||||
else if (gotit > 1) {
|
||||
/* this shouldn't happen, eh? */
|
||||
fprintf(zfd," ERR: Multiply-allocd memory!\n");
|
||||
m->addr = ret;
|
||||
m->size = len;
|
||||
if (m->file) free(m->file);
|
||||
m->file = strdup(file);
|
||||
m->line = line;
|
||||
/* could continue the loop to check for multiply-allocd memory */
|
||||
/* but that's highly improbable so lets just return instead. */
|
||||
return (ret);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* NULL or invalid pointer given */
|
||||
fprintf(zfd,"zrealloc: invalid pointer 0x%4.4x, %d bytes to realloc at %s:%d.\n",
|
||||
(int)what, len, file, line);
|
||||
|
||||
return (zmalloc(len, file, line));
|
||||
}
|
||||
void zfree(int * what, char * file,int line)
|
||||
|
||||
/* doesn't actually free memory */
|
||||
void zfree(unsigned char *what, char *file, int line)
|
||||
{
|
||||
meminfo *m, *old;
|
||||
unsigned char *addr;
|
||||
meminfo *m;
|
||||
int gotit = 0;
|
||||
|
||||
if (what == 0) {
|
||||
fprintf(zfd,"zmalloc: Null pointer free'd: %s:%d\n", file, line);
|
||||
if (!what) {
|
||||
fprintf(zfd,"zfree: ERR: Null pointer free'd: %s:%d.\n", file, line);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!getzmallocstatus()) {
|
||||
free(what);
|
||||
} else {
|
||||
/* look up allocated mem in list: */
|
||||
old = m = &memlist;
|
||||
if (m == (meminfo *)0) {
|
||||
/* no memlist */
|
||||
free(what);
|
||||
} else {
|
||||
for(; m ; m = m->next) {
|
||||
if (m->addr == (long)what) {
|
||||
/* got it. Print it if verbose: */
|
||||
addr = (unsigned char *)m->addr;
|
||||
if (getzmallocstatus() > 1)
|
||||
fprintf(zfd,"zmalloc: Freed 0x%4.4x %d bytes mallocd@%s:%d\n",
|
||||
(int)addr,m->size,m->file,m->line);
|
||||
|
||||
/* check the padding: */
|
||||
pad_check(m);
|
||||
|
||||
/* note that we freed the memory */
|
||||
m->frees++;
|
||||
|
||||
/* check to see if it was freed > once */
|
||||
if (m->frees > 1) {
|
||||
fprintf(zfd," ERR: multiple frees! 0x%4.4x %d bytes: %s:%d\n",
|
||||
(int)addr, m->size, m->file, m->line);
|
||||
fprintf(zfd," free'd from %s:%d\n",
|
||||
file, line);
|
||||
}
|
||||
gotit++;
|
||||
if (!m)
|
||||
break;
|
||||
}
|
||||
/* look up allocated mem in list: */
|
||||
for (m = memlist; m; m = m->next) {
|
||||
if (m->addr == what) {
|
||||
/* got it. Print it if verbose: */
|
||||
if (zmalloclogging > 2) {
|
||||
fprintf(zfd,"zfree: Freed 0x%4.4x %d bytes mallocd at %s:%d, freed at %s:%d\n",
|
||||
(int)m->addr, m->size, m->file, m->line, file, line);
|
||||
}
|
||||
if (!gotit && m) {
|
||||
fprintf(zfd,"zmalloc: ERR: Freed unallocated memory");
|
||||
fprintf(zfd," @0x%4.4x %d bytes %s:%d\n",
|
||||
(int)what,m->size,m->file,m->line);
|
||||
}
|
||||
else if (gotit > 1) {
|
||||
/* this shouldn't happen, eh? */
|
||||
fprintf(zfd," ERR: Multiply-allocd memory!\n");
|
||||
/* check the padding: */
|
||||
pad_check(m);
|
||||
|
||||
/* note that we freed the memory */
|
||||
m->frees++;
|
||||
|
||||
/* check to see if it was freed > once */
|
||||
if (m->frees > 1) {
|
||||
fprintf(zfd,"zfree: ERR: multiple frees! 0x%4.4x %d bytes\n"
|
||||
" mallocd at %s:%d, freed at %s:%d.\n",
|
||||
(int)m->addr, m->size, m->file, m->line, file, line);
|
||||
if (zmalloclogging > 1) zdump(m);
|
||||
}
|
||||
gotit++;
|
||||
}
|
||||
} /* for.. */
|
||||
|
||||
if (!gotit) {
|
||||
fprintf(zfd,"zfree: ERR: attempt to free unallocated memory 0x%4.4x at %s:%d.\n",
|
||||
(int)what, file, line);
|
||||
}
|
||||
if (gotit > 1) {
|
||||
/* this shouldn't happen, eh? */
|
||||
fprintf(zfd,"zfree: ERR: Multiply-allocd memory 0x%4.4x.\n", (int)what);
|
||||
}
|
||||
}
|
||||
|
||||
/* zstrdup */
|
||||
|
||||
char *zstrdup(const char *src, char *file, int line)
|
||||
{
|
||||
char *result;
|
||||
char *result;
|
||||
#ifndef NO_MEMORY_STRDUP
|
||||
if (!getzmallocstatus()) {
|
||||
result = (char*)malloc(strlen(src) + 1);
|
||||
if (result == (char*)0)
|
||||
return (char*)0;
|
||||
strcpy(result, src); /* strcpy ok, size checked above */
|
||||
return result;
|
||||
} else {
|
||||
result = (char*)zmalloc(strlen(src) + 1, file, line);
|
||||
if (result == (char*)0)
|
||||
return (char*)0;
|
||||
strcpy(result, src);
|
||||
return result;
|
||||
}
|
||||
result = (char*)zmalloc(strlen(src) + 1, file, line);
|
||||
if (!result)
|
||||
return NULL;
|
||||
strcpy(result, src);
|
||||
return result;
|
||||
#else
|
||||
result = (char*)malloc(strlen(src) + 1);
|
||||
if (result == (char*)0)
|
||||
return (char*)0;
|
||||
strcpy(result, src); /* strcpy ok, size checked above */
|
||||
return result;
|
||||
result = (char*)malloc(strlen(src) + 1);
|
||||
if (!result)
|
||||
return NULL;
|
||||
strcpy(result, src); /* strcpy ok, size checked above */
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void zmalloc_check()
|
||||
{
|
||||
meminfo *m;
|
||||
|
@ -264,124 +273,124 @@ void zmalloc_check()
|
|||
int total_leak = 0;
|
||||
int num_leaks = 0;
|
||||
|
||||
if (getzmallocstatus() > 0) {
|
||||
/* look up allocated mem in list: */
|
||||
for(m = &memlist; m ; m = m->next) {
|
||||
if (m->addr != 0 && m->frees <= 0) {
|
||||
fprintf(zfd,"zmalloc: UNfreed memory 0x%4.4x %d bytes mallocd at %s:%d\n",
|
||||
(int)m->addr,m->size,m->file,m->line);
|
||||
fprintf(zfd, "\n------------ Checking leaks ------------\n\n");
|
||||
/* look up allocated mem in list: */
|
||||
for(m = memlist; m; m = m->next) {
|
||||
if (m->addr != 0 && m->frees <= 0) {
|
||||
fprintf(zfd,"zmalloc: UNfreed memory 0x%4.4x %d bytes mallocd at %s:%d\n",
|
||||
(int)m->addr, m->size, m->file, m->line);
|
||||
if (zmalloclogging > 1) zdump(m);
|
||||
|
||||
/* check padding on un-freed memory too: */
|
||||
pad_check(m);
|
||||
/* check padding on un-freed memory too: */
|
||||
pad_check(m);
|
||||
|
||||
total_leak += m->size;
|
||||
num_leaks ++;
|
||||
}
|
||||
}
|
||||
if (total_leak) {
|
||||
if (total_leak > 10000)
|
||||
admonishemnt = "you must work for Microsoft.";
|
||||
else if (total_leak > 5000)
|
||||
admonishemnt = "you should be ashamed!";
|
||||
else if (total_leak > 2000)
|
||||
admonishemnt = "you call yourself a programmer?";
|
||||
else if (total_leak > 1000)
|
||||
admonishemnt = "the X consortium has a job for you...";
|
||||
else
|
||||
admonishemnt = "close, but not there yet.";
|
||||
fprintf(zfd,"zmalloc: %d leaks totalling %d bytes... %s\n",num_leaks,total_leak,
|
||||
admonishemnt);
|
||||
}
|
||||
else {
|
||||
fprintf(zfd,"zmalloc: Congratulations: leak-free code!\n");
|
||||
total_leak += m->size;
|
||||
num_leaks++;
|
||||
}
|
||||
}
|
||||
if (total_leak) {
|
||||
if (total_leak > 10000)
|
||||
admonishemnt = "you must work for Microsoft.";
|
||||
else if (total_leak > 5000)
|
||||
admonishemnt = "you should be ashamed!";
|
||||
else if (total_leak > 2000)
|
||||
admonishemnt = "you call yourself a programmer?";
|
||||
else if (total_leak > 1000)
|
||||
admonishemnt = "the X consortium has a job for you...";
|
||||
else
|
||||
admonishemnt = "close, but not there yet.";
|
||||
fprintf(zfd,"zmalloc: %d leaks totalling %d bytes... %s\n",
|
||||
num_leaks, total_leak, admonishemnt);
|
||||
}
|
||||
else {
|
||||
fprintf(zfd,"zmalloc: Congratulations: leak-free code!\n");
|
||||
}
|
||||
|
||||
/* free up our own internal list */
|
||||
zmalloc_free_list(&memlist);
|
||||
zmalloc_free_list(memlist);
|
||||
|
||||
if (zfd) {
|
||||
fflush(zfd);
|
||||
fclose(zfd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pad_check(meminfo *m)
|
||||
{
|
||||
#ifndef NO_MEMORY_PADDING
|
||||
unsigned char *addr = (unsigned char *)m->addr;
|
||||
|
||||
/* check the padding: */
|
||||
if (memcmp((int *)(addr - sizeof(beginPad)),
|
||||
beginPad, sizeof(beginPad)) != 0)
|
||||
fprintf(zfd," ERR: beginPad was modified!\n");
|
||||
if (memcmp((int *)(addr + m->size),endPad,
|
||||
sizeof(endPad)) != 0)
|
||||
fprintf(zfd," ERR: endPad was modified!\n");
|
||||
if (memcmp(m->addr - sizeof(beginPad), beginPad, sizeof(beginPad)) != 0) {
|
||||
fprintf(zfd,"pad_check: ERR: beginPad was modified! (mallocd@ %s:%d)\n", m->file, m->line);
|
||||
if (zmalloclogging > 1) zdump(m);
|
||||
}
|
||||
if (memcmp(m->addr + m->size, endPad, sizeof(endPad)) != 0) {
|
||||
fprintf(zfd,"pad_check: ERR: endPad was modified! (mallocd@ %s:%d)\n", m->file, m->line);
|
||||
if (zmalloclogging > 1) zdump(m);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void zmalloc_free_list(meminfo *m)
|
||||
{
|
||||
meminfo *old;
|
||||
for( m = m->next ; m ; ) {
|
||||
old = m;
|
||||
m = m->next;
|
||||
free(old->file);
|
||||
free(old);
|
||||
meminfo *next_m;
|
||||
for (; m; m = next_m) {
|
||||
next_m = m->next;
|
||||
#ifndef NO_MEMORY_PADDING
|
||||
if (m->addr) free(m->addr - sizeof(beginPad));
|
||||
#else
|
||||
if (m->addr) free(m->addr);
|
||||
#endif
|
||||
if (m->file) free(m->file);
|
||||
free(m);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef ZTEST
|
||||
#undef ZMALLOC_H
|
||||
|
||||
#include "zmalloc.h"
|
||||
|
||||
main()
|
||||
int main()
|
||||
{
|
||||
unsigned char * tmp;
|
||||
unsigned char * shit;
|
||||
|
||||
zmalloc_init();
|
||||
|
||||
printf("Testing Zmalloc.\n");
|
||||
printf("Malloc test..");
|
||||
printf("You should see no error here.\n");
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
free(tmp);
|
||||
/* You should see no error here. */
|
||||
shit = (unsigned char*)malloc(200);
|
||||
free(shit);
|
||||
|
||||
printf("Free free mem test...\n");
|
||||
printf("You should see an ERR: multiple frees here\n");
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
free(tmp);
|
||||
free(tmp);
|
||||
/* Multiple frees test */
|
||||
shit = (unsigned char*)malloc(200);
|
||||
strcpy(shit, "This should show up in the dump but truncated to MAX_ZDUMP_SIZE chars");
|
||||
free(shit);
|
||||
free(shit);
|
||||
|
||||
/*
|
||||
fprintf(zfd,"\nFree unallocated mem test \n");
|
||||
tmp += 4;
|
||||
free(tmp);
|
||||
*/
|
||||
/* Free unallocated mem test */
|
||||
shit += 4;
|
||||
free(shit);
|
||||
|
||||
printf("Unfreed mem test...\n");
|
||||
printf("You should see an \"UNfreed mem at line %d\" (at end) because of this\n",__LINE__+1);
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
/* Unfreed mem test... You should see "UNfreed mem at line 370" (at end) because of this */
|
||||
shit = (unsigned char*)malloc(200);
|
||||
strcpy(shit, "This is unfreed memory!");
|
||||
|
||||
printf("Buffer overrun test 1...\n");
|
||||
printf("You should see an ERR:endPad here\n");
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
tmp[200] = 0xfa;
|
||||
free(tmp);
|
||||
/* Buffer overrun test... You should see an ERR:endPad here */
|
||||
shit = (unsigned char*)malloc(200);
|
||||
shit[202] = 0xbb;
|
||||
free(shit);
|
||||
|
||||
printf("Buffer overrun test 2...\n");
|
||||
printf("You should see an ERR:endPad here\n");
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
tmp[215] = 0xbb;
|
||||
free(tmp);
|
||||
/* Buffer underrun test... You should see an ERR:beginPad here */
|
||||
shit = (unsigned char*)malloc(200);
|
||||
shit[-3] = 0x0f;
|
||||
free(shit);
|
||||
|
||||
printf("Buffer underrun test 1...\n");
|
||||
printf("You should see an ERR:beginPad here\n");
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
tmp[-10] = 0x0f;
|
||||
free(tmp);
|
||||
|
||||
printf("Buffer underrun test 2...\n");
|
||||
printf("You should see an ERR:beginPad here\n");
|
||||
tmp = (unsigned char*)malloc(200);
|
||||
tmp[-1] = 0x00;
|
||||
free(tmp);
|
||||
/* Free NULL pointer test... */
|
||||
shit = NULL;
|
||||
free(shit);
|
||||
|
||||
printf("Test completed. See zmalloc.log for the messages.\n");
|
||||
|
||||
zmalloc_check();
|
||||
exit(0);
|
||||
|
|
|
@ -1,22 +1,32 @@
|
|||
/**************************************************************************
|
||||
* File: zmalloc.h Part of tbaMUD *
|
||||
* Usage: A simple memory allocation monitor, header. *
|
||||
* *
|
||||
* Version 1.1 Copyright 1996, 1998, 1999, 2000 Eric Murray. *
|
||||
* File: zmalloc.h Part of tbaMUD *
|
||||
* Usage: A simple memory allocation monitor, header. *
|
||||
* *
|
||||
* Version 1.1 Copyright 1996, 1998, 1999, 2000 Eric Murray. *
|
||||
**************************************************************************/
|
||||
/*
|
||||
** Zmalloc, a simple memory-allocation monitor.
|
||||
**
|
||||
** Copyright 1996 Eric Murray, ericm@lne.com
|
||||
** You may make free use of this code but please give me credit.
|
||||
** Documentation: http://www.lne.com/ericm/zmalloc
|
||||
*/
|
||||
|
||||
#ifndef ZMALLOC_H
|
||||
#define ZMALLOC_H
|
||||
|
||||
int *zmalloc(int, char *, int);
|
||||
void zfree(int *, char *, int);
|
||||
int zmalloc_check();
|
||||
char *zstrdup(const char*, char*, int);
|
||||
unsigned char *zmalloc(int, char *, int);
|
||||
unsigned char *zrealloc(unsigned char *, int, char *, int);
|
||||
void zfree(unsigned char *, char *, int);
|
||||
void zmalloc_init(void);
|
||||
void zmalloc_check(void);
|
||||
char *zstrdup(const char *, char *, int);
|
||||
|
||||
#define malloc(x) zmalloc((x),__FILE__,__LINE__)
|
||||
#define calloc(n,x) zmalloc((n*x),__FILE__,__LINE__)
|
||||
#define free(x) zfree((int *)(x),__FILE__,__LINE__)
|
||||
#undef strdup
|
||||
#define strdup(x) zstrdup((x), __FILE__, __LINE__)
|
||||
#define malloc(x) zmalloc((x),__FILE__,__LINE__)
|
||||
#define calloc(n,x) zmalloc((n*x),__FILE__,__LINE__)
|
||||
#define realloc(r,x) zrealloc((unsigned char *)(r),(x),__FILE__,__LINE__)
|
||||
#define free(x) zfree((unsigned char *)(x),__FILE__,__LINE__)
|
||||
#undef strdup
|
||||
#define strdup(x) zstrdup((x), __FILE__, __LINE__)
|
||||
|
||||
#endif /* ZMALLOC_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue