Total RP 3: Extended

Total RP 3: Extended

903k Downloads

Run a workflow when an item is picked up or put down

Ellypse opened this issue ยท 0 comments

commented

Many situations require a way to run a workflow when an item is placed in the character inventory or destroyed.

  • We would want to have an OnPickup script that could be linked to a workflow and that would be run when the item is created from the database, by another item, received from a trade, looted from a stash, a quest, on the floor. Any situation that would add the item to the character's inventory.
  • We would also want to have an OnPutdown script that could be linked to a workflow and that would be run when the item is deleted by another item (consumed), dropped on the floor, trade with someone. Any situation that would remove the item from the character's inventory.
  • As we might want to condition some things based on how the item was exactly picked up or put down, it would be interesting to pass a variable to the workflow environment that would indicate what action triggered it (maybe use the events naming conventions cause == "ITEM_TRADED" or cause == "ITEM_DROPPED")