Full Version : Pathetic n00b... sigh
xmlspawner >>Q&A >>Pathetic n00b... sigh
<< Prev | Next >>
dagormanu- 04-26-2006
I've spent two days trying to figure this thing out. We've used XMLSpawner to populate our shard for years. I am VERY familiar with regular spawning, but I can't make quests work to save my life.
I'm starting with the simplest thing I can think of and still no luck.
If I'm carrying a hued, named dagger, begin the conversation...

CODE
<?xml version="1.0" standalone="yes"?> <XmlQuestNPC> <NPC> <Name>Dude the Great</Name> <Running>True</Running>
<ProximityRange>3</ProximityRange>
<TriggerOnCarried>dagger/hue/1102/name/blackie</TriggerOnCarried>
<AllowGhost>False</AllowGhost>
<SpeechPace>10</SpeechPace>
<ResetTime>0.5</ResetTime>
<ConfigFile>TRINT2</ConfigFile>
<SpeechEntries>3</SpeechEntries>
</NPC>
<SpeechEntry>
<EntryNumber>0</EntryNumber>
<ID>0</ID>
<Text>Hey. What's that?</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>10</EntryNumber>
<ID>10</ID>
<Text>Can I see it?</Text>
<Keywords>poop,knife</Keywords>
<DependsOn>0</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>
<Text>Thanks!</Text>
<Keywords>sure,yes</Keywords>
<Action>TAKE/&lt;dagger/hue/1102&gt;</Action>
<DependsOn>10</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
</SpeechEntry>
</XmlQuestNPC>

