tbaMUD 3.54

[Oct 04 2007] - Rumble
  Changed autoexit to display doors as Exits: n (e) w s. DISP_CLOSED_DOORS added
  to cedit.
  Added rcopy, ocopy, etc. for all forms of OLC. (thanks Neme)
[Oct 01 2007] - Rumble
  Added trigedit variables %zonename% and %zonenumber%. (thanks Drefs)
  Fixed memory leak in do_dig. (thanks Neme)
  Added trigedit variables %roomflag% and object %affects%. (thanks Jamdog)
[Sep 27 2007] - Rumble
  Update to do_hit to prevent crash if the player is AFF_CHARM somehow without a
  master. (thanks Jamdog)
  Removed alias.c. New ASCII aliases handled in players.c and saved in plrfiles.
This commit is contained in:
Rumble 2007-10-04 18:37:07 +00:00
parent 1f7a7b4182
commit 40b643b7d5
35 changed files with 798 additions and 540 deletions

View file

@ -5,6 +5,16 @@ The Builder Academy
builderacademy.net 9091 builderacademy.net 9091
tbaMUD 3.54 tbaMUD 3.54
[Oct 04 2007] - Rumble
Changed autoexit to display doors as Exits: n (e) w s. DISP_CLOSED_DOORS added to cedit.
Added rcopy, ocopy, etc. for all forms of OLC. (thanks Neme)
[Oct 01 2007] - Rumble
Added trigedit variables %zonename% and %zonenumber%. (thanks Drefs)
Fixed memory leak in do_dig. (thanks Neme)
Added trigedit variables %roomflag% and object %affects%. (thanks Jamdog)
[Sep 27 2007] - Rumble
Update to do_hit to prevent crash if the player is AFF_CHARM somehow without a master. (thanks Jamdog)
Removed alias.c. New ASCII aliases handled in players.c and saved in plrfiles.
[Sep 25 2007] - Rumble [Sep 25 2007] - Rumble
Added set/not set to extra descriptions menu in oedit so a builder can tell if they exist or not without having to enter the extra desc menu or stat the object. Added set/not set to extra descriptions menu in oedit so a builder can tell if they exist or not without having to enter the extra desc menu or stat the object.
Replaced [TRIG] flag (showvnum enabled) with [T<vnum>] to make things easier to stat. Replaced [TRIG] flag (showvnum enabled) with [T<vnum>] to make things easier to stat.

View file

@ -148,6 +148,31 @@ A
6 2 6 2
A A
2 1 2 1
#1223
scholar's guide jeweler's loop quest~
Scholar's Guide~
The Guide to all Gnomish knowledge hums here quietly.~
~
11 abdgq 0 0 0 aco 0 0 0 0 0 0 0
0 0 0 0
3 1000 0 20
E
scholar's guide jeweler's loop quest~
You are looking at what could quite possibly be one of the most beautiful
peaces of artistry ever made. This finely crafted jeweler's loop is suspended
from a chain of golden links. The loop itself is a perfectly made combination
of grounned glass, perfectly crafted silver, and precision gnomish workmanship.
It is so simple as to be elegant. A tiny plaque hangs from the chain that
suspends the loop. "To you who would sacrifice for life, join me. To you who
would become a slave to wonder, hold me. To you who seek riches through
learning, I am yours. "
~
A
3 3
A
12 50
A
4 3
#1226 #1226
boards builder's bulletin gen_boards~ boards builder's bulletin gen_boards~
a builder's bulletin board~ a builder's bulletin board~
@ -315,14 +340,14 @@ A piece of fireworks is planted in a champagne bottle.~
0 0 0 0 0 0 0 0
T 1297 T 1297
E E
firework new year piece~
This large rocket is about to go up! Strange colours will fill the sky!
~
E
bottle champagne~ bottle champagne~
The bottle is filled partially with water so it doesn't tilt over. Someone The bottle is filled partially with water so it doesn't tilt over. Someone
has obviously drunk the champagne first. 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 #1299
christmas tree~ christmas tree~
a christmas tree~ a christmas tree~

View file

@ -726,6 +726,8 @@ Room Variables Example~
%echo% WEATHER: %self.weather% %echo% WEATHER: %self.weather%
%echo% SECTOR: %self.sector% %echo% SECTOR: %self.sector%
%echo% CONTENTS: %self.contents% %echo% CONTENTS: %self.contents%
%echo% ZONENAME: %self.zonename%
%echo% ZONEID: %self.zoneid%
~ ~
#30 #30
Text Variables Example~ Text Variables Example~

View file

@ -763,31 +763,45 @@ done
Hunger, Thirst, Drunk Test Trigger~ Hunger, Thirst, Drunk Test Trigger~
2 g 100 2 g 100
~ ~
wait 1 if %self.roomflag(DARK)%
%echo% Hello %actor.name% %echo% This is a dark room.
%echo% Hunger: %actor.hunger% Thirst: %actor.thirst% Drunk: %actor.drunk% end
nop %actor.hunger(50) if %self.roomflag(DEATH)%
nop %actor.thirst(50) %echo% This is a death trap - goodbye!
nop %actor.drunk(50) end
%echo% Hunger: %actor.hunger% Thirst: %actor.thirst% Drunk: %actor.drunk% if %self.roomflag(NO_MOB)%
nop %actor.hunger(-10) %echo% Mobiles cannot enter this room.
nop %actor.thirst(-10) end
nop %actor.drunk(-10) if %self.roomflag(INDOORS)%
%echo% Hunger: %actor.hunger% Thirst: %actor.thirst% Drunk: %actor.drunk% %echo% This room is indoors.
nop %actor.hunger(20) end
nop %actor.thirst(21) if %self.roomflag(PEACEFUL)%
nop %actor.drunk(22) %echo% You can't kill anything in this room.
%echo% Hunger: %actor.hunger% Thirst: %actor.thirst% Drunk: %actor.drunk% end
* if %self.roomflag(NO_TRACK)%
while %actor.hunger% >= 0 %echo% You cannot track anything through this room.
nop %actor.hunger(-1) end
done if %self.roomflag(NO_MAGIC)%
while %actor.thirst% >= 0 %echo% You cannot cast spells in here!
nop %actor.thirst(-1) end
done if %self.roomflag(TUNNEL)%
while %actor.drunk% >= 0 %echo% This room is a narrow tunnel.
nop %actor.drunk(-1) end
done if %self.roomflag(PRIVATE)%
%echo% This is a private room.
end
if %self.roomflag(GODROOM)%
%echo% Only Gods can enter this room.
end
if %self.roomflag(HOUSE)%
%echo% This is a house.
end
if %self.roomflag(HCRSH)%
%echo% This is a house which will crash-save.
end
if %self.roomflag(ATRIUM)%
%echo% This is an atrium for a house.
end
~ ~
#1217 #1217
new trigger~ new trigger~
@ -913,6 +927,154 @@ elseif %direction% == west
%echoaround% %actor% The door slides open, %actor.name% walks out, and the door slides shut. %echoaround% %actor% The door slides open, %actor.name% walks out, and the door slides shut.
end end
~ ~
#1256
Mob Quote Using Arrays~
0 d 100
quote~
* By Jamie Nelson from the forum http://groups.yahoo.com/group/dg_scripts/
eval w1max %random.20%
eval w2max %random.20%
eval w3max %random.20%
eval w4max %random.20%
eval w5max %random.11%
eval w6max %random.20%
set w1[0] phenomenal
set w1[1] rapid
set w1[2] chilling
set w1[3] insipid
set w1[4] nauseating
set w1[5] astronomical
set w1[6] austere
set w1[7] inevitable
set w1[8] inescapable
set w1[9] reckless
set w1[10] haphazard
set w1[11] accelerating
set w1[12] profound
set w1[13] awesome
set w1[14] terrifying
set w1[15] ubiquitous
set w1[16] ignominious
set w1[17] unprecedented
set w1[18] unparalleled
set w1[19] insidious
set w1[20] broad
set w2[0] growth
set w2[1] decline
set w2[2] prospects
set w2[3] acceleration
set w2[4] threat
set w2[5] expansion
set w2[6] oneness
set w2[7] outgrowth
set w2[8] madness
set w2[9] evacuation
set w2[10] diminishment
set w2[11] consumption
set w2[12] decay
set w2[13] putrefaction
set w2[14] vapidity
set w2[15] downsizing
set w2[16] degeneration
set w2[17] litigation
set w2[18] declivity
set w2[19] hastening
set w2[20] paradigm shifting
set w3[0] the Internet
set w3[1] urban tax dollars
set w3[2] new technologies
set w3[3] gender identification disorders
set w3[4] censorship
set w3[5] interpersonal communications
set w3[6] modern life
set w3[7] rampant paradigm shifts
set w3[8] consumer spending
set w3[9] rain forests
set w3[10] human literacy
set w3[11] natural resources
set w3[12] traditional values
set w3[13] media junk food
set w3[14] family values
set w3[15] corporate mentality
set w3[16] the American justice system
set w3[17] technological change
set w3[18] the ozone layer
set w3[19] human resources
set w3[20] current epistemologies
set w4[0] forever dissipate
set w4[1] escalate
set w4[2] aggrandize
set w4[3] overhaul
set w4[4] deteriorate
set w4[5] revolutionize
set w4[6] uglify
set w4[7] put an end to
set w4[8] enslave
set w4[9] bankrupt
set w4[10] truncate
set w4[11] nullify
set w4[12] sabotage
set w4[13] destabilize
set w4[14] incapacitate
set w4[15] hasten
set w4[16] dehumanize
set w4[17] evaporate
set w4[18] indenture
set w4[19] intensify
set w4[20] undermine
set w5[0] today's
set w5[1] tomorrow's
set w5[2] the entrenchment of our
set w5[3] worldwide
set w5[4] our children's
set w5[5] modern
set w5[6] all of our
set w5[7] our future
set w5[8] our
set w5[9] the demise of our
set w5[10] our grandchildren's
set w5[11] all hope for
set w6[0] business models
set w6[1] re-ruralization
set w6[2] human condition
set w6[3] family values
set w6[4] self-esteem
set w6[5] medical insights
set w6[6] human psyche
set w6[7] human depth
set w6[8] egalitarianism
set w6[9] World Wide Web
set w6[10] future values
set w6[11] hopes and dreams
set w6[12] business models
set w6[13] political climate
set w6[14] education
set w6[15] cultural heritage
set w6[16] lifestyles
set w6[17] fiduciary responsibility
set w6[18] genetic diversity
set w6[19] intestinal fortitude
set w6[20] computer literacy
set w1 %%w1[%w1max%]%%
eval w1 %w1%
set msg The %w1%
set w2 %%w2[%w2max%]%%
eval w2 %w2%
set msg %msg% %w2% of
set w3 %%w3[%w3max%]%%
eval w3 %w3%
set msg %msg% %w3%
set w4 %%w4[%w4max%]%%
eval w4 %w4%
set msg %msg% will %w4%
set w5 %%w5[%w5max%]%%
eval w5 %w5%
set msg %msg% %w5%
set w6 %%w6[%w6max%]%%
eval w6 %w6%
set msg %msg% %w6%
say %msg%
~
#1267 #1267
secret drawer magic~ secret drawer magic~
1 c 4 1 c 4

View file

