Full Version : Attachment in Condition
xmlspawner >>Q&A >>Attachment in Condition
<< Prev | Next >>
LDamian- 07-01-2006
Hello.
When I give PC attachment through action during talk with quest NPC:
SETONTRIGMOB/ATTACH/XmlQuestAttachment,one,10000
it work perfekt, but I don't know how can I check present this attachment in PC.
I try:
GETONTRIGMOB,<ATTACHMENT,XmlQuestAttachment,one>
GETONTRIGMOB,XmlQuestAttachment,one
......
Thank you very much.
olsyke- 07-01-2006
sorry my english isnt all that well either but if you simply try to find out what attachment there is on a monster or mobile just try this -->
--> [Getatt <-- and target whatever you want to view
ArteGordon- 07-01-2006

QUOTE (LDamian @ July 01, 2006 03:28 pm)
Hello. When I give PC attachment through action during talk with quest NPC: SETONTRIGMOB/ATTACH/XmlQuestAttachment,one,10000 it work perfekt, but I don't know how can I check present this attachment in PC. I try:
GETONTRIGMOB,<ATTACHMENT,XmlQuestAttachment,one>
GETONTRIGMOB,XmlQuestAttachment,one
......
Thank you very much.

the syntax for referring to properties on attachments on an object would be
[ATTACHMENT,type,name,property]

QUOTE
- modified the syntax for referencing attachments using the GET series of keywords. Whereever a property would normally be specified for those keywords, the new property keyword [ATTACHMENT,type,name,property] can be used. For example, to read the value property on an xmlvalue attachment with the name XS on a triggering mob you would specify "GETONTRIGMOB,[ATTACHMENT,xmlvalue,XS,value]". The change involved using [] instead of <> for the ATTACHMENT delimiters. This was to resolve a conflict with the use of the old syntax in conditional tests. The example attachtest1.xml has been modified to reflect the change.

so you would use a Condition test like
GETONTRIGMOB,[ATTACHMENT,XmlQuestAttachment,one,name] = "one"
which just tests for a known property on the attachment such as 'name' so that it can only be true if the attachment actually exists
olsyke- 07-01-2006
eww why do i always feel dumb after you post arte
i should leave the answering to you guys ^^
ArteGordon- 07-01-2006

QUOTE (olsyke @ July 01, 2006 05:09 pm)
eww why do i always feel dumb after you post arte i should leave the answering to you guys ^^

not at all. You're answer was also accurate. [getatt is the way to manually examine attachment properties.