Added zones 354 and 355
This commit is contained in:
682
lib/world/trg/211.trg
Normal file
682
lib/world/trg/211.trg
Normal file
@@ -0,0 +1,682 @@
|
||||
#21100
|
||||
Test~
|
||||
0 g 100
|
||||
~
|
||||
%echo% This trigger commandlist is not complete!
|
||||
~
|
||||
#21101
|
||||
Load Cards~
|
||||
0 d 100
|
||||
*~
|
||||
set zone 211
|
||||
set start %self.room.vnum%
|
||||
eval room %self.room.vnum% + 1
|
||||
switch %speech.car%
|
||||
case shuffle
|
||||
if %self.varexists(Cards_Dealt)%
|
||||
%echo% n The voice is in your mind again.
|
||||
%echo% c 'I'm sorry, the cards seem to be already laid out.' n
|
||||
halt
|
||||
else
|
||||
set deck 78
|
||||
set layout 10
|
||||
global deck
|
||||
global layout
|
||||
set var %zone%01
|
||||
emote shuffles the cards.
|
||||
%echo% n %self.name% seems to speak directly to your mind.
|
||||
%echo% c 'Keep shuffling until you feel the deck understands your question. n
|
||||
%echo% c When you're ready, say DEAL.' n
|
||||
set Deck_Shuffled 1
|
||||
global Deck_Shuffled
|
||||
while %var% < %zone%79
|
||||
set %var% 1
|
||||
remote %var% %self.id%
|
||||
eval var %var% + 1
|
||||
done
|
||||
halt
|
||||
end
|
||||
end
|
||||
case deal
|
||||
if !%self.varexists(Deck_Shuffled)%
|
||||
%echo% n The voice is in your mind again.
|
||||
%echo% c 'The cards don't seem to understand your question yet. Have you n
|
||||
%echo% c SHUFFLEd?' n
|
||||
halt
|
||||
elseif %self.varexists(Cards_Dealt)%
|
||||
%echo% n The voice is in your mind again. n
|
||||
%echo% c 'I'm sorry, the cards seem to be already laid out.' n
|
||||
halt
|
||||
else
|
||||
emote starts to lay out the cards.
|
||||
%echo% n The voice seems to surround you now.
|
||||
%echo% c 'When you're ready, please go up to start your reading. Once you n
|
||||
%echo% c start, you won't be able to come back. Of course, you can always n
|
||||
%echo% c come back for another reading. n
|
||||
wait 2 sec
|
||||
%echo% c At each room, LOOK CARD to see the meaning. Reverse means n
|
||||
%echo% c that the card laid out upsidedown which changes the meaning. n
|
||||
%echo% c Don't worry about it. The card will show the reversed meaning. n
|
||||
%echo% c The room name will explain what the placement of the card means.' n
|
||||
wait 1 sec
|
||||
%door% %self.room.vnum% up flags a
|
||||
emote opens the door to the stairway.
|
||||
while %layout%
|
||||
set zonebase %zone%00
|
||||
eval card %random.78% + %zonebase%
|
||||
eval temp %%self.varexists(%card%)%%
|
||||
eval hascard %temp%
|
||||
if %hascard%
|
||||
mgoto %room%
|
||||
set rand %random.2%
|
||||
if %rand% == 1
|
||||
%load% obj %zone%99
|
||||
end
|
||||
%load% obj %card%
|
||||
mgoto %start%
|
||||
rdelete %card% %self.id%
|
||||
eval deck %deck% - 1
|
||||
eval layout %layout% - 1
|
||||
eval room %room% + 1
|
||||
global deck
|
||||
global layout
|
||||
set Cards_Dealt 1
|
||||
global Cards_Dealt
|
||||
else
|
||||
end
|
||||
done
|
||||
halt
|
||||
break
|
||||
default
|
||||
break
|
||||
end
|
||||
~
|
||||
#21102
|
||||
Look Card~
|
||||
2 c 100
|
||||
*~
|
||||
* Parnassus' Special Anti-Freeze Formula
|
||||
if %cmd.mudcommand% == nohassle
|
||||
return 0
|
||||
halt
|
||||
end
|
||||
*
|
||||
set zone 211
|
||||
if %self.vnum% > %zone%10 && %self.vnum% < %zone%24
|
||||
* if %self.vnum% > %zone%00 && %self.vnum% < %zone%24
|
||||
set cmdroom %zone%20
|
||||
elseif %self.vnum% > %zone%30 && %self.vnum% < %zone%44
|
||||
set cmdroom %zone%40
|
||||
elseif %self.vnum% > %zone%45 && %self.vnum% < %zone%64
|
||||
set cmdroom %zone%60
|
||||
else
|
||||
return 0
|
||||
halt
|
||||
end
|
||||
if %cmd.mudcommand% == look || %cmd.mudcommand% == examine
|
||||
* Look Trigger Written by Fizban - June 06 2013
|
||||
* This trigger changes the meaning of the card for reverse.
|
||||
* If there is no argument, just look.
|
||||
if !%arg%
|
||||
return 0
|
||||
halt
|
||||
else
|
||||
* The ~ anchors the comparison to the front of the word.
|
||||
* rd /= card but ~rd is not a part of ~card while ~c is.
|
||||
set arg ~%arg%
|
||||
if ~card /= %arg%
|
||||
* Check for the reverser. If it is in the room, give
|
||||
* one meaning. If it is not, give the other.
|
||||
eval rev %%findobj.%self.vnum%(%zone%99)%%
|
||||
if %rev% < 1
|
||||
%echo% Reverser is not here.
|
||||
%force% %actor% look card
|
||||
else
|
||||
%force% %actor% look reverse
|
||||
%echo% Reverser is here.
|
||||
end
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
elseif %cmd.mudcommand% == quit || %cmd.mudcommand% == afk
|
||||
%send% %actor% Because you have decided to %cmd.mudcommand%, you cannot finish the reading.
|
||||
%echoaround% %actor% %actor.name% has to leave the reading now.
|
||||
wait 1 sec
|
||||
%send% %actor% You are magically sent to the end of the reading.
|
||||
%echoaround% %actor% %actor.name% is whisked away in a puff of smoke.
|
||||
wait 1 sec
|
||||
%teleport% %actor% %cmdroom%
|
||||
wait 1 sec
|
||||
%at% %cmdroom% %force% %actor% down
|
||||
wait 1 sec
|
||||
%at% %actor% %force% %actor% %cmd%
|
||||
wait 1 sec
|
||||
halt
|
||||
elseif %cmd% == return || %cmd% == recall
|
||||
%send% %actor% Because you have decided to %cmd%, you cannot finish the reading.
|
||||
%echoaround% %actor% %actor.name% has to leave the reading now.
|
||||
wait 1 sec
|
||||
%send% %actor% You are magically sent to the end of the reading.
|
||||
%echoaround% %actor% %actor.name% is whisked away in a puff of smoke.
|
||||
wait 1 sec
|
||||
%teleport% %actor% %cmdroom%
|
||||
wait 1 sec
|
||||
%at% %cmdroom% %force% %actor% down
|
||||
wait 1 sec
|
||||
%at% %actor% %force% %actor% %cmd%
|
||||
wait 1 sec
|
||||
halt
|
||||
else
|
||||
return 0
|
||||
end
|
||||
~
|
||||
#21103
|
||||
Clear the Cards - r21120, r21140, r21160~
|
||||
2 q 100
|
||||
~
|
||||
* Clears cards from the reading and reader marker
|
||||
* when player finishes the reading.
|
||||
if %direction% == down
|
||||
wait 2 sec
|
||||
%purge%
|
||||
set room %self.vnum%
|
||||
eval purgeroom %room% - 9
|
||||
while %purgeroom% < %self.vnum%
|
||||
%at% %purgeroom% %purge%
|
||||
eval purgeroom %purgeroom% + 1
|
||||
done
|
||||
eval purgeroom %purgeroom% + 5
|
||||
%at% %purgeroom% %purge%
|
||||
end
|
||||
~
|
||||
#21104
|
||||
Reset the Fortuneteller~
|
||||
0 q 100
|
||||
~
|
||||
* Clears the fortune-teller for the next player.
|
||||
* Closes the doors coming back to make it easier to see the path while
|
||||
* keeping the possibility of checking past cards.
|
||||
if %direction% == up
|
||||
* set deck 78
|
||||
set layout 10
|
||||
* global deck
|
||||
global layout
|
||||
rdelete Deck_Shuffled %self.id%
|
||||
rdelete Cards_Dealt %self.id%
|
||||
rdelete tarot_reading_started %self.id%
|
||||
if %self.room.vnum% == 21110 || %self.room.vnum% == 21130 || %self.room.vnum% == 21150
|
||||
%door% %self.room.vnum% up flags abc
|
||||
eval cardroom %self.room.vnum% + 2
|
||||
%door% %cardroom% down flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% north flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% south flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% west flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% north flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% west flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% south flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% south flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% south flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% east flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% south flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% west flags ab
|
||||
eval cardroom %cardroom% + 1
|
||||
%door% %cardroom% north flags ab
|
||||
end
|
||||
end
|
||||
~
|
||||
#21105
|
||||
Dealer Greets~
|
||||
0 h 100
|
||||
~
|
||||
wait 2 sec
|
||||
%echo% n The voice of %self.name% seems to fill your head.
|
||||
%echo% c 'Ahh, you have something on your mind? Let us see what the n
|
||||
%echo% c cards have to say. Unfortunately, you cannot hold or shuffle n
|
||||
%echo% c my cards, but concentrate on your question and say shuffle. n
|
||||
%echo% c When you feel that the cards know your question, say deal and n
|
||||
%echo% c I shall lay out the cards for you to examine. n
|
||||
wait 3 sec
|
||||
%echo% c Usually I would interpret the cards for you, but that is n
|
||||
%echo% c forbidden me in this space and time. All I am allowed is to n
|
||||
%echo% c show you the cards and you must decide their meanings in your n
|
||||
%echo% c own mind. Move from card to card. Each space and each card n
|
||||
%echo% c will explain itself to you. 'LOOK CARD' in each room to see n
|
||||
%echo% c the explanation. These are very simplified meanings so they n
|
||||
%echo% c are very general. n
|
||||
wait 3 sec
|
||||
%echo% c Remember, this is just a game and should not be taken n
|
||||
%echo% c seriously any more than you would run your life by newspaper n
|
||||
%echo% c horoscopes or slips of paper from fortune-cookies. n
|
||||
wait 2 sec
|
||||
%echo% c When you're ready, start by saying SHUFFLE.' n
|
||||
~
|
||||
#21106
|
||||
Receptionist juggles appointments - M21104~
|
||||
0 d 100
|
||||
*~
|
||||
set zone 211
|
||||
* set findobj 0
|
||||
* Checks for available readers
|
||||
* Kicks out people that are afk, etc
|
||||
if %self.room.vnum% != %zone%02
|
||||
emote looks around in confusion.
|
||||
say I'm sorry. I have to get to my office.
|
||||
emote leaves.
|
||||
eval findmob %%findmob.%zone%02(%self.vnum%)%%
|
||||
if %findmob% > 0
|
||||
%purge% %self%
|
||||
else
|
||||
mgoto %zone%02
|
||||
halt
|
||||
end
|
||||
end
|
||||
if %actor% == %self%
|
||||
halt
|
||||
end
|
||||
* Check to see if someone is already trying to get an appointment.
|
||||
if %self.has_item(%zone%98)% && !%actor.varexists(Making_Tarot_Appointment_%zone%)%
|
||||
say I'm sorry, %actor.name%. I'm speaking with someone else right now.
|
||||
halt
|
||||
end
|
||||
* This loop goes through the entire string of words the actor says. .car is the
|
||||
* word and .cdr is the remaining string.
|
||||
eval word %speech.car%
|
||||
eval rest %speech.cdr%
|
||||
while %word%
|
||||
* %echo% Word: %word%
|
||||
* %echo% rest: %rest%
|
||||
switch %word%
|
||||
* Appointment starts the conversation.
|
||||
* Objxxx98 keeps trigger from reacting to other conversations.
|
||||
* if %actor.is_pc% &&
|
||||
case appointment
|
||||
if !%self.has_item(%zone%98)%
|
||||
%load% o %zone%98
|
||||
set Making_Tarot_Appointment_%zone% 1
|
||||
remote Making_Tarot_Appointment_%zone% %actor.id%
|
||||
say Let me just see if any of our consultants have an opening.
|
||||
say Say restart at any time to leave or start over.
|
||||
%echo% She consults an appointment book.
|
||||
wait 2 seconds
|
||||
set available 0
|
||||
set readerno 0
|
||||
set unreaderno 0
|
||||
eval temp %%findobj.%zone%25(card)%%
|
||||
eval findobjsibyl %temp%
|
||||
if %findobjsibyl% < 1
|
||||
eval available %available% + 1
|
||||
eval readerno %readerno% + 1
|
||||
set reader%readerno% Sibyl
|
||||
else
|
||||
eval unreaderno %unreaderno% + 1
|
||||
set unreader%unreaderno% Sibyl
|
||||
end
|
||||
eval temp %%findobj.%zone%45(card)%%
|
||||
eval findobjesmerelda %temp%
|
||||
if %findobjesmerelda% < 1
|
||||
eval available %available% + 1
|
||||
eval readerno %readerno% + 1
|
||||
set reader%readerno% Esmerelda
|
||||
else
|
||||
eval unreaderno %unreaderno% + 1
|
||||
set unreader%unreaderno% Esmerelda
|
||||
end
|
||||
eval temp %%findobj.%zone%65(card)%%
|
||||
eval findobjjaelle %temp%
|
||||
if %findobjjaelle% < 1
|
||||
eval available %available% + 1
|
||||
eval readerno %readerno% + 1
|
||||
set reader%readerno% Jaelle
|
||||
else
|
||||
eval unreaderno %unreaderno% + 1
|
||||
set unreader%unreaderno% Jaelle
|
||||
end
|
||||
if %available% == 0
|
||||
say Sorry, Sibyl, Esmerelda and Jaelle all seem to be with clients right now.
|
||||
say Please try again later.
|
||||
rdelete Making_Tarot_Appointment_%zone% %actor.id%
|
||||
halt
|
||||
end
|
||||
if %available% == 1
|
||||
say %unreader1% and %unreader2% are with clients but %reader1% is available.
|
||||
say Say %reader1% if you want to see her.
|
||||
set Choosing_Tarot_Reader_%zone% 1
|
||||
remote Choosing_Tarot_Reader_%zone% %actor.id%
|
||||
halt
|
||||
end
|
||||
if %available% == 2
|
||||
say %unreader1% is with a client but %reader1% and %reader2% are available.
|
||||
say Say %reader1% or %reader2% to see her.
|
||||
set Choosing_Tarot_Reader_%zone% 1
|
||||
remote Choosing_Tarot_Reader_%zone% %actor.id%
|
||||
halt
|
||||
end
|
||||
if %available% == 3
|
||||
say %reader1%, %reader2% and %reader3% are all available right now.
|
||||
say Say %reader1%, %reader2% or %reader3% to see her.
|
||||
set Choosing_Tarot_Reader_%zone% 1
|
||||
remote Choosing_Tarot_Reader_%zone% %actor.id%
|
||||
halt
|
||||
end
|
||||
end
|
||||
break
|
||||
case Sibyl
|
||||
if %actor.varexists(Choosing_Tarot_Reader_%zone%)%
|
||||
eval findobj %%findobj.%zone%25(card)%%
|
||||
if %findobj% < 1
|
||||
say Sibyl is ready to see you now.
|
||||
%door% %zone%02 north flags a
|
||||
wait 1 sec
|
||||
%force% %actor% north
|
||||
%door% %zone%02 north flags abc
|
||||
rdelete Making_Tarot_Appointment_%zone% %actor.id%
|
||||
rdelete Choosing_Tarot_Reader_%zone% %actor.id%
|
||||
mgoto %zone%99
|
||||
%purge% quill
|
||||
mgoto %zone%25
|
||||
%load% obj %zone%49
|
||||
mgoto %zone%02
|
||||
else
|
||||
Say I'm sorry. Sibyl is with another client right now.
|
||||
say Please choose one of the available readers.
|
||||
end
|
||||
end
|
||||
break
|
||||
case Esmerelda
|
||||
if %actor.varexists(Choosing_Tarot_Reader_%zone%)%
|
||||
eval findobj %%findobj.%zone%45(card)%%
|
||||
if %findobj% < 1
|
||||
say Esmerelda is ready to see you now.
|
||||
%door% %zone%02 west flags a
|
||||
wait 1 sec
|
||||
%force% %actor% w
|
||||
%door% %zone%02 west flags abc
|
||||
rdelete Making_Tarot_Appointment_%zone% %actor.id%
|
||||
rdelete Choosing_Tarot_Reader_%zone% %actor.id%
|
||||
mgoto %zone%99
|
||||
%purge% quill
|
||||
mgoto %zone%45
|
||||
%load% obj %zone%52
|
||||
mgoto %zone%02
|
||||
else
|
||||
Say I'm sorry. Esmerelda is with another client right now.
|
||||
say Please choose one of the available readers.
|
||||
end
|
||||
end
|
||||
break
|
||||
case Jaelle
|
||||
if %actor.varexists(Choosing_Tarot_Reader_%zone%)%
|
||||
eval findobj %%findobj.%zone%65(card)%%
|
||||
if %findobj% < 1
|
||||
say Jaelle is ready to see you now.
|
||||
%door% %zone%02 east flags a
|
||||
wait 1 sec
|
||||
%force% %actor% e
|
||||
%door% %zone%02 east flags abc
|
||||
rdelete Making_Tarot_Appointment_%zone% %actor.id%
|
||||
rdelete Choosing_Tarot_Reader_%zone% %actor.id%
|
||||
mgoto %zone%99
|
||||
%purge% quill
|
||||
mgoto %zone%65
|
||||
%load% obj %zone%50
|
||||
mgoto %zone%02
|
||||
else
|
||||
Say I'm sorry. Jaelle is with another client right now.
|
||||
say Please choose one of the available readers.
|
||||
end
|
||||
end
|
||||
break
|
||||
case Restart
|
||||
if %actor.varexists(Making_Tarot_Appointment_%zone%)%
|
||||
rdelete Making_Tarot_Appointment_%zone% %actor.id%
|
||||
rdelete Choosing_Tarot_Reader_%zone% %actor.id%
|
||||
mgoto %zone%99
|
||||
%purge% quill
|
||||
mgoto %zone%02
|
||||
emote puts down the appointment book.
|
||||
end
|
||||
break
|
||||
default
|
||||
break
|
||||
done
|
||||
* End of the loop we need to take the next word in the string and save the
|
||||
* remainder for the next pass.
|
||||
eval word %rest.car%
|
||||
eval rest %rest.cdr%
|
||||
done
|
||||
~
|
||||
#21107
|
||||
Tarot Receptionist greets - M21104~
|
||||
0 h 100
|
||||
*~
|
||||
if %direction% == south
|
||||
emote looks up from her appointment book.
|
||||
say Would you like to make an appointment with one of our readers?
|
||||
say Before we start, make sure you have enough time to finish your reading.
|
||||
say Please do not go afk or leave the game before you finish the reading.
|
||||
say If you are sure, just say appointment.
|
||||
else if %direction% == up
|
||||
smile %actor%
|
||||
say I hope you enjoyed your reading. Please, come again soon.
|
||||
say Of course, if you want another appointment now, say appointment.
|
||||
end
|
||||
~
|
||||
#21108
|
||||
Leaving Tarot~
|
||||
0 c 100
|
||||
*~
|
||||
* For mobs to clear reading from players blocking by starting and leaving.
|
||||
* Should be adjusted to your muds commands.
|
||||
* Parnassus' Special Anti-Freeze Formula
|
||||
if %cmd.mudcommand% == nohassle
|
||||
return 0
|
||||
halt
|
||||
end
|
||||
*
|
||||
set zone 211
|
||||
if %cmd.mudcommand% == quit || %cmd.mudcommand% == afk
|
||||
if %self.vnum% == %zone%04 && %actor.varexists(Making_Tarot_Appointment_%zone%)%
|
||||
say I'm sorry but I won't be able to give you an appointment right now.
|
||||
say Please come back when you have more time available.
|
||||
rdelete Making_Tarot_Appointment_%zone% %actor.id%
|
||||
rdelete Choosing_Tarot_Reader_%zone% %actor.id%
|
||||
mgoto %zone%99
|
||||
%purge% quill
|
||||
mgoto %zone%02
|
||||
wait 1 sec
|
||||
emote puts down the appointment book.
|
||||
wait 1 sec
|
||||
%force% %actor% %cmd.mudcommand%
|
||||
wait 1 sec
|
||||
halt
|
||||
elseif %self.vnum% == %zone%01 || %self.vnum% == %zone%02 || %self.vnum% == %zone%03
|
||||
set office %self.room.vnum%
|
||||
eval endroom %office% + 10
|
||||
%echo% n %self.name%'s voice sounds reproachfully in your head.
|
||||
%echo% c 'You don't seem to have time for this right now. n
|
||||
%echo% c Please come back when you have more time.' n
|
||||
wait 1 sec
|
||||
%echo% %self.name% waves her hand and you find yourself outside.
|
||||
wait 1 sec
|
||||
%teleport% %actor% %zone%01
|
||||
mgoto %endroom%
|
||||
down
|
||||
mgoto %office%
|
||||
wait 1 sec
|
||||
%force% %actor% look
|
||||
%force% %actor% %cmd.mudcommand%
|
||||
rdelete Deck_Shuffled %self.id%
|
||||
rdelete Cards_Dealt %self.id%
|
||||
rdelete tarot_reading_started %self.id%
|
||||
halt
|
||||
else
|
||||
return 0
|
||||
halt
|
||||
end
|
||||
elseif %cmd% == return || %cmd% == recall || %cmd% == teleport || %cmd.mudcommand% == goto
|
||||
if %self.vnum% == %zone%04 && %actor.varexists(Making_Tarot_Appointment_%zone%)%
|
||||
say I'm sorry but I won't be able to give you an appointment right now.
|
||||
say Please come back when you have more time available.
|
||||
rdelete Making_Tarot_Appointment_%zone% %actor.id%
|
||||
rdelete Choosing_Tarot_Reader_%zone% %actor.id%
|
||||
mgoto %zone%99
|
||||
%purge% quill
|
||||
mgoto %zone%02
|
||||
%send% %actor% n
|
||||
emote puts down the appointment book.
|
||||
%send% %actor% n
|
||||
return 0
|
||||
halt
|
||||
elseif %self.vnum% == %zone%01 || %self.vnum% == %zone%02 || %self.vnum% == %zone%03
|
||||
set office %self.room.vnum%
|
||||
eval endroom %office% + 10
|
||||
%echo% n %self.name%'s voice sounds reproachfully in your head.
|
||||
%echo% c 'You don't seem to have time for this right now. n
|
||||
%echo% c Please come back when you have more time.' n
|
||||
%send% %actor% n
|
||||
%teleport% %actor% %zone%01
|
||||
return 0
|
||||
%send% %actor% n
|
||||
mgoto %endroom%
|
||||
down
|
||||
mgoto %office%
|
||||
rdelete Deck_Shuffled %self.id%
|
||||
rdelete Cards_Dealt %self.id%
|
||||
rdelete tarot_reading_started %self.id%
|
||||
halt
|
||||
else
|
||||
return 0
|
||||
halt
|
||||
end
|
||||
elseif %cmd.mudcommand% == south
|
||||
if %self.vnum% == %zone%04 && %actor.varexists(Making_Tarot_Appointment_%zone%)%
|
||||
say I'm sorry but I won't be able to give you an appointment right now.
|
||||
say Please come back when you have more time available.
|
||||
rdelete Making_Tarot_Appointment_%zone% %actor.id%
|
||||
rdelete Choosing_Tarot_Reader_%zone% %actor.id%
|
||||
mgoto %zone%99
|
||||
%purge% quill
|
||||
mgoto %zone%02
|
||||
wait 1 sec
|
||||
emote puts down the appointment book.
|
||||
wait 1 sec
|
||||
%force% %actor% %cmd%
|
||||
halt
|
||||
else
|
||||
return 0
|
||||
halt
|
||||
end
|
||||
else
|
||||
return 0
|
||||
end
|
||||
~
|
||||
#21109
|
||||
Timer for obj 21198~
|
||||
1 f 100
|
||||
~
|
||||
* Timer on obj 21198 is set to 10 minutes. This is adjustable.
|
||||
* Since 21198 stops any appointments while talking to one person
|
||||
* this keeps any person from blocking the zone until reboot.
|
||||
set zone 211
|
||||
set actor %self.carried_by%
|
||||
if %actor.vnum% == %zone%04
|
||||
%echo% %actor.name% says, 'I've been waiting too long for this appointment.'
|
||||
%echo% %actor.name% puts down the appointment book.
|
||||
%purge% %self%
|
||||
else
|
||||
set actor %self.carried_by.name%
|
||||
%force% %actor% say I seem to have stolen someone's pen.
|
||||
%echoaround% %actor% The nib of the pen pokes %actor%.
|
||||
%send% %actor% The nib of the pen pokes you.
|
||||
%damage% %actor% 5
|
||||
%echoaround% %actor% %actor.name% shakes %actor.hisher% hand in pain and drops a pen which rolls away.
|
||||
%send% %actor% You drop a pen which rolls away somewhere.
|
||||
%purge% %self%
|
||||
end
|
||||
~
|
||||
#21110
|
||||
Reload glass and bread - obj 21180 and 21182~
|
||||
1 c 100
|
||||
*~
|
||||
* This trigger is to keep the waiting room supplied with food and drink.
|
||||
* Because of the auto-regenerative qualities, it also cancels out any
|
||||
* sac benefits to prevent spam-saccing for gold or exp.
|
||||
* Parnassus' Special Anti-Freeze Formula
|
||||
if %cmd.mudcommand% == nohassle
|
||||
return 0
|
||||
halt
|
||||
end
|
||||
*
|
||||
set zone 211
|
||||
if get == %cmd.mudcommand% || sacrifice == %cmd.mudcommand%
|
||||
if %self.room.vnum% == %zone%02
|
||||
set testernumber 2
|
||||
else
|
||||
set testernumber 1
|
||||
end
|
||||
set arg _%arg%
|
||||
eval inroom %self.room%
|
||||
eval obj %inroom.contents%
|
||||
* find the first object in the room
|
||||
while %obj%
|
||||
set next_obj %obj.next_in_list%
|
||||
set objlist %obj.name%
|
||||
set keywordlist _%obj.name.car%
|
||||
set keywordrest _%obj.name.cdr%
|
||||
while %keywordlist%
|
||||
* while an object is in the room
|
||||
if %keywordlist.contains(%arg%)%
|
||||
if %obj.id% == %self.id%
|
||||
if get == %cmd.mudcommand%
|
||||
%force% %actor% %cmd.mudcommand% %obj.name.car%
|
||||
elseif sacrifice == %cmd.mudcommand%
|
||||
%send% %actor% You carefully dispose of %obj.shortdesc%.
|
||||
%echoaround% %actor% %actor.name% carefully disposes of %obj.shortdesc%.
|
||||
set me %self.vnum%
|
||||
eval temp %%findobj.%zone%02(%me%)%%
|
||||
eval tester %temp%
|
||||
if %self.room.vnum% == %zone%02
|
||||
set testernumber 2
|
||||
else
|
||||
set testernumber 1
|
||||
end
|
||||
if %tester% < %testernumber%
|
||||
%at% %zone%02 %load% obj %self.vnum%
|
||||
end
|
||||
%purge% %self%
|
||||
end
|
||||
set me %self.vnum%
|
||||
eval temp %%findobj.%zone%02(%me%)%%
|
||||
eval tester %temp%
|
||||
if %tester% < %testernumber%
|
||||
%at% %zone%02 %load% obj %self.vnum%
|
||||
end
|
||||
halt
|
||||
end
|
||||
end
|
||||
set keywordlist %keywordrest.car%
|
||||
set keywordrest %keywordrest.cdr%
|
||||
done
|
||||
* find the next object for the while to loop
|
||||
set obj %next_obj%
|
||||
done
|
||||
return 0
|
||||
halt
|
||||
else
|
||||
return 0
|
||||
halt
|
||||
end
|
||||
~
|
||||
$~
|
||||
249
lib/world/trg/653.trg
Normal file
249
lib/world/trg/653.trg
Normal file
@@ -0,0 +1,249 @@
|
||||
#65302
|
||||
Running the Elevator~
|
||||
2 c 100
|
||||
*~
|
||||
* Written December 22, 2014 by Parnassus for TBAmud
|
||||
* Thanks to Fizban for writing an Elevator trigger, and Rumble for posting it as
|
||||
* a Trigger of the day, which made me decide that my Housing project
|
||||
* apartment really needed an elevator.
|
||||
* Thanks to Axanon for letting me look at his really nice elevator triggers.
|
||||
* Be prepared for errors, use at your own risk.
|
||||
* Any errors are mine, any people named in this trigger are blameless!
|
||||
*
|
||||
* Parnassus' Special Anti-Freeze Formula
|
||||
if %cmd.mudcommand% == nohassle
|
||||
return 0
|
||||
halt
|
||||
end
|
||||
*
|
||||
* Variable assignments: make changes here.
|
||||
* Thanks to Krell for helping me work out this format which is especially
|
||||
* good for a stand-alone trigger!
|
||||
* adjust zone number
|
||||
* set maxfl to the highest floor number. To make a penthouse, make adjustments
|
||||
* similar to the Ground floor here. If you add more than 20 floors, switch to the
|
||||
* commented line using CURFL instead of the one using ORDINAL .
|
||||
* add additional floors along with %zone% and room number of the linking room.
|
||||
* (Also add mention of button and display in the linking room. Set up door to the
|
||||
* elevator, flagged as 2 - Pickproof door.)
|
||||
set zone 653
|
||||
set maxfl 4
|
||||
set totfl 5
|
||||
set Elevat %zone%99
|
||||
set Floor0 %zone%98
|
||||
set Floor1 %zone%06
|
||||
set Floor2 %zone%14
|
||||
set Floor3 %zone%22
|
||||
set Floor4 %zone%30
|
||||
* Which side of the elevator is the door on?
|
||||
set elevdoor north
|
||||
* Which side of the room is the elevator on?
|
||||
set roomdoor south
|
||||
** Thanks to Thomas for the formula that makes this part work.
|
||||
eval temp %%Elevat.%elevdoor%(vnum)%%
|
||||
eval eleroom %temp%
|
||||
if %eleroom% == %Floor1%
|
||||
set CurFl 1
|
||||
set Curex %Floor1%
|
||||
elseif %eleroom% == %Floor2%
|
||||
set CurFl 2
|
||||
set Curex %Floor2%
|
||||
elseif %eleroom% == %Floor3%
|
||||
set CurFl 3
|
||||
set Curex %Floor3%
|
||||
elseif %eleroom% == %Floor4%
|
||||
set CurFl 4
|
||||
set Curex %Floor4%
|
||||
elseif %eleroom% == %Floor0%
|
||||
set CurFl 0
|
||||
set Curex %Floor0%
|
||||
end
|
||||
if %cmd% == push
|
||||
if %arg% == g || %arg% >= 1 && %arg% <= %maxfl%
|
||||
if %self.vnum% != %Elevat%
|
||||
%send% %actor% You don't see that here.
|
||||
halt
|
||||
else
|
||||
** Thanks to Kyle for figuring out how to make this part work.
|
||||
eval text %%self.%elevdoor%(bits)%%
|
||||
if %text.contains(LOCKED)% && !%text.contains(PICKPROOF)%
|
||||
%send% %actor% The elevator is already in motion. Please be patient.
|
||||
halt
|
||||
end
|
||||
end
|
||||
if %arg% == g
|
||||
set %arg% 0
|
||||
set targfl 0
|
||||
set Tarex %Floor0%
|
||||
elseif %arg% == 1
|
||||
set Tarex %Floor1%
|
||||
set targfl 1
|
||||
elseif %arg% == 2
|
||||
set Tarex %Floor2%
|
||||
set targfl 2
|
||||
elseif %arg% == 3
|
||||
set Tarex %Floor3%
|
||||
set targfl 3
|
||||
elseif %arg% == 4
|
||||
set Tarex %Floor4%
|
||||
set targfl 4
|
||||
end
|
||||
elseif %arg% == button
|
||||
if %self.vnum% == %Elevat%
|
||||
%send% %actor% Which button?
|
||||
halt
|
||||
else
|
||||
eval text %%self.%roomdoor%(bits)%%
|
||||
if !%text.contains(CLOSED)%
|
||||
%send% %actor% The elevator is already here.
|
||||
halt
|
||||
elseif %text.contains(LOCKED)% && !%text.contains(PICKPROOF)%
|
||||
%send% %actor% The elevator is already in use. Please wait and try again.
|
||||
halt
|
||||
end
|
||||
end
|
||||
else
|
||||
%send% %actor% You don't see that here.
|
||||
halt
|
||||
end
|
||||
if %self.vnum% == %Floor0%
|
||||
set Tarex %Floor0%
|
||||
set targfl 0
|
||||
elseif %self.vnum% == %Floor1%
|
||||
set Tarex %Floor1%
|
||||
set targfl 1
|
||||
elseif %self.vnum% == %Floor2%
|
||||
set Tarex %Floor2%
|
||||
set targfl 2
|
||||
elseif %self.vnum% == %Floor3%
|
||||
set Tarex %Floor3%
|
||||
set targfl 3
|
||||
elseif %self.vnum% == %Floor4%
|
||||
set Tarex %Floor4%
|
||||
set targfl 4
|
||||
end
|
||||
if %targfl% == g
|
||||
set dir down
|
||||
eval length %Curfl%
|
||||
elseif %targfl% > %Curfl%
|
||||
set dir up
|
||||
eval length %targfl% - %Curfl%
|
||||
elseif %targfl% < %Curfl%
|
||||
set dir down
|
||||
eval length %Curfl% - %targfl%
|
||||
else
|
||||
set dir nowhere
|
||||
set length 0
|
||||
end
|
||||
%at% %Elevat% %echo% The elevator doors slide shut.
|
||||
%at% %Curex% %echo% The elevator doors slide shut.
|
||||
wait 5
|
||||
set echofl 0
|
||||
while %echofl% < %totfl%
|
||||
eval temp %%Floor%echofl%%%
|
||||
%at% %temp% %echo% The elevator doors start to vibrate.
|
||||
%door% %temp% %roomdoor% flags abc
|
||||
eval echofl %echofl% + 1
|
||||
done
|
||||
if %length% > 0
|
||||
set origlen %length%
|
||||
%door% %Curex% %roomdoor% flags abc
|
||||
%door% %Elevat% %elevdoor% purge
|
||||
%door% %Elevat% %elevdoor% room %Elevat%
|
||||
%door% %Elevat% %elevdoor% flags abc
|
||||
%at% %Elevat% %echo% The elevator g*l u r c h e s* n
|
||||
%at% %Elevat% %echo% n G*l u r c h e s* n
|
||||
%at% %Elevat% %echo% n g*l u r c h e s* n %dir%wards.
|
||||
end
|
||||
while %length%
|
||||
if %dir% == up
|
||||
eval Curfl %Curfl% + 1
|
||||
elseif %dir% == down
|
||||
eval Curfl %Curfl% -1
|
||||
end
|
||||
if %Curfl% == 0
|
||||
set ordinal ground
|
||||
elseif %Curfl% == 1
|
||||
set ordinal 1st
|
||||
elseif %Curfl% == 2
|
||||
set ordinal 2nd
|
||||
elseif %Curfl% == 3
|
||||
set ordinal 3rd
|
||||
elseif %Curfl% > 3
|
||||
set ordinal %Curfl%th
|
||||
end
|
||||
wait 15
|
||||
%at% %Elevat% %echo% g *DING!* n
|
||||
%at% %Elevat% %echo% You have reached the %ordinal% floor.
|
||||
* It's easier to use the following line if you have over 20 floors (instead of the 21th floor)
|
||||
* %at% %Elevat% %echo% You have reached floor %Curfl%.
|
||||
wait 5
|
||||
eval length %length% - 1
|
||||
if %CurFl% > %maxfl%
|
||||
%echo% r Something seems to be wrong with the elevator. n
|
||||
%echo% r Please try again and if there's still a problem, n
|
||||
%echo% r please report this to admin. n
|
||||
set length 0
|
||||
end
|
||||
done
|
||||
if %origlen% > 0
|
||||
wait 2
|
||||
%at% %Elevat% %echo% nThe elevator y*s h u d d e r s* n
|
||||
%at% %Elevat% %echo% n Y*s h u d d e r s* n
|
||||
%at% %Elevat% %echo% n y*s h u d d e r s* n to a halt.
|
||||
end
|
||||
wait 2
|
||||
set echofl 0
|
||||
while %echofl% < %totfl%
|
||||
eval temp %%Floor%echofl%%%
|
||||
%at% %temp% %echo% The elevator doors stop vibrating.
|
||||
wait 3
|
||||
%door% %temp% %roomdoor% flags abcd
|
||||
eval echofl %echofl% + 1
|
||||
done
|
||||
wait 1
|
||||
%at% %targfl% %echo% g *DING!* n
|
||||
wait 3
|
||||
%door% %Tarex% %roomdoor% room %Elevat%
|
||||
%door% %Tarex% %roomdoor% flags a
|
||||
%door% %Elevat% %elevdoor% purge
|
||||
%door% %Elevat% %elevdoor% room %Tarex%
|
||||
%at% %Elevat% %echo% The doors slide open.
|
||||
%at% %Tarex% %echo% The elevator doors slide open.
|
||||
wait 3
|
||||
%door% %Elevat% %elevdoor% flags a
|
||||
elseif %cmd.mudcommand% == look
|
||||
if !%arg%
|
||||
return 0
|
||||
halt
|
||||
elseif %arg% == display
|
||||
if %self.vnum% != %Elevat%
|
||||
eval text %%self.%roomdoor%(bits)%%
|
||||
if !%text.contains(CLOSED)%
|
||||
%send% %actor% The elevator is already here.
|
||||
halt
|
||||
end
|
||||
else
|
||||
eval text %%self.%elevdoor%(bits)%%
|
||||
end
|
||||
if %text.contains(LOCKED)% && !%text.contains(PICKPROOF)%
|
||||
%send% %actor% Numbers flash across the display. The elevator is on the move.
|
||||
halt
|
||||
end
|
||||
if %Curfl% == 0
|
||||
set displaymsg the ground floor
|
||||
else
|
||||
set displaymsg floor %Curfl%
|
||||
end
|
||||
%send% %actor% The elevator is on %displaymsg%.
|
||||
halt
|
||||
* if look is not noarg or display
|
||||
else
|
||||
return 0
|
||||
end
|
||||
* if command is anything except look or push
|
||||
else
|
||||
return 0
|
||||
end
|
||||
~
|
||||
$~
|
||||
44
lib/world/trg/654.trg
Normal file
44
lib/world/trg/654.trg
Normal file
@@ -0,0 +1,44 @@
|
||||
#65400
|
||||
Keychain takes you to Housing~
|
||||
1 j 1
|
||||
~
|
||||
* Thanks to bakarus for suggesting the return, to Vatiken
|
||||
* for helping him with it and to Rumble for adding it to
|
||||
* trigger 176 where I could copy it.
|
||||
* http://www.tbamud.com/forum/3-building/355-dg-script-question#371
|
||||
wait 1 sec
|
||||
* Adjust zone to proper zone number
|
||||
set zone 654
|
||||
set roomvnummin %zone%00
|
||||
set roomvnummax %zone%99
|
||||
* if person hasn't used the key before, send to Midgaard Temple
|
||||
* instead of returning.
|
||||
set defaultroom 3001
|
||||
* if person uses key in apartment zone, return player to last room
|
||||
* out of the zone where the key was used.
|
||||
if %actor.room.vnum% >= %zone%00 && %actor.room.vnum% <= %zone%99
|
||||
if %actor.varexists(keychain_return_room)%
|
||||
%send% %actor% You return to your previous location.
|
||||
%echoaround% %actor% %actor.name% heads back out into the world.
|
||||
%teleport% %actor% %actor.keychain_return_room%
|
||||
%force% %actor% look
|
||||
%echoaround% %actor% %actor.name% appears in the room.
|
||||
else
|
||||
%send% %actor% You head back out into the world.
|
||||
%echoaround% %actor% %actor.name% heads back out into the world.
|
||||
%teleport% %actor% %defaultroom%
|
||||
%force% %actor% look
|
||||
%echoaround% %actor% %actor.name% appears in the room.
|
||||
end
|
||||
else
|
||||
eval keychain_return_room %actor.room.vnum%
|
||||
remote keychain_return_room %actor.id%
|
||||
%send% %actor% You head for home.
|
||||
%echoaround% %actor% %actor.name% heads for home.
|
||||
%teleport% %actor% %self.vnum%
|
||||
%force% %actor% look
|
||||
%echoaround% %actor% %actor.name% appears, heading for home.
|
||||
end
|
||||
%force% %actor% remove keychain
|
||||
~
|
||||
$~
|
||||
Reference in New Issue
Block a user