@ -9,7 +9,7 @@ D0
The Immortal Board Room can be seen to the north. The Immortal Board Room can be seen to the north.
~ ~
~ ~
0 -1 1204 0 -1 -1
S S
#1201 #1201
The Inn Of The Gods~ The Inn Of The Gods~
@ -23,7 +23,7 @@ D2
The Immortal Board Room can be seen to the south. The Immortal Board Room can be seen to the south.
~ ~
~ ~
0 -1 1204 0 -1 -1
S S
#1202 #1202
The Ice Box Of The Gods~ The Ice Box Of The Gods~
@ -43,65 +43,7 @@ D3
The Immortal Board Room can be seen to the west. The Immortal Board Room can be seen to the west.
~ ~
~ ~
0 -1 1204 0 -1 -1
S
#1204
The Immortal Board Room~
The main hang out of the Gods, the Immortal Board Room is the place to be.
Gods exchange messages here most every day. The mortal board room is to the
east and the meeting room for the gods is to the south. To the north is the
Gods' Inn and to the west is a post office for Gods. In the northeast corner
you spot a small staircase leading upwards.
~
12 8 0 0 0 0
D0
The Gods' Inn can be seen just to the north.
~
~
0 -1 1201
D1
The Immortal Board Hall can be seen just to the east.
~
~
0 -1 1290
D2
The Gods' Meeting Room is located to the south.
~
~
0 -1 1200
D3
The Gods' Post Office is just to the west.
~
~
0 -1 1205
D4
There is a small stair in the corner leading up to the social room of
the Gods.
~
~
0 -1 1206
E
original~
The main hang out of the Gods, the Immortal Board Room is the place to be.
Gods exchange messages here most every day. The mortal board room is to the
east and the meeting room for the gods is to the south. To the north is the
Gods' Inn and to the west is a post office for Gods. In the northeast corner
you spot a small staircase leading upwards.
~
S
#1205
The Post Office Of The Gods~
The Post Office Of The Gods is the same as most Post Offices except that
it is not as slow. Even the Postal service knows not to anger the Gods.
Piles of junk mail line the walls. I guess even Gods get on mailing lists.
The Immortal Board Room is to the east.
~
12 8 0 0 0 0
D1
The Immortal Board Room is just to the east.
~
~
0 -1 1204
S S
#1206 #1206
The Social Gathering Room~ The Social Gathering Room~
@ -114,7 +56,7 @@ The Immortal Board Room is just down through the floor. Funny how you
didn't notice that exit before isn't it? didn't notice that exit before isn't it?
~ ~
~ ~
0 -1 1204 0 -1 -1
S S
#1290 #1290
The Immortal Board Hall~ The Immortal Board Hall~
@ -134,7 +76,7 @@ D2
D3 D3
~ ~
~ ~
0 0 1204 0 0 -1
S S
#1291 #1291
The Builders' Board Room~ The Builders' Board Room~
@ -173,4 +115,254 @@ D0
~ ~
0 0 1290 0 0 1290
S S
#1297
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
~
12 8 0 0 0 0
D0
~
~
0 0 33
D2
~
~
0 0 33
E
Catcher Rye~
The mark of the immature man is that he wants to die nobly for a cause,
while the mark of the mature man is that he wants to live humbly for one.
--Wilhelm Stekel
...you'll find that you're not the first person who was ever confused and
frighteneed and even sickened by human behavior. You're by no means alone on
that score, you'll be excited and stimulated to know. Many, many men have been
just as troubled morally and spiritually as you are right now. Happily, some
of them kept records of their troubles. You'll learn from them-if you want to.
Just as someday, if you have something to offer, someone will learn something
from you. It's a beautiful reciprocal arrangement.
--The Catcher in the Rye
~
E
old glory flag~
I fly atop the world's tallest buildings. I stand watch in America's Halls
of Justice. I fly majestically over great institutions of learning. I stand
guard with the greatest military power in the world. Look up and see me! I
stand for peace, honor, truth, and justice. I stand for freedom. I am
confident, I am arrogant, I am proud. When I am flown with my banners, my head
is a little higher, my colors a little truer, I bow to no one! I am recognized
all over the world. I am worshipped, I am loved, and I am feared! I have
fought in every battle of every war for more than 200 years: Gettysburg,
Shiloh, Appomattox, San Juan Hill, the trenches of France, the Argonne Forest,
Anzio, Rome, the beaches of Normandy, Guam, Okinawa, Japan, Korea, Vietnam, the
Persian Gulf, and a score of places long forgotten by all, but those who were
there with me... I was there! I led my Soldiers, Sailors, Airmen, and
Marines. I followed them and watched over them. They loved me. I was on a
small hill in Iwo Jima. I was dirty, battle-worn, and tired. But my Soldiers
cheered me! And I was proud! I have been soiled, burned, torn, and trampled
on the streets of countries that I have helped set free. It does not hurt, for
I am invincible. I have also been soiled, burned, torn, and trampled on the
streets of my own country and, when it is by those whom I have served with in
battle-it hurts. But I shall overcome, for I am strong! I have slipped the
bonds of Earth and, from my vantage point on the Moon, I stand watch over the
uncharted new frontiers of Space. I have been a silent witness to all of
America's finest hours. But my finest hour comes when I am torn in strips to
be used as bandages for my wounded comrades on the field of battle-when I fly
at half-mast to honor my Soldiers, Sailors, Airmen, and Marines, and-when I lie
in the trembling arms of a grieving mother, at the gravesite of her fallen son
or daughter-I am proud. My name is Old Glory-long may I wave. Dear God, long
may I wave.
~
E
war~
War is an ugly thing, but not the ugliest of things. The decayed and
degraded state of moral and patriotic feeling which thinks that nothing is
worth war is much worse. The person who has nothing for which he is willing to
fight, nothing which is more important than his own personal safety, is a
miserable creature and has no chance of being free unless made and kept so by
the exertions of better men than himself.
John Stuart Mill
~
E
builder~
There is one timeless way of building.
It is thousands of years old, and the same today as it has always been.
The great traditional buildings of the past, the villages and tents and
temples in which man feels at home, have always been made by people who were
very close to the center of this way. It is not possible to make great
buildings, or great towns, beautiful places, places where you feel yourself,
places where you feel alive, except by following this way. And, as you will
see, this way will lead anyone who looks for it to buildings which are
themselves as ancient in their form, as the trees and hills, and as our faces
are.
--The Timeless Way of Building
~
E
oath~
I do solemnly swear that I will support and defend the Constitution of the
United States against all enemies, foreign and domestic, and to bear true faith
and allegiance to the same that I take this obligation freely, without any
mental reservation or purpose of evasion, and that I will well and faithfully
discharge the duties of the office upon which I am about to enter.
~
E
july4~
On July 4, 1776, we claimed our independence from England and Democracy was
born. Every day thousands leave their homeland to come to the "land of the
free and the home of the brave" so they can begin their American Dream. The
United States is truly a diverse nation made up of dynamic people. Each year
on July 4, Americans celebrate that freedom and indepen-dence with barbecues,
picnics, and family ga-therings. Through the Internet we are learning about
and communicat-ing with people of different nations, with different languages
and different races throughout the world. Bringing the world closer with
understanding and knowledge can only benefit all nations. We invite all
nations to celebrate with Americans online this Fourth of July. Happy
Birthday, America!
~
E
.test~
can you see this with look around?
~
S
T 1201
#1298
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
~
12 8 0 0 0 0
D0
~
~
0 0 33
D2
~
~
0 0 33
E
Catcher Rye~
The mark of the immature man is that he wants to die nobly for a cause,
while the mark of the mature man is that he wants to live humbly for one.
--Wilhelm Stekel
...you'll find that you're not the first person who was ever confused and
frighteneed and even sickened by human behavior. You're by no means alone on
that score, you'll be excited and stimulated to know. Many, many men have been
just as troubled morally and spiritually as you are right now. Happily, some
of them kept records of their troubles. You'll learn from them-if you want to.
Just as someday, if you have something to offer, someone will learn something
from you. It's a beautiful reciprocal arrangement.
--The Catcher in the Rye
~
E
old glory flag~
I fly atop the world's tallest buildings. I stand watch in America's Halls
of Justice. I fly majestically over great institutions of learning. I stand
guard with the greatest military power in the world. Look up and see me! I
stand for peace, honor, truth, and justice. I stand for freedom. I am
confident, I am arrogant, I am proud. When I am flown with my banners, my head
is a little higher, my colors a little truer, I bow to no one! I am recognized
all over the world. I am worshipped, I am loved, and I am feared! I have
fought in every battle of every war for more than 200 years: Gettysburg,
Shiloh, Appomattox, San Juan Hill, the trenches of France, the Argonne Forest,
Anzio, Rome, the beaches of Normandy, Guam, Okinawa, Japan, Korea, Vietnam, the
Persian Gulf, and a score of places long forgotten by all, but those who were
there with me... I was there! I led my Soldiers, Sailors, Airmen, and
Marines. I followed them and watched over them. They loved me. I was on a
small hill in Iwo Jima. I was dirty, battle-worn, and tired. But my Soldiers
cheered me! And I was proud! I have been soiled, burned, torn, and trampled
on the streets of countries that I have helped set free. It does not hurt, for
I am invincible. I have also been soiled, burned, torn, and trampled on the
streets of my own country and, when it is by those whom I have served with in
battle-it hurts. But I shall overcome, for I am strong! I have slipped the
bonds of Earth and, from my vantage point on the Moon, I stand watch over the
uncharted new frontiers of Space. I have been a silent witness to all of
America's finest hours. But my finest hour comes when I am torn in strips to
be used as bandages for my wounded comrades on the field of battle-when I fly
at half-mast to honor my Soldiers, Sailors, Airmen, and Marines, and-when I lie
in the trembling arms of a grieving mother, at the gravesite of her fallen son
or daughter-I am proud. My name is Old Glory-long may I wave. Dear God, long
may I wave.
~
E
war~
War is an ugly thing, but not the ugliest of things. The decayed and
degraded state of moral and patriotic feeling which thinks that nothing is
worth war is much worse. The person who has nothing for which he is willing to
fight, nothing which is more important than his own personal safety, is a
miserable creature and has no chance of being free unless made and kept so by
the exertions of better men than himself.
John Stuart Mill
~
E
builder~
There is one timeless way of building.
It is thousands of years old, and the same today as it has always been.
The great traditional buildings of the past, the villages and tents and
temples in which man feels at home, have always been made by people who were
very close to the center of this way. It is not possible to make great
buildings, or great towns, beautiful places, places where you feel yourself,
places where you feel alive, except by following this way. And, as you will
see, this way will lead anyone who looks for it to buildings which are
themselves as ancient in their form, as the trees and hills, and as our faces
are.
--The Timeless Way of Building
~
E
oath~
I do solemnly swear that I will support and defend the Constitution of the
United States against all enemies, foreign and domestic, and to bear true faith
and allegiance to the same that I take this obligation freely, without any
mental reservation or purpose of evasion, and that I will well and faithfully
discharge the duties of the office upon which I am about to enter.
~
E
july4~
On July 4, 1776, we claimed our independence from England and Democracy was
born. Every day thousands leave their homeland to come to the "land of the
free and the home of the brave" so they can begin their American Dream. The
United States is truly a diverse nation made up of dynamic people. Each year
on July 4, Americans celebrate that freedom and indepen-dence with barbecues,
picnics, and family ga-therings. Through the Internet we are learning about
and communicat-ing with people of different nations, with different languages
and different races throughout the world. Bringing the world closer with
understanding and knowledge can only benefit all nations. We invite all
nations to celebrate with Americans online this Fourth of July. Happy
Birthday, America!
~
E
.test~
can you see this with look around?
~
S
T 1201
#1299
The Immortal Board Room~
The main hang out of the Gods, the Immortal Board Room is the place to be.
Gods exchange messages here most every day. The mortal board room is to the
east and the meeting room for the gods is to the south. To the north is the
Gods' Inn and to the west is a post office for Gods. In the northeast corner
you spot a small staircase leading upwards.
~
12 65535 0 0 0 0
E
original~
The main hang out of the Gods, the Immortal Board Room is the place to be.
Gods exchange messages here most every day. The mortal board room is to the
east and the meeting room for the gods is to the south. To the north is the
Gods' Inn and to the west is a post office for Gods. In the northeast corner
you spot a small staircase leading upwards.
~
S
$~ $~

View file

