Full Version : Another problem whit the Quest
xmlspawner >>Q&A >>Another problem whit the Quest


<< Prev | Next >>

Elassar- 03-17-2006
I have another problem on making my own quest sad.gif
How can i set that the players can't receve 2 copies of the same questholder?

I can't use the NoTrigOnCarried (on the top of [xmledit menu) because the player have to talk again whit the png to receve the reward...

I tried whit GETONCARRIED,Quest Name,questholder,iscompleted=true and the same but iscompleted=false (on 2 differents line) and it looks work... But when i walk away from the npc, and then i come back, it dosn't work any more sad.gif

Its a very strange problem... Maybe there is another way to do it better, can you help me?

I'll be grate to you forever tongue.gif


(ps: sorry for my bad english smile.gif )

ArteGordon- 03-17-2006
post the .npc file and I will take a look at it.

Elassar- 03-18-2006
Here is it smile.gif

CODE
<?xml version="1.0" standalone="yes"?>
<XmlQuestNPC>
 <NPC>
   <Name>Balint</Name>
   <Running>True</Running>
   <ProximityRange>3</ProximityRange>
   <AllowGhost>False</AllowGhost>
   <SpeechPace>10</SpeechPace>
   <ResetTime>0,166666666666667</ResetTime>
   <ConfigFile>quest_base</ConfigFile>
   <SpeechEntries>14</SpeechEntries>
 </NPC>
 <SpeechEntry>
   <EntryNumber>0</EntryNumber>
   <ID>0</ID>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>10</EntryNumber>
   <ID>10</ID>
   <Text>Salve...</Text>
   <DependsOn>-1</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>20</EntryNumber>
   <ID>20</ID>
   <Keywords>salve</Keywords>
   <DependsOn>10</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
   <Gump>GUMP,Balint,4/Mmmh mi sembri una persona in cerca di
avventure... Forse potresti svolgere un compito per me;Di cosa si
tratta?;accept;Non ho tempo;decline;</Gump>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>30</EntryNumber>
   <ID>30</ID>
   <Keywords>accept</Keywords>
   <DependsOn>20</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
   <Gump>GUMP,Balint,4/Molto bene... Devi sapere che *storia da
inventare*. Quindi ti chiedo di portarmi un diamante!!! Credi di Essere in
grado di farlo?;Certamente!;accept2;No grazie;decline2</Gump>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>40</EntryNumber>
   <ID>40</ID>
   <Keywords>decline</Keywords>
   <DependsOn>20</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
   <Gump>GUMP,Balint,4/Beh... Pazienza... Sara' per un'altra volta! A
presto!;A Presto;chiudi</Gump>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>50</EntryNumber>
   <ID>50</ID>
   <Keywords>decline2</Keywords>
   <DependsOn>30</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
   <Gump>GUMP,Balint,4/Beh... Come non detto allora! A presto!;A
Presto!;chiudi</Gump>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>60</EntryNumber>
   <ID>60</ID>
   <Keywords>accept2</Keywords>
   <Action>GIVE/&lt;questholder/name/Il diamante di
Balint/notestring/Balint ti ha chiesto di riportargli indietro un prezioso
diamante./objective1/COLLECT,diamond,1/autoreward/false</Action>
   <DependsOn>30</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>70</EntryNumber>
   <ID>70</ID>
   <Keywords>ricompensa</Keywords>
   <Condition>GETONCARRIED,Il diamante di
Balint,questholder,iscompleted=true</Condition>
   <DependsOn>10</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
   <Gump>GUMP,Balint,4/Oooh! Un meraviglioso diamante!!! Ti ringrazio
infinitamente ed ecco a te la tua ricompensa!;Grazie la
accetto!;accept3;La prenderò dopo;decline3</Gump>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>80</EntryNumber>
   <ID>80</ID>
   <Keywords>accept3</Keywords>
   <Action>GIVE/Gold,200</Action>
   <DependsOn>70</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
   <Gump>GUMP,Balint,4/A presto! E Buona Fortuna amico!;A
