Full Version : NoTriggerOnCarried Question
xmlspawner >>Q&A >>NoTriggerOnCarried Question


<< Prev | Next >>

Zyle- 01-08-2006
I've been trying to set up a spawner that will not trigger if a player has either a certain item in his pack, OR a quest with certain objectives completed. So the plan is, the questgiver gives the player an item which stops that spawner triggering again, then when he's done the objective which consumes the item, it will still not trigger again and go on to the return spawner instead. I've tried a few syntaxes but none of them worked - is there a way to do it? I've been adding extra objectives like Return to Questgiver so that I can get around the problem but if it's possible to do it properly, that would be better. smile.gif

ArteGordon- 01-08-2006
Yes, you should be able to do this with something that looks like

questholdername,objective | itemname,itemtype

QUOTE

- added support for compound TriggerOnCarried/NoTriggerOnCarried tests using the & and | operators.  This allows testing for multiple carried items.  For example to trigger the spawner when a player is carrying both the platehelm named 'Helm of Light' and the longsword named 'Sword of Light' you could use the following string in the TriggerOnCarried property, "Helm of Light,platehelm & Sword of Light,longsword"


where any individual item string looks like

name[,type][,EQUIPPED][,objective,objective,...]

What have you tried? I'll check it out.

Zyle- 01-08-2006
I tried that but without the itemtype bit, so:
Quest,1 | itemname

I'll give it a go with the right format now, hehe. Thanks Arte smile.gif

Zyle- 01-08-2006
Woot, got it working wink.gif Thanks!

Is the itemtype just the name of the object's class? (Probably a stupid question... heh)

ArteGordon- 01-08-2006
yeah, it should work.

I always like to add the itemtype if I can since it makes sure that I dont accidentally match something else that I forgot could have the same name.

I tested it out both with and without the itemtype with a quest and a named item and it worked.

Note, the string you gave

Quest,1 | itemname

will prevent triggering whenever the player is either carrying the item named "itemname", or has a quest named "Quest" with objective 1 completed

(edit)

right, itemtype is just the name of the items class (or subclass), so you could refer to a longsword as having the type "longsword", or "baseweapon", or "item"

Zyle- 01-08-2006
Weirdness... I must have just typoed something somewhere or borked the capitalisation or something. I was at that quest for about 4 hours straight so it's fairly likely. It's working now though, thanks for the help smile.gif

edit:
Great, thanks smile.gif

ArteGordon- 01-08-2006
yeah, probably the caps. It is easy to miss that since the client will automatically display names with caps even if the actual name strings are not capitalized.

Zyle- 01-09-2006
Hehe, I've got into the habit of doing a [get name before I enter anything in those fields after the small o in "A Piece of Rare Khalhan Cactus" kept me banging my head on the desk for about 18 hours...! Still, I tend to get frustrated when it doesn't *just work* and then I mess up anyway. wink.gif