@ -1228,11 +1228,6 @@ D4
fireplace~ fireplace~
1 0 30875 1 0 30875
E E
stones~
They look as if they aren't anchored all that well, as if they might be able
to be moved or jarred free.
~
E
fireplace~ fireplace~
It is a huge piece of work, spanning the entire length of the room. The It is a huge piece of work, spanning the entire length of the room. The
place where the firewood is actually kept and burnt only takes up about a place where the firewood is actually kept and burnt only takes up about a
@ -1240,6 +1235,11 @@ quarter of the space that it could, the rest of it is just ornate. Most of the
rocks are made from regular, grayish stone but there is a particular run of them rocks are made from regular, grayish stone but there is a particular run of them
that are a bit darker than the rest. that are a bit darker than the rest.
~ ~
E
stones~
They look as if they aren't anchored all that well, as if they might be able
to be moved or jarred free.
~
S S
#30872 #30872
Cailveh's Private Chambers~ Cailveh's Private Chambers~

View file

@ -24,7 +24,7 @@ OBJFILES = comm.o act.comm.o act.informative.o act.movement.o act.item.o \
castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \ castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \
house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \ house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \
objsave.o shop.o spec_assign.o spec_procs.o spell_parser.o \ objsave.o shop.o spec_assign.o spec_procs.o spell_parser.o \
spells.o utils.o weather.o alias.o players.o spells.o utils.o weather.o players.o
default: .accepted default: .accepted
$(MAKE) ../bin/circle $(MAKE) ../bin/circle
@ -91,8 +91,6 @@ clean:
# Dependencies for the object files (automagically generated with # Dependencies for the object files (automagically generated with
# gcc -MM) # gcc -MM)
alias.o: alias.c conf.h sysdep.h structs.h utils.h interpreter.h db.h
$(CC) -c $(CFLAGS) alias.c
act.comm.o: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ act.comm.o: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \
handler.h db.h screen.h handler.h db.h screen.h
$(CC) -c $(CFLAGS) act.comm.c $(CC) -c $(CFLAGS) act.comm.c

View file

@ -26,7 +26,7 @@ OBJFILES = o.comm act.o.comm act.o.informative act.o.movement act.o.item \
o.castle o.class o.config o.constants o.db o.fight o.graph o.handler \ o.castle o.class o.config o.constants o.db o.fight o.graph o.handler \
o.house o.interpreter o.limits o.magic o.mail o.mobact o.modify \ o.house o.interpreter o.limits o.magic o.mail o.mobact o.modify \
o.objsave o.random o.shop o.spec_assign o.spec_procs \ o.objsave o.random o.shop o.spec_assign o.spec_procs \
o.spell_parser o.spells o.utils o.weather o.players o.alias o.spell_parser o.spells o.utils o.weather o.players
default: all default: all
@ -41,8 +41,6 @@ clean:
# Dependencies for the object files (automagically generated with # Dependencies for the object files (automagically generated with
# gcc -MM) # gcc -MM)
o.alias: c.alias h.conf h.sysdep h.structs h.utils h.interpreter h.db
$(CC) -c $(CFLAGS) c.alias -o o.alias
act.o.comm: act.c.comm h.conf h.sysdep h.structs \ act.o.comm: act.c.comm h.conf h.sysdep h.structs \
h.utils h.comm h.interpreter h.handler \ h.utils h.comm h.interpreter h.handler \
h.db h.screen h.db h.screen

View file

@ -43,7 +43,6 @@ circle : BccW32.cfg $(Dep_circle)
echo MakeNode echo MakeNode
Dep_circledexe = \ Dep_circledexe = \
alias.obj\
act.comm.obj\ act.comm.obj\
act.movement.obj\ act.movement.obj\
act.item.obj\ act.item.obj\
@ -85,7 +84,6 @@ circle.exe : $(Dep_circledexe)
$(TLINK32) @&&| $(TLINK32) @&&|
/v $(IDE_LinkFLAGS32) $(LinkerOptsAt_circledexe) $(LinkerInheritOptsAt_circledexe) + /v $(IDE_LinkFLAGS32) $(LinkerOptsAt_circledexe) $(LinkerInheritOptsAt_circledexe) +
C:\BC5\LIB\c0x32.obj+ C:\BC5\LIB\c0x32.obj+
alias.obj+
act.comm.obj+ act.comm.obj+
act.movement.obj+ act.movement.obj+
act.item.obj+ act.item.obj+
@ -129,11 +127,6 @@ C:\BC5\LIB\cw32i.lib
| |
alias.obj : alias.c
$(BCC32) -P- -c @&&|
$(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ alias.c
|
act.comm.obj : act.comm.c act.comm.obj : act.comm.c
$(BCC32) -P- -c @&&| $(BCC32) -P- -c @&&|
$(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.comm.c $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.comm.c

View file

@ -44,7 +44,6 @@ circle : BccW32.cfg $(Dep_circle)
echo MakeNode echo MakeNode
Dep_circledexe = \ Dep_circledexe = \
alias.obj\
act.comm.obj\ act.comm.obj\
act.movement.obj\ act.movement.obj\
act.item.obj\ act.item.obj\
@ -86,7 +85,6 @@ circle.exe : $(Dep_circledexe)
$(TLINK32) @&&| $(TLINK32) @&&|
/v $(IDE_LinkFLAGS32) $(LinkerOptsAt_circledexe) $(LinkerInheritOptsAt_circledexe) + /v $(IDE_LinkFLAGS32) $(LinkerOptsAt_circledexe) $(LinkerInheritOptsAt_circledexe) +
C:\BORLAND\BCC55\LIB\c0x32.obj+ C:\BORLAND\BCC55\LIB\c0x32.obj+
alias.obj+
act.comm.obj+ act.comm.obj+
act.movement.obj+ act.movement.obj+
act.item.obj+ act.item.obj+
@ -128,11 +126,6 @@ C:\BORLAND\BCC55\LIB\import32.lib+
C:\BORLAND\BCC55\LIB\cw32i.lib C:\BORLAND\BCC55\LIB\cw32i.lib
| |
alias.obj : alias.c
$(BCC32) -P- -c @&&|
$(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ alias.c
|
act.comm.obj : act.comm.c act.comm.obj : act.comm.c
$(BCC32) -P- -c @&&| $(BCC32) -P- -c @&&|
$(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.comm.c $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.comm.c

View file

@ -24,7 +24,7 @@ CFLAGS = @CFLAGS@ $(MYFLAGS) $(PROFILE)
LIBS = @LIBS@ @CRYPTLIB@ @NETLIB@ LIBS = @LIBS@ @CRYPTLIB@ @NETLIB@
OBJFILES = act.comm.o act.informative.o act.item.o act.movement.o \ OBJFILES = act.comm.o act.informative.o act.item.o act.movement.o \
act.offensive.o act.other.o act.social.o act.wizard.o aedit.o alias.o \ act.offensive.o act.other.o act.social.o act.wizard.o aedit.o \
ban.o boards.o bsd-snprintf.o castle.o cedit.o class.o comm.o config.o \ ban.o boards.o bsd-snprintf.o castle.o cedit.o class.o comm.o config.o \
constants.o db.o dg_comm.o dg_db_scripts.o dg_event.o \ constants.o db.o dg_comm.o dg_db_scripts.o dg_event.o \
dg_handler.o dg_misc.o dg_mobcmd.o dg_objcmd.o dg_olc.o dg_scripts.o \ dg_handler.o dg_misc.o dg_mobcmd.o dg_objcmd.o dg_olc.o dg_scripts.o \
@ -37,7 +37,7 @@ OBJFILES = act.comm.o act.informative.o act.item.o act.movement.o \
weather.o zedit.o zmalloc.o weather.o zedit.o zmalloc.o
CXREF_FILES = act.comm.c act.informative.c act.item.c act.movement.c \ CXREF_FILES = act.comm.c act.informative.c act.item.c act.movement.c \
act.offensive.c act.other.c act.social.c act.wizard.c aedit.c alias.c \ act.offensive.c act.other.c act.social.c act.wizard.c aedit.c \
ban.c boards.c bsd-snprintf.c castle.c cedit.c class.c comm.c config.c \ ban.c boards.c bsd-snprintf.c castle.c cedit.c class.c comm.c config.c \
constants.c db.c dg_comm.c dg_db_scripts.c dg_event.c \ constants.c db.c dg_comm.c dg_db_scripts.c dg_event.c \
dg_handler.c dg_misc.c dg_mobcmd.c dg_objcmd.c dg_olc.c dg_scripts.c \ dg_handler.c dg_misc.c dg_mobcmd.c dg_objcmd.c dg_olc.c dg_scripts.c \

View file

@ -52,7 +52,6 @@ OBJS=\
act.item.obj \ act.item.obj \
act.informative.obj \ act.informative.obj \
act.comm.obj \ act.comm.obj \
alias.obj
LIBS=$(LCCDIR)\lib\wsock32.lib LIBS=$(LCCDIR)\lib\wsock32.lib
@ -551,14 +550,3 @@ ACT_COMM_C=\
act.comm.obj: $(ACT_COMM_C) $(DISTDIR)\src\act.comm.c act.comm.obj: $(ACT_COMM_C) $(DISTDIR)\src\act.comm.c
$(CC) $(CFLAGS) $(DISTDIR)\src\act.comm.c $(CC) $(CFLAGS) $(DISTDIR)\src\act.comm.c
# Build ALIAS.C
ALIAS_C=\
$(DISTDIR)\src\sysdep.h\
$(DISTDIR)\src\structs.h\
$(DISTDIR)\src\utils.h\
$(DISTDIR)\src\interpreter.h\
$(DISTDIR)\src\db.h\
alias.obj: $(ALIAS_C) $(DISTDIR)\src\alias.c
$(CC) $(CFLAGS) $(DISTDIR)\src\alias.c

View file

@ -40,7 +40,7 @@ OBJFILES = comm.obj act.comm.obj act.informative.obj act.movement.obj act.item.o
castle.obj class.obj config.obj constants.obj db.obj fight.obj graph.obj handler.obj \ castle.obj class.obj config.obj constants.obj db.obj fight.obj graph.obj handler.obj \
house.obj interpreter.obj limits.obj magic.obj mail.obj mobact.obj modify.obj \ house.obj interpreter.obj limits.obj magic.obj mail.obj mobact.obj modify.obj \
objsave.obj shop.obj spec_assign.obj spec_procs.obj spell_parser.obj \ objsave.obj shop.obj spec_assign.obj spec_procs.obj spell_parser.obj \
spells.obj utils.obj weather.obj random.obj alias.obj players.obj spells.obj utils.obj weather.obj random.obj players.obj
default: circle.exe default: circle.exe
$(MAKE) circle.exe $(MAKE) circle.exe
@ -52,8 +52,6 @@ circle.exe : $(OBJFILES)
# Dependencies for the object files (automagically generated with # Dependencies for the object files (automagically generated with
# gcc -MM) # gcc -MM)
alias.obj: alias.c conf.h sysdep.h structs.h utils.h interpreter.h db.h
$(CC) -c $(CFLAGS) alias.c
act.comm.obj: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ act.comm.obj: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \
handler.h db.h screen.h handler.h db.h screen.h
$(CC) -c $(CFLAGS) act.comm.c $(CC) -c $(CFLAGS) act.comm.c

View file

@ -26,7 +26,7 @@ OBJFILES = comm.o act.comm.o act.informative.o act.movement.o act.item.o \
castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \ castle.o class.o config.o constants.o db.o fight.o graph.o handler.o \
house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \ house.o interpreter.o limits.o magic.o mail.o mobact.o modify.o \
objsave.o shop.o spec_assign.o spec_procs.o spell_parser.o \ objsave.o shop.o spec_assign.o spec_procs.o spell_parser.o \
spells.o utils.o weather.o random.o alias.o players.o spells.o utils.o weather.o random.o players.o
default: .accepted default: .accepted
$(MAKE) ../bin/circle $(MAKE) ../bin/circle
@ -93,8 +93,6 @@ clean:
# Dependencies for the object files (automagically generated with # Dependencies for the object files (automagically generated with
# gcc -MM) # gcc -MM)
alias.o: alias.c conf.h sysdep.h structs.h utils.h interpreter.h db.h
$(CC) -c $(CFLAGS) alias.c
act.comm.o: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \ act.comm.o: act.comm.c conf.h sysdep.h structs.h utils.h comm.h interpreter.h \
handler.h db.h screen.h handler.h db.h screen.h
$(CC) -c $(CFLAGS) act.comm.c $(CC) -c $(CFLAGS) act.comm.c

View file

@ -434,10 +434,12 @@ void do_auto_exits(struct char_data *ch)
for (door = 0; door < NUM_OF_DIRS; door++) { for (door = 0; door < NUM_OF_DIRS; door++) {
if (!EXIT(ch, door) || EXIT(ch, door)->to_room == NOWHERE) if (!EXIT(ch, door) || EXIT(ch, door)->to_room == NOWHERE)
continue; continue;
if (EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED)) if (EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED) && !CONFIG_DISP_CLOSED_DOORS)
continue; continue;
if (EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED))
send_to_char(ch, "%c ", LOWER(*dirs[door])); send_to_char(ch, "%s(%c)%s ", CCRED(ch, C_NRM), LOWER(*dirs[door]), CCCYN(ch, C_NRM));
else
send_to_char(ch, "%c ", LOWER(*dirs[door]));
slen++; slen++;
} }
@ -458,14 +460,18 @@ ACMD(do_exits)
for (door = 0; door < NUM_OF_DIRS; door++) { for (door = 0; door < NUM_OF_DIRS; door++) {
if (!EXIT(ch, door) || EXIT(ch, door)->to_room == NOWHERE) if (!EXIT(ch, door) || EXIT(ch, door)->to_room == NOWHERE)
continue; continue;
if (EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED)) if (EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED) && !CONFIG_DISP_CLOSED_DOORS)
continue; continue;
len++; len++;
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS)) if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_SHOWVNUMS) && !EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED))
send_to_char(ch, "%-5s - [%5d] %s\r\n", dirs[door], GET_ROOM_VNUM(EXIT(ch, door)->to_room), send_to_char(ch, "%-5s - [%5d] %s\r\n", dirs[door], GET_ROOM_VNUM(EXIT(ch, door)->to_room), world[EXIT(ch, door)->to_room].name);
world[EXIT(ch, door)->to_room].name); else if (CONFIG_DISP_CLOSED_DOORS && EXIT_FLAGGED(EXIT(ch, door), EX_CLOSED)) {
/* But we tell them the door is closed */
send_to_char(ch, "%-5s - The %s is closed.\r\n", dirs[door],
(EXIT(ch, door)->keyword)? fname(EXIT(ch, door)->keyword) : "opening" );
}
else else
send_to_char(ch, "%-5s - %s\r\n", dirs[door], IS_DARK(EXIT(ch, door)->to_room) && send_to_char(ch, "%-5s - %s\r\n", dirs[door], IS_DARK(EXIT(ch, door)->to_room) &&
!CAN_SEE_IN_DARK(ch) ? "Too dark to tell." : world[EXIT(ch, door)->to_room].name); !CAN_SEE_IN_DARK(ch) ? "Too dark to tell." : world[EXIT(ch, door)->to_room].name);
@ -1607,7 +1613,7 @@ void perform_immort_where(struct char_data *ch, char *arg)
send_to_char(ch, "M%3d. %-25s%s - [%5d] %-25s%s", ++num, GET_NAME(i), QNRM, send_to_char(ch, "M%3d. %-25s%s - [%5d] %-25s%s", ++num, GET_NAME(i), QNRM,
GET_ROOM_VNUM(IN_ROOM(i)), world[IN_ROOM(i)].name, QNRM); GET_ROOM_VNUM(IN_ROOM(i)), world[IN_ROOM(i)].name, QNRM);
if (SCRIPT(i)) if (SCRIPT(i))
send_to_char(ch, "[T%d] ", i->proto_script->vnum); send_to_char(ch, "[T%5d] ", i->proto_script->vnum);
send_to_char(ch, "%s\r\n", QNRM); send_to_char(ch, "%s\r\n", QNRM);
} }
for (num = 0, k = object_list; k; k = k->next) for (num = 0, k = object_list; k; k = k->next)

