Quote:
|
Originally Posted by ArteGordon
weapon1 is just an item class name, like longsword, or axe, or katana.
You would have to have a script that defined an item class named weapon1.
This would have been clearer perhaps.
Code:
<SpeechEntry>
<EntryNumber>15</EntryNumber>
<ID>34</ID>
<Text>Here is your weapon.</Text>
<Action>GIVE/longsword</Action>
<Keywords>weapon</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>16</EntryNumber>
<ID>34</ID>
<Text>Here is your weapon.</Text>
<Action>GIVE/mace</Action>
<Keywords>weapon</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>17</EntryNumber>
<ID>34</ID>
<Text>Here is your weapon.</Text>
<Action>GIVE/katana</Action>
<Keywords>weapon</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
sorry, I'm not really following all of that. The DependsOn key refers to the ID number of another speech entry. It has to be a number, not a word.
It determines the order in which speech entries will be processed. So if DependsOn for an entry is 33, then that entry wont be processed until the entry with ID 33 has been completed.
In the present example the entry with ID 33 looks like this
Code:
<SpeechEntry>
<EntryNumber>10</EntryNumber>
<ID>33</ID>
<Text>Your choices are: Armor, Weapon, Jewelry.</Text>
<DependsOn>3</DependsOn>
<Pause>2</Pause>
</SpeechEntry>
so the entries that give out weapons will not be processed until this one finishes.
Since they all depend on the same entry (33), and they are triggered by the same keywords (weapon), one of them will be randomly selected.
|
I dont know why i didnt see it earlier, when you explained it this last time the one think that I didnt know was how I was going to keep each catagory seperate, i thought the speach would have to be seperated to point to each word seperatly. but now i see the line <keywords> and I saw the light...
thanks again for being patient with me.
EDIT:
this is what I have done so far, its using most of the items in the quest reward stone. I have tested and it seems to be working, but when I went back in to make some spelling changes and then tested again it only gave one time again, so i can only think i may of missed something.
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
-----------------
//weapons
<SpeechEntry>
<EntryNumber>15</EntryNumber>
<ID>34</ID>
<Text>Here is your weapon.</Text>
<Action>GIVE/BladeofBlood</Action>
<Keywords>weapon</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>16</EntryNumber>
<ID>34</ID>
<Text>Here is your weapon.</Text>
<Action>GIVE/BladeOfDeath</Action>
<Keywords>weapon</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>19</EntryNumber>
<ID>34</ID>
<Text>Here is your weapon.</Text>
<Action>GIVE/BowOfTheDarkElf</Action>
<Keywords>weapon</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>20</EntryNumber>
<ID>34</ID>
<Text>Here is your weapon.</Text>
<Action>GIVE/DoomKiss</Action>
<Keywords>weapon</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>21</EntryNumber>
<ID>34</ID>
<Text>Here is your weapon.</Text>
<Action>GIVE/SlayoroftheAbyss</Action>
<Keywords>weapon</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
//Armor
<SpeechEntry>
<EntryNumber>30</EntryNumber>
<ID>34</ID>
<Text>Here is your armor.</Text>
<Action>GIVE/GauntletsOfBeserker</Action>
<Keywords>armor</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>31</EntryNumber>
<ID>34</ID>
<Text>Here is your armor.</Text>
<Action>GIVE/HelmetofBlood</Action>
<Keywords>armor</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>32</EntryNumber>
<ID>34</ID>
<Text>Here is your armor.</Text>
<Action>GIVE/MageBracers</Action>
<Keywords>armor</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>33</EntryNumber>
<ID>34</ID>
<Text>Here is your armor.</Text>
<Action>GIVE/LeggingsOfSpeed</Action>
<Keywords>armor</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>34</EntryNumber>
<ID>34</ID>
<Text>Here is your armor.</Text>
<Action>GIVE/LeggingsOfTheMagi</Action>
<Keywords>armor</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>35</EntryNumber>
<ID>34</ID>
<Text>Here is your armor.</Text>
<Action>GIVE/OrnateArmGuards</Action>
<Keywords>armor</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>36</EntryNumber>
<ID>34</ID>
<Text>Here is your armor.</Text>
<Action>GIVE/TunicOfThorns</Action>
<Keywords>armor</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>37</EntryNumber>
<ID>34</ID>
<Text>Here is your armor.</Text>
<Action>GIVE/TunicofBlood</Action>
<Keywords>armor</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>38</EntryNumber>
<ID>34</ID>
<Text>Here is your armor.</Text>
<Action>GIVE/TunicOfChance</Action>
<Keywords>armor</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>39</EntryNumber>
<ID>34</ID>
<Text>Here is your armor.</Text>
<Action>GIVE/VoiceDead</Action>
<Keywords>armor</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
//Jewelry
<SpeechEntry>
<EntryNumber>50</EntryNumber>
<ID>34</ID>
<Text>Here is your jewelry.</Text>
<Action>GIVE/BraceOfChance</Action>
<Keywords>jewelry</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>51</EntryNumber>
<ID>34</ID>
<Text>Here is your jewelry.</Text>
<Action>GIVE/Fightersbracelet</Action>
<Keywords>jewelry</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>52</EntryNumber>
<ID>34</ID>
<Text>Here is your jewelry.</Text>
<Action>GIVE/RingOfTheMagi</Action>
<Keywords>jewelry</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>53</EntryNumber>
<ID>34</ID>
<Text>Here is your jewelry.</Text>
<Action>GIVE/RingOfTheRanger</Action>
<Keywords>jewelry</Keywords>
<DependsOn>33</DependsOn>
</SpeechEntry>
--------------------
and throw in a little bonus
--------------------
<SpeechEntry>
<EntryNumber>60</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>70</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>
thanks for checking it out..