Hello, i want to release an small scripts that allows you to tp to your own house.
This version got exhaustion time (10sec)..
I want also thanks Znote for some support <3
Make an new file in talkactions/script name it tphouse.lua and paste this into it:
And open talkactions.xml and put this line
This version got exhaustion time (10sec)..
I want also thanks Znote for some support <3
Make an new file in talkactions/script name it tphouse.lua and paste this into it:
Lua:
function onSay(cid, words, param, channel)
local playerPos = getCreaturePosition(cid)
if exhaustion.check(cid, 7612) == false then
if getHouseByPlayerGUID(getPlayerGUID(cid)) and getCreatureCondition(cid, CONDITION_INFIGHT) == false then
doTeleportThing(cid, getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid))))
doSendMagicEffect(playerPos, CONST_ME_TELEPORT)
doSendAnimatedText(playerPos, 'Bye!', TEXTCOLOR_GREEN)
exhaustion.set(cid, 7612, 10)
elseif getCreatureCondition(cid, CONDITION_INFIGHT) == true then
doSendAnimatedText(playerPos, 'PZ Locked!', TEXTCOLOR_RED)
exhaustion.set(cid, 7612, 10)
elseif getHouseByPlayerGUID(getPlayerGUID(cid)) == nil then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You dont own a house!")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are exhausted!")
end
return true
end
And open talkactions.xml and put this line
Lua:
<talkaction words="!gohouse" event="script" value="tphouse.lua"/>
![rkr51c.gif](/proxy.php?image=http%3A%2F%2Fi49.tinypic.com%2Frkr51c.gif&hash=d6b4e13163de59c3019341a0b59c9a1b)
Last edited: