bpm91
Advanced OT User
- Joined
- May 23, 2019
- Messages
- 1,046
- Solutions
- 7
- Reaction score
- 180
- Location
- Brazil
- YouTube
- caruniawikibr
I recently tried to implement this on my server but it didn't work.
I don't know what it could be, as I recently implemented the moveitem option, even managed to parchment the global tibia quest with the moveitem function.
I don't know what it could be, as I recently implemented the moveitem option, even managed to parchment the global tibia quest with the moveitem function.
LUA:
registerCreatureEvent(cid, "houseTrash")
LUA:
<event type="moveitem" name="houseTrash" event="script" value="houseTrash.lua"/>
LUA:
function onMoveItem(moveItem, frompos, position, cid)
if position.x == CONTAINER_POSITION then
return true
end
local house = getHouseFromPos(position)
if type(house) == 'number' then
local owner = getHouseOwner(house)
if owner == 0 then
return false, doPlayerSendCancel(cid, 'Sorry, not possible.')
end
if owner ~= getPlayerGUID(cid) then
local sub = getHouseAccessList(house, 0x101):explode('\n')
local guest = getHouseAccessList(house, 0x100):explode('\n')
local isInvited = false
if (#sub > 0) and isInArray(sub, getCreatureName(cid)) then
isInvited = true
end
if (#guest > 0) and isInArray(guest, getCreatureName(cid)) then
isInvited = true
end
if not isInvited then
return false, doPlayerSendCancel(cid, 'Sorry its not possible bcus you are not invited.')
end
end
end
return true
end
