silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,480
- Solutions
- 9
- Reaction score
- 211
as the title says I have an issue, when I buy a house and then left some items inside and use the command leave house the items don't be moved to the depot
I use tfs 1.1/2 it is old so I'll leave all the codes here
house.cpp
house.h
leavehouse.lua (talkaction)
also, somebody can tell the line logical about house behavior, I want to understand everything
I use tfs 1.1/2 it is old so I'll leave all the codes here
house.cpp
Code:
https://hastebin.com/isilovopud.php
Code:
https://hastebin.com/ayamogirun.m
Code:
function onSay(player, words, param)
local house = Tile(player:getPosition()):getHouse()
if not house then
player:sendCancelMessage("You are not inside a house.")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
if house:getOwnerGuid() ~= player:getGuid() then
player:sendCancelMessage("You are not the owner of this house.")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
house:setOwnerGuid(0)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have successfully left your house.")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end