mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-15 06:54:54 +02:00
introduce changes from streamside fork
This commit is contained in:
19
data/talkactions/scripts/sellhouse.lua
Normal file
19
data/talkactions/scripts/sellhouse.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
function onSay(player, words, param)
|
||||
local tradePartner = Player(param)
|
||||
if not tradePartner or tradePartner == player then
|
||||
player:sendCancelMessage("Trade player not found.")
|
||||
return false
|
||||
end
|
||||
|
||||
local house = player:getTile():getHouse()
|
||||
if not house then
|
||||
player:sendCancelMessage("You must stand in your house to initiate the trade.")
|
||||
return false
|
||||
end
|
||||
|
||||
local returnValue = house:startTrade(player, tradePartner)
|
||||
if returnValue ~= RETURNVALUE_NOERROR then
|
||||
player:sendCancelMessage(returnValue)
|
||||
end
|
||||
return false
|
||||
end
|
Reference in New Issue
Block a user