View file

@ -105,7 +105,7 @@ ACMD(do_hit)
check_killer(ch, vict); check_killer(ch, vict);
} }
} }
if (AFF_FLAGGED(ch, AFF_CHARM) && !IS_NPC(ch->master) && !IS_NPC(vict)) if (AFF_FLAGGED(ch, AFF_CHARM) && ch->master && !IS_NPC(ch->master) && vict && !IS_NPC(vict))
return; /* you can't order a charmed pet to attack a return; /* you can't order a charmed pet to attack a
* player */ * player */
} }
@ -273,9 +273,11 @@ ACMD(do_flee)
loss = GET_MAX_HIT(was_fighting) - GET_HIT(was_fighting); loss = GET_MAX_HIT(was_fighting) - GET_HIT(was_fighting);
loss *= GET_LEVEL(was_fighting); loss *= GET_LEVEL(was_fighting);
gain_exp(ch, -loss); gain_exp(ch, -loss);
stop_fighting(ch); }
stop_fighting(was_fighting); if (FIGHTING(ch))
} stop_fighting(ch);
if (was_fighting && ch == FIGHTING(was_fighting))
stop_fighting(was_fighting);
} else { } else {
act("$n tries to flee, but can't!", TRUE, ch, 0, 0, TO_ROOM); act("$n tries to flee, but can't!", TRUE, ch, 0, 0, TO_ROOM);
} }

View file

@ -1,191 +0,0 @@
/*************************************************************************
* File: alias.c Part of tbaMUD *
* Usage: Writing/reading player's aliases. *
* *
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
* by Jeremy Hess, Chad Thompson, and George Greer *
**************************************************************************/
#include "conf.h"
#include "sysdep.h"
#include "structs.h"
#include "utils.h"
#include "interpreter.h"
#include "db.h"
void write_aliases(struct char_data *ch);
void read_aliases(struct char_data *ch);
void delete_aliases(const char *charname);
void write_aliases(struct char_data *ch)
{
FILE *file;
char fn[MAX_STRING_LENGTH];
struct alias_data *temp;
get_filename(fn, sizeof(fn), ALIAS_FILE, GET_NAME(ch));
remove(fn);
if (GET_ALIASES(ch) == NULL)
return;
if ((file = fopen(fn, "w")) == NULL) {
log("SYSERR: Couldn't save aliases for %s in '%s': %s", GET_NAME(ch), fn, strerror(errno));
/* SYSERR_DESC: This error occurs when the server fails to open the relevant
* alias file for writing. The text at the end of the error should give a
* valid reason why. */
return;
}
for (temp = GET_ALIASES(ch); temp; temp = temp->next) {
int aliaslen = strlen(temp->alias);
int repllen = strlen(temp->replacement) - 1;
fprintf(file, "%d\n%s\n" /* Alias */
"%d\n%s\n" /* Replacement */
"%d\n", /* Type */
aliaslen, temp->alias,
repllen, temp->replacement + 1,
temp->type);
}
fclose(file);
}
void read_aliases(struct char_data *ch)
{
FILE *file;
char xbuf[MAX_STRING_LENGTH];
struct alias_data *t2, *prev = NULL;
int length;
get_filename(xbuf, sizeof(xbuf), ALIAS_FILE, GET_NAME(ch));
if ((file = fopen(xbuf, "r")) == NULL) {
if (errno != ENOENT) {
log("SYSERR: Couldn't open alias file '%s' for %s: %s", xbuf, GET_NAME(ch), strerror(errno));
/* SYSERR_DESC: This error occurs when the server fails to open the
* relevant alias file for reading. The text at the end version should
* give a valid reason why. */
}
return;
}
CREATE(GET_ALIASES(ch), struct alias_data, 1);
t2 = GET_ALIASES(ch);
for (;;) {
/* Read the aliased command. */
if (fscanf(file, "%d\n", &length) != 1)
goto read_alias_error;
fgets(xbuf, length + 1, file);
t2->alias = strdup(xbuf);
/* Build the replacement. */
if (fscanf(file, "%d\n", &length) != 1)
goto read_alias_error;
*xbuf = ' '; /* Doesn't need terminated, fgets() will. */
fgets(xbuf + 1, length + 1, file);
t2->replacement = strdup(xbuf);
/* Figure out the alias type. */
if (fscanf(file, "%d\n", &length) != 1)
goto read_alias_error;
t2->type = length;
if (feof(file))
break;
CREATE(t2->next, struct alias_data, 1);
prev = t2;
t2 = t2->next;
};
fclose(file);
return;
read_alias_error:
if (t2->alias)
free(t2->alias);
free(t2);
if (prev)
prev->next = NULL;
fclose(file);
}
void delete_aliases(const char *charname)
{
char filename[PATH_MAX];
if (!get_filename(filename, sizeof(filename), ALIAS_FILE, charname))
return;
if (remove(filename) < 0 && errno != ENOENT)
log("SYSERR: deleting alias file %s: %s", filename, strerror(errno));
/* SYSERR_DESC: When an alias file cannot be removed, this error will occur,
* and the reason why will be the tail end of the error. */
}
/* until further notice, the alias->pfiles save and load functions will
* function along side the old seperate alias file load, for compatibility. */
void write_aliases_ascii(FILE *file, struct char_data *ch)
{
struct alias_data *temp;
int count = 0;
if (GET_ALIASES(ch) == NULL)
return;
for (temp = GET_ALIASES(ch); temp; temp = temp->next)
count++;
fprintf(file, "Alis: %d\n", count);
/* the +1 thing below is due to alias replacements having a space prepended
* in memory. The reason for this escapes me. Welcor 27/12/06 */
for (temp = GET_ALIASES(ch); temp; temp = temp->next) {
fprintf(file, "%s\n" /* Alias */
"%s\n" /* Replacement */
"%d\n", /* Type */
temp->alias,
temp->replacement+1,
temp->type);
}
}
void read_aliases_ascii(FILE *file, struct char_data *ch, int count)
{
int i;
struct alias_data *temp;
char abuf[MAX_INPUT_LENGTH], rbuf[MAX_INPUT_LENGTH+1], tbuf[MAX_INPUT_LENGTH];
if (count == 0) {
GET_ALIASES(ch) = NULL;
return; /* No aliases in the list. */
}
for (i = 0; i < count; i++) {
/* Read the aliased command. */
get_line(file, abuf);
/* Read the replacement. */
get_line(file, tbuf);
strcpy(rbuf, " ");
strcat(rbuf, tbuf); /* strcat: OK */
/* read the type */
get_line(file, tbuf);
if (abuf && *abuf && tbuf && *tbuf && rbuf && *rbuf) {
CREATE(temp, struct alias_data, 1);
temp->alias = strdup(abuf);
temp->replacement = strdup(rbuf);
temp->type = atoi(tbuf);
temp->next = GET_ALIASES(ch);
GET_ALIASES(ch) = temp;
}
}
}

View file

