So i want to make a script that replaces the items after pickup but it seems to occur before it goes into your inventory.
So of course, it doesn't remove the picked up item. (Also i don't want to cancel the pickup event and then kill the item because i want the pickup animation)
So of course, it doesn't remove the picked up item. (Also i don't want to cancel the pickup event and then kill the item because i want the pickup animation)
Code:
on pickup of any log:
set {_logcount.%player%} to item amount of event-item
give {_logcount.%player%} of spruce logs to the player
remove {_logcount.%player%} of event-item from the player