<NME> competitive_travel2.quest
<BEF> #!QUESTMAKER_START_SCRIPT Competitive Travel #2
#The player travels at the behest of one existing mob in your world
#to another somewhere else.  A reward is optionally given upon arrival.
#
#!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_travel_2
#
#Quest Name:
#Enter a friendly displayable name for your quest:
#$QUEST_NAME=$STRING=Competitive Travel #2
#
#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 Announcer
#The Announcer is the mob who will be announcing the quest initially. This must
#be an existing mob in your world.  They will announce the quest to players
#once, and then mark whether the player says they accept the quest.
#
#Announcer Area/Room: 
#Specify below the name of the area that your Announcer 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.
#  
#Announcer Area:
#$ANNOUNCER_AREA=($AREA)
#Announcer Room ID:
#$ANNOUNCER_ROOM=($ROOMID)
#
#Announcer mob name: 
#Specify the name of the mob who will act as the Announcer 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.
#$ANNOUNCER_NAME=$NAME
#
#!QUESTMAKER_PAGE Announcer greetings/instructions
#Here's where you specify any special text said by the announcer regarding
#your quest
#
#Announcer greeting: 
#Specify what the announcer says to people when they enter the room about their
#quest.   Use the code ${2 *} to designate the name of the mob to find.
#$QUEST_NOTIFYSTRING=$LONG_STRING=I need someone to find ${2 *} somewhere.
#
#Announcer instructions: 
#Specify what the announcer says to people who have accepted the quest.  This 
#should give some details about what is to be done.  You can leave this blank
#if you like.  Use the code ${2 *} to designate the name of the mob to find.
#$QUEST_INSTRUCTIONSSTRING=($LONG_STRING)=Find ${2 *} at that one place.  Be careful!
#
#Announcer announcement:
#Select what type of annoucement the Announcer will make when the quest starts.
#Use the code ${2 *} to designate the name of the mob to find.
#$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 Destination Mob
#The Destination Mob is the mob to which the player must travel.
#
#Destination Mob Area/Room: 
#Specify below the name of the area that your destination 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.
#
#Destination Area:
#$DESTINATION_AREA=($AREA)
#Destination Room:
#$DESTINATION_ROOM=($ROOMID)
#
#Destination mob name: 
#Specify the name of the mob who will act as the destination 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.
#$DESTINATION_NAME=$NAME
#
#Destination response: 
#You may optionally specify some additional bit of speech the destination 
#mob will say to the players after they arrive.
#$DESTINATION_RESPONSE=($LONG_STRING)=Glad you made it!
#
#!QUESTMAKER_PAGE Quest Completion
#Select some rewards for completing the travel:
#
#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)
#
#$CATEGORY=($HIDDEN)=
#
#!QUESTMAKER_END_SCRIPT Competitive Travel #2

set name $QUEST_ID
set display $QUEST_NAME
set author $#AUTHOR
set questtype competitive_travel2
set category $CATEGORY
set instructions $QUEST_INSTRUCTIONSSTRING

set wait $FREQUENCY
set interval 1
#quiet

set minplayers 1
set playermask $QUEST_CRITERIA


set area $ANNOUNCER_AREA
set room $ANNOUNCER_ROOM
set mobgroup
set mob $ANNOUNCER_NAME
give stat keyplayer true
give script LOAD=$QUEST_ID_announcer.script

set area $DESTINATION_AREA
set room $DESTINATION_ROOM
set mobgroup
set mob $DESTINATION_NAME
give stat keyplayer true
give script LOAD=$QUEST_ID_destination.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_announcer.script</NAME>
<DATA>
ONCE_PROG 100
	MPQSET * INSTRUCTIONS $i in $a wants you to '$QUEST_INSTRUCTIONSSTRING'
	MPSETVAR * $QUEST_ID_ALREADY_TOLD ''
	MPSETVAR * $QUEST_ID_REWARDED ''
	MPSETVAR * $QUEST_ID_ACCEPTED ''
	MPSETVAR * $QUEST_ID_NUMACCEPTED ''
	$QUEST_ANNOUNCEMENT_TYPE $QUEST_ANNOUNCEMENT
~

QUEST_TIME_PROG * -1
	mpsetvar $i $QUEST_ID_NUMACCEPTED '$<$i $QUEST_ID_ACCEPTED>.LENGTH#'
	for $0 = 0 to< '$<$i $QUEST_ID_NUMACCEPTED>'
		if !QUESTWINNER('$<$i $QUEST_ID_ACCEPTED>.$0' *)
			tell "$<$i $QUEST_ID_ACCEPTED>.$0" You failed to complete your quest in time.
	    endif
		mpqset * STATISTICS FAILED
	next
	MPSETVAR * $QUEST_ID_NUMACCEPTED ''
	MPSETVAR * $QUEST_ID_ALREADY_TOLD ''
	MPSETVAR * $QUEST_ID_ACCEPTED ''
	MPSETVAR * $QUEST_ID_REWARDED ''
~

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 !STRIN('$<$i $QUEST_ID_ALREADY_TOLD>' '$n')
				if VAR($n $QUEST_ID_ACCEPTED == '')
					sayto "$n" $QUEST_NOTIFYSTRING -- just say 'i accept' to take on this quest.
					MPSETVAR $i $QUEST_ID_ALREADY_TOLD '$<$i $QUEST_ID_ALREADY_TOLD> "$n"'
				endif
			endif
		endif
	endif
~

FUNCTION_PROG CAN_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 VAR($n $QUEST_ID_ACCEPTED == '')
				RETURN TRUE
			endif
		endif
	endif
	RETURN CANCEL
~

FUNCTION_PROG DO_ACCEPT
	mpqset * REMAINING $DURATION
	mpsetvar $i $QUEST_ID_ACCEPTED $n
	mpsetvar $n $QUEST_ID_ACCEPTED 'YES'
	mpqset * STATISTICS ACCEPTED
	mpscript $n INDIVIDUAL LOAD=$QUEST_ID_playertrack.script
~

SPEECH_PROG p i accept
	if CALLFUNC(CAN_ACCEPT)
		sayto "$n" $QUEST_INSTRUCTIONSSTRING
		MPCALLFUNC DO_ACCEPT
	else
		sayto "$n" Yes, yes, I know .. now off with you.
	endif
~

QUEST_TIME_PROG * 1
	mpsetvar $i $QUEST_ID_NUMACCEPTED '$<$i $QUEST_ID_ACCEPTED>.LENGTH#'
	for $0 = 0 to< '$<$i $QUEST_ID_NUMACCEPTED>'
		if !QUESTWINNER('$<$i $QUEST_ID_ACCEPTED>.$0' *)
			tell "$<$i $QUEST_ID_ACCEPTED>.$0"  You have less than a minute left to find ${2 *} and complete your quest.
		endif
	next
~
</DATA></FILE>
<FILE><NAME>$QUEST_ID_destination.script</NAME>
<DATA>
GREET_PROG 100
	if ISLIKE($n '$QUEST_CRITERIA') and ISPC($n) and ( EVAL('$MULTIPLE' != 'PREV') or QUESTWINNER($n previous) ) AND VAR($n $QUEST_ID_ACCEPTED == 'YES')
		if  EVAL('$MULTIPLE' != 'YES') AND QUESTWINNER($n *)
		else
			if EVAL('$EXP' != '')
				mpexp $n $EXP
			endif
			if EVAL('$FACTION' != '')
				mpfaction $n $FACTION +$NUMFACTION
			endif
			if EVAL('$QUEST_POINT' == 'YES') AND !QUESTWINNER($n *)
				mpoloadroom 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 *
			sayto $n $DESTINATION_RESPONSE
			mpendquest *
			mpqset * STATISTICS SUCCESS
			IF EVAL('$NEXT_QUEST' != '')
				mpstartquest $NEXT_QUEST
			ELSE
				IF EVAL('$MULTIPLE' == 'PREV')
					mptransfer $n $n
				ENDIF
			ENDIF
		endif
	endif