@ -102,6 +102,7 @@ void cedit_setup(struct descriptor_data *d)
OLC_CONFIG(d)->play.load_into_inventory = CONFIG_LOAD_INVENTORY; OLC_CONFIG(d)->play.load_into_inventory = CONFIG_LOAD_INVENTORY;
OLC_CONFIG(d)->play.track_through_doors = CONFIG_TRACK_T_DOORS; OLC_CONFIG(d)->play.track_through_doors = CONFIG_TRACK_T_DOORS;
OLC_CONFIG(d)->play.no_mort_to_immort = CONFIG_NO_MORT_TO_IMMORT; OLC_CONFIG(d)->play.no_mort_to_immort = CONFIG_NO_MORT_TO_IMMORT;
OLC_CONFIG(d)->play.disp_closed_doors = CONFIG_DISP_CLOSED_DOORS;
/* Crash Saves */ /* Crash Saves */
OLC_CONFIG(d)->csd.free_rent = CONFIG_FREE_RENT; OLC_CONFIG(d)->csd.free_rent = CONFIG_FREE_RENT;
@ -194,6 +195,7 @@ void cedit_save_internally(struct descriptor_data *d)
CONFIG_LOAD_INVENTORY = OLC_CONFIG(d)->play.load_into_inventory; CONFIG_LOAD_INVENTORY = OLC_CONFIG(d)->play.load_into_inventory;
CONFIG_TRACK_T_DOORS = OLC_CONFIG(d)->play.track_through_doors; CONFIG_TRACK_T_DOORS = OLC_CONFIG(d)->play.track_through_doors;
CONFIG_NO_MORT_TO_IMMORT = OLC_CONFIG(d)->play.no_mort_to_immort; CONFIG_NO_MORT_TO_IMMORT = OLC_CONFIG(d)->play.no_mort_to_immort;
CONFIG_DISP_CLOSED_DOORS = OLC_CONFIG(d)->play.disp_closed_doors;
/* Crash Saves */ /* Crash Saves */
CONFIG_FREE_RENT = OLC_CONFIG(d)->csd.free_rent; CONFIG_FREE_RENT = OLC_CONFIG(d)->csd.free_rent;
@ -350,6 +352,8 @@ int save_config( IDXTYPE nowhere )
"track_through_doors = %d\n\n", CONFIG_TRACK_T_DOORS); "track_through_doors = %d\n\n", CONFIG_TRACK_T_DOORS);
fprintf(fl, "* Should players who reach enough exp automatically level to immortal?\n" fprintf(fl, "* Should players who reach enough exp automatically level to immortal?\n"
"no_mort_to_immort = %d\n\n", CONFIG_NO_MORT_TO_IMMORT); "no_mort_to_immort = %d\n\n", CONFIG_NO_MORT_TO_IMMORT);
fprintf(fl, "* Should closed doors be shown on autoexit / exit?\n"
"disp_closed_doors = %d\n\n", CONFIG_DISP_CLOSED_DOORS);
strcpy(buf, CONFIG_OK); strcpy(buf, CONFIG_OK);
strip_cr(buf); strip_cr(buf);
@ -568,8 +572,9 @@ void cedit_disp_game_play_options(struct descriptor_data *d)
"%sM%s) Death Traps Junk Items : %s%s\r\n" "%sM%s) Death Traps Junk Items : %s%s\r\n"
"%sN%s) Objects Load Into Inventory : %s%s\r\n" "%sN%s) Objects Load Into Inventory : %s%s\r\n"
"%sO%s) Track Through Doors : %s%s\r\n" "%sO%s) Track Through Doors : %s%s\r\n"
"%sP%s) Mortals Level To Immortal : %s%s\r\n" "%sP%s) Display Closed Doors : %s%s\r\n"
"%s1%s) OK Message Text : %s%s" "%sR%s) Mortals Level To Immortal : %s%s\r\n"
"%s1%s) OK Message Text : %s%s"
"%s2%s) NOPERSON Message Text : %s%s" "%s2%s) NOPERSON Message Text : %s%s"
"%s3%s) NOEFFECT Message Text : %s%s" "%s3%s) NOEFFECT Message Text : %s%s"
"%sQ%s) Exit To The Main Menu\r\n" "%sQ%s) Exit To The Main Menu\r\n"
@ -590,7 +595,8 @@ void cedit_disp_game_play_options(struct descriptor_data *d)
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.dts_are_dumps), grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.dts_are_dumps),
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.load_into_inventory), grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.load_into_inventory),
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.track_through_doors), grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.track_through_doors),
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.no_mort_to_immort), grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.disp_closed_doors),
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.no_mort_to_immort),
grn, nrm, cyn, OLC_CONFIG(d)->play.OK, grn, nrm, cyn, OLC_CONFIG(d)->play.OK,
grn, nrm, cyn, OLC_CONFIG(d)->play.NOPERSON, grn, nrm, cyn, OLC_CONFIG(d)->play.NOPERSON,
@ -881,7 +887,12 @@ void cedit_parse(struct descriptor_data *d, char *arg)
case 'p': case 'p':
case 'P': case 'P':
TOGGLE_VAR(OLC_CONFIG(d)->play.no_mort_to_immort); TOGGLE_VAR(OLC_CONFIG(d)->play.disp_closed_doors);
break;
case 'r':
case 'R':
TOGGLE_VAR(OLC_CONFIG(d)->play.no_mort_to_immort);
break; break;
case '1': case '1':

View file

@ -298,3 +298,7 @@ int use_autowiz = YES;
/* If yes, what is the lowest level which should be on the wizlist? (All immort /* If yes, what is the lowest level which should be on the wizlist? (All immort
* levels below the level you specify will go on the immlist instead.) */ * levels below the level you specify will go on the immlist instead.) */
int min_wizlist_lev = LVL_GOD; int min_wizlist_lev = LVL_GOD;
/* To mimic stack behavior set to NO. To allow mortals to see doors in exits
* set to YES. */
int display_closed_doors = YES;

View file

@ -169,6 +169,7 @@ extern int bitsavetodisk;
extern struct player_index_element *player_table; extern struct player_index_element *player_table;
extern int top_of_p_table; extern int top_of_p_table;
extern long top_idnum; extern long top_idnum;
extern int display_closed_doors;
/* external ASCII Player Files vars */ /* external ASCII Player Files vars */
extern int auto_pwipe; extern int auto_pwipe;
@ -3364,6 +3365,7 @@ void load_default_config( void )
CONFIG_NOEFFECT = strdup(NOEFFECT); CONFIG_NOEFFECT = strdup(NOEFFECT);
CONFIG_TRACK_T_DOORS = track_through_doors; CONFIG_TRACK_T_DOORS = track_through_doors;
CONFIG_NO_MORT_TO_IMMORT = no_mort_to_immort; CONFIG_NO_MORT_TO_IMMORT = no_mort_to_immort;
CONFIG_DISP_CLOSED_DOORS = display_closed_doors;
/* Rent / crashsave options. */ /* Rent / crashsave options. */
CONFIG_FREE_RENT = free_rent; CONFIG_FREE_RENT = free_rent;
@ -3451,7 +3453,9 @@ void load_config( void )
break; break;
case 'd': case 'd':
if (!str_cmp(tag, "dts_are_dumps")) if (!str_cmp(tag, "display_closed_doors"))
CONFIG_DISP_CLOSED_DOORS = num;
else if (!str_cmp(tag, "dts_are_dumps"))
CONFIG_DTS_ARE_DUMPS = num; CONFIG_DTS_ARE_DUMPS = num;
else if (!str_cmp(tag, "donation_room_1")) else if (!str_cmp(tag, "donation_room_1"))
if (num == -1) if (num == -1)

View file

@ -26,7 +26,6 @@
#define LIB_PLRTEXT ":plrtext:" #define LIB_PLRTEXT ":plrtext:"
#define LIB_PLROBJS ":plrobjs:" #define LIB_PLROBJS ":plrobjs:"
#define LIB_PLRVARS ":plrvars:" #define LIB_PLRVARS ":plrvars:"
#define LIB_PLRALIAS ":plralias:"
#define LIB_PLRFILES ":plrfiles:" #define LIB_PLRFILES ":plrfiles:"
#define LIB_HOUSE ":house:" #define LIB_HOUSE ":house:"
#define SLASH ":" #define SLASH ":"
@ -39,7 +38,6 @@
#define LIB_PLRTEXT "plrtext/" #define LIB_PLRTEXT "plrtext/"
#define LIB_PLROBJS "plrobjs/" #define LIB_PLROBJS "plrobjs/"
#define LIB_PLRVARS "plrvars/" #define LIB_PLRVARS "plrvars/"
#define LIB_PLRALIAS "plralias/"
#define LIB_HOUSE "house/" #define LIB_HOUSE "house/"
#define LIB_PLRFILES "plrfiles/" #define LIB_PLRFILES "plrfiles/"
#define SLASH "/" #define SLASH "/"
@ -49,7 +47,6 @@
#define SUF_OBJS "objs" #define SUF_OBJS "objs"
#define SUF_TEXT "text" #define SUF_TEXT "text"
#define SUF_ALIAS "alias"
#define SUF_MEM "mem" #define SUF_MEM "mem"
#define SUF_PLR "plr" #define SUF_PLR "plr"

View file

@ -96,6 +96,7 @@ ACMD(do_oasis_trigedit)
else else
trigedit_setup_existing(d, real_num); trigedit_setup_existing(d, real_num);
trigedit_disp_menu(d);
STATE(d) = CON_TRIGEDIT; STATE(d) = CON_TRIGEDIT;
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM); act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
@ -150,8 +151,6 @@ void trigedit_setup_new(struct descriptor_data *d)
OLC_TRIG(d) = trig; OLC_TRIG(d) = trig;
OLC_VAL(d) = 0; /* Has changed flag. (It hasn't so far, we just made it.) */ OLC_VAL(d) = 0; /* Has changed flag. (It hasn't so far, we just made it.) */
trigedit_disp_menu(d);
} }
void trigedit_setup_existing(struct descriptor_data *d, int rtrg_num) void trigedit_setup_existing(struct descriptor_data *d, int rtrg_num)
@ -179,8 +178,6 @@ void trigedit_setup_existing(struct descriptor_data *d, int rtrg_num)
OLC_TRIG(d) = trig; OLC_TRIG(d) = trig;
OLC_VAL(d) = 0; /* Has changed flag. (It hasn't so far, we just made it.) */ OLC_VAL(d) = 0; /* Has changed flag. (It hasn't so far, we just made it.) */
trigedit_disp_menu(d);
} }
void trigedit_disp_menu(struct descriptor_data *d) void trigedit_disp_menu(struct descriptor_data *d)

View file

@ -2984,3 +2984,17 @@ void remove_from_lookup_table(long uid)
log("remove_from_lookup. UID %ld not found.", uid); log("remove_from_lookup. UID %ld not found.", uid);
} }
bool check_flags_by_name_ar(int *array, int numflags, char *search, const char *namelist[])
{
int i, item=-1;
for (i=0; i<numflags && item < 0; i++)
if (!strcmp(search, namelist[i])) item = i;
if (item < 0) return FALSE;
if (IS_SET_AR(array, item)) return TRUE;
return FALSE;
}

View file