Presto;closequest</Gump>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>90</EntryNumber>
   <ID>90</ID>
   <Keywords>decline3</Keywords>
   <DependsOn>70</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
   <Gump>GUMP,Balint,4/Va bene, allora ripassa quando vuoi e avrai la
tua ricompensa!;A Presto!;chiudi</Gump>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>100</EntryNumber>
   <ID>100</ID>
   <Keywords>closequest</Keywords>
   <Action>TAKE,1,1,false,questholder/Il diamante di Balint</Action>
   <DependsOn>80</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>110</EntryNumber>
   <ID>110</ID>
   <Text>Mmmh... non mi sembra che lei abbia completato la
missione!</Text>
   <Keywords>ricompensa</Keywords>
   <Condition>GETONCARRIED,Il diamante di
Balint,questholder,iscompleted=false</Condition>
   <DependsOn>10</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>120</EntryNumber>
   <ID>120</ID>
   <Text>Ti ho già  affidato la missione...</Text>
   <Keywords>salve</Keywords>
   <Condition>GETONCARRIED,Il diamante di
Balint,questholder,iscompleted=false</Condition>
   <DependsOn>10</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
 <SpeechEntry>
   <EntryNumber>130</EntryNumber>
   <ID>130</ID>
   <Text>Bene, hai completato la missione a quanto vedo... Chiedimi
della "ricompensa" e te la darò!</Text>
   <Keywords>salve</Keywords>
   <Condition>GETONCARRIED,Il diamante di
Balint,questholder,iscompleted=true</Condition>
   <DependsOn>10</DependsOn>
   <Pause>1</Pause>
   <PrePause>-1</PrePause>
   <LockConversation>True</LockConversation>
   <AllowNPCTrigger>False</AllowNPCTrigger>
   <SpeechStyle>Regular</SpeechStyle>
   <SpeechHue>-1</SpeechHue>
 </SpeechEntry>
</XmlQuestNPC>

ArteGordon- 03-18-2006
and what happens when you add a Condition test to one of the entries like

QUOTE

  <SpeechEntry>
  <EntryNumber>30</EntryNumber>
  <ID>30</ID>
  <Keywords>accept</Keywords>
  <DependsOn>20</DependsOn>
  <Pause>1</Pause>
  <PrePause>-1</PrePause>
  <LockConversation>True</LockConversation>
  <AllowNPCTrigger>False</AllowNPCTrigger>
  <SpeechStyle>Regular</SpeechStyle>
  <SpeechHue>-1</SpeechHue>
    <Condition>~GETONCARRIED,Il diamante di Balint,questholder,iscompleted=false</Condition>
  <Gump>GUMP,Balint,4/Molto bene... Devi sapere che *storia da
inventare*. Quindi ti chiedo di portarmi un diamante!!! Credi di Essere in
grado di farlo?;Certamente!;accept2;No grazie;decline2</Gump>
</SpeechEntry>


this will only allow the entry to be executed if the quest is either not present or is present but completed

Elassar- 03-18-2006

Mmmh it looks working know whit the "~" Thx! biggrin.gif
How can i let it work for all 2 case (iscompleted=true/false) on the same string?

ArteGordon- 03-18-2006
I'm not sure exactly what you are asking.

Elassar- 03-18-2006
Sorry...
im asking if there is a way to use ~GETONCARRIED,Il diamante di Balint,questholder,iscompleted=false and ~GETONCARRIED,Il diamante di Balint,questholder,iscompleted=true for the same situation and in the same commando string... 'cause i don't want that the player can have the questholder in any mode.

ArteGordon- 03-18-2006
ah. The easier way to check for that is to just check for a property that you know will be true. The only way that it can be false is if it is not carried.

So to check for your questholder NOT being carried, use
~GETONCARRIED,Il diamante di Balint,questholder,visible=true

