local function getRecorderPlayer(pos, cid)
local ret = 0
if cid and isPosEqual(getThingPos(cid), pos) then
return cid
end
local s = {}
s.x = pos.x
s.y = pos.y
s.z = pos.z
for a = 0, 255 do
s.stackpos = a
local b = getTileThingByPos(s).uid
if b > 1 and isPlayer(b) and getCreatureOutfit(b).lookType ~= 814 then
ret = b
end
end
return ret
end
------------[[ Configurações. ]]------------
local cfg = {
{1, {x = 1056, y = 1056, z = 7}, {x = 1056, y = 1057, z = 7}}, --{valor da storage do clan, posição que o jogador deve ficar, posição para qual o mesmo será teleportado},
{2, {x = 1057, y = 1056, z = 7}, {x = 1056, y = 1058, z = 7}},
{3, {x = 1058, y = 1056, z = 7}, {x = 1056, y = 1059, z = 7}},
{4, {x = 1059, y = 1056, z = 7}, {x = 1056, y = 1060, z = 7}},
{5, {x = 1060, y = 1056, z = 7}, {x = 1056, y = 1061, z = 7}},
{6, {x = 1061, y = 1056, z = 7}, {x = 1056, y = 1062, z = 7}},
{7, {x = 1062, y = 1056, z = 7}, {x = 1056, y = 1063, z = 7}},
{8, {x = 1063, y = 1056, z = 7}, {x = 1056, y = 1064, z = 7}},
{9, {x = 1064, y = 1056, z = 7}, {x = 1056, y = 1065, z = 7}},
}
local rank = {
need = true, --Precisará estar em x rank? [true/sim] [false/não]
what_rank = 5, --Se colocar true acima, configure aqui o rank necessário.
}
-----------[[ Fim das configurações. ]]---------
function onUse(cid, item, frompos, item2, topos)
for a, b in pairs(cfg) do
local pos = getRecorderPlayer(b[2])
if not isPlayer(pos) then
return doPlayerSendCancel(cid, "One or more players aren't in the correct clan's place.")
elseif rank.need == true then
if getPlayerStorageValue(pos, 862281) <= (rank.what_rank - 1) then
return doPlayerSendCancel(cid, "One or more players aren't at rank "..rank.what_rank..".")
end
end
end
for c, d in pairs(cfg) do
local pos = getRecorderPlayer(d[2])
doTeleportThing(pos, d[3])
doPlayerSendTextMessage(pos, 27, "Good luck!")
doSendMagicEffect(getThingPos(pos), 14)
end
return true
end
Tabela com valor das storages, e seus respectivos clans:
[1] = Volcanic [2] = Seavell [3] = Orebound [4] = Wingeon [5] = Malefic [6] = Gardestrike [7] = Psycraft [8] = Naturia [9] = Raibolt





info
Grupo: Cavaleiro
Registrado: 24/10/13
Posts: 180
Reputação: +46
Algum Scripter consegue fazer um script, que ao clicar em uma "alavanca" 9 players das posições indicadas, sejam teleportados cada um para um lugar diferente?
Obrigado
Vale 10 Rep+