@ -20,11 +20,13 @@
#include "screen.h" #include "screen.h"
#include "constants.h" #include "constants.h"
#include "spells.h" #include "spells.h"
#include "oasis.h"
/* External variables and functions */ /* External variables and functions */
extern const char *pc_class_types[]; extern const char *pc_class_types[];
extern struct time_info_data time_info; extern struct time_info_data time_info;
int find_eq_pos_script(char *arg); int find_eq_pos_script(char *arg);
bool check_flags_by_name_ar(int *array, int numflags, char *search, const char *namelist[]);
/* Utility functions */ /* Utility functions */
@ -1062,7 +1064,17 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
*str = '\x1'; *str = '\x1';
switch (LOWER(*field)) { switch (LOWER(*field)) {
case 'c': case 'a':
if (!str_cmp(field, "affects")) {
if (subfield && *subfield) {
if (check_flags_by_name_ar(GET_OBJ_AFFECT(o), NUM_AFF_FLAGS, subfield, affected_bits) == TRUE)
snprintf(str, slen, "1");
else
snprintf(str, slen, "0");
} else
snprintf(str, slen, "0");
}
case 'c':
if (!str_cmp(field, "cost")) { if (!str_cmp(field, "cost")) {
if (subfield && *subfield) { if (subfield && *subfield) {
int addition = atoi(subfield); int addition = atoi(subfield);
@ -1301,6 +1313,20 @@ o->contains) ? "1" : "0"));
else else
*str = '\0'; *str = '\0';
} }
else if (!str_cmp(field, "zonenumber"))
snprintf(str, slen, "%d", zone_table[r->zone].number);
else if (!str_cmp(field, "zonename"))
snprintf(str, slen, "%s", zone_table[r->zone].name);
else if (!str_cmp(field, "roomflag")) {
if (subfield && *subfield) {
room_rnum thisroom = real_room(r->number);
if (check_flags_by_name_ar(ROOM_FLAGS(thisroom), NUM_ROOM_FLAGS, subfield, room_bits) == TRUE)
snprintf(str, slen, "1");
else
snprintf(str, slen, "0");
} else
snprintf(str, slen, "0");
}
else if (!str_cmp(field, "north")) { else if (!str_cmp(field, "north")) {
if (R_EXIT(r, NORTH)) { if (R_EXIT(r, NORTH)) {
if (subfield && *subfield) { if (subfield && *subfield) {

View file

@ -382,41 +382,6 @@ int copy_room(struct room_data *to, struct room_data *from)
return TRUE; return TRUE;
} }
/* Idea by Cris Jacob. */
room_rnum duplicate_room(room_vnum dest_vnum, room_rnum orig)
{
int new_rnum, znum;
struct room_data nroom;
#if CIRCLE_UNSIGNED_INDEX
if (orig == NOWHERE || orig > top_of_world) {
#else
if (orig < 0 || orig > top_of_world) {
#endif
log("SYSERR: GenOLC: copy_room: Given bad original real room.");
return NOWHERE;
} else if ((znum = real_zone_by_thing(dest_vnum)) == NOWHERE) {
log("SYSERR: GenOLC: copy_room: No such destination zone.");
return NOWHERE;
}
/* add_room will make its own copies of strings. */
if ((new_rnum = add_room(&nroom)) == NOWHERE) {
log("SYSERR: GenOLC: copy_room: Problem adding room.");
return NOWHERE;
}
nroom = world[new_rnum];
nroom.number = dest_vnum;
nroom.zone = znum;
/* So the people and objects aren't in two places at once. */
nroom.contents = NULL;
nroom.people = NULL;
return new_rnum;
}
/* Copy strings over so bad things don't happen. We do not free the existing /* Copy strings over so bad things don't happen. We do not free the existing
* strings here because copy_room() did a shallow copy previously and we'd be * strings here because copy_room() did a shallow copy previously and we'd be
* freeing the very strings we're copying. If this function is used elsewhere, * freeing the very strings we're copying. If this function is used elsewhere,

View file

@ -49,8 +49,6 @@ int parse_class(char arg);
int special(struct char_data *ch, int cmd, char *arg); int special(struct char_data *ch, int cmd, char *arg);
int isbanned(char *hostname); int isbanned(char *hostname);
int valid_name(char *newname); int valid_name(char *newname);
void read_aliases(struct char_data *ch);
void delete_aliases(const char *charname);
void remove_player(int pfilepos); void remove_player(int pfilepos);
/* local functions */ /* local functions */
@ -62,7 +60,6 @@ int perform_alias(struct descriptor_data *d, char *orig, size_t maxlen);
int reserved_word(char *argument); int reserved_word(char *argument);
int _parse_name(char *arg, char *name); int _parse_name(char *arg, char *name);
int enter_player_game (struct descriptor_data *d); int enter_player_game (struct descriptor_data *d);
void write_aliases(struct char_data *ch);
/* prototypes for all do_x functions. */ /* prototypes for all do_x functions. */
ACMD(do_action); ACMD(do_action);
@ -157,6 +154,7 @@ ACMD(do_mtransform);
ACMD(do_mzoneecho); ACMD(do_mzoneecho);
ACMD(do_mrecho); ACMD(do_mrecho);
ACMD(do_not_here); ACMD(do_not_here);
ACMD(do_oasis_copy);
ACMD(do_order); ACMD(do_order);
ACMD(do_page); ACMD(do_page);
ACMD(do_peace); ACMD(do_peace);
@ -175,7 +173,6 @@ ACMD(do_rescue);
ACMD(do_rest); ACMD(do_rest);
ACMD(do_restore); ACMD(do_restore);
ACMD(do_return); ACMD(do_return);
ACMD(do_room_copy);
ACMD(do_save); ACMD(do_save);
ACMD(do_saveall); ACMD(do_saveall);
ACMD(do_say); ACMD(do_say);
@ -366,6 +363,7 @@ cpp_extern const struct command_info cmd_info[] = {
{ "mail" , "mail" , POS_STANDING, do_not_here , 1, 0 }, { "mail" , "mail" , POS_STANDING, do_not_here , 1, 0 },
{ "medit" , "med" , POS_DEAD , do_oasis_medit, LVL_BUILDER, 0 }, { "medit" , "med" , POS_DEAD , do_oasis_medit, LVL_BUILDER, 0 },
{ "mlist" , "mlist" , POS_DEAD , do_oasis_list , LVL_BUILDER, SCMD_OASIS_MLIST }, { "mlist" , "mlist" , POS_DEAD , do_oasis_list , LVL_BUILDER, SCMD_OASIS_MLIST },
{ "mcopy" , "mcopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_MEDIT },
{ "mute" , "mute" , POS_DEAD , do_wizutil , LVL_GOD, SCMD_MUTE }, { "mute" , "mute" , POS_DEAD , do_wizutil , LVL_GOD, SCMD_MUTE },
{ "news" , "news" , POS_SLEEPING, do_gen_ps , 0, SCMD_NEWS }, { "news" , "news" , POS_SLEEPING, do_gen_ps , 0, SCMD_NEWS },
@ -386,6 +384,7 @@ cpp_extern const struct command_info cmd_info[] = {
{ "olc" , "olc" , POS_DEAD , do_show_save_list, LVL_BUILDER, 0 }, { "olc" , "olc" , POS_DEAD , do_show_save_list, LVL_BUILDER, 0 },
{ "olist" , "olist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_OLIST }, { "olist" , "olist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_OLIST },
{ "oedit" , "oedit" , POS_DEAD , do_oasis_oedit, LVL_BUILDER, 0 }, { "oedit" , "oedit" , POS_DEAD , do_oasis_oedit, LVL_BUILDER, 0 },
{ "ocopy" , "ocopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_OEDIT },
{ "put" , "p" , POS_RESTING , do_put , 0, 0 }, { "put" , "p" , POS_RESTING , do_put , 0, 0 },
{ "peace" , "pe" , POS_DEAD , do_peace , LVL_BUILDER, 0 }, { "peace" , "pe" , POS_DEAD , do_peace , LVL_BUILDER, 0 },
@ -421,11 +420,12 @@ cpp_extern const struct command_info cmd_info[] = {
{ "return" , "retu" , POS_DEAD , do_return , 0, 0 }, { "return" , "retu" , POS_DEAD , do_return , 0, 0 },
{ "redit" , "redit" , POS_DEAD , do_oasis_redit, LVL_BUILDER, 0 }, { "redit" , "redit" , POS_DEAD , do_oasis_redit, LVL_BUILDER, 0 },
{ "rlist" , "rlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_RLIST }, { "rlist" , "rlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_RLIST },
{ "rclone" , "rclone" , POS_DEAD , do_room_copy, LVL_BUILDER, 0 }, { "rcopy" , "rcopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_REDIT },
{ "roomflags", "roomflags", POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_SHOWVNUMS }, { "roomflags", "roomflags", POS_DEAD , do_gen_tog , LVL_IMMORT, SCMD_SHOWVNUMS },
{ "say" , "s" , POS_RESTING , do_say , 0, 0 }, { "say" , "s" , POS_RESTING , do_say , 0, 0 },
{ "score" , "sc" , POS_DEAD , do_score , 0, 0 }, { "score" , "sc" , POS_DEAD , do_score , 0, 0 },
{ "scopy" , "scopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_SEDIT },
{ "sit" , "si" , POS_RESTING , do_sit , 0, 0 }, { "sit" , "si" , POS_RESTING , do_sit , 0, 0 },
{ "'" , "'" , POS_RESTING , do_say , 0, 0 }, { "'" , "'" , POS_RESTING , do_say , 0, 0 },
{ "save" , "sav" , POS_SLEEPING, do_save , 0, 0 }, { "save" , "sav" , POS_SLEEPING, do_save , 0, 0 },
@ -465,6 +465,7 @@ cpp_extern const struct command_info cmd_info[] = {
{ "trigedit" , "trigedit", POS_DEAD , do_oasis_trigedit, LVL_BUILDER, 0 }, { "trigedit" , "trigedit", POS_DEAD , do_oasis_trigedit, LVL_BUILDER, 0 },
{ "typo" , "typo" , POS_DEAD , do_gen_write, 0, SCMD_TYPO }, { "typo" , "typo" , POS_DEAD , do_gen_write, 0, SCMD_TYPO },
{ "tlist" , "tlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_TLIST }, { "tlist" , "tlist" , POS_DEAD , do_oasis_list, LVL_BUILDER, SCMD_OASIS_TLIST },
{ "tcopy" , "tcopy" , POS_DEAD , do_oasis_copy, LVL_GOD, CON_TRIGEDIT },
{ "tstat" , "tstat" , POS_DEAD , do_tstat , LVL_BUILDER, 0 }, { "tstat" , "tstat" , POS_DEAD , do_tstat , LVL_BUILDER, 0 },
{ "unlock" , "unlock" , POS_SITTING , do_gen_door , 0, SCMD_UNLOCK }, { "unlock" , "unlock" , POS_SITTING , do_gen_door , 0, SCMD_UNLOCK },
@ -1250,19 +1251,10 @@ int perform_dupe_check(struct descriptor_data *d)
/* load the player, put them in the right room - used by copyover_recover too */ /* load the player, put them in the right room - used by copyover_recover too */
int enter_player_game (struct descriptor_data *d) int enter_player_game (struct descriptor_data *d)
{ {
int load_result; int load_result;
room_vnum load_room; room_vnum load_room;
reset_char(d->character); reset_char(d->character);
/* See if there might be some aliases in the old alias file. Only do this
* if there were no aliases in the pfile. */
if (GET_ALIASES(d->character) == NULL)
{
read_aliases(d->character);
/* delete the old file - player will be saved in a second. */
delete_aliases(GET_NAME(d->character));
}
if (PLR_FLAGGED(d->character, PLR_INVSTART)) if (PLR_FLAGGED(d->character, PLR_INVSTART))
GET_INVIS_LEV(d->character) = GET_LEVEL(d->character); GET_INVIS_LEV(d->character) = GET_LEVEL(d->character);
@ -1731,7 +1723,6 @@ void nanny(struct descriptor_data *d, char *arg)
remove_player(player_i); remove_player(player_i);
} }
delete_aliases(GET_NAME(d->character));
delete_variables(GET_NAME(d->character)); delete_variables(GET_NAME(d->character));
write_to_output(d, "Character '%s' deleted! Goodbye.\r\n", GET_NAME(d->character)); write_to_output(d, "Character '%s' deleted! Goodbye.\r\n", GET_NAME(d->character));
mudlog(NRM, LVL_GOD, TRUE, "%s (lev %d) has self-deleted.", GET_NAME(d->character), GET_LEVEL(d->character)); mudlog(NRM, LVL_GOD, TRUE, "%s (lev %d) has self-deleted.", GET_NAME(d->character), GET_LEVEL(d->character));

View file

@ -155,6 +155,7 @@ ACMD(do_oasis_medit)
else else
medit_setup_existing(d, real_num); medit_setup_existing(d, real_num);
medit_disp_menu(d);
STATE(d) = CON_MEDIT; STATE(d) = CON_MEDIT;
/* Display the OLC messages to the players in the same room as the /* Display the OLC messages to the players in the same room as the
@ -193,8 +194,6 @@ void medit_setup_new(struct descriptor_data *d)
/* Has changed flag. (It hasn't so far, we just made it.) */ /* Has changed flag. (It hasn't so far, we just made it.) */
OLC_VAL(d) = FALSE; OLC_VAL(d) = FALSE;
OLC_ITEM_TYPE(d) = MOB_TRIGGER; OLC_ITEM_TYPE(d) = MOB_TRIGGER;
medit_disp_menu(d);
} }
void medit_setup_existing(struct descriptor_data *d, int rmob_num) void medit_setup_existing(struct descriptor_data *d, int rmob_num)
@ -215,8 +214,6 @@ void medit_setup_existing(struct descriptor_data *d, int rmob_num)
*/ */
SCRIPT(mob) = NULL; SCRIPT(mob) = NULL;
OLC_MOB(d)->proto_script = NULL; OLC_MOB(d)->proto_script = NULL;
medit_disp_menu(d);
} }
/* Ideally, this function should be in db.c, but I'll put it here for portability. */ /* Ideally, this function should be in db.c, but I'll put it here for portability. */
@ -787,7 +784,7 @@ void medit_parse(struct descriptor_data *d, char *arg)
return; return;
} else } else
write_to_output(d, "Please answer 'Y' or 'N': "); write_to_output(d, "Please answer 'Y' or 'N': ");
break; break;
default: default:
/* We should never get here. */ /* We should never get here. */
@ -814,4 +811,3 @@ void medit_string_cleanup(struct descriptor_data *d, int terminator)
break; break;
} }
} }

View file

@ -14,19 +14,153 @@
#include "interpreter.h" #include "interpreter.h"
#include "handler.h" #include "handler.h"
#include "db.h" #include "db.h"
#include "shop.h"
#include "genshp.h"
#include "genolc.h" #include "genolc.h"
#include "genzon.h" #include "genzon.h"
#include "genwld.h" #include "genwld.h"
#include "oasis.h" #include "oasis.h"
#include "improved-edit.h" #include "improved-edit.h"
#include "constants.h" #include "constants.h"
#include "dg_scripts.h"
/* Internal Functions */ /* Internal Functions */
ACMD(do_dig); ACMD(do_dig);
ACMD(do_room_copy);
room_vnum redit_find_new_vnum(zone_rnum zone); room_vnum redit_find_new_vnum(zone_rnum zone);
int buildwalk(struct char_data *ch, int dir); int buildwalk(struct char_data *ch, int dir);
/* External Functions */
void trigedit_save(struct descriptor_data *d);
void redit_save_internally(struct descriptor_data *d);
void oedit_save_internally(struct descriptor_data *d);
void medit_save_internally(struct descriptor_data *d);
void sedit_save_internally(struct descriptor_data *d);
void trigedit_setup_existing(struct descriptor_data *d, int rnum);
void redit_setup_existing(struct descriptor_data *d, int rnum);
void oedit_setup_existing(struct descriptor_data *d, int rnum);
void medit_setup_existing(struct descriptor_data *d, int rnum);
void sedit_setup_existing(struct descriptor_data *d, int rnum);
/***********************************************************
* This function makes use of the high level OLC functions *
* to copy most types of mud objects. The type of data is *
* determined by the subcmd variable and the functions are *
* looked up in a table. *
***********************************************************/
ACMD(do_oasis_copy)
{
int i, src_vnum, src_rnum, dst_vnum, dst_rnum;
char buf1[MAX_INPUT_LENGTH];
char buf2[MAX_INPUT_LENGTH];
struct descriptor_data *d;
struct {
int con_type;
IDXTYPE (*binary_search)(IDXTYPE vnum);
void (*save_func)(struct descriptor_data *d);
void (*setup_existing)(struct descriptor_data *d, int rnum);
const char *command;
const char *text;
} oasis_copy_info[] = {
{ CON_REDIT, real_room, redit_save_internally, redit_setup_existing, "rcopy", "room" },
{ CON_OEDIT, real_object, oedit_save_internally, oedit_setup_existing, "ocopy", "object" },
{ CON_MEDIT, real_mobile, medit_save_internally, medit_setup_existing, "mcopy", "mobile" },
{ CON_SEDIT, real_shop, sedit_save_internally, sedit_setup_existing, "scopy", "shop" },
{ CON_TRIGEDIT, real_trigger, trigedit_save, trigedit_setup_existing, "tcopy", "trigger" },
{ -1, NULL, NULL, NULL, "\n", "\n" }
};
/* Find the given connection type in the table (passed in subcmd). */
for (i = 0; *(oasis_copy_info[i].text) != '\n'; i++)
if (subcmd == oasis_copy_info[i].con_type)
break;
/* If not found, we don't support copying that type of data. */
if (*(oasis_copy_info[i].text) == '\n')
return;
/* No copying as a mob or while being forced. */
if (IS_NPC(ch) || !ch->desc || STATE(ch->desc) != CON_PLAYING)
return;
/* We need two arguments. */
two_arguments(argument, buf1, buf2);
/* Both arguments are required and they must be numeric. */
if (!*buf2 || !is_number(buf1) || !is_number(buf2)) {
send_to_char(ch, "Syntax: %s <source vnum> <target vnum>\r\n", oasis_copy_info[i].command);
return;
}
/* We can't copy non-existing data. */
/* Note: the source data can be in any zone. It's not restricted */
/* to the builder's designated OLC zone. */
src_vnum = atoi(buf1);
src_rnum = (*oasis_copy_info[i].binary_search)(src_vnum);
if (src_rnum == NOWHERE) {
send_to_char(ch, "The source %s (#%d) does not exist.\r\n", oasis_copy_info[i].text, src_vnum);
return;
}
/* Don't copy if the target already exists. */
dst_vnum = atoi(buf2);
dst_rnum = (*oasis_copy_info[i].binary_search)(dst_vnum);
if (dst_rnum != NOWHERE) {
send_to_char(ch, "The target %s (#%d) already exists.\r\n", oasis_copy_info[i].text, dst_vnum);
return;
}
/* Check that whatever it is isn't already being edited. */
for (d = descriptor_list; d; d = d->next) {
if (STATE(d) == subcmd) {
if (d->olc && OLC_NUM(d) == dst_vnum) {
send_to_char(ch, "The target %s (#%d) is currently being edited by %s.\r\n",
oasis_copy_info[i].text, dst_vnum, GET_NAME(d->character));
return;
}
}
}
d = ch->desc;
/* Give the descriptor an OLC structure. */
if (d->olc) {
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_oasis_copy: Player already had olc structure.");
free(d->olc);
}
/* Create the OLC structure. */
CREATE(d->olc, struct oasis_olc_data, 1);
/* Find the zone. */
if ((OLC_ZNUM(d) = real_zone_by_thing(dst_vnum)) == NOWHERE) {
send_to_char(ch, "Sorry, there is no zone for the given vnum (#%d)!\r\n", dst_vnum);
free(d->olc);
d->olc = NULL;
return;
}
/* Make sure the builder is allowed to modify the target zone. */
if (!can_edit_zone(ch, OLC_ZNUM(d))) {
send_cannot_edit(ch, zone_table[OLC_ZNUM(d)].number);
free(d->olc);
d->olc = NULL;
return;
}
/* We tell the OLC functions that we want to save to the target vnum. */
OLC_NUM(d) = dst_vnum;
/* Perform the copy. */
send_to_char(ch, "Copying %s: source: #%d, dest: #%d.\r\n", oasis_copy_info[i].text, src_vnum, dst_vnum);
(*oasis_copy_info[i].setup_existing)(d, src_rnum);
(*oasis_copy_info[i].save_func)(d);
/* Currently CLEANUP_ALL should be used for everything. */
cleanup_olc(d, CLEANUP_ALL);
send_to_char(ch, "Done.\r\n");
}
/* Commands */ /* Commands */
ACMD(do_dig) ACMD(do_dig)
{ {
@ -138,7 +272,7 @@ ACMD(do_dig)
OLC_VAL(d) = 0; OLC_VAL(d) = 0;
send_to_char(ch, "New room (%d) created.\r\n", rvnum); send_to_char(ch, "New room (%d) created.\r\n", rvnum);
cleanup_olc(d, CLEANUP_STRUCTS); cleanup_olc(d, CLEANUP_ALL);
/* Update rrnum to the correct room rnum after adding the room. */ /* Update rrnum to the correct room rnum after adding the room. */
rrnum = real_room(rvnum); rrnum = real_room(rvnum);
} }
@ -166,111 +300,6 @@ ACMD(do_dig)
} }
} }
ACMD(do_room_copy)
{
struct room_data *room_src, *room_dst;
int room_num, j, buf_num, taeller;
zone_rnum dst_zone;
struct descriptor_data *dsc;
char buf[MAX_INPUT_LENGTH];
one_argument(argument, buf);
if (!*buf) {
send_to_char(ch, "Usage: rclone <target room>\r\n");
return;
}
if (real_room((buf_num = atoi(buf))) != NOWHERE) {
send_to_char(ch, "That room already exist!\r\n");
return;
}
if ((dst_zone = real_zone_by_thing(buf_num)) == NOWHERE) {
send_to_char(ch, "Sorry, there is no zone for that number!\r\n");
return;
}
if (!can_edit_zone(ch, dst_zone) ||
!can_edit_zone(ch, world[IN_ROOM(ch)].zone) ) {
send_to_char(ch, "You may only copy rooms within your designated zone(s)!\r\n");
return;
}
room_src = &world[IN_ROOM(ch)];
CREATE(room_dst, struct room_data, 1);
room_dst->zone = dst_zone;
/* Allocate space for all strings. */
send_to_char(ch, "Cloning room....\r\n");
room_dst->name = str_udup(world[IN_ROOM(ch)].name);
room_dst->description = str_udup(world[IN_ROOM(ch)].description);
room_dst->description = str_udup(world[IN_ROOM(ch)].description);
room_dst->number = buf_num;
room_dst->sector_type = world[IN_ROOM(ch)].sector_type;
for(taeller=0; taeller < RF_ARRAY_MAX; taeller++)
room_dst->room_flags[taeller] = ROOM_FLAGS(IN_ROOM(ch))[taeller];
/* Extra descriptions, if necessary. */
send_to_char(ch, "Cloning extra descriptions....\r\n");
if (world[IN_ROOM(ch)].ex_description) {
struct extra_descr_data *tdesc, *temp, *temp2;
CREATE(temp, struct extra_descr_data, 1);
room_dst->ex_description = temp;
for (tdesc = world[IN_ROOM(ch)].ex_description; tdesc; tdesc = tdesc->next) {
temp->keyword = strdup(tdesc->keyword);
temp->description = strdup(tdesc->description);
if (tdesc->next) {
CREATE(temp2, struct extra_descr_data, 1);
temp->next = temp2;
temp = temp2;
} else
temp->next = NULL;
}
}
/* Now save the room in the right place. */
send_to_char(ch, "Saving new room...\r\n");
if ((room_num = add_room(room_dst)) == NOWHERE) {
send_to_char(ch, "Something went wrong...\r\n");
log("SYSERR: do_room_copy: Something failed! (%d)", room_num);
return;
}
/* Idea contributed by C.Raehl. */
for (dsc = descriptor_list; dsc; dsc = dsc->next) {
if (dsc == ch->desc)
continue;
if (STATE(dsc) == CON_ZEDIT) {
for (j = 0; OLC_ZONE(dsc)->cmd[j].command != 'S'; j++)
switch (OLC_ZONE(dsc)->cmd[j].command) {
case 'O':
case 'M':
OLC_ZONE(dsc)->cmd[j].arg3 += (OLC_ZONE(dsc)->cmd[j].arg3 >= room_num);
break;
case 'D':
OLC_ZONE(dsc)->cmd[j].arg2 += (OLC_ZONE(dsc)->cmd[j].arg2 >= room_num);
/* Fall through */
case 'R':
OLC_ZONE(dsc)->cmd[j].arg1 += (OLC_ZONE(dsc)->cmd[j].arg1 >= room_num);
break;
}
} else if (STATE(dsc) == CON_REDIT) {
for (j = 0; j < NUM_OF_DIRS; j++)
if (OLC_ROOM(dsc)->dir_option[j])
if (OLC_ROOM(dsc)->dir_option[j]->to_room >= room_num)
OLC_ROOM(dsc)->dir_option[j]->to_room++;
}
}
add_to_save_list(real_zone_by_thing(atoi(buf)), SL_WLD);
redit_save_to_disk(real_zone_by_thing(atoi(buf)));
send_to_char(ch, "Room cloned to %d.\r\nAll Done.\r\n", buf_num);
}
/* BuildWalk - OasisOLC Extension by D. Tyler Barnes. */ /* BuildWalk - OasisOLC Extension by D. Tyler Barnes. */
/* For buildwalk. Finds the next free vnum in the zone */ /* For buildwalk. Finds the next free vnum in the zone */
room_vnum redit_find_new_vnum(zone_rnum zone) room_vnum redit_find_new_vnum(zone_rnum zone)

View file

@ -170,6 +170,7 @@ ACMD(do_oasis_oedit)
else else
oedit_setup_new(d); oedit_setup_new(d);
oedit_disp_menu(d);
STATE(d) = CON_OEDIT; STATE(d) = CON_OEDIT;
/* Send the OLC message to the players in the same room as the builder. */ /* Send the OLC message to the players in the same room as the builder. */
@ -195,8 +196,6 @@ void oedit_setup_new(struct descriptor_data *d)
SCRIPT(OLC_OBJ(d)) = NULL; SCRIPT(OLC_OBJ(d)) = NULL;
OLC_OBJ(d)->proto_script = OLC_SCRIPT(d) = NULL; OLC_OBJ(d)->proto_script = OLC_SCRIPT(d) = NULL;
oedit_disp_menu(d);
} }
void oedit_setup_existing(struct descriptor_data *d, int real_num) void oedit_setup_existing(struct descriptor_data *d, int real_num)
@ -216,8 +215,6 @@ void oedit_setup_existing(struct descriptor_data *d, int real_num)
* obj later, after editing. */ * obj later, after editing. */
SCRIPT(obj) = NULL; SCRIPT(obj) = NULL;
OLC_OBJ(d)->proto_script = NULL; OLC_OBJ(d)->proto_script = NULL;
oedit_disp_menu(d);
} }
void oedit_save_internally(struct descriptor_data *d) void oedit_save_internally(struct descriptor_data *d)

