GOD Wille
Excellent OT User
I don't know if this has been made and relased but;
If you do not stand on a depot tile, you may not put any item at any depot locker, or at any tile with action id 7483. (Unless if you have group higher than 3) Also you won't be able to throw items except for in a square area around your character.
It requires that you have this installed;
Feature - Creaturescript: onMoveItem(moveItem, frompos, position, cid)
login.lua
creaturescripts.xml
antitrash.lua
If you do not stand on a depot tile, you may not put any item at any depot locker, or at any tile with action id 7483. (Unless if you have group higher than 3) Also you won't be able to throw items except for in a square area around your character.
It requires that you have this installed;
Feature - Creaturescript: onMoveItem(moveItem, frompos, position, cid)
login.lua
Lua:
registerCreatureEvent(cid, "antiTrash")
creaturescripts.xml
XML:
<event type="moveitem" name="antiTrash" script="antitrash.lua"/>
antitrash.lua
Lua:
local depottiles = {11062,416,417,425,426,446,447}
local depots = {2589,2590,2591,2592,10970}
local group = 3
local function checkIfThrow(pos,topos)
if topos.x == 0xffff then
return false
end
local thing = getThingFromPos(pos)
if isInArray(depottiles,thing.itemid) then
if not isInArea(topos,{x=pos.x-1,y=pos.y-1,z=pos.z},{x=pos.x+1,y=pos.y+1, z=pos.z}) then
return true
end
else
for i = 1, #depots do
if depots[i] == getTileItemById(topos,depots[i]).itemid or getTileInfo(topos).actionid == 7483 then
return true
end
end
end
return false
end
function onMoveItem(cid, item, count, toContainer, fromContainer, fromPos, toPos)
if isPlayer(cid) then
local pos = getThingPos(cid)
if getPlayerGroupId(cid) > group then
return true
end
if checkIfThrow({x=pos.x,y=pos.y,z=pos.z,stackpos=0},toPos) then
doPlayerSendCancel(cid,"You can't put items on this tile if you don't stand on a depot tile.")
doSendMagicEffect(getThingPos(cid),CONST_ME_POFF)
return false
end
end
return true
end