View Single Post
Old 03-18-2005, 11:25 PM   #15 (permalink)
Gator81
Forum Novice
 
Join Date: Jan 2005
Age: 47
Posts: 176
Default

Quote:
Originally Posted by ArteGordon
Another way in which you can give out random rewards is to have multiple entries that could be triggered by the same keyword, in which case it will pick one at random. Like,

Code:
<SpeechEntry>
    <EntryNumber>15</EntryNumber>
    <ID>34</ID>
    <Text>Here is your weapon.</Text>
    <Action>GIVE/weapon1</Action>
    <Keywords>weapon</Keywords>
    <DependsOn>33</DependsOn>
  </SpeechEntry>

<SpeechEntry>
    <EntryNumber>16</EntryNumber>
    <ID>34</ID>
    <Text>Here is your weapon.</Text>
    <Action>GIVE/weapon2</Action>
    <Keywords>weapon</Keywords>
    <DependsOn>33</DependsOn>
  </SpeechEntry>

<SpeechEntry>
    <EntryNumber>17</EntryNumber>
    <ID>34</ID>
    <Text>Here is your weapon.</Text>
    <Action>GIVE/weapon3</Action>
    <Keywords>weapon</Keywords>
    <DependsOn>33</DependsOn>
  </SpeechEntry>
where weapon1, weapon2, and weapon3 were items that you wished to hand out one of at random. Since all of the entries have the same dependencies, one of them would be selected at random.
ok this looks alot easier then the other stuff I was looking at..... but i still have a question that I dont meant to be confused about:
would I make a directory named weapon1 and put the weapons in it? or do i have to rename the weapons to weapon1,weapon2.ect..
Or would i need to expand and give a unique id to each name weapon/armor/jewlery instead of them all being id 33 so I could keep the original name of the item and the dependson would = the one word and since there is multi items it would choose only one.
I dont mean to sound coufusing but I am thinking on the fly.

thanks for the help
Gator81 is offline