/
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/Languages/
com/planet_ink/coffee_mud/Abilities/Misc/
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/Specializations/
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/Behaviors/
com/planet_ink/coffee_mud/CharClasses/
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/Common/
com/planet_ink/coffee_mud/Common/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/BasicTech/
com/planet_ink/coffee_mud/Items/CompTech/
com/planet_ink/coffee_mud/Items/MiscMagic/
com/planet_ink/coffee_mud/Items/Weapons/
com/planet_ink/coffee_mud/Items/interfaces/
com/planet_ink/coffee_mud/Libraries/
com/planet_ink/coffee_mud/Libraries/interfaces/
com/planet_ink/coffee_mud/Locales/
com/planet_ink/coffee_mud/MOBS/
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/core/
com/planet_ink/coffee_mud/core/collections/
com/planet_ink/coffee_mud/core/interfaces/
com/planet_ink/coffee_mud/core/intermud/
com/planet_ink/coffee_mud/core/intermud/i3/
com/planet_ink/coffee_web/server/
com/planet_ink/siplet/applet/
lib/
resources/factions/
resources/fakedb/
resources/progs/autoplayer/
resources/quests/holidays/
web/
web/admin.templates/
web/admin/grinder/
web/admin/images/
web/clan.templates/
web/pub.templates/
web/pub/images/mxp/
web/pub/sounds/
web/pub/textedit/
#!QUESTMAKER_START_SCRIPT Competitive Delivery #3
#The player delivers a custom-Item from one existing mob in your world
#to one or more others that you create.  A reward is given upon delivery.
#
#!QUESTMAKER_PAGE Quest Name/Duration
#Enter the unique name and starting time/duration for your new quest.
#Times are entered as a simple number or math expression to denote a
#time in default ticks (4 second period), or you may follow the expression 
#with the word seconds, minutes, hours, days, mudhours, muddays, mudweeks,
#mudmonths, or mudyears.  Time expressions may include numbers, math 
#symbols, or the ? operator to generate random numbers.  Example:
#"5 + 3?10 minutes" would generate a frequency of 8-15 minutes.#
#
#Quest ID:
#Enter a unique name/id for your quest:
#$QUEST_ID=$UNIQUE_QUEST_NAME=competitive_delivery_1
#
#Quest Name:
#Enter a friendly displayable name for your quest:
#$QUEST_NAME=$STRING=Competitive Delivery #1
#
#Quest Frequency:
#This is the time between quest starts.
#$FREQUENCY=$TIMEEXPRESSION=90 minutes
#
#Quest Duration:
#This is how long your quest remains running, and how long a player 
#accepting the quest has to complete the quest and report back in.
#$DURATION=$TIMEEXPRESSION=90 minutes
#
#Quest-Player Criterium:
#You may leave this entry blank, or enter a Zapper Mask to describe what
#kinds of players may participate in this quest.  You can use this to set
#race, level, or other requirements.
#$QUEST_CRITERIA=$ZAPPERMASK
#
#!QUESTMAKER_PAGE Specify the Deliverer
#The Deliverer is the mob who will be holding the item initially. This must
#be an existing mob in your world.  
#
#Deliverer Area/Room: 
#Specify below the name of the area that your deliverer mob will be located
#in and/or the room in which the mob can be found.  You may leave both blank
#to force the quest manager to find the mob somewhere in the world, but this
#will hurt the performance of your mud, so use with care.
#Use double-quotes around multi-word areas and room ids/names.
#  
#Deliverer Area:
#$DELIVERER_AREA=($AREA)
#Deliverer Room ID:
#$DELIVERER_ROOM=($ROOMID)
#
#Deliverer mob name: 
#Specify the name of the mob who will act as the deliverer mob.  
#Use double-quotes around multi-word names.
#If you specified an area or room above, then the mob must be located there.
#You may optionally have the quest manager select a 'random' mob by entering
#a mob name of ANY MASK= followed by a Zapper Mask (see help on 
#ZAPPERMASKS for information on zapper mask syntax).
#Remember, if the quest manager can not find your mob, the quest will not
#be started.
#$DELIVERER_NAME=$NAME
#
#Deliverer reasons: 
#Specify some additional bit of speech the deliverer 
#mob will say to players when the item is handed over for delivery.  The
#deliverer will already be specifying the name of the mob to deliver to,
#but you might want to say what its for, or where the mob is, or something
#about the reward, or whatever.
#$REASONING=($LONG_STRING)
#
#Deliverer announcement:
#Select what type of annoucement the Deliverer will make when the quest starts.
#$QUEST_ANNOUNCEMENT_TYPE=$CHOOSE=YELL,QUESTCHAT,MPECHO,SAY
#This is what the announcement says.  Leave it blank if you only want him to talk to people who enter the room with him.
#$QUEST_ANNOUNCEMENT=($STRING)
#
#!QUESTMAKER_PAGE Specify the Deliveree
#The Deliveree is the mob to which the item will be delivered. 
#
#Deliveree mobs: 
#Specify the names of the mob who will act as the deliveree mobs.  
#Use double-quotes around multi-word names.

