View Single Post
Old 03-18-2005, 02:07 PM   #10 (permalink)
Gator81
Forum Novice
 
Join Date: Jan 2005
Age: 47
Posts: 176
Default the questmaster

ArteGordon, since this is your work you may be able to help me here. In your questmaster.npc I would like to know if this is possible or if I would need to look into doing it in another way.

Code:
<?xml version="1.0" standalone="yes"?>

<XmlQuestNPC>

----------------------------
This sets up the NPC named QuestMaster
Banter is triggered by a player coming within 3 tiles.
The conversation will automatically reset after 12 seconds of idle time.

Speech triggering will be disabled if the GatorQuest quest attachment 
is found that lets us know whether the person has already completed this quest.
----------------------------
  <NPC>
    <Name>QuestMaster</Name>
    <Running>True</Running>
    <ProximityRange>3</ProximityRange>
    <NoTriggerOnCarried>ATTACHMENT,GatorQuest,XmlQuestAttachment</NoTriggerOnCarried>
    <AllowGhost>False</AllowGhost>
    <ResetTime>0.20</ResetTime>
    <ConfigFile>questmaster</ConfigFile>
  </NPC>

----------------------------
This is just the default starting point when the conversation resets.  It is just a placeholder.  All of the real conversation 
branches from the banter
----------------------------
<SpeechEntry>
<EntryNumber>0</EntryNumber>
    <ID>0</ID>
    <DependsOn>9999</DependsOn>
  </SpeechEntry>

----------------------------
Here is the banter section
----------------------------
<SpeechEntry>
    <EntryNumber>1</EntryNumber>
    <ID>1</ID>
    <Text>Well done hero. You have completed your quest, do you seek a reward?</Text>
    <DependsOn>-1</DependsOn>
  </SpeechEntry>

----------------------------
Reach this point if the quest has not already been completed
----------------------------
<SpeechEntry>
    <EntryNumber>5</EntryNumber>
    <ID>3</ID>
    <Text>You are worthy. Name that which you seek.</Text>
<Keywords>yes</Keywords>
    <DependsOn>1</DependsOn>
  </SpeechEntry>


------------------
offer the rewards
------------------
<SpeechEntry>
    <EntryNumber>10</EntryNumber>
    <ID>33</ID>
    <Text>Your choices are: Armor, Weapon, Jewelry.</Text>
    <DependsOn>3</DependsOn>
    <Pause>2</Pause>
  </SpeechEntry>

-----------------
give the rewards based upon what they say

In this section I was curious if another sub script could be used to select the
different weapons that I would want randomally picked.
example:
questitems
 weapons - a sword
                   a mace - ect...(weapons that I want to choose)
 armor      - chain
                - leather - ect..( armor that i want to choose)
 Jewlery  - ring - ect.. (same thing)
now I could have 10-15 items for each one if i wanted and I could also 
set different ones for different levels of the quest.
easy quest            - rare items
hard quest            - elite items
almost impossible - godly items-----------------
<SpeechEntry>
    <EntryNumber>15</EntryNumber>
    <ID>34</ID>
    <Text>Here is your weapon.</Text>
    <Action>GIVE/WEAPON,4,5</Action>
    <Keywords>weapon</Keywords>
    <DependsOn>33</DependsOn>
  </SpeechEntry>
<SpeechEntry>
    <EntryNumber>16</EntryNumber>
    <ID>34</ID>
    <Text>Here is your armor.</Text>
    <Action>GIVE/ARMOR,4,5</Action>
    <Keywords>armor</Keywords>
    <DependsOn>33</DependsOn>
  </SpeechEntry>
<SpeechEntry>
    <EntryNumber>17</EntryNumber>
    <ID>34</ID>
    <Text>Here is your jewelry.</Text>
    <Action>GIVE/JEWELRY,4,5</Action>
    <Keywords>jewelry</Keywords>
    <DependsOn>33</DependsOn>
  </SpeechEntry>

--------------------
and throw in a little bonus
--------------------
<SpeechEntry>
    <EntryNumber>30</EntryNumber>
    <ID>35</ID>
    <Text>and something to spend wisely.</Text>
    <Action>GIVE/bankcheck,10000</Action>
    <DependsOn>34</DependsOn>
  </SpeechEntry>

------------------------
After giving the reward, add the quest attachment that will expire after 10 hours (600 minutes)
------------------------
<SpeechEntry>
    <EntryNumber>40</EntryNumber>
    <ID>50</ID>
    <Text>Perhaps we will meet when you are again worthy.</Text>
    <Action>SETONTRIGMOB/ATTACH/XmlQuestAttachment,GatorQuest,600</Action>
    <DependsOn>35</DependsOn>
  </SpeechEntry>



</XmlQuestNPC>
in the code is where I want to do something, and you have the talent of helping
direct me in the right direction if it is possible.


thanks
Gator81 is offline