Full Version : Delete item from backpack
xmlspawner >>Q&A >>Delete item from backpack


<< Prev | Next >>

Haazen- 04-18-2008
I am using an XMLSpawner to teleport player if they are carrying a certain item.

I use SETONTRIGMOB to teleport them and that works.

How do I now delete the item that triggered the teleport from their pack? I tried TAKEBYTYPE by no results.

Thank you very much.

ArteGordon- 04-18-2008
you should be able to use the SETONCARRIED along with the DELETE keyword like this

SETONCARRIED,name,type/DELETE

QUOTE

- added the new "DELETE" keyword that can be used to modify a standalone keyword and delete the object that it refers to (it will not allow you to delete players) 
For example, this spawn entry

SET,Mystic Sword,longsword/DELETE

will delete the longsword named "Mystic Sword"

SETONMOB,SeeYouLater,Balron/DELETE

will delete the balron named "SeeYouLater"

SETONCARRIED,,Gold/DELETE

will delete gold that it finds being carried by the triggering mob

SETONSPAWN,TargetSpawner,2/DELETE

will delete all of the spawns of subgroup 2 on the spawner named TargetSpawner.  This is basically the same as using the DESPAWN keyword but will delete all spawns regardless of their CLR flag setting.

Haazen- 04-18-2008
That worked. Thanks. But if a player is carrying more than one of the items that trigger the teleport, it deletes them all. Is there a way to only delete one of them from the pack?

Sorry, not entirely true. Sometimes it triggers more than once and then it will delete more than one of the item. I guess I must make it so the spawner can not trigger instantly.

ArteGordon- 04-19-2008
set min/maxrefract to the amount of time that you want between triggerings.