xYzPrototype
Just a standard member
Hello again, so I found this gohouse command here, tweaked it a bit to remove some affects I didn't want, and it's not working. It's never worked, all it does is Teleport you to the same tile that the player is standing and says 'Bye'. Can someone diagnose the problem in my script please? I don't know how to fix it.
Or at least tell me when I need to add elsewhere so this works? I can only find scripts very similar to this and all of them do the same thing
Thank you
Code:
function onSay(cid, words, param, channel)
local storage = 2313
local playerPos = getCreaturePosition(cid)
if exhaustion.check(cid, storage) ~= false then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, 'You must wait ' .. exhaustion.get(cid, storage) .. ' seconds')
end
if getHouseByPlayerGUID(getPlayerGUID(cid)) then
doTeleportThing(cid, getHouseInfo(getHouseByPlayerGUID(getPlayerGUID(cid))).entry)
doSendMagicEffect(playerPos, CONST_ME_TELEPORT)
doSendAnimatedText(playerPos, 'Bye!', TEXTCOLOR_GREEN)
exhaustion.set(cid, storage, 10)
return true
end
if isPlayerPzLocked(cid) or getCreatureCondition(cid, CONDITION_INFIGHT) then
doSendAnimatedText(playerPos, 'PZ Locked!', TEXTCOLOR_RED)
exhaustion.set(cid, storage, 10)
end
if getHouseByPlayerGUID(getPlayerGUID(cid)) ~= nil then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You dont own a house!")
end
return true
end
Or at least tell me when I need to add elsewhere so this works? I can only find scripts very similar to this and all of them do the same thing
Thank you
Last edited: