Your IP : 216.73.216.182


Current Path : /home/cmowner/CoffeeMud/resources/quests/random/
Upload File :
Current File : //home/cmowner/CoffeeMud/resources/quests/random/auto_collect5.xml

<?xml version="1.0"?>
<!-- ----------------------------------------------------------------------------
Copyright 2020-2025 Bo Zimmerman

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--------------------------------------------------------------------------------

See guides/RandomAreas.html for information about documents of this type.

template: auto_collect5
vars: 
    template(quest_template)
    category(whatevs)
    targetskill(ANY or a skill ID)
    targetresource(Any or name of a raw resource)
    targetmaterial(Any or name of a raw material)
    num_targets(num money to collect)
	xp_amount_awarded
	quest_point_awarded(YES,NO)
	reward_items()
	target_min_arealevel(#), target_max_arealevel(#)
	quest_multiple(YES, NO, or PREV)
-->

<QUEST ID="auto_collect5" QUEST_TEMPLATE_ID="auto_collect5">
	<QUEST_ID DEFINE="quest_id">${h:quest_template}_R$[100000000?999999999]</QUEST_ID>
	<QUEST_CRITERIA  SELECT="Pick-1">
		<QUEST_CRITERIA CONDITION="$target_min_arealevel = ''">+SYSOP +LEVELS -&lt;$[$target_level - $level_span] -&gt;$[$target_level + $level_span]</QUEST_CRITERIA>
		<QUEST_CRITERIA CONDITION="$target_min_arealevel != ''">+LEVEL -&lt;$target_min_arealevel -&gt;$target_max_arealevel </QUEST_CRITERIA>
	</QUEST_CRITERIA>
	<FREQUENCY>1</FREQUENCY>
	<DURATION>90 minutes</DURATION>
	<CATEGORY>$quest_category</CATEGORY>
	<NUM_COLLECTABLES>$num_targets</NUM_COLLECTABLES>
	<QUEST_POINT>$quest_point_awarded</QUEST_POINT>
	<EXP>$xp_amount_awarded</EXP>
	<MULTIPLE>$quest_multiple</MULTIPLE>
	<NEXT_QUEST>$next_quest_id</NEXT_QUEST>
	<FACTION>$target_faction</FACTION>
	<NUMFACTION>$[$target_faction_amt / -500]</NUMFACTION>
	<QUEST_NAME SELECT="Pick-1">
		<QUEST_NAME>You need $num_targets ${target_item_name} $reason_verbed</QUEST_NAME>
		<QUEST_NAME>You want $num_targets ${target_item_name} $reason_verbed</QUEST_NAME>
		<QUEST_NAME>You must $reason_verb $num_targets ${target_item_name}</QUEST_NAME>
		<QUEST_NAME>${C:reason_verb} $num_targets ${target_item_name}</QUEST_NAME>
		<QUEST_NAME PICKWEIGHT=99 CONDITION="$deityname!=''">$deityname needs $num_targets ${target_item_name} $reason_verbed</QUEST_NAME>
	</QUEST_NAME>
	<QUEST_INSTRUCTIONSSTRING>${j:1:quest_instructionstring}</QUEST_INSTRUCTIONSSTRING>
	<QUEST_WINSPEECH_TEXT>${j:1:quest_winspeech}</QUEST_WINSPEECH_TEXT>
	<WRONG_COLLECTABLE_SAY>This is not what I asked for.</WRONG_COLLECTABLE_SAY>
	<REWARD_ITEMS>${SELECT: ANY\. FROM $dungeon_treasure_items}</REWARD_ITEMS>

	<STRING load="/resources/quests/random/inc_questcommon.xml" />

	<STRING ID="num_targets" SELECT="any-1" DEFINE="num_targets" MERGE=override>
		<STRING>$[1 + ($target_level*20)]</STRING>
	</STRING>

	<STRING ID="reason_verbed" define="reason_verbed">$verb_donated</STRING>
	<STRING ID="reason_verb" define="reason_verb">$verb_donate</STRING>
	<STRING ID="reason_desc" PREDEFINE="reason=$reason">$reason_desc</STRING>
	<STRING ID="reason" DEFINE="reason" SELECT="Pick-1">
		<STRING>$reason_ilostthem</STRING>
		<STRING>$reason_welosteachother</STRING>
		<STRING>$reason_gencollect</STRING>
		<STRING>$reason_idoforthem</STRING>
		<STRING>$reason_wedotoeachother</STRING>
		<STRING PICKWEIGHT=99 CONDITION="$deityname!=''">$reason_deitydo</STRING>
	</STRING>
	<STRING ID="reason_deitydo" SELECT="All" REQUIRES="deityname=$">
		<STRING define="reason_verbed">$verb_stolen</STRING>
		<STRING define="reason_verb">$verb_steal</STRING>
		<STRING define="quest_winspeech">$quest_generic_winner_speeches</STRING>
		<STRING define="quest_fightspeech">$quest_generic_fight_speeches</STRING>
		<STRING define="reason_short">${c:reason_verb} ${p:target_item_name} for ${c:deityname}.</STRING>
		<STRING define="reason_desc" SELECT="Any-1">
			<STRING>${c:deityname} needs me to have ${p:target_item_name} for some magical experiments.</STRING>
			<STRING>${c:reason_verb} ${p:target_item_name} for ${c:deityname}.</STRING>
			<STRING>${c:deityname} has proclaimed that I need ${p:target_item_name}.</STRING>
			<STRING>Collect ${p:target_item_name} for ${c:deityname}.</STRING>
		</STRING>
	</STRING>

	<STRING ID="reason_short" define="reason_short" SELECT="Any-1">
		<STRING>You need $num_targets ${target_item_name} $reason_verbed!</STRING>
		<STRING>You must get $reason_verb $num_targets ${target_item_name}!</STRING>
		<STRING>Assistance required with some $num_targets ${target_item_name}!</STRING>
		<STRING>${c:reason_verb} $num_targets ${target_item_name} to me!</STRING>
		<STRING>${c:reason_verb} $num_targets ${target_item_name}, quickly!</STRING>
		<STRING>You want $num_targets ${target_item_name} $reason_verbed! </STRING>
	</STRING>

	<STRING ID="quest_instructionstring" SELECT="ALL">
		<STRING ACTION="PREPEND">$reason_desc</STRING>
		<STRING ACTION="APPEND">$reason_short</STRING>
	</STRING>

	<STRING ID="quest_winspeech" PREDEFINE="reason=$reason">$quest_winspeech</STRING>

	<STRING id="quest_generic_winner_speeches" SELECT="Any-1">
		<STRING>${c:reason_verbed! That's all you need!</STRING>
		<STRING>${c:reason_verbed} at last!</STRING>
		<STRING>Congratulations for having $reason_verbed.</STRING>
		<STRING>Congratulations adventurer, you have ${reason_verbed}, and that will be all.</STRING>
	</STRING>

	<STRING id="quest_generic_fight_speeches" SELECT="Any-1">
		<STRING>${c:target_item_name} is mine!</STRING>
		<STRING>You are not getting my $target_item_name!</STRING>
		<STRING>I would rather $hurt_verb you than give $target_item_name to you.</STRING>
	</STRING>

	<STRING ID="reason_partytime" SELECT="All">
		<STRING define="quest_winspeech" SELECT="Any-1" >
			<STRING>Yay! Let the party BEGIN!</STRING>"
			<STRING>TIME TO CELEBRATE!</STRING>"
			<STRING>Let the celebration begin!</STRING>"
			<STRING>We can finally begin the festivities!</STRING>"
		</STRING>
		<STRING define="reason_desc" SELECT="Any-1">
			<STRING>You're throwing a party and you need lots of ${target_item_name}.</STRING>
			<STRING>Today you are celebrating, and ${target_item_name} are your favorite gifts.</STRING>
			<STRING>It's your $noun_anyrelation`s birthday, and you need several ${target_item_name} for your gift.</STRING>
			<STRING>It is officially Celebration Day, and the ceremony requires several ${target_item_name}.</STRING>
		</STRING>
	</STRING>

	<STRING ID="reason_ilostthem" SELECT="All">
		<STRING define="quest_winspeech" SELECT="Any-1">
			<STRING>You did it!</STRING>
			<STRING>You're so relieved!</STRING>
			<STRING>Congratulations for finding it!</STRING>
		</STRING>
		<STRING define="reason_desc" SELECT="Any-1">
			<STRING>You lost all your ${target_item_name} and need more.</STRING>
			<STRING>Your $noun_anyrelation has lost their ${target_item_name}.</STRING>
			<STRING>You seem to have misplaced all your ${target_item_name}.</STRING>
			<STRING>You can't find your $noun_anyrelation`s ${target_item_name}.</STRING>
		</STRING>
	</STRING>
	
	<STRING ID="reason_welosteachother" SELECT="All">
		<STRING define="quest_winspeech" SELECT="Any-1">
			<STRING>You $verb_donated them!</STRING>
			<STRING>You are thanked for your assistance.</STRING>
			<STRING>Congratulations for getting these!</STRING>
		</STRING>
		<STRING define="reason_desc" SELECT="Any-1">
			<STRING>${C:target_item_name} for supplies is important to your experiments..</STRING>
			<STRING>${C:target_item_name} for supplies is important to your $noun_anyrelation`s experiments.</STRING>
			<STRING>You need ${target_item_name} for your $noun_anyrelation`s project.</STRING>
			<STRING>You need ${target_item_name} for your important project.</STRING>
			<STRING>${C:target_item_name} for supplies is key to your work.</STRING>
		</STRING>
	</STRING>
	
	<STRING ID="reason_gencollect" SELECT="All">
		<STRING define="quest_winspeech">$quest_generic_winner_speeches</STRING>
		<STRING define="reason_desc" SELECT="Any-1">
			<STRING>You need  ${target_item_name} $verb_donated.</STRING>
			<STRING>You need ${target_item_name} $verb_donated to you.</STRING>
			<STRING>You arecollecting ${target_item_name}.</STRING>
			<STRING>Your $noun_anyrelation is collecting ${target_item_name}, and we need your assistance.</STRING>
		</STRING>
	</STRING>
	
	<STRING ID="reason_idoforthem" SELECT="All">
		<STRING define="quest_winspeech">$quest_generic_winner_speeches</STRING>
		<STRING define="reason_desc" SELECT="Any-1">
			<STRING>You lack the ${target_item_name} that your $noun_anyrelation requires.</STRING>
			<STRING>You wish to give ${target_item_name} to your $noun_anyrelation.</STRING>
			<STRING>Your $noun_anyrelation requires ${target_item_name}.</STRING>
		</STRING>
	</STRING>

	<STRING ID="reason_wedotoeachother" SELECT="All">
		<STRING define="quest_winspeech">$quest_generic_winner_speeches</STRING>
		<STRING define="reason_desc" SELECT="Any-1">
			<STRING >You need ${target_item_name} for supplies for your magical experiments.</STRING>
			<STRING>${c:reason_verb} ${target_item_name} to yourself.</STRING>
			<STRING>Gather yourself ${target_item_name}.</STRING>
		</STRING>
	</STRING>

	<STRING ID="quest_point_awarded" DEFINE="quest_point_awarded" SELECT="Pick-1">
		<STRING PICKWEIGHT=2>NO</STRING>
		<STRING PICKWEIGHT=1>YES</STRING>
	</STRING>
	
	<STRING ID="xp_amount_awarded" DEFINE="xp_amount_awarded" SELECT="any-1">
		<STRING>$[100 + ($target_level * 3)]</STRING>
	</STRING>
	
	<STRING ID="target_faction" SELECT="any-1" DEFINE="target_faction">
		<STRING></STRING>
	</STRING>

	<STRING ID="target_faction_amt" SELECT="first" DEFINE="target_faction_amt">
		<STRING>0</STRING>
	</STRING>
	
	<STRING ID="target_item_name" define="target_item_name">${SELECT: DENOMINATION_NAME from $target_area}</STRING>

	<STRING ID="target_level" DEFINE="target_level" SELECT="any-1">
		<STRING CONDITION="$target_min_arealevel = ''">${SELECT:MED_LEVEL from $target_area}</STRING>
		<STRING CONDITION="$target_min_arealevel != ''">$[${target_min_arealevel} + (1?(${target_max_arealevel}-${target_min_arealevel}))</STRING>
	</STRING>
	
	<OBJECT ID="target_area" SELECT="Pick-1" DEFINE="target_area">
		<OBJECT pickweight=55555 condition="$targetarea_name != ''">SELECT: ANY\. FROM areas where NAME=$targetarea_name</OBJECT> 
		<OBJECT pickweight=1 condition="$targetarea_name = '' and $target_min_arealevel = ''">SELECT: ANY\. FROM areas</OBJECT>
		<OBJECT pickweight=1 condition="$targetarea_name = '' and $target_min_arealevel != ''">
			SELECT: ANY\. FROM areas WHERE MED_LEVEL &gt;= $target_min_arealevel and MED_LEVEL &lt;= $target_max_arealevel 
		</OBJECT>
	</OBJECT>
	
	<STRING ID="target_level" DEFINE="target_level" SELECT="any-1">
		<STRING CONDITION="$target_min_arealevel = ''">$[1?50]</STRING>
		<STRING CONDITION="$target_min_arealevel != ''">$[${target_min_arealevel} + (1?(${target_max_arealevel}-${target_min_arealevel}))</STRING>
	</STRING>
	
	<STRING ID="level_range" SELECT="any-1" DEFINE="level_range" MERGE=true>
		<STRING>$[$target_level + 6]</STRING>
	</STRING>
</QUEST>