#!QUESTMAKER_START_SCRIPT Competitive Delivery #1
#The player delivers a custom-Item from one existing mob in your world
#to one or more others. 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 Area/Room:
#Specify below the name of the area that your deliveree 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.
#
#Deliveree Area:
#$DELIVEREE_AREA=($AREA)
#Deliveree Room:
#$DELIVEREE_ROOM=($ROOMID)
#
#Deliveree mobs names:
#Specify the names of the mob who will act as the deliveree mobs.
#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 mobs, the quest will not
#be started.
#$DELIVEREE_NAME=$NAME
#
#!QUESTMAKER_PAGE Specify the Deliveree Mob details
#The Deliveree Mobs are the mobs the player must find and deliver the item to.
#Here you can specify how many of deliverees and what they say.e
#
#Number of deliverings
#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=($STRING)=1
#
#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 Deliverable item
#Create the item which the deliverer mob will give to the player to
#be taken and given to the deliveree mob.
#
#Deliverable Item:
#You may select from the available items below or create a
#new item just for this quest.
#$DELIVERABLE_ITEM=$ITEMXML
#
#!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 #1
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 room $DELIVEREE_ROOM
set mobgroup $DELIVEREE_NAME
give stat keyplayer true
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_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
mpechoat $w You have less than a minute left to deliver $i.
~
</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
~
RAND_PROG 99
if QVAR(* REMAINING == '')
MPENDQUEST $i
else
mpsetvar $i TIME_REMAINING $%QVAR(* REMAINING)%
endif
~
</DATA></FILE>