- Joined
- Aug 19, 2007
- Messages
- 4,941
- Solutions
- 11
- Reaction score
- 352
data/actions/actions.xml:
data/actions/scripts/tools/broom.lua:
This is for 0.3 version, if you want to use it on 0.2, replace getItemNameById with getItemName.
Known Bugs:
- You can remove items from you own backpack.
- When you click on player/creature it says "You can not remove water."
Code:
<action itemid="2324" script="tools/broom.lua"/>
data/actions/scripts/tools/broom.lua:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isMoveable(itemEx.uid) == TRUE then
doRemoveItem(itemEx.uid)
doSendMagicEffect(toPosition, CONST_ME_POFF)
else
doPlayerSendCancel(cid, "You can not remove "..getItemNameById(itemEx.itemid)..".")
end
return TRUE
end
This is for 0.3 version, if you want to use it on 0.2, replace getItemNameById with getItemName.
Known Bugs:
- You can remove items from you own backpack.
- When you click on player/creature it says "You can not remove water."