Em data/talkactions/scripts crie um arquivo.lua e cole isto dentro:
local config = {
pos = {x=1, y=1, z=1}, -- posicao do templo
time = 1, --- tempo em horas
wall = {x=1, y=1, z=1, stackpos=1}, -- posição da primeira wall // não mexa no stackpos
walli = {x=1, y=1, z=1,stackpos=1}, -- posição da segunda wall
idwall = 1111 -- id da wall
}
function onSay(cid, item, position, words, param)
local players = getPlayersOnline()
for i=1, #players do
doTeleportThing(players[i], config.pos)
end
doBroadcastMessage("Area vip está aberta por ".. config.time .." hora.")
doRemoveItem(getThingfromPos(config.wall).uid, 1)
doRemoveItem(getThingfromPos(config.walli).uid, 1)
addEvent(createStone, config.time*60*60*1000)
addEvent(backTemple, config.time*60*60*1000)
return true
end
function createStone()
doCreateItem(config.idwall, 1, config.wall)
doCreateItem(config.idwall, 1, config.walli)
end
function backTemple()
local players = getPlayersOnline()
for i=1, #players do
doTeleportThing(players[i], config.pos)
end
doBroadcastMessage("Area vip foi fechada.")
db.executeQuery("UPDATE `players` SET `posx` = '"..config.pos.x.."', `posy` = '"..config.pos.y.."', `posz` = '"..config.pos.z.."';")
return true
end
Em talkactions.xml adicione a tag: <talkaction words="/openvip" script="NOMEDOSEUARQUIVO.lua"/>
É só editar as posições e o id da wall no script. Vlw, espero ter ajudado.