Va em data/talkactions/scripts adicione um script.lua com o nome de home e bote esse script:
function isWalkable(pos, creature, proj, pz)-- by Nord
if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
if getTopCreature(pos).uid > 0 and creature then return false end
if getTileInfo(pos).protection and pz then return false, true end
local n = not proj and 3 or 2
for i = 0, 255 do
pos.stackpos = i
local tile = getTileThingByPos(pos)
if tile.itemid ~= 0 and not isCreature(tile.uid) then
if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
return false
end
end
end
return true
end
function onSay(cid, words)
if not getHouseByPlayerGUID(getPlayerGUID(cid)) then
return doPlayerSendCancel(cid, "Voce nao tem casa.")
end
local pos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid)))
if getCreatureCondition(cid, CONDITION_INFIGHT) then
return doPlayerSendCancel(cid, "Voce tem que estar sem battle.")
end
if not getTilePzInfo({x=pos.x-1, y=pos.y, z=pos.z}) and isWalkable({x=pos.x-1, y=pos.y, z=pos.z}) then
pos = {x=pos.x-1, y=pos.y, z=pos.z}
elseif not getTilePzInfo({x=pos.x+1, y=pos.y, z=pos.z}) and isWalkable({x=pos.x+1, y=pos.y, z=pos.z}) then
pos = {x=pos.x+1, y=pos.y, z=pos.z}
elseif not getTilePzInfo({x=pos.x, y=pos.y+1, z=pos.z}) and isWalkable({x=pos.x, y=pos.y+1, z=pos.z}) then
pos = {x=pos.x, y=pos.y+1, z=pos.z}
elseif not getTilePzInfo({x=pos.x, y=pos.y-1, z=pos.z}) and isWalkable({x=pos.x, y=pos.y-1, z=pos.z}) then
pos = {x=pos.x, y=pos.y-1, z=pos.z}
end
doTeleportThing(cid, pos)
end
Agora va em talkactions.xml e adicione essa linha:
<talkaction words="!home" event="script" value="home.lua"/>








info
Group: Campones
Joined: 22/07/08
Posts: 56
Reputation: +5
Ae galera, achei um comando que quando dito você é tele transportado para frente da sua casa, so falar !home, o tele funciona apenas sem pz, vai logo abaixo uma foto, sera que alguém poderia me ajudar?
OT: Alissow Server, version 0.4.1 (Alissow) – 8.60
SS:
Estou no aguardo