HeberPcL
[PowerOT.com.br]
How not to get release the command! Buyhouse for Free players, I found this script that does not verify whether it is premium.
However the script that giving the following error:
Error
The command works, but this error appears in Default.
I also know if the Rent System using this TalkAction be affected?
Compilation: 1076
Thx!
However the script that giving the following error:
function onSay(cid, words, param)
-- Made By Xikez
--///////// Things to Edit //////////
local numberOfHouse = 250 -- How many houses does your server have? Tip: You can use the map editor for this.
local money = 50000 -- Cost of 1 house.
local canOwnHouse = 1 -- How many houses can a player buy?
--/////////////////////////////////////////
local pos = getPlayerPosition(cid)
local hasCheckedLeft = 0
local hasCheckedRight = 0
local hasCheckedUp = 0
local hasCheckedDown = 0
local msgto = ""
local houseId = 0
local hasHouse = getPlayerPosition(cid)
local checkedHowMany = 0
local ownsHouse = 0
local housePosFirst = 0
local newOwner = getPlayerGUID(cid)
housePosFirst = {x=getPlayerPosition(cid).x-1, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
if getTileHouseInfo(housePosFirst) ~= 0 then
hasCheckedLeft = getTileHouseInfo(housePosFirst)
end
housePosFirst = {x=getPlayerPosition(cid).x+1, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z}
if getTileHouseInfo(housePosFirst) ~= 0 then
hasCheckedRight = getTileHouseInfo(housePosFirst)
end
housePosFirst = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y+1, z=getPlayerPosition(cid).z}
if getTileHouseInfo(housePosFirst) ~= 0 then
hasCheckedDown = getTileHouseInfo(housePosFirst)
end
housePosFirst = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y-1, z=getPlayerPosition(cid).z}
if getTileHouseInfo(housePosFirst) ~= 0 then
hasCheckedUp = getTileHouseInfo(housePosFirst)
end
if hasCheckedUp ~= 0 or hasCheckedDown ~= 0 or hasCheckedRight ~= 0 or hasCheckedLeft ~= 0 then
if hasCheckedUp ~= 0 then
houseId = hasCheckedUp
elseif hasCheckedDown ~= 0 then
houseId = hasCheckedDown
elseif hasCheckedRight ~= 0 then
houseId = hasCheckedRight
elseif hasCheckedLeft ~= 0 then
houseId = hasCheckedLeft
end
if getHouseOwner(houseId) ~= 0 then
if getHouseOwner(houseId) == newOwner then
msgto = "You already own this house."
else
msgto = "The house already has a owner."
end
else
while checkedHowMany < numberOfHouse do
checkedHowMany = checkedHowMany + 1
if getHouseOwner(checkedHowMany) == newOwner then
ownsHouse = ownsHouse + 1
end
end
if ownsHouse < canOwnHouse then
--TODO: Count how much money to be paid, it cannot be accurate though.
if doPlayerRemoveMoney(cid, money) == 1 then
setHouseOwner(houseId, newOwner)
msgto = "Congratz! You are now the owner of the house."
else
msgto = "You don\'t have enough money"
end
else
msgto = "You can\'t buy more houses."
end
--
end
else
msgto = "There is no house around you. Make sure you are facing the house door."
end
doPlayerSendTextMessage(cid, 24, msgto)
doPlayerSendTextMessage(cid, 25, words)
return 0
end
Error
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
[23/08/2008 10:33:34] Lua Script Error: [TalkAction Interface]
[23/08/2008 10:33:34] data/talkactions/scripts/powerot/gethouse.luanSay
[23/08/2008 10:33:34] luaGetHouseOwner(). House not found
The command works, but this error appears in Default.
I also know if the Rent System using this TalkAction be affected?
Compilation: 1076
Thx!