Full Version : Attachment problem
xmlspawner >>Q&A >>Attachment problem
<< Prev | Next >>
Vladimir- 05-20-2006
Hey there.
The shard i work on recently started up and i've made a few quests for the players to try out. All of the quests are set to repeatable/false. once completed the quest gives them an Attachment so that they can't redo the quest, however some players are complaining that can redo quests. when i check their [getatt the Attachment for that quest is no longer there... but they still have the quests points for it
to my knowledge this is only happening to a few players, and I have no idea whats causing it...
I don't run the shard so i don't have access to the scripts.
Any help would be much appreciated... thx
ArteGordon- 05-20-2006
Sounds like something is actively removing the attachments. I would have the owners check the logs for [gett or [delatt calls. It could also be done with [xmlfind.
You might also check the attachments themselves to make sure that they dont have an expiration time being set.
Also you might check to make sure that you dont have another version of the quest with the same name somewhere, or a spawner or npc that manipulates or adds the xmlquestattachment.
I would use [xmlfind for this.
Vladimir- 05-20-2006
Ok i think i know why its doing this now...
for some of the players... the first time they spk to the quest npc and accept the quest... a message comes up saying they have accepted the quest, but the questholder ins't in their bag...
only on the 2nd try does the questholder drop in the bag. here is the npc file

QUOTE
<?xml version="1.0" standalone="yes"?> <XmlQuestNPC> <NPC> <Name>Carl</Name> <Running>True</Running>
<ProximityRange>3</ProximityRange>
<NoTriggerOnCarried>ATTACHMENT,Apprentice Crafter,XmlQuestAttachment | Apprentice Crafter</NoTriggerOnCarried>
<AllowGhost>False</AllowGhost>
<SpeechPace>10</SpeechPace>
<ResetTime>0.166666666666667</ResetTime>
<ConfigFile>CrafterHaven</ConfigFile>
<SpeechEntries>6</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>Hello {GETONTRIGMOB,name}, doust thou wish to explore lands far beyond this island?</Text>
<DependsOn>-2</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>quest,yes,yes i do</Keywords>
<DependsOn>10</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
<Gump>GUMP,Apprentice Crafter,4/You do indeed look like the Crafter type, {GETONTRIGMOB,name}. If you are in search of a place to continue your trade I could indeed make that possible. However I would need you to prove your worth in the fundamentals of Crafting.;What is your challenge?;ok;I don't think I'm ready to prove myself;no</Gump>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>30</EntryNumber>
<ID>30</ID>
<Keywords>ok</Keywords>
<DependsOn>20</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
<Gump>GUMP,Apprentice Crafter,3/Collect resources that are so very vital to our trade. When you have 30 logs and 5 iron ore, bring them to me and I will give you the means to continue your journey </Gump>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>40</EntryNumber>
<ID>40</ID>
<Keywords>accept</Keywords>
<Action>GIVE/&lt;questholder/name/Apprentice Crafter/notestring/Collect 30 logs and 5 iron ore and bring them back to Carl in Haven/objective1/GIVE,Carl,log,30/objective2/GIVE,Carl,ironore,5/repeatable/false/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>50</EntryNumber>
<ID>50</ID>
<Action>TAKE/Apprentice Crafter ; SETONTHIS/MSG/Well done {GETONTRIGMOB,name}, you have proven yourself worthy as an apprentice crafter, you may continue your journey through the portal!</Action>
<Condition>GETONCARRIED,Apprentice Crafter,questholder,iscompleted=true</Condition>
<DependsOn>-1</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
</SpeechEntry>
</XmlQuestNPC>

ArteGordon- 05-20-2006
I'll check it out.
Also you might want to check to make sure that their backpacks are not full. That could prevent the quest from being given to them. I have that on the todo list of things to change.
(edit)
ignore that. That has already been fixed. It shouldnt matter if the backpack is full or not.
(edit)
ok, I took a look at it and this is what I think is happening. You have your ResetTime for the XmlDialog set to 10 seconds, so if they take more than 10 seconds to read the gump that comes up in entry 20, then the dialog will reset.
Even though they press the Accept button and the gump tells them that they have accepted the quest, it will not advance to entry 30 because it DependsOn 20 and the npc dialog has been reset back to entry zero.
So the players that arent getting the questholder are probably just slower readers.
Just make the ResetTime longer.
Vladimir- 05-20-2006
Fantastic... i'm sure it will work, I was worried about the time being too short but wasn't sure...
the reason i made it so short is because 3-4 players que at the quest NPC so to wait 60 seconds for him to work again frustrates them hehe
Thx a mil ArteGordon will give it a shot!
ArteGordon- 05-20-2006

QUOTE (Vladimir @ May 20, 2006 09:24 am)
Fantastic... i'm sure it will work, I was worried about the time being too short but wasn't sure... the reason i made it so short is because 3-4 players que at the quest NPC so to wait 60 seconds for him to work again frustrates them hehe Thx a mil ArteGordon will give it a shot!

if you want to instantly reset the dialog to make it available again when you hand out your questholder, just add this action to your Action field
SETONTHIS/doreset/true
That way it will still wait the full ResetTime while in the middle of the dialog, but will have no delay between players if they complete the dialog sequence.
Vladimir- 05-20-2006
mmm thank you! that makes life a bit easier
Vladimir- 05-20-2006
um it doesn't seem to be doing the doreset.
this is my line in the Action field:
GIVE/&lt;questholder/name/The Fighters Proving Ground/notestring/Head into the mountains, far to the south and kill 3 mongbats and 3 skeletons/objective1/KILL,mongbat,3/objective2/KILL,skeleton,3/repeatable/false/autoreward/false ; SETONTHIS/doreset/true
ArteGordon- 05-20-2006

QUOTE (Vladimir @ May 20, 2006 01:14 pm)
um it doesn't seem to be doing the doreset. this is my line in the Action field: GIVE/&lt;questholder/name/The Fighters Proving Ground/notestring/Head into the mountains, far to the south and kill 3 mongbats and 3 skeletons/objective1/KILL,mongbat,3/objective2/KILL,skeleton,3/repeatable/false/autoreward/false ; SETONTHIS/doreset/true</Action>

is this on an xmlquestnpc? When you use SETONTHIS in an xmldialog, it will refer to the thing that it is attached to.
XmlQuestNPCs have a DoReset property that just provides an easy way to access the DoReset property on the XmlDialog, so that line will work.
If you attach the xmldialog to anything else, then that wont work. You would need to refer to the XmlDialog attachment explicitly like
SETONTHIS/ATTACHMENT,xmldialog,,doreset/true
Vladimir- 05-20-2006
yes, must i paste the NPC file?
ArteGordon- 05-20-2006
yes, paste it and I will take a look.
Vladimir- 05-20-2006

QUOTE
<?xml version="1.0" standalone="yes"?> <XmlQuestNPC> <NPC> <Name>Anya</Name> <Running>True</Running>
<ProximityRange>3</ProximityRange>
<NoTriggerOnCarried>ATTACHMENT,The Fighters Proving Ground,XmlQuestAttachment | The Fighters Proving Ground</NoTriggerOnCarried>
<AllowGhost>False</AllowGhost>
<SpeechPace>10</SpeechPace>
<ResetTime>2</ResetTime>
<ConfigFile>FighterHaven</ConfigFile>
<SpeechEntries>6</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>Hello {GETONTRIGMOB,name}, doust thou wish to explore lands far beyond this island?</Text>
<DependsOn>-2</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>quest,yes,yes i do</Keywords>
<DependsOn>10</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
<Gump>GUMP,The Fighters Proving Ground,4/You do indeed look brave and strong, traveler, but looks can be decieving. Prove to me that you are worthy to continue your journey and I shall give you the means to do so.;What is your challenge?;ok;I don't feel that I am ready yet;no</Gump>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>30</EntryNumber>
<ID>30</ID>
<Keywords>ok</Keywords>
<DependsOn>20</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
<Gump>GUMP,The Fighters Proving Grounds,3/Head into the mountains to the south, there you will find a graveyard, Kill 3 Mongbats and 3 skeletons to prove your worth.</Gump>
</SpeechEntry>
<SpeechEntry>
<EntryNumber>40</EntryNumber>
<ID>40</ID>
<Keywords>accept</Keywords>
<Action>GIVE/&lt;questholder/name/The Fighters Proving Ground/notestring/Head into the mountains, far to the south and kill 3 mongbats and 3 skeletons/objective1/KILL,mongbat,3/objective2/KILL,skeleton,3/repeatable/false/autoreward/false ; SETONTHIS/doreset/true</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>
<Action>TAKE/The Fighters Proving Ground ; SETONTHIS/MSG/Well done {GETONTRIGMOB,name}, you have proven yourself worthy. Proceed through the gate and continue your journey brave traveler!</Action>
<Condition>GETONCARRIED,The Fighters Proving Ground,questholder,iscompleted=true</Condition>
<DependsOn>-1</DependsOn>
<Pause>1</Pause>
<PrePause>-1</PrePause>
<LockConversation>True</LockConversation>
<AllowNPCTrigger>False</AllowNPCTrigger>
<SpeechStyle>Regular</SpeechStyle>
<SpeechHue>-1</SpeechHue>
</SpeechEntry>
</XmlQuestNPC>

thanks
ArteGordon- 05-20-2006
I checked it out and there is a small change in XmlDialog.cs that is required to allow it to work. I will add this to the next release and you can get it in beta_311.zip in the upcoming releases thread.
http://xmlspawner.15.forumer.com/index.php?showtopic=53
If you want to make the change yourself, around line 1144 change this

QUOTE
// execute any action associated with it // allow for multiple action strings on a single line separated by a semicolon if(CurrentEntry.Action != null && CurrentEntry.Action.Length > 0) { string [] args = CurrentEntry.Action.Split(';');
for(int j = 0;j<args.Length;j++)
{
ExecuteAction(m, args[j]);
}
}
// execute any GUMP associated with it
ExecuteGump(m, CurrentEntry.Gump);
IsActive = true;
m_LastInteraction = DateTime.Now;

to this

QUOTE
IsActive = true; m_LastInteraction = DateTime.Now; // execute any action associated with it // allow for multiple action strings on a single line separated by a semicolon if(CurrentEntry.Action != null && CurrentEntry.Action.Length > 0)
{
string [] args = CurrentEntry.Action.Split(';');
for(int j = 0;j<args.Length;j++)
{
ExecuteAction(m, args[j]);
}
}
// execute any GUMP associated with it
ExecuteGump(m, CurrentEntry.Gump);

Vladimir- 05-20-2006
Thanks again I'll nag the admin to put it in.
Vladimir- 05-22-2006
Hmm the doreset function is working perfectly now... but it seems that some players don't recieve the attachment after completing the quest.
I've been sitting with this for days, i've tested the quest myself over and over and I always get the attachment. So I cannot understand why some don't?
The attachment is important because i have another spawn that only triggers if this attachment is found on the players.
When a player completes the quest, a [getatt shows that they have recieved 1 quest point, and yet the attachment for that quest isn't there. Once again this doesn't happen to all players.
I'm really baffled by this any ideas what could be causing this?
Also another question... the spawner that checks for the attachment is used as a teleporter, so that if the attachment is found it does a SETONTRIGMOB/x/y/z. I was just wandering if it is possible to apply the same condition to the tamed animals that they have following them? so that they too can go thru the "portal"