To check for it being carried, use
GETONCARRIED,Il diamante di Balint,questholder,visible=true

Elassar- 03-20-2006
ok, now all works! Thank you...
Did you think that i have no question for you? Ahahah you'r wrong! biggrin.gif
How can i make that the reward is a random magical item?
i tried to put in the "action" field [COLOR=blue]GIVE/<bag/ADD/<armor,1,3>[/COLOR=blue] but the console say "invalid ADD. No such item : armor,1,3"
i tried whit the [COLOR=blue]GIVE/<bag/ADD,0,5/<armor,1,3>[/COLOR=blue] but i want that the chance to have the magical item is 100%...

Another question, where can i find a list of all loots?

ArteGordon- 03-20-2006
you need to capitalize the ARMOR keyword

If you look in xmlspawner2.txt you can find a list of the available loot keywords along with their descriptions.
I believe that there is also a HowTo entry in the Howto forums on it.

QUOTE

- loot keywords: ARMOR, WEAPON, JEWELRY, JARMOR, JWEAPON, SARMOR, SHIELD, LOOT, LOOTPACK, POTION, SCROLL, NECROSCROLL


QUOTE

- Added the "LOOTPACK,loottype" keyword.  This can be be used to add items to a mob or container using the distro lootpack system.  The loottypes are poor, meager, average, rich, filthyrich, ultrarich, superboss.  If the keyword is used in a triggered spawn, then the luck of the triggering mob will also be factored in when generating the loot (otherwise a default luck of zero is used in the loot calculation). Because of the way in which distro lootpack generation works, lootpacks added to a container will not contain stackable items such as gold.


QUOTE

- added the new LOOT keyword that allows you to invoke arbitrary Loot class methods for generating random loot.  The syntax is "LOOT,methodname".  The method must be one of the public static methods in the Loot class that takes no arguments, and it must return an item. 
For example, to spawn a random statue use the keyword

LOOT,RandomStatue

where RandomStatue() is a defined static Loot class method that returns a random statue.
Other Loot methods that are part of the standard 1.0.0 distribution include, Gems, clothing, Wands, Reagents, Instruments, and other things, so all of the following would be valid

LOOT,RandomGem
LOOT,RandomClothing
LOOT,RandomWand
LOOT,RandomReagent
LOOT,RandomInstrument
LOOT,RandomNecromancyReagent
LOOT,RandomArmorOrShieldOrWeaponOrJewelry
LOOT,RandomGrimmochJournal

You can also define your own Loot methods in Loot.cs to return different types of random item if you like.

For example, if you are using the XmlSockets addon and have made the Loot.cs modification, you could spawn a random augmentation by using

LOOT,RandomAugment

Like the other loot keywords, this can be used to spawn random items or to add them to mobs or containers using the ADD keyword.  For example, to add a random statue to a spawned mob, you could use something like

orc/ADD/LOOT,RandomStatue

and you can set properties on the resulting random item just as you would any other spawned item, like

LOOT,RandomReagent/amount/20

to spawn a random reagent and set the amount to 20

Elassar- 03-20-2006
QUOTE (ArteGordon @ March 20, 2006 05:06 pm)
you need to capitalize the ARMOR keyword


Thank you, and sorry 'cause i am a very noob sad.gif sad.gif sad.gif

You are greath! biggrin.gif

ArteGordon- 03-20-2006
no problem. And here is that HowTo post on the subject
http://xmlspawner.15.forumer.com/index.php?showtopic=116

Elassar- 03-25-2006
Im back again! biggrin.gif
The question is:
"What's the difference between the Quest Holder and the Quest Note?"

ArteGordon- 03-25-2006
the questholder will allow you to inspect the quest rewards if you have it set up for autoreward, the questnote will not. That is because the questholder is a container and so can actually hold the rewards, while the questnote is a not a container. Otherwise they work the same other than the appearance.