View file

@ -31,12 +31,12 @@ void tag_argument(char *argument, char *tag);
void load_affects(FILE *fl, struct char_data *ch); void load_affects(FILE *fl, struct char_data *ch);
void load_skills(FILE *fl, struct char_data *ch); void load_skills(FILE *fl, struct char_data *ch);
void load_HMVS(struct char_data *ch, const char *line, int mode); void load_HMVS(struct char_data *ch, const char *line, int mode);
void write_aliases_ascii(FILE *file, struct char_data *ch);
void read_aliases_ascii(FILE *file, struct char_data *ch, int count);
/* external fuctions */ /* external fuctions */
bitvector_t asciiflag_conv(char *flag); bitvector_t asciiflag_conv(char *flag);
void save_char_vars(struct char_data *ch); void save_char_vars(struct char_data *ch);
void write_aliases_ascii(FILE *file, struct char_data *ch);
void read_aliases_ascii(FILE *file, struct char_data *ch, int count);
void save_char_vars_ascii(FILE *file, struct char_data *ch); void save_char_vars_ascii(FILE *file, struct char_data *ch);
void read_saved_vars_ascii(FILE *file, struct char_data *ch, int count); void read_saved_vars_ascii(FILE *file, struct char_data *ch, int count);
void strip_cr(char *buffer); void strip_cr(char *buffer);
@ -100,7 +100,6 @@ int create_entry(char *name)
int i, pos; int i, pos;
if (top_of_p_table == -1) { /* no table */ if (top_of_p_table == -1) { /* no table */
CREATE(player_table, struct player_index_element, 1);
pos = top_of_p_table = 0; pos = top_of_p_table = 0;
} else if ((pos = get_ptable_by_name(name)) == -1) { /* new name */ } else if ((pos = get_ptable_by_name(name)) == -1) { /* new name */
i = ++top_of_p_table + 1; i = ++top_of_p_table + 1;
@ -813,3 +812,63 @@ void load_HMVS(struct char_data *ch, const char *line, int mode)
break; break;
} }
} }
/* until further notice, the alias->pfiles save and load functions will
* * function along side the old seperate alias file load, for compatibility. */
void write_aliases_ascii(FILE *file, struct char_data *ch)
{
struct alias_data *temp;
int count = 0;
if (GET_ALIASES(ch) == NULL)
return;
for (temp = GET_ALIASES(ch); temp; temp = temp->next)
count++;
fprintf(file, "Alis: %d\n", count);
/* the +1 thing below is due to alias replacements having a space prepended
* * in memory. The reason for this escapes me. Welcor 27/12/06 */
for (temp = GET_ALIASES(ch); temp; temp = temp->next) {
fprintf(file, "%s\n" /* Alias */
"%s\n" /* Replacement */
"%d\n", /* Type */
temp->alias,
temp->replacement+1,
temp->type);
}
}
void read_aliases_ascii(FILE *file, struct char_data *ch, int count)
{
int i;
struct alias_data *temp;
char abuf[MAX_INPUT_LENGTH], rbuf[MAX_INPUT_LENGTH+1], tbuf[MAX_INPUT_LENGTH];
if (count == 0) {
GET_ALIASES(ch) = NULL;
return; /* No aliases in the list. */
}
for (i = 0; i < count; i++) {
/* Read the aliased command. */
get_line(file, abuf);
/* Read the replacement. */
get_line(file, tbuf);
strcpy(rbuf, " ");
strcat(rbuf, tbuf); /* strcat: OK */
/* read the type */
get_line(file, tbuf);
if (abuf && *abuf && tbuf && *tbuf && rbuf && *rbuf) {
CREATE(temp, struct alias_data, 1);
temp->alias = strdup(abuf);
temp->replacement = strdup(rbuf);
temp->type = atoi(tbuf);
temp->next = GET_ALIASES(ch);
GET_ALIASES(ch) = temp;
}
}
}

