| Current Path : /home/cmowner/CoffeeMud/resources/quests/random/ |
| Current File : //home/cmowner/CoffeeMud/resources/quests/random/normal_travel3.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: normal_travel3
settable vars:
template(normal_travel3)
category(whatevs)
area_name(area name)
source_name(mob name)
targetarea_name(area name)
targetname(container name)
itemname(name of an item)
multiarea(yes or NO)
xp_amount_awarded
gold_amount_awarded
quest_point_awarded(YES,NO)
reward_items()
target_min_arealevel(#), target_max_arealevel(#)
quest_multiple(YES, NO, or PREV)
-->
<QUEST ID="normal_travel3" QUEST_TEMPLATE_ID="normal_travel3">
<QUEST_ID DEFINE="quest_id">${_:source_area_name}_${_:source_name}_${h:quest_template}_R$[100000000?999999999]</QUEST_ID>
<QUEST_CRITERIA>+SYSOP +LEVELS -<$[$target_level - $level_span] ->$[$target_level + $level_span]</QUEST_CRITERIA>
<CATEGORY>$quest_category</CATEGORY>
<ANNOUNCER_AREA>"$source_area_name"</ANNOUNCER_AREA>
<ANNOUNCER_ROOM>"$source_room_id"</ANNOUNCER_ROOM>
<ANNOUNCER_NAME>"$source_name"</ANNOUNCER_NAME>
<DESTINATION_AREA>"$target_area_name"</DESTINATION_AREA>
<DESTINATION_ROOM>"$target_room_id"</DESTINATION_ROOM>
<DESTINATION_MSG>$target_required_msg</DESTINATION_MSG>
<DESTINATION_FORCE>$quest_skill_force</DESTINATION_FORCE>
<DESTINATION_SKILL_ID>$quest_skill_id</DESTINATION_SKILL_ID>
<DESTINATION_SKILL_XML>$quest_skill_xml</DESTINATION_SKILL_XML>
<QUEST_POINT>$quest_point_awarded</QUEST_POINT>
<GOLD>$gold_amount_awarded</GOLD>
<EXP>$xp_amount_awarded</EXP>
<MULTIPLE>$quest_multiple</MULTIPLE>
<NEXT_QUEST>$next_quest_id</NEXT_QUEST>
<FACTION>$source_faction</FACTION>
<NUMFACTION>$[$source_faction_amt / 500]</NUMFACTION>
<QUEST_NAME SELECT="Pick-1">
<QUEST_NAME>${C:source_name} needs you to $reason_verb at $target_name in ${C:target_area_name}</QUEST_NAME>
<QUEST_NAME>${C:source_name} wants you to $reason_verb at $target_name in ${C:target_area_name}</QUEST_NAME>
<QUEST_NAME>${C:source_name} asks you to $reason_verb at $target_name in ${C:target_area_name}</QUEST_NAME>
<QUEST_NAME>Do ${reason_verb} at $target_name in ${C:target_area_name} for ${C:source_name}</QUEST_NAME>
<QUEST_NAME PICKWEIGHT=99 CONDITION="$deityname!=''">${C:source_name} needs you to $reason_verb at $target_name in ${C:target_area_name} for $deityname</QUEST_NAME>
</QUEST_NAME>
<QUEST_NOTIFYSSTRING>${j:1:quest_notifystring}</QUEST_NOTIFYSSTRING>
<QUEST_INSTRUCTIONSSTRING>${j:1:quest_instructionstring}</QUEST_INSTRUCTIONSSTRING>
<QUEST_WINSPEECH_TEXT>${j:1:quest_winspeech}</QUEST_WINSPEECH_TEXT>
<TRAVEL_RESPONSE_TYPE>MPECHOAT $$n</TRAVEL_RESPONSE_TYPE>
<TRAVEL_RESPONSE>${j:1:quest_traveled}</TRAVEL_RESPONSE>
<REWARD_ITEMS>${SELECT: ANY\. FROM $dungeon_treasure_items}</REWARD_ITEMS>
<STRING load="/resources/quests/random/inc_questcommon.xml" />
<STRING id="quest_winspeech" SELECT="Any-1">
<STRING>You have $reason_verbed!</STRING>
<STRING>${c:reason_verbed} at last!</STRING>
<STRING>Congratulations!</STRING>
<STRING>You have completed the $reason_verb task, that will be all.</STRING>
</STRING>
<STRING ID="quest_notifystring" define="quest_notifystring" SELECT="ALL">
<STRING ACTION="PREPEND">$reason_short $quest_notifyaddendum</STRING>
</STRING>
<STRING ID="target_required_msg">You successfully complete your $reason_verbing.</STRING>
<STRING ID="quest_skill_force">YES</STRING>
<STRING ID="quest_skill_id">TempSkill_${c:reason_verbing}</STRING>
<STRING ID="quest_skill_xml">
<ABILITY ID="" TYPE="GenGatheringSkill" >
<CLASS>TempSkill_${c:reason_verbing}</CLASS>
<NAME>${c:reason_verbing}</NAME>
<HELP></HELP>
<TRIGSTR>${u:reason_verb}</TRIGSTR>
<MATLIST></MATLIST>
<VERB>${reason_verbing}</VERB>
<SOUND></SOUND>
<CANSIT>true</CANSIT>
<CANBUNDLE>false</CANBUNDLE>
<ROOMMASK>-LOCATION +ROOMID($target_room_id)</ROOMMASK>
<PLAYMASK></PLAYMASK>
<YIELDFORMULA>(1?5)+3</YIELDFORMULA>
<MSGSTART><S-NAME> start(s) $reason_verbing.</MSGSTART>
<MSGFOUND><S-NAME> make(s) a discovery!</MSGFOUND>
<MSGNOTFOUND>You find no useful information here.</MSGNOTFOUND>
<MSGCOMPLETE><S-NAME> successfully complete(s) <S-HIS-HER> $reason_verbing.</MSGCOMPLETE>
<ITEMXML></ITEMXML>
<ISCOSMETIC>true</ISCOSMETIC>
<MINDUR>12</MINDUR>
<BASEDUR>60</BASEDUR>
<FINDTICK>6</FINDTICK>
</ABILITY>
</STRING>
<STRING ID="quest_notifyaddendum" SELECT="Pick-1">
<STRING PICKWEIGHT=1>Are you game?</STRING>
<STRING PICKWEIGHT=1>Are you ready?</STRING>
<STRING PICKWEIGHT=1>Are you up to it?</STRING>
<STRING PICKWEIGHT=1>Can you handle it?</STRING>
<STRING PICKWEIGHT=1>Who's ready?</STRING>
<STRING PICKWEIGHT=12></STRING>
</STRING>
<STRING ID="reason_short" define="reason_short" SELECT="Any-1">
<STRING>I need you at $target_name for some important $reason_verb!</STRING>
<STRING>${c:verb_travel} to ${target_name} and engage in $reason_verbing there!</STRING>
<STRING>${c:verb_travel} to ${target_name} for $reason_verbing !</STRING>
<STRING>I want you at ${target_name} for $reason_verbing!</STRING>
</STRING>
<STRING ID="quest_instructionstring" SELECT="ALL">
<STRING ACTION="PREPEND">$reason_desc</STRING>
<STRING ACTION="APPEND">$reason_short</STRING>
</STRING>
<STRING ID="quest_traveled" PREDEFINE="reason=$reason">
<STRING condition="$quest_traveled_msg != ''">$quest_traveled_msg</STRING>
<STRING condition="$quest_traveled_msg = ''">${c:reason_verb} complete.</STRING>
</STRING>
<STRING ID="reason_verbing" PREDEFINE="reason_verb=$reason_verb" DEFINE="reason_verbing">$verb_researching</STRING>
<STRING ID="reason_verbed" PREDEFINE="reason_verb=$reason_verb" DEFINE="reason_verbed">$verb_researched</STRING>
<STRING ID="reason_verb" DEFINE="reason_verb">$verb_research</STRING>
<STRING ID="reason_desc" PREDEFINE="reason=$reason">$reason_desc</STRING>
<STRING ID="reason" DEFINE="reason">
<STRING define="reason_desc" SELECT="Any-1">
<STRING CONDITION="$deityname=''">You have some $reason_verbing to get done.</STRING>
<STRING CONDITION="$deityname!=''">You have some $reason_verbing to get done for ${c:deityname}.</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="gold_amount_awarded" DEFINE="gold_amount_awarded" SELECT="any-1">
<STRING>$[$target_level*2]</STRING>
</STRING>
<STRING ID="xp_amount_awarded" DEFINE="xp_amount_awarded" SELECT="any-1">
<STRING>$[100 + ($target_level * 3)]</STRING>
</STRING>
<OBJECT ID="source_area" SELECT="Pick-1" DEFINE="source_area">
<OBJECT pickweight=99999 condition="'${SELECT: name FROM area}' != ''">SELECT: . FROM area</OBJECT>
<OBJECT pickweight=55555 condition="$area_name != ''" and '${SELECT: name FROM area}' = ''>SELECT: ANY\. FROM areas where NAME=$area_name</OBJECT>
<OBJECT pickweight=1 condition="$area_name = '' and '${SELECT: name FROM area}' = '' and $multiarea = 'YES'">
SELECT: ANY\. FROM areas WHERE (SELECT: count\. from $mql_viable_questgivers) > 0
</OBJECT>
<OBJECT pickweight=1 condition="$area_name = '' and $target_min_arealevel = '' and '${SELECT: name FROM area}' = '' and $multiarea != 'YES'">
SELECT: ANY\. FROM areas WHERE (SELECT: count\. from $mql_viable_questgivers) > 0
AND (SELECT: count\. from AREA\NPROOMS WHERE exits\count > 0 and display\count = 1 and
( (shops\count > 0
and ((SELECT: COUNT\. from room\shops WHERE CLASS="GenLibrarian") > 0
or (SELECT: COUNT\. from room\shops\shopitems WHERE CLASS="GenBook") > 0))
or "library" in display or "library" in description or "bookshelf" in description or "bookcase" in description or "books" in description)) > 0
</OBJECT>
<OBJECT pickweight=1 condition="$area_name = '' and $target_min_arealevel != '' and '${SELECT: name FROM area}' = '' and $multiarea != 'YES'">
SELECT: ANY\. FROM areas WHERE MED_LEVEL >= $target_min_arealevel and MED_LEVEL <= $target_max_arealevel
and (SELECT: count\. from $mql_viable_questgivers) > 0
AND (SELECT: count\. from AREA\NPROOMS WHERE exits\count > 0 and display\count = 1 and
( (shops\count > 0
and ((SELECT: COUNT\. from room\shops WHERE CLASS="GenLibrarian") > 0
or (SELECT: COUNT\. from room\shops\shopitems WHERE CLASS="GenBook") > 0))
or "library" in display or "library" in description or "bookshelf" in description or "bookcase" in description or "books" in description)) > 0
</OBJECT>
</OBJECT>
<OBJECT ID="source_room" DEFINE="source_room">SELECT: . FROM $source\room</OBJECT>
<OBJECT ID="source" SELECT="Pick-1" DEFINE="source">
<OBJECT PICKWEIGHT=99999 CONDITION="'${SELECT: name FROM mob}' != ''">SELECT: . FROM mob</OBJECT>
<OBJECT pickweight=55555 condition="$sourcename != ''" and '${SELECT: name FROM mob}' = ''>SELECT: . FROM $source_area\npcs WHERE name = $sourcename</OBJECT>
<OBJECT PICKWEIGHT=1 CONDITION="$sourcename = '' and '${SELECT: name FROM mob}' = ''" insert="$mql_viable_questgiver" />
</OBJECT>
<STRING ID="source_area_name" SELECT="any-1" DEFINE="source_area_name">
<STRING>${SELECT:name FROM $source_area}</STRING>
</STRING>
<STRING ID="target_level" DEFINE="target_level" SELECT="any-1">
<STRING>${SELECT:MED_LEVEL from $target_area}</STRING>
</STRING>
<STRING ID="level_range" SELECT="any-1" DEFINE="level_range" MERGE=true>
<STRING>$target_level</STRING>
</STRING>
<STRING ID="source_room_id" SELECT="any-1" DEFINE="source_room_id">
<STRING>${SELECT:roomid from $source_room}</STRING>
</STRING>
<STRING ID="source_name" SELECT="any-1" DEFINE="source_name">
<STRING>${SELECT:name from $source}</STRING>
</STRING>
<STRING ID="source_class" SELECT="any-1" DEFINE="source_class">
<STRING>${SELECT:class from $source}</STRING>
</STRING>
<STRING ID="source_faction" SELECT="any-1" DEFINE="source_faction">
<STRING>${SELECT:factionid from $source}</STRING>
</STRING>
<STRING ID="source_faction_amt" SELECT="first" DEFINE="source_faction_amt">
<STRING CONDITION="$source_faction!=''">${SELECT:factionamt from $source}</STRING>
<STRING>0</STRING>
</STRING>
<STRING ID="source_align" SELECT="any-1" DEFINE="source_align">
<STRING>${SELECT:alignment from $source}</STRING>
</STRING>
<OBJECT ID="target" DEFINE="target">SELECT: FIRST\. from $target_room</OBJECT>
<STRING ID="target_name" SELECT="any-1" DEFINE="target_name">${SELECT:display from $target}</STRING>
<STRING ID="multiarea" define="multiarea">NO</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=100 condition="$targetarea_name = '' and $multiarea != 'YES'">SELECT: any\. from $source_area</OBJECT>
<OBJECT pickweight=1 condition="$targetarea_name = '' and $multiarea = 'YES'">
SELECT: any\. from $target_areas_guess
</OBJECT>
</OBJECT>
<OBJECT ID="target_areas_guess" define="target_areas_guess" SELECT="Pick-1">
<OBJECT pickweight=1 condition="$target_min_arealevel = ''">
SELECT: . FROM areas WHERE (SELECT: count\. from AREA\NPROOMS WHERE exits\count > 0 and display\count = 1 and ((shops\count > 0 and ((SELECT: COUNT\. from room\shops WHERE CLASS="GenLibrarian") > 0 or (SELECT: COUNT\. from room\shops\shopitems WHERE CLASS="GenBook") > 0)) or "library" in display or "library" in description or "bookshelf" in description or "bookcase" in description or "books" in description) > 0
</OBJECT>
<OBJECT pickweight=1 condition="$target_min_arealevel != ''">
SELECT: . FROM areas WHERE MED_LEVEL >= $target_min_arealevel and MED_LEVEL <= $target_max_arealevel
and (SELECT: count\. from AREA\NPROOMS WHERE exits\count > 0 and display\count = 1 and ((shops\count > 0 and ((SELECT: COUNT\. from room\shops WHERE CLASS="GenLibrarian") > 0 or (SELECT: COUNT\. from room\shops\shopitems WHERE CLASS="GenBook") > 0)) or "library" in display or "library" in description or "bookshelf" in description or "bookcase" in description or "books" in description) > 0
</OBJECT>
</OBJECT>
<STRING ID="target_area_name" SELECT="any-1" DEFINE="target_area_name">
<STRING>${SELECT:name from $target_area}</STRING>
</STRING>
<OBJECT ID="target_rooms" define="target_rooms">
SELECT: . FROM $target_AREA\NPROOMS where exits\count > 0 and display\count = 1 and ((shops\count > 0 and ((SELECT: COUNT\. from room\shops WHERE CLASS="GenLibrarian") > 0 or (SELECT: COUNT\. from room\shops\shopitems WHERE CLASS="GenBook") > 0)) or "library" in display or "library" in description or "bookshelf" in description or "bookcase" in description or "books" in description
</OBJECT>
<OBJECT ID="target_room" DEFINE="target_room">SELECT: any\. FROM $target_rooms</OBJECT>
<STRING ID="target_room_id" DEFINE="target_room_id">${SELECT: roomid from $target_room}</STRING>
</QUEST>