I spawn the guy from the config file. No problem.
He says the first line, whether I have the dagger or not. And he won't respond to the key words to continue the conversation.
GAH!
The reason I'm going through this is that I am running an evert in which players find black scrolls. If they have the scroll, I want to trigger a quest in which they have to collect ten of them to receive a special item and some important news.
I know this is rediculously simple, but I just can't get my brain around it. Any help would be HUGELY appreciated.
dagormanu- 04-26-2006
Okay. I just found the dependsOn = -2 thing. I changed that. Now it's still acting funny. If I say "hi" it triggers the first line. ?! I am so confused.
ArteGordon- 04-26-2006
the problem is just the syntax of the TriggerOnCarried string that you are using
dagger/hue/1102/name/blackie
that is what you would use to set those properties in a spawn entry, but it is not the syntax used to test for them.
The TriggerOnCarried/NoTriggerOnCarried strings have this syntax
name[,type][,EQUIPPED][,objective,objective,...]
so to test for dagger named "blackie" you would use a string like
blackie,dagger
You cannot currently add a property test to the TriggerOnCarried/NoTriggerOnCarried string such as requiring the named dagger to also have the hue 1102.
If you needed to make that kind of additional test, what you would do would be to set the Condition field of your starting dialog entry to something like
GETONCARRIED,blackie,dagger,hue=1102
which would test for the hue property on that carried dagger and only allow execution of that entry if it had the value of 1102.
dagormanu- 04-26-2006
Beauty! That got me started. If I have any more trouble I'll let you know. (Currently it's not taking the dagger, but I'll try to figure that out on my own.)
ArteGordon- 04-26-2006
hint, take a look at the syntax of the TAKE keyword
TAKE[,prob[,quantity[,true,[typename]]]]/itemname
dagormanu- 04-26-2006
It's going pretty well. But I still have some issues. First, how do I make sure that I successfully took the item? When they accept the quest, I take the item and give a questholder. But if they have somehow squirrelled away the item, I don't want to give them the quest.
The item is a spoon made to look like a scroll, hued 1102, and named Illegible Message. (Spoon so they can't do anything with it like scribe or cast or even eat it. Smart eh?)
On accept of the quest gump...

CODE
TAKE,1,1,true,spoon/Illegible Message

...works fine. Then the next entry I tried...

CODE
~GETONTAKEN,hue=1102

Then say something rude. Another entry...

CODE
GETONTAKEN,hue=1102

Then give the questholder. Both of these depend on the TAKE entry. With this condition in place, I do get the questholder if I have the item, but I don't get the rude message if I drop the item before accepting. (I pulled this from the foolsgold.npc)
Now, separate issue. If I get the quest holder, I'm having a problem with the order of the arguments (I think).

CODE
TAKEN/DELETE; GIVE/<questholder/objective1/COLLECTNAMED,Illegible Message,spoon,9,hue=1102>

Which follows the syntax COLLECTNAMED,itemname[,itemtype][,count][,proptest] considering I want them to find 9 more of the same item.
But my questholder gump says, "Collect spoon 9(s) named spoon (Illegible Message left)
:T Not exactly what I was hoping for.
Thanks for your quick responses!! And thanks SO MUCH for XMLSpawner!!!
dagormanu- 04-26-2006

QUOTE (dagormanu @ April 27, 2006 02:52 am)
But my questholder gump says, "Collect spoon 9(s) named spoon (Illegible Message left)

I got it to work... kind of ... using GIVENAMED instead of COLLECTNAMED (although I'd prefer to use collect). However, I just figure dout that both of these (and all of the different options I seem to have) are going to say "9 spoon(s)". So much for my clever idea. Is there a way I can collect these things without giving away the fact that they are not really scrolls?
ArteGordon- 04-27-2006

QUOTE (dagormanu @ April 26, 2006 10:08 pm)

QUOTE (dagormanu @ April 27, 2006 02:52 am)
But my questholder gump says, "Collect spoon 9(s) named spoon (Illegible Message left)

I got it to work... kind of ... using GIVENAMED instead of COLLECTNAMED (although I'd prefer to use collect). However, I just figure dout that both of these (and all of the different options I seem to have) are going to say "9 spoon(s)". So much for my clever idea. Is there a way I can collect these things without giving away the fact that they are not really scrolls?
you can set description strings for each objective to say whatever you want instead of that default message, like
GIVE/<questholder/objective1/COLLECTNAMED,Illegible Message,spoon,9,hue=1102/description1/Collect the illegible scrolls>
ArteGordon- 04-27-2006
for your condition tests

QUOTE
~GETONTAKEN,hue=1102

will return true whenever the taken item either does not have the hue 1102 or does not exist (since then it obviously doesnt have that property value).

QUOTE
GETONTAKEN,hue=1102

that will be true only when the item exists and has the hue value of 1102.
I'm not exactly sure what your problem is, but it sounds like you just want it to withhold giving out the quest if the item was not successfully taken. If so, then just use your
GETONTAKEN,hue=1102
Condition test, for that dialog entry.
(edit)
ok, I think I understand your issue now. You need to make sure that you delete any previously taken item before testing with the GETONTAKEN keyword since the npc will hang onto those things unless you explicitly delete them.
This is the action that does that
TAKEN/DELETE
Currently you are doing this when you give out the questholder. You want to do it earlier.
You could even put it in the same Action entry that you use to take the item before the use of the TAKE keyword. Like
TAKEN/DELETE; TAKE,1,1,true,spoon/Illegible Message
that will first clear any previous taken item, and then try to take the new one.
dagormanu- 04-27-2006
Awesome. Thanks!
Now, I'm down to wrapping up the quest. I have added a second XMLSpawner object right next to the first. I have the following entries:

CODE
TAKE/Strange Scrolls/ GIVE/myspecialitemobject GUMP,Guy takes the scrolls,0/Some text here to explain the quest and what it means.

And the following properties set:

CODE
MaxDelay = 0:01 MinDelay = 0:01 ProximityRange = 5 SpawnOnTrigger = True TriggerAccessLevel = Administrator (just for testing)
TriggerOnCarried = Strange Scrolls,1

I always seems to take the completed questholder (And tells me I received a quest point). Sometimes I get the special item, sometimes not. I only got the gump once and can't seem to get it back.
ArteGordon- 04-27-2006
that is probably because you have all of these with the default subgroup 0 assignement. With subgroup 0, single entries are randomly selected for spawning on each spawner tick.
TAKE/Strange Scrolls/
GIVE/myspecialitemobject
GUMP,Guy takes the scrolls,0/Some text here to explain the quest and what it means.
What you actually want is for all of them to be spawned together, so put them all into the same subgroup.
(edit)
oh, and you also dont need to set the min/maxdelay to be so small
MaxDelay = 0:01
MinDelay = 0:01
since you have SpawnOnTrigger set to true which will immediately spawn on triggering regardless of the min/maxdelay settings.
It doesnt really matter, I just wanted to point out that you dont need to do it.
dagormanu- 04-27-2006
It's perfect!! (Well, mostly.) I've added the quest and just in time too. The players were about to riot. It was my fault for starting the event before I had it really ready and tested.
Thanks, Arte. You so utterly rock. (I'll post my xml and npc files as soon as I get them off of the server.)
dagormanu- 05-01-2006
xml...

CODE
<Spawns> <Points> <Name>EdvardSpawner</Name> <UniqueId>a52d45c6-f01b-479a-bbe1-8f23037510f0</UniqueId> <Map>Trammel</Map>
<X>1410</X>
<Y>1605</Y>
<Width>0</Width>
<Height>0</Height>
<CentreX>1410</CentreX>
<CentreY>1605</CentreY>
<CentreZ>30</CentreZ>
<Range>1</Range>
<MaxCount>1</MaxCount>
<MinDelay>5</MinDelay>
<MaxDelay>10</MaxDelay>
<DelayInSec>False</DelayInSec>
<Duration>0</Duration>
<DespawnTime>0</DespawnTime>
<ProximityRange>-1</ProximityRange>
<ProximityTriggerSound>500</ProximityTriggerSound>
<TriggerProbability>1</TriggerProbability>
<InContainer>False</InContainer>
<MinRefractory>0</MinRefractory>
<MaxRefractory>0</MaxRefractory>
<TODStart>0</TODStart>
<TODEnd>0</TODEnd>
<TODMode>0</TODMode>
<KillReset>1</KillReset>
<ExternalTriggering>False</ExternalTriggering>
<SequentialSpawning>-1</SequentialSpawning>
<AllowGhostTriggering>False</AllowGhostTriggering>
<SpawnOnTrigger>False</SpawnOnTrigger>
<SmartSpawning>False</SmartSpawning>
<Team>0</Team>
<Amount>1</Amount>
<IsGroup>False</IsGroup>
<IsRunning>True</IsRunning>
<IsHomeRangeRelative>True</IsHomeRangeRelative>
<Objects2>xmlquestnpc,0/configfile/TrammelDyingEdvard/loadconfig/true:MX=1:SB=0:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1</Objects2>
</Points>
<Points>
<Name>EdvardFinishSpawner</Name>
<UniqueId>2e27712b-f479-4268-9044-9be9adb85b7e</UniqueId>
<Map>Trammel</Map>
<X>1404</X>
<Y>1602</Y>
<Width>10</Width>
<Height>10</Height>
<CentreX>1409</CentreX>
<CentreY>1607</CentreY>
<CentreZ>30</CentreZ>
<Range>5</Range>
<MaxCount>3</MaxCount>
<MinDelay>5</MinDelay>
<MaxDelay>10</MaxDelay>
<DelayInSec>False</DelayInSec>
<Duration>0</Duration>
<DespawnTime>0</DespawnTime>
<ProximityRange>5</ProximityRange>
<ProximityTriggerSound>500</ProximityTriggerSound>
<ItemTriggerName>Strange Scrolls,1</ItemTriggerName>
<TriggerProbability>1</TriggerProbability>
<InContainer>False</InContainer>
<MinRefractory>0</MinRefractory>
<MaxRefractory>0</MaxRefractory>
<TODStart>0</TODStart>
<TODEnd>0</TODEnd>
<TODMode>0</TODMode>
<KillReset>1</KillReset>
<ExternalTriggering>False</ExternalTriggering>
<SequentialSpawning>-1</SequentialSpawning>
<AllowGhostTriggering>False</AllowGhostTriggering>
<SpawnOnTrigger>True</SpawnOnTrigger>
<SmartSpawning>False</SmartSpawning>
<Team>0</Team>
<Amount>1</Amount>
<IsGroup>False</IsGroup>
<IsRunning>True</IsRunning>
<IsHomeRangeRelative>True</IsHomeRangeRelative>
<Objects2>GUMP,Edvard inspects the scrolls,0/Edvard spreads the scrolls out on the table. After a moment of inspection, his faces goes pale. "God save us! You must flee this place! I pray you do not have a home in Trammel. Just in case, take this moving crate deed. We must ALL flee Trammel. Hurry!! There is no time to waste! FLEE!!:MX=1:SB=1:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:OBJ=TAKE/Strange Scrolls/:MX=1:SB=1:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1:OBJ=GIVE/movingboxdeed:MX=1:SB=1:RT=0:TO=0:KL=0:RK=0:CA=1:DN=-1:DX=-1:SP=1</Objects2>
</Points>
</Spawns>

npc...

CODE
<XmlQuestNPC> <NPC> <Name>Edvard</Name> <Running>True</Running> <ProximityRange>3</ProximityRange>
<NoTriggerOnCarried>Strange Scrolls</NoTriggerOnCarried>
<AllowGhost>False</AllowGhost>
<SpeechPace>10</SpeechPace>
<ResetTime>0.5</ResetTime>
<ConfigFile>TrammelDyingEdvard</ConfigFile>
<SpeechEntries>8</SpeechEntries>
</NPC>
<SpeechEntry>
<EntryNumber>0</EntryNumber>
<ID>0</ID>
<Text>Nice day, isn't it?</Text>
<Keywords>hello,hi,edvard,hey</Keywords>
<DependsOn>-1</DependsOn>
<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>Pardon me. Where did you find that strange scroll?</Text>
<Action>SETONTHIS/SOUND,1055/</Action>
<Condition>GETONCARRIED,Illegible Message,spoon,hue=1102</Condition>
<DependsOn>-1</DependsOn>
<Pause>5</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>20</EntryNumber>
<ID>20</ID>
<Text>May I see it please?</Text>
<Keywords>lich,undead</Keywords>
<DependsOn>10</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>30</EntryNumber>
<ID>30</ID>
<Keywords>yes,yea,sure,of course,here,take</Keywords>
<DependsOn>20</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
<Gump>GUMP,Can you find more?,3/Very interesting. This seems some kind of message, but I don't know what it means. If you could bring me more of these, I may be able to find out what this is all about. </Gump>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>40</EntryNumber>
<ID>40</ID>
<Keywords>accept</Keywords>
<Action>TAKEN/DELETE; TAKE,1,1,true,spoon/Illegible Message</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>50</EntryNumber>
<ID>50</ID>
<Text>Be gone ye skallywag. I've no time for your trickery!</Text>
<Action>GIVE/TAKEN</Action>
<Condition>~GETONTAKEN,hue=1102</Condition>
<DependsOn>40</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>60</EntryNumber>
<ID>60</ID>
<Action>GIVE/&lt;questholder/name/Strange Scrolls/objective1/COLLECTNAMED,Illegible Message,spoon,9,hue=1102/description1/Collect 9 more of these mysterious scrolls./repeatable/false&gt;</Action>
<Condition>GETONTAKEN,hue=1102</Condition>
<DependsOn>40</DependsOn>
<Pause>0</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>70</EntryNumber>
<ID>70</ID>
<Text>I've given you a blue book. Open it to continue your quest. Godspeed!!</Text>
<Action>TAKEN/DELETE</Action>
<DependsOn>60</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
</SpeechEntry>
</XmlQuestNPC>

ArteGordon- 05-01-2006
thanks. For those trying it out, I believe that it requires that you add a spawn for a lich or other undead that carry the special scrolls, and the reward is a movingboxdeed which is also a custom item.
You also need to be carrying one of the scrolls and greet the npc to start the quest.