View file

@ -139,6 +139,7 @@ ACMD(do_oasis_redit)
else else
redit_setup_new(d); redit_setup_new(d);
redit_disp_menu(d);
STATE(d) = CON_REDIT; STATE(d) = CON_REDIT;
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM); act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING); SET_BIT_AR(PLR_FLAGS(ch), PLR_WRITING);
@ -157,7 +158,6 @@ void redit_setup_new(struct descriptor_data *d)
OLC_ITEM_TYPE(d) = WLD_TRIGGER; OLC_ITEM_TYPE(d) = WLD_TRIGGER;
OLC_ROOM(d)->proto_script = OLC_SCRIPT(d) = NULL; OLC_ROOM(d)->proto_script = OLC_SCRIPT(d) = NULL;
redit_disp_menu(d);
OLC_VAL(d) = 0; OLC_VAL(d) = 0;
} }
@ -215,8 +215,6 @@ void redit_setup_existing(struct descriptor_data *d, int real_num)
dg_olc_script_copy(d); dg_olc_script_copy(d);
room->proto_script = NULL; room->proto_script = NULL;
SCRIPT(room) = NULL; SCRIPT(room) = NULL;
redit_disp_menu(d);
} }
void redit_save_internally(struct descriptor_data *d) void redit_save_internally(struct descriptor_data *d)
@ -224,10 +222,10 @@ void redit_save_internally(struct descriptor_data *d)
int j, room_num, new_room = FALSE; int j, room_num, new_room = FALSE;
struct descriptor_data *dsc; struct descriptor_data *dsc;
if (OLC_ROOM(d)->number == NOWHERE) { if (OLC_ROOM(d)->number == NOWHERE)
new_room = TRUE; new_room = TRUE;
OLC_ROOM(d)->number = OLC_NUM(d);
} OLC_ROOM(d)->number = OLC_NUM(d);
/* FIXME: Why is this not set elsewhere? */ /* FIXME: Why is this not set elsewhere? */
OLC_ROOM(d)->zone = OLC_ZNUM(d); OLC_ROOM(d)->zone = OLC_ZNUM(d);

View file

@ -164,6 +164,7 @@ ACMD(do_oasis_sedit)
else else
sedit_setup_new(d); sedit_setup_new(d);
sedit_disp_menu(d);
STATE(d) = CON_SEDIT; STATE(d) = CON_SEDIT;
act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM); act("$n starts using OLC.", TRUE, d->character, 0, 0, TO_ROOM);
@ -206,7 +207,6 @@ void sedit_setup_new(struct descriptor_data *d)
/* Presto! A shop. */ /* Presto! A shop. */
OLC_SHOP(d) = shop; OLC_SHOP(d) = shop;
sedit_disp_menu(d);
} }
void sedit_setup_existing(struct descriptor_data *d, int rshop_num) void sedit_setup_existing(struct descriptor_data *d, int rshop_num)
@ -216,7 +216,6 @@ void sedit_setup_existing(struct descriptor_data *d, int rshop_num)
/* don't waste time trying to free NULL strings -- Welcor */ /* don't waste time trying to free NULL strings -- Welcor */
copy_shop(OLC_SHOP(d), shop_index + rshop_num, FALSE); copy_shop(OLC_SHOP(d), shop_index + rshop_num, FALSE);
sedit_disp_menu(d);
} }
/* Menu functions */ /* Menu functions */

View file

@ -1047,6 +1047,7 @@ struct game_data {
int load_into_inventory;/* Objects load in immortals inventory. */ int load_into_inventory;/* Objects load in immortals inventory. */
int track_through_doors;/* Track through doors while closed? */ int track_through_doors;/* Track through doors while closed? */
int no_mort_to_immort; /* Prevent mortals leveling to imms? */ int no_mort_to_immort; /* Prevent mortals leveling to imms? */
int disp_closed_doors; /* Display closed doors in autoexit? */
char *OK; /* When player receives 'Okay.' text. */ char *OK; /* When player receives 'Okay.' text. */
char *NOPERSON; /* 'No one by that name here.' */ char *NOPERSON; /* 'No one by that name here.' */

View file

@ -526,10 +526,6 @@ int get_filename(char *filename, size_t fbufsize, int mode, const char *orig_nam
prefix = LIB_PLROBJS; prefix = LIB_PLROBJS;
suffix = SUF_OBJS; suffix = SUF_OBJS;
break; break;
case ALIAS_FILE:
prefix = LIB_PLRALIAS;
suffix = SUF_ALIAS;
break;
case ETEXT_FILE: case ETEXT_FILE:
prefix = LIB_PLRTEXT; prefix = LIB_PLRTEXT;
suffix = SUF_TEXT; suffix = SUF_TEXT;

View file

@ -108,10 +108,9 @@ void char_from_furniture(struct char_data *ch);
/* get_filename() */ /* get_filename() */
#define CRASH_FILE 0 #define CRASH_FILE 0
#define ETEXT_FILE 1 #define ETEXT_FILE 1
#define ALIAS_FILE 2 #define SCRIPT_VARS_FILE 2
#define SCRIPT_VARS_FILE 3 #define PLR_FILE 3
#define PLR_FILE 4 #define MAX_FILES 4
#define MAX_FILES 5
/* breadth-first searching */ /* breadth-first searching */
#define BFS_ERROR (-1) #define BFS_ERROR (-1)
@ -548,6 +547,7 @@ void char_from_furniture(struct char_data *ch);
#define CONFIG_OK config_info.play.OK #define CONFIG_OK config_info.play.OK
#define CONFIG_NOPERSON config_info.play.NOPERSON #define CONFIG_NOPERSON config_info.play.NOPERSON
#define CONFIG_NOEFFECT config_info.play.NOEFFECT #define CONFIG_NOEFFECT config_info.play.NOEFFECT
#define CONFIG_DISP_CLOSED_DOORS config_info.play.disp_closed_doors
/* Crash Saves */ /* Crash Saves */
#define CONFIG_FREE_RENT config_info.csd.free_rent #define CONFIG_FREE_RENT config_info.csd.free_rent