Lava Titan
Developer
Hello, I'm working on this small script to avoid players throwing junk or lose thrown items by mistake in some places but I'm having an issue in how to track the amount of items thrown..
I'm not sure if there's another way to do this but this is what I came up with xd
Example: If some1 throws 69 coins into the tile, I have to return 69 coins back.
At this moment all the coins are removed but I can't figure out how to return the amount thrown
I'm not sure if there's another way to do this but this is what I came up with xd
Example: If some1 throws 69 coins into the tile, I have to return 69 coins back.
At this moment all the coins are removed but I can't figure out how to return the amount thrown
Lua:
function onAddItem(moveitem, tileitem, position, cid)
doPlayerAddItem(cid, getItemIdByName(getItemName(moveitem.uid)), 1, true)
doRemoveItem(moveitem.uid)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doPlayerSendCancel(cid, "You can't throw items there.")
return true
end