#Specify below the name of the area that your deliveree mob or mobs will be created
#in and/or the rooms in which the mob or mobs will be created.  You may leave both blank
#to force the quest manager to create the mobs randomly throughout the world if you like.
#Use double-quotes around multi-word areas and room ids/names.  
#
#Deliveree Area:
#$DELIVEREE_AREA=($AREA)
#Deliveree Room(s):
#$DELIVEREE_ROOM=($ROOMID)
#
#Deliveree mobs: 
#Specify the mobs who will act as the deliveree mob or mobs.  You might want to mix things
#up by making them mobile.
#$DELIVEREE_MOBS=$MOBXML_ONEORMORE
#
#Num Mobs created:
#Specify how many of the above mobs will be created for the quest.  If this number is larger than
#the number of mobs available, duplicates will be made.  If it is smaller, the choices will be random
#from the list.
#$DELIVEREES_CREATED=($EXPRESSION)=10
#
#Num Deliverees:
#specify the number of the deliverable items must be delivered to mobs
#matching the deliveree.  The announcer will give the player the correct
#number of items to deliver.
#$DELIVEREE_COUNT=($EXPRESSION)=1
#
#!QUESTMAKER_PAGE Deliverable item
#Create the item which the deliverer mob will give to the player to 
#be taken and given to the deliveree mobs.  
#
#Deliverable Item: 
#You may select from the available items below or create a 
#new item just for this quest.
#$DELIVERABLE_ITEM=$ITEMXML
#
#Deliveree response: 
#You may optionally specify some additional bit of speech the deliveree 
#mob will say to the players after the item is handed over. 
#$DELIVER_RESPONSE=($LONG_STRING)=Thank you.
#
#!QUESTMAKER_PAGE Quest Completion
#Select some rewards for delivering the item:
#
#Reward items: 
#Specify zero or more items to choose from as a reward 
#$REWARD_ITEMS=$ITEMXML_ZEROORMORE
#
#Quest Point?
#$QUEST_POINT=$CHOOSE=YES,NO
#Amount of money (an amount, or leave blank):
#$GOLD=($EXPRESSION)
#Amount of experience points, blank for none, or a number% for percent of exp to next level:
#$EXP=($STRING)=10%
#
#Player Faction to give to or take from:
#$FACTION=($FACTION)
#If you selected a faction above, enter a new numeric amount, 
#or enter +value to add, or --value to subtract:
#$NUMFACTION=($STRING)
#
#Select whether a player may complete this quest multiple times,
#or 'prev' to require a previous quest, if multiple found.
#$MULTIPLE=$CHOOSE=YES,NO,PREV
#
#If you choose, you may have completion of this quest automatically start another.
#If this is what you want, enter the next quests name here:
#$NEXT_QUEST=($EXISTING_QUEST_NAME)
#
#!QUESTMAKER_END_SCRIPT Competitive Delivery #3

set name $QUEST_ID
set display $QUEST_NAME
set author $#AUTHOR

set wait $FREQUENCY
set interval 1
#quiet

set minplayers 1
set playermask $QUEST_CRITERIA

