/
com/planet_ink/coffee_mud/Abilities/
com/planet_ink/coffee_mud/Abilities/Common/
com/planet_ink/coffee_mud/Abilities/Diseases/
com/planet_ink/coffee_mud/Abilities/Druid/
com/planet_ink/coffee_mud/Abilities/Fighter/
com/planet_ink/coffee_mud/Abilities/Prayers/
com/planet_ink/coffee_mud/Abilities/Properties/
com/planet_ink/coffee_mud/Abilities/Skills/
com/planet_ink/coffee_mud/Abilities/Songs/
com/planet_ink/coffee_mud/Abilities/Spells/
com/planet_ink/coffee_mud/Abilities/Thief/
com/planet_ink/coffee_mud/Abilities/Traps/
com/planet_ink/coffee_mud/Areas/interfaces/
com/planet_ink/coffee_mud/Behaviors/
com/planet_ink/coffee_mud/CharClasses/interfaces/
com/planet_ink/coffee_mud/Commands/
com/planet_ink/coffee_mud/Commands/interfaces/
com/planet_ink/coffee_mud/Exits/interfaces/
com/planet_ink/coffee_mud/Items/Armor/
com/planet_ink/coffee_mud/Items/Basic/
com/planet_ink/coffee_mud/Items/MiscMagic/
com/planet_ink/coffee_mud/Items/Software/
com/planet_ink/coffee_mud/Items/Weapons/
com/planet_ink/coffee_mud/Libraries/interfaces/
com/planet_ink/coffee_mud/Locales/
com/planet_ink/coffee_mud/Locales/interfaces/
com/planet_ink/coffee_mud/MOBS/
com/planet_ink/coffee_mud/MOBS/interfaces/
com/planet_ink/coffee_mud/Races/
com/planet_ink/coffee_mud/Races/interfaces/
com/planet_ink/coffee_mud/WebMacros/
com/planet_ink/coffee_mud/WebMacros/interfaces/
com/planet_ink/coffee_mud/application/
com/planet_ink/coffee_mud/core/smtp/
com/planet_ink/siplet/applet/
lib/
resources/examples/
resources/fakedb/
resources/quests/delivery/
resources/quests/diseased/
resources/quests/drowning/
resources/quests/gobwar/
resources/quests/holidays/
resources/quests/robbed/
resources/quests/smurfocide/
resources/quests/stolen/
resources/quests/templates/
resources/quests/treasurehunt/
resources/quests/vengeance/
web/
web/admin.templates/
web/admin/images/
web/pub.templates/
web/pub/images/mxp/
web/pub/sounds/
#set the quest name
set name murdermystery

#####################################
# Set run-requirements for this quest
#####################################
# this one runs every 8-12 hours (7200+(3600*rand))*4 secpertick /60 secs /60 mins.
set wait 7200
set interval 3600
set runlevel 1
set minplayers 1

#####################################
#  Select an area for our mystery
#####################################
# inform the quest that it occurs in Midgaard, but dont set a room just yet
set area Midgaard

#####################################
# Select a murder victim
#####################################
# now, in midgaard, pick a random intelligent mob to be our victim.
# this will specify a room also!  
set mob ANY MASK=+INT 6 +NAMES -HASSAN "-THE GUILDMASTER"
# now designate the above set mob as our mystery "target"
set target mob
# now give him the deadman script, which will kill him, unfortunately.
give behavior Scriptable LOAD=quests/murdermystery/deadman.script


#####################################
# Select a murder location and time
#####################################
# since a room was set above, this should work great!
set wherehappened room
# this is 1-10 hours ago from current hour
set whenhappened -1?-10

#####################################
# Select a suspects meeting location
#####################################
set room
set roomgroup
set locale CityStreet
set whereat room

#####################################
# Assign the murder suspects
#####################################
# first, make sure the mobs aren't generated anywhere
set room
# import the mobs, and load them into the game.
import mobs quests/murdermystery/suspects.cmare
load mobgroup 3 any
# will select one of the agentgroup as THE killer!!! 
set agentgroup 3
# change the mobgroup to be the agentgroup without the agent
set mobgroup agentgroup-agent
give behavior Scriptable LOAD=quests/murdermystery/suspect.script
give behavior Mobile
give affect Prop_SafePet
# now set just the agent back in play
set mob agent
give behavior Scriptable LOAD=quests/murdermystery/killer.script
give behavior Mobile
give affect Prop_SafePet

#####################################
# Assign the suspect motives
#####################################
# this should automatically select THE motive
# probably need a way to narrow them down though...dammit, just make the list shorter!!
set motivegroup "drunken anger" "jealous love" "insulted honor" 

#####################################
# Assign the suspect weapons
#####################################
set mobgroup
set room wherehappened
# import the items
import items quests/murdermystery/weapons.cmare
load itemgroup 3 any
# will select any one of the toolgroup as THE tool 
set toolgroup 3
set itemgroup toolgroup-tool
give behavior Scriptable LOAD=quests/murdermystery/anyolditem.script
# now put the regular tool back in play
set item tool
give behavior Scriptable LOAD=quests/murdermystery/killeritem.script

