Estava olhando ake no forum ate que surgiu uma luz, o overllord e o script de pokemon teleportar para house, depois de algumas tags deletadas consegui resolver meu proprio pedido, um script que teleporta o player para sua house,
Primeiro crie um arquivo .lua na pasta data/talkactions/teleport.lua
Depois adicione:
function onSay(cid, words, param)
local config = {
pz = false, -- players precisam estar em protection zone para usar? (true or false)
battle = true, -- players deve estar sem battle (true or false)
custo = false, -- se os teleport irão custa (true or false)
need_level = true, -- se os teleport irão precisar de level (true or false)
premium = true -- se precisa ser premium account (true or false)
}
local lugar = {
["olympus house #1"] ={
pos = {x=526, y=401, z=7},level = 30000,price = 4000,n="olympus house #1"}
}
if (param == '') then
local str = ""
str = str .. "Places to go :\n\nHouse\nFalador\nSendas\nFurbridge\nMesten\nSpenzel"
doShowTextDialog(cid, 7416, str)
return TRUE
end
if string.lower(param) == "house" then
if getHouseByPlayerGUID(getPlayerGUID(cid)) then
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
doTeleportThing(cid, getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid))))
pos2 = {x=getThingPos(cid).x, y=getThingPos(cid).y+1, z=getThingPos(cid).z}
doSendMagicEffect(getThingPos(cid), 29)
local item = getPlayerSlotItem(cid, 8)
setPlayerStorageValue(cid, 10, 0)
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You don't own a house.")
end
return true
end
local a = lugar[string.lower(param)]
if not(a) then
doPlayerSendTextMessage(cid, 22, "Essa House nao existe.")
return TRUE
elseif config.premium == true and not isPremium(cid) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Only premium members can use this skill.")
return TRUE
elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Nao Pode Teleportar em battle.")
return TRUE
end
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, a.pos)
pos2 = {x=getThingPos(cid).x, y=getThingPos(cid).y+1, z=getThingPos(cid).z}
doSendMagicEffect(a.pos, 29)
local item = getPlayerSlotItem(cid, 8)
doSendMagicEffect(pos2, CONST_ME_TELEPORT)
doRemoveCondition(cid, CONDITION_OUTFIT)
setPlayerStorageValue(cid, 10, 0)
return TRUE
end
depois crie uma tag no data/talkactions/talkactions.xml
<talkaction words="!tp;!teleport;/tp;/teleport" event="script" value="teleport.lua"/>
Parte vermelha editavel, espero ter ajudado
Edit: tinha algumas tags que eu esqueci de deletar nao interferia mais ficava uns error's chatos no executavel
Creditos:
80% Overlord, por ter me mostrado esse belo script de pokemon
20% Fodim (Acho q ainda menos), so apenas deletei algumas tags, e postei