import items $QUEST_ID_item.xml
set area $DELIVERER_AREA
set room $DELIVERER_ROOM
set mobgroup
set mob $DELIVERER_NAME
give stat keyplayer true
give script LOAD=$QUEST_ID_deliverer.script
set item LOADEDITEMS
give item
give script LOAD=$QUEST_ID_deliverable.script
set mob
set item

set area $DELIVEREE_AREA
set roomgroup $DELIVEREE_ROOM
set mobgroup
set mob
set room
import mobs $QUEST_ID_mobs.xml
load mobgroup $DELIVEREES_CREATED any
set mob
give script LOAD=$QUEST_ID_deliveree.script

set duration $DURATION

<?xml version="1.0"?>
<FILE><NAME>$QUEST_ID_rewarditems.xml</NAME><DATA><ITEMS>$REWARD_ITEMS</ITEMS></DATA></FILE>
<FILE><NAME>$QUEST_ID_item.xml</NAME><DATA><ITEMS>$DELIVERABLE_ITEM</ITEMS></DATA></FILE>
<FILE><NAME>$QUEST_ID_mobs.xml</NAME><DATA><MOBS>$DELIVEREE_MOBS</MOBS></DATA></FILE>
<FILE><NAME>$QUEST_ID_deliverer.script</NAME>
<DATA>
ONCE_PROG 100
	$QUEST_ANNOUNCEMENT_TYPE $QUEST_ANNOUNCEMENT
~

# this script is for the human chosen to be the note bearer
GREET_PROG 100
	if ISLIKE($n '$QUEST_CRITERIA') and ISPC($n) and ( EVAL('$MULTIPLE' != 'PREV') or QUESTWINNER($n previous) )
		if EVAL('$MULTIPLE' == 'YES') OR !QUESTWINNER($n *)
			if has($n '$[1 *]')
					sayto "$n" What are you doing back here?  Deliver $[1 *] to ${2 *}!
			else
				if has($i '$[1 *]')
					sayto "$n" I have something I need to be delivered to ${2 *}.  If you'll deliver it for me, say 'I accept', and I will give you the details.
				endif
			endif
		endif
	endif
~

SPEECH_PROG mission problem package quest help delivery deliver 'me to do' 'to do' mission? problem? package? quest? help? delivery? delive?r 'me to do?' 'to do?' 
	if ISLIKE($n '$QUEST_CRITERIA') and ISPC($n) and ( EVAL('$MULTIPLE' != 'PREV') or QUESTWINNER($n previous) )
		if EVAL('$MULTIPLE' == 'YES') OR !QUESTWINNER($n *)
			if has($n '$[1 *]')
					sayto "$n" Just deliver $[1 *] to ${2 *}!
			else
				if has($i '$[1 *]')
					sayto "$n" I have something I need to be delivered to ${2 *}.  If you'll deliver it for me, say 'I accept', and I will give you the details.
				endif
			endif
		endif
	endif
~

SPEECH_PROG p i accept
	if ISLIKE($n '$QUEST_CRITERIA') and ISPC($n) and ( EVAL('$MULTIPLE' != 'PREV') or QUESTWINNER($n previous) )
		if  EVAL('$MULTIPLE' == 'YES') OR !QUESTWINNER($n *)
			if !has($n '$[1 *]')
				if EVAL($DELIVEREE_COUNT > 1)
					for $0 = 0 to< $DELIVEREE_COUNT
						if !has($i '$[1 *]')
							mpoload '$[1 *]'
							MPQSET * QUESTOBJ $b
						endif
						give "$[1 *]" "$n"
					next 
					sayto "$n" Please deliver these to $DELIVEREE_COUNT ${2 *}.  $REASONING
				else
					if !has($i '$[1 *]')
						mpoload '$[1 *]'
						MPQSET * QUESTOBJ $b
					endif
					give "$[1 *]" "$n"
					sayto "$n" Please deliver this to ${2 *}.  $REASONING
				endif 
				mpscript $n INDIVIDUAL LOAD=$QUEST_ID_playertrack.script
				mpqset * REMAINING $DURATION
				mpqset * STATISTICS ACCEPTED
			else
				sayto "$n" Yes, I know.  Now deliver it to ${2 *}.
			endif
		endif
	endif
~
	

GIVE_PROG all
	if EVAL($o == '$[1 *]')
		sayto "$n" So, you refuse?  Help me find someone else then.  Ok?
		mpjunk $o
	endif
~
</DATA></FILE>
<FILE><NAME>$QUEST_ID_deliverable.script</NAME>
<DATA>
QUEST_TIME_PROG * 1
~

</DATA></FILE>
<FILE><NAME>$QUEST_ID_deliveree.script</NAME>
<DATA>
GREET_PROG 100
	if eval('$[1 *]' != '') AND has($n '$[1 *]') and !STRCONTAINS('$<$n QUEST_DELIVERED>' $@i)
		say "$n" Ah, I see you are here to deliver $[1 *].  Go ahead and give it to me.
	endif
~
	

GIVE_PROG all
	if ISLIKE($n '$QUEST_CRITERIA') and ISPC($n) and ( EVAL('$MULTIPLE' != 'PREV') or QUESTWINNER($n previous) )
		if  EVAL('$MULTIPLE' != 'YES') AND QUESTWINNER($n *)
			sayto "$n" What's this?
			give "$o" "$n"
		else
			if EVAL($o == '$[1 *]')
				if EVAL($DELIVEREE_COUNT > 1) 
					if !STRCONTAINS('$<$n QUEST_DELIVERED>' $@i)
						mpsetvar $n QUEST_DELIVERED ' $<$n QUEST_DELIVERED>  "$@i" '
						if EVAL('$<$n QUEST_DELIVERED>.LENGTH#' < $DELIVEREE_COUNT)
							mpjunk $o
							sayto "$n" $DELIVER_RESPONSE
							mpechoat $n That's $<$n QUEST_DELIVERED>.LENGTH# / $DELIVEREE_COUNT
							return
						endif
					else
						give $o $n
						return
					endif
				endif
				if EVAL('$EXP' != '')
					mpexp $n $EXP
				endif
				if EVAL('$FACTION' != '')
					mpfaction $n $FACTION +$NUMFACTION
				endif
				if EVAL('$QUEST_POINT' == 'YES') AND !QUESTWINNER($n *)
					mpoload QuestPoint
					give "a quest point" "$n"
				endif
				if EVAL('$GOLD' != '') AND EVAL('$GOLD' > 0)
					mpoload $GOLD
					give $GOLD "$n"
				endif
				mpoload fromfile $QUEST_ID_rewarditems.xml any
				if EVAL('$b' != '')
					give "$b" "$n"
				endif
				mpquestwin $n *
				mpjunk $o
				sayto "$n" $DELIVER_RESPONSE
				mpendquest *
				mpqset * STATISTICS SUCCESS
				IF EVAL('$NEXT_QUEST' != '')
					mpstartquest $NEXT_QUEST
				ELSE
					IF EVAL('$MULTIPLE' == 'PREV')
						mptransfer $n $n
					ENDIF
				ENDIF
			else
				sayto "$n" What's this?
				give "$o" "$n"
			endif
		endif
	else
		sayto "$n" What's this?
		give "$o" "$n"
	endif
~
</DATA></FILE>
<FILE><NAME>$QUEST_ID_playertrack.script</NAME>
<DATA>
ONCE_PROG 100
    mpsetvar $i INSTRUCTIONS Please deliver $[1, *] to ${2 *}. $REASONING 
~

QUEST_TIME_PROG * -1
	mpsetvar $i QUEST_DELIVERED
	if !QUESTWINNER($i *)
		mpechoat $i The quest '$QUEST_NAME' has ended
	endif
	mpqset * STATISTICS FAILED
~

QUEST_TIME_PROG * 1
	mpechoat $w You have less than a minute left to complete your deliveries.
~

RAND_PROG 99
    if QVAR(* REMAINING == '')
        MPENDQUEST $i
    else
        mpsetvar $i TIME_REMAINING $%QVAR(* REMAINING)%
    endif
~
</DATA></FILE>