#####################################
# Set up the announcer
#####################################
set roomgroup
set room
set mob hassan
give behavior Scriptable LOAD=quests/murdermystery/announcer.script~
give behavior Scriptable +SPEECH_PROG mystery murder crime solve\;say Yes, $TARGET was murdered at $WHEREHAPPENED.  The murder weapons were left behind. You should go there and starting asking the folks in nearby rooms about those weapons, and any other clues you gather.  Then come back here and announce WHO you think did it, their MOTIVE, and what WEAPON they used.  No wrong guesses are allowed.  Questioning the people around that room will reveal all the clues you need.\;~\;
give behavior Scriptable +ONCE_PROG\;QUESTCHAT Murder most foul! $TARGET was murdered at $WHEREHAPPENED on $WHENHAPPENED.  Come and ask me about the mystery!\;~\;
give behavior Scriptable +SPEECH_PROG $&TOOL\;if VAR($n MM1_TOOL != '')\;say You have already made a guess on the weapon.\;return\;endif\;MPSETVAR $n MM1_TOOL '$TOOL'\;say Ok, so you think the weapon used was $TOOL.\;MPSETVAR $n MM1_CORRECT ++\;MPCALLFUNC winner\;~\;
give behavior Scriptable +SPEECH_PROG $&AGENT\;if VAR($n MM1_AGENT != '')\;say You have already made a guess on the killer.\;return\;endif\;MPSETVAR $n MM1_AGENT '$AGENT'\;say Ok, so you think the killer was $AGENT.\;MPSETVAR $n MM1_CORRECT ++\;MPCALLFUNC winner\;~\;
give behavior Scriptable +SPEECH_PROG $&MOTIVE\;if VAR($n MM1_MOTIVE != '')\;say You have already made a guess on the motive.\;return\;endif\;MPSETVAR $n MM1_MOTIVE '$MOTIVE'\;say Ok, so you think the motive was $MOTIVE.\;MPSETVAR $n MM1_CORRECT ++\;MPCALLFUNC winner\;~\;
#give behavior Scriptable +GREET_PROG 100\;if VAR($n MM1_CORRECT > 0)\;say You have $<$n MM1_CORRECT> correct guessed.\;endif\;~\;
LOAD=quests/murdermystery/badagentguess.quest mob agentgroup-agent
LOAD=quests/murdermystery/badtoolguess.quest mob toolgroup-tool
LOAD=quests/murdermystery/badmotiveguess.quest mob motivegroup-motive

#####################################
# Now set up all the evidence
#####################################
# first the weapons<->suspects
LOAD=quests/murdermystery/toolagentmap.quest wherehappened toolgroup-tool agentgroup-agent
LOAD=quests/murdermystery/toolagentmap.quest wherehappened tool agentgroup-agent 
LOAD=quests/murdermystery/toolagentmap.quest wherehappened toolgroup-tool agent
# now agents<->motives
LOAD=quests/murdermystery/agentmotivemap.quest wherehappened agentgroup-agent motivegroup-motive
LOAD=quests/murdermystery/agentmotivemap.quest wherehappened agent motivegroup-motive
LOAD=quests/murdermystery/agentmotivemap.quest wherehappened agentgroup-agent motive
# lastly tools<->motives
LOAD=quests/murdermystery/toolmotivemap.quest wherehappened toolgroup-tool motivegroup-motive
LOAD=quests/murdermystery/toolmotivemap.quest wherehappened tool motivegroup-motive
LOAD=quests/murdermystery/toolmotivemap.quest wherehappened toolgroup-tool motive

#####################################
# Now install a second set to make things easier.
#####################################
# first the weapons<->suspects
LOAD=quests/murdermystery/toolagentmap.quest wherehappened toolgroup-tool agentgroup-agent
LOAD=quests/murdermystery/toolagentmap.quest wherehappened tool agentgroup-agent 
LOAD=quests/murdermystery/toolagentmap.quest wherehappened toolgroup-tool agent
# now agents<->motives
LOAD=quests/murdermystery/agentmotivemap.quest wherehappened agentgroup-agent motivegroup-motive
LOAD=quests/murdermystery/agentmotivemap.quest wherehappened agent motivegroup-motive
LOAD=quests/murdermystery/agentmotivemap.quest wherehappened agentgroup-agent motive
# lastly tools<->motives
LOAD=quests/murdermystery/toolmotivemap.quest wherehappened toolgroup-tool motivegroup-motive
LOAD=quests/murdermystery/toolmotivemap.quest wherehappened tool motivegroup-motive
LOAD=quests/murdermystery/toolmotivemap.quest wherehappened toolgroup-tool motive

set duration 800
# the duration of the quest is 52 minutes (800 ticks).  The scripts on the mobs will
# do the rest...