~
</DATA></FILE>
<FILE><NAME>$QUEST_ID_playertrack.script</NAME>
<DATA>
ONCE_PROG 100
    mpsetvar $i INSTRUCTIONS $QUEST_INSTRUCTIONSSTRING
~

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

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

git-svn-id: svn://192.168.1.10/public/CoffeeMud@7115 0d6f1817-ed0e-0410-87c9-987e46238f29

<DFF> @@ -1,6 +1,7 @@
 #!QUESTMAKER_START_SCRIPT Competitive Travel #2
 #The player travels at the behest of one existing mob in your world
-#to another somewhere else.  A reward is optionally given upon arrival.
+#to another existing mob somewhere else in your world.  A reward
+#is optionally given upon arrival.
 #
 #!QUESTMAKER_PAGE Quest Name/Duration
 #Enter the unique name and starting time/duration for your new quest.

{'commit': 'diff --git a/resources/quests/templates/competitive_travel2.quest b/resources/quests/templates/competitive_travel2.quest\nindex 17ca33eca7..13223234e2 100644\n--- a/resources/quests/templates/competitive_travel2.quest\n+++ b/resources/quests/templates/competitive_travel2.quest\n@@ -1,6 +1,7 @@\n #!QUESTMAKER_START_SCRIPT Competitive Travel #2\r\n #The player travels at the behest of one existing mob in your world\r\n-#to another somewhere else.  A reward is optionally given upon arrival.\r\n+#to another existing mob somewhere else in your world.  A reward\r\n+#is optionally given upon arrival.\r\n #\r\n #!QUESTMAKER_PAGE Quest Name/Duration\r\n #Enter the unique name and starting time/duration for your new quest.\r\n', 'commit_subject': '', 'repo_name': 'bozimmerman/CoffeeMud', 'committer': {'name': 'bozimmerman', 'email': 'dc45fe023482b3b890b5e574e53c1d051f45b1ef@zimmers.net', 'time_sec': '1212343593', 'tz_offset': '0', 'date': {'seconds': '1212343593'}}, 'commit_tree': 'bca5ebfc299504baf51a40be72d2e262a7a6e83d', 'commit_message': '\n\ngit-svn-id: svn://192.168.1.10/public/CoffeeMud@7115 0d6f1817-ed0e-0410-87c9-987e46238f29\n', 'language_name': 'JavaScript', 'license': 'apache-2.0', 'hunks': '@@ -1,6 +1,7 @@\n #!QUESTMAKER_START_SCRIPT Competitive Travel #2\r\n #The player travels at the behest of one existing mob in your world\r\n-#to another somewhere else.  A reward is optionally given upon arrival.\r\n+#to another existing mob somewhere else in your world.  A reward\r\n+#is optionally given upon arrival.\r\n #\r\n #!QUESTMAKER_PAGE Quest Name/Duration\r\n #Enter the unique name and starting time/duration for your new quest.\r\n', 'addition_count': 2, 'deletion_count': 1, 'src_file': 'a/resources/quests/templates/competitive_travel2.quest', 'tgt_file': 'b/resources/quests/templates/competitive_travel2.quest', 'file_extension': '.quest', 'before_file': '#!QUESTMAKER_START_SCRIPT Competitive Travel #2\r\n#The player travels at the behest of one existing mob in your world\r\n#to another somewhere else.  A reward is optionally given upon arrival.\r\n#\r\n#!QUESTMAKER_PAGE Quest Name/Duration\r\n#Enter the unique name and starting time/duration for your new quest.\r\n#Times are entered as a simple number or math expression to denote a\n#time in default ticks (4 second period), or you may follow the expression \n#with the word seconds, minutes, hours, days, mudhours, muddays, mudweeks,\n#mudmonths, or mudyears.  Time expressions may include numbers, math \n#symbols, or the ? operator to generate random numbers.  Example:\n#"5 + 3?10 minutes" would generate a frequency of 8-15 minutes.#\n#\n#Quest ID:\n#Enter a unique name/id for your quest:\n#$QUEST_ID=$UNIQUE_QUEST_NAME=competitive_travel_2\n#\n#Quest Name:\n#Enter a friendly displayable name for your quest:\n#$QUEST_NAME=$STRING=Competitive Travel #2\n#\n#Quest Frequency:\n#This is the time between quest starts.\n#$FREQUENCY=$TIMEEXPRESSION=90 minutes\n#\n#Quest Duration:\n#This is how long your quest remains running, and how long a player \n#accepting the quest has to complete the quest and report back in.\n#$DURATION=$TIMEEXPRESSION=90 minutes\n#\n#Quest-Player Criterium:\n#You may leave this entry blank, or enter a Zapper Mask to describe what\n#kinds of players may participate in this quest.  You can use this to set\n#race, level, or other requirements.\n#$QUEST_CRITERIA=$ZAPPERMASK\n#\n#!QUESTMAKER_PAGE Specify the Announcer\n#The Announcer is the mob who will be announcing the quest initially. This must\n#be an existing mob in your world.  They will announce the quest to players\n#once, and then mark whether the player says they accept the quest.\n#\n#Announcer Area/Room: \n#Specify below the name of the area that your Announcer mob will be located\n#in and/or the room in which the mob can be found.  You may leave both blank\n#to force the quest manager to find the mob somewhere in the world, but this\n#will hurt the performance of your mud, so use with care.\n#Use double-quotes around multi-word areas and room ids/names.\n#  \n#Announcer Area:\n#$ANNOUNCER_AREA=($AREA)\n#Announcer Room ID:\n#$ANNOUNCER_ROOM=($ROOMID)\n#\n#Announcer mob name: \n#Specify the name of the mob who will act as the Announcer mob.  \n#Use double-quotes around multi-word names.\n#If you specified an area or room above, then the mob must be located there.\n#You may optionally have the quest manager select a \'random\' mob by entering\n#a mob name of ANY MASK= followed by a Zapper Mask (see help on \n#ZAPPERMASKS for information on zapper mask syntax).\n#Remember, if the quest manager can not find your mob, the quest will not\n#be started.\n#$ANNOUNCER_NAME=$NAME\n#\n#!QUESTMAKER_PAGE Announcer greetings/instructions\n#Here\'s where you specify any special text said by the announcer regarding\n#your quest\n#\n#Announcer greeting: \n#Specify what the announcer says to people when they enter the room about their\n#quest.   Use the code ${2 *} to designate the name of the mob to find.\n#$QUEST_NOTIFYSTRING=$LONG_STRING=I need someone to find ${2 *} somewhere.\n#\n#Announcer instructions: \n#Specify what the announcer says to people who have accepted the quest.  This \n#should give some details about what is to be done.  You can leave this blank\n#if you like.  Use the code ${2 *} to designate the name of the mob to find.\n#$QUEST_INSTRUCTIONSSTRING=($LONG_STRING)=Find ${2 *} at that one place.  Be careful!\n#\n#Announcer announcement:\n#Select what type of annoucement the Announcer will make when the quest starts.\n#Use the code ${2 *} to designate the name of the mob to find.\n#$QUEST_ANNOUNCEMENT_TYPE=$CHOOSE=YELL,QUESTCHAT,MPECHO,SAY\n#This is what the announcement says.  Leave it blank if you only want him to talk to people who enter the room with him.\n#$QUEST_ANNOUNCEMENT=($STRING)\n#\n#!QUESTMAKER_PAGE Specify the Destination Mob\n#The Destination Mob is the mob to which the player must travel.\n#\n#Destination Mob Area/Room: \n#Specify below the name of the area that your destination mob will be located\n#in and/or the room in which the mob can be found.  You may leave both blank\n#to force the quest manager to find the mob somewhere in the world, but this\n#will hurt the performance of your mud, so use with care.  \n#Use double-quotes around multi-word areas and room ids/names.\n#\n#Destination Area:\n#$DESTINATION_AREA=($AREA)\n#Destination Room:\n#$DESTINATION_ROOM=($ROOMID)\n#\n#Destination mob name: \n#Specify the name of the mob who will act as the destination mob.  \n#Use double-quotes around multi-word names.\n#If you specified an area or room above, then the mob must be located there. \n#You may optionally have the quest manager select a \'random\' mob by entering\n#a mob name of ANY MASK= followed by a Zapper Mask (see help on \n#ZAPPERMASKS for information on zapper mask syntax).\n#Remember, if the quest manager can not find your mob, the quest will not\n#be started.\n#$DESTINATION_NAME=$NAME\n#\n#Destination response: \n#You may optionally specify some additional bit of speech the destination \n#mob will say to the players after they arrive.\n#$DESTINATION_RESPONSE=($LONG_STRING)=Glad you made it!\n#\n#!QUESTMAKER_PAGE Quest Completion\n#Select some rewards for completing the travel:\n#\n#Reward items: \n#Specify zero or more items to choose from as a reward \n#$REWARD_ITEMS=$ITEMXML_ZEROORMORE\n#\n#Quest Point?\n#$QUEST_POINT=$CHOOSE=YES,NO\n#Amount of money (an amount, or leave blank):\n#$GOLD=($EXPRESSION)\n#Amount of experience points, blank for none, or a number% for percent of exp to next level:\n#$EXP=($STRING)=10%\n#\n#Player Faction to give to or take from:\n#$FACTION=($FACTION)\n#If you selected a faction above, enter a new numeric amount, \n#or enter +value to add, or --value to subtract:\n#$NUMFACTION=($STRING)\n#\n#Select whether a player may complete this quest multiple times,\n#or \'prev\' to require a previous quest, if multiple found.\n#$MULTIPLE=$CHOOSE=YES,NO,PREV\n#\n#If you choose, you may have completion of this quest automatically start another.\n#If this is what you want, enter the next quests name here:\n#$NEXT_QUEST=($EXISTING_QUEST_NAME)\n#\n#$CATEGORY=($HIDDEN)=\n#\n#!QUESTMAKER_END_SCRIPT Competitive Travel #2\n\nset name $QUEST_ID\nset display $QUEST_NAME\nset author $#AUTHOR\nset questtype competitive_travel2\nset category $CATEGORY\nset instructions $QUEST_INSTRUCTIONSSTRING\n\nset wait $FREQUENCY\nset interval 1\n#quiet\n\nset minplayers 1\nset playermask $QUEST_CRITERIA\n\n\nset area $ANNOUNCER_AREA\nset room $ANNOUNCER_ROOM\nset mobgroup\nset mob $ANNOUNCER_NAME\ngive stat keyplayer true\ngive script LOAD=$QUEST_ID_announcer.script\n\nset area $DESTINATION_AREA\nset room $DESTINATION_ROOM\nset mobgroup\nset mob $DESTINATION_NAME\ngive stat keyplayer true\ngive script LOAD=$QUEST_ID_destination.script\n\nset duration $DURATION\n\n<?xml version="1.0"?>\n<FILE><NAME>$QUEST_ID_rewarditems.xml</NAME><DATA><ITEMS>$REWARD_ITEMS</ITEMS></DATA></FILE>\n<FILE><NAME>$QUEST_ID_announcer.script</NAME>\n<DATA>\nONCE_PROG 100\n\tMPQSET * INSTRUCTIONS $i in $a wants you to \'$QUEST_INSTRUCTIONSSTRING\'\n\tMPSETVAR * $QUEST_ID_ALREADY_TOLD \'\'\n\tMPSETVAR * $QUEST_ID_REWARDED \'\'\n\tMPSETVAR * $QUEST_ID_ACCEPTED \'\'\n\tMPSETVAR * $QUEST_ID_NUMACCEPTED \'\'\n\t$QUEST_ANNOUNCEMENT_TYPE $QUEST_ANNOUNCEMENT\n~\n\nQUEST_TIME_PROG * -1\n\tmpsetvar $i $QUEST_ID_NUMACCEPTED \'$<$i $QUEST_ID_ACCEPTED>.LENGTH#\'\n\tfor $0 = 0 to< \'$<$i $QUEST_ID_NUMACCEPTED>\'\n\t\tif !QUESTWINNER(\'$<$i $QUEST_ID_ACCEPTED>.$0\' *)\n\t\t\ttell "$<$i $QUEST_ID_ACCEPTED>.$0" You failed to complete your quest in time.\n\t    endif\n\t\tmpqset * STATISTICS FAILED\n\tnext\n\tMPSETVAR * $QUEST_ID_NUMACCEPTED \'\'\n\tMPSETVAR * $QUEST_ID_ALREADY_TOLD \'\'\n\tMPSETVAR * $QUEST_ID_ACCEPTED \'\'\n\tMPSETVAR * $QUEST_ID_REWARDED \'\'\n~\n\nGREET_PROG 100\n\tif ISLIKE($n \'$QUEST_CRITERIA\') and ISPC($n) and ( EVAL(\'$MULTIPLE\' != \'PREV\') or QUESTWINNER($n previous) )\n\t\tif EVAL(\'$MULTIPLE\' == \'YES\') OR !QUESTWINNER($n *)\n\t\t\tif !STRIN(\'$<$i $QUEST_ID_ALREADY_TOLD>\' \'$n\')\n\t\t\t\tif VAR($n $QUEST_ID_ACCEPTED == \'\')\n\t\t\t\t\tsayto "$n" $QUEST_NOTIFYSTRING -- just say \'i accept\' to take on this quest.\n\t\t\t\t\tMPSETVAR $i $QUEST_ID_ALREADY_TOLD \'$<$i $QUEST_ID_ALREADY_TOLD> "$n"\'\n\t\t\t\tendif\n\t\t\tendif\n\t\tendif\n\tendif\n~\n\nFUNCTION_PROG CAN_ACCEPT\n\tif ISLIKE($n \'$QUEST_CRITERIA\') and ISPC($n) and ( EVAL(\'$MULTIPLE\' != \'PREV\') or QUESTWINNER($n previous) )\n\t\tif EVAL(\'$MULTIPLE\' == \'YES\') OR !QUESTWINNER($n *)\n\t\t\tif VAR($n $QUEST_ID_ACCEPTED == \'\')\n\t\t\t\tRETURN TRUE\n\t\t\tendif\n\t\tendif\n\tendif\n\tRETURN CANCEL\n~\n\nFUNCTION_PROG DO_ACCEPT\n\tmpqset * REMAINING $DURATION\n\tmpsetvar $i $QUEST_ID_ACCEPTED $n\n\tmpsetvar $n $QUEST_ID_ACCEPTED \'YES\'\n\tmpqset * STATISTICS ACCEPTED\n\tmpscript $n INDIVIDUAL LOAD=$QUEST_ID_playertrack.script\n~\n\nSPEECH_PROG p i accept\n\tif CALLFUNC(CAN_ACCEPT)\n\t\tsayto "$n" $QUEST_INSTRUCTIONSSTRING\n\t\tMPCALLFUNC DO_ACCEPT\n\telse\n\t\tsayto "$n" Yes, yes, I know .. now off with you.\n\tendif\n~\n\nQUEST_TIME_PROG * 1\n\tmpsetvar $i $QUEST_ID_NUMACCEPTED \'$<$i $QUEST_ID_ACCEPTED>.LENGTH#\'\n\tfor $0 = 0 to< \'$<$i $QUEST_ID_NUMACCEPTED>\'\n\t\tif !QUESTWINNER(\'$<$i $QUEST_ID_ACCEPTED>.$0\' *)\n\t\t\ttell "$<$i $QUEST_ID_ACCEPTED>.$0"  You have less than a minute left to find ${2 *} and complete your quest.\n\t\tendif\n\tnext\n~\n</DATA></FILE>\n<FILE><NAME>$QUEST_ID_destination.script</NAME>\n<DATA>\nGREET_PROG 100\n\tif ISLIKE($n \'$QUEST_CRITERIA\') and ISPC($n) and ( EVAL(\'$MULTIPLE\' != \'PREV\') or QUESTWINNER($n previous) ) AND VAR($n $QUEST_ID_ACCEPTED == \'YES\')\n\t\tif  EVAL(\'$MULTIPLE\' != \'YES\') AND QUESTWINNER($n *)\n\t\telse\n\t\t\tif EVAL(\'$EXP\' != \'\')\n\t\t\t\tmpexp $n $EXP\n\t\t\tendif\n\t\t\tif EVAL(\'$FACTION\' != \'\')\n\t\t\t\tmpfaction $n $FACTION +$NUMFACTION\n\t\t\tendif\n\t\t\tif EVAL(\'$QUEST_POINT\' == \'YES\') AND !QUESTWINNER($n *)\n\t\t\t\tmpoloadroom QuestPoint\n\t\t\t\tgive "a quest point" "$n"\n\t\t\tendif\n\t\t\tif EVAL(\'$GOLD\' != \'\') AND EVAL(\'$GOLD\' > 0)\n\t\t\t\tmpoload $GOLD\n\t\t\t\tgive $GOLD "$n"\n\t\t\tendif\n\t\t\tmpoload fromfile $QUEST_ID_rewarditems.xml any\n\t\t\tif EVAL(\'$b\' != \'\')\n\t\t\t\tgive "$b" "$n"\n\t\t\tendif\n\t\t\tmpquestwin $n *\n\t\t\tsayto $n $DESTINATION_RESPONSE\n\t\t\tmpendquest *\n\t\t\tmpqset * STATISTICS SUCCESS\n\t\t\tIF EVAL(\'$NEXT_QUEST\' != \'\')\n\t\t\t\tmpstartquest $NEXT_QUEST\n\t\t\tELSE\n\t\t\t\tIF EVAL(\'$MULTIPLE\' == \'PREV\')\n\t\t\t\t\tmptransfer $n $n\n\t\t\t\tENDIF\n\t\t\tENDIF\n\t\tendif\n\tendif\n~\n</DATA></FILE>\n<FILE><NAME>$QUEST_ID_playertrack.script</NAME>\n<DATA>\nONCE_PROG 100\n    mpsetvar $i INSTRUCTIONS $QUEST_INSTRUCTIONSSTRING\n~\n\nQUEST_TIME_PROG * -1\n\tif !QUESTWINNER($i *)\n\t\tmpechoat $i The quest \'$QUEST_NAME\' has ended\n\tendif\n\tmpqset * STATISTICS FAILED\n~\n\nRAND_PROG 99\n    if QVAR(* REMAINING == \'\')\n        MPENDQUEST $i\n    else\n        mpsetvar $i TIME_REMAINING $%QVAR(* REMAINING)%\n    endif\n~\n</DATA></FILE>', 'message': '\n\ngit-svn-id: svn://192.168.1.10/public/CoffeeMud@7115 0d6f1817-ed0e-0410-87c9-987e46238f29\n', 'author_name': 'bozimmerman', 'lang': 'quest'}