Uma QuesT Meio Diferente [ DESERT QUEST ] NAO SEI SE JA EXISTE UMA ASSIM AQUI NO XTIBIA [^.^]
Vou Explicar Os Detalhes No Final.
Crie Um Arquivo Na Pasta Actions Chamado [ desertquest.lua ] e Coloque Isso Dentro.
local config = {-- level needed to make the quest
level = 20,
-- if players should be able to do the quest unlimited amount of times (not conflicting quest rewards)
redo = {
status = true, -- true = unlimited, false = once
storageValue = 10035 -- only if status is false this will be used
},
-- vocation requirement, positions and item configuration
{
vocations = {1, 5},
itemId = 6119,
playerPos = {x=1419, y=53, z=7},
newPos = {x=1447, y=53, z=7},
itemPos = {x=1418, y=53, z=7}
},
{
vocations = {2, 6},
itemId = 6103,
playerPos = {x=1422, y=50, z=7},
newPos = {x=1449, y=53, z=7},
itemPos = {x=1422, y=49, z=7}
},
{
vocations = {3, 7},
itemId = 4852,
playerPos = {x=1422, y=56, z=7},
newPos = {x=1451, y=53, z=7},
itemPos = {x=1422, y=57, z=7}
},
{
vocations = {4, 8},
itemId = 5804,
playerPos = {x=1425, y=53, z=7},
newPos = {x=1453, y=53, z=7},
itemPos = {x=1426, y=53, z=7}
}
}
function onUse(cid)
local players = {}
for _, v in ipairs(config) do
v.playerPos.stackpos = 253
local player = getThingfromPos(v.playerPos).uid
if isPlayer(player) == FALSE then
return doPlayerSendCancel(cid, "There are not enough players.")
elseif getPlayerLevel(player) < config.level then
players.level = true
elseif isInArray(v.vocations, getPlayerVocation(player)) == FALSE then
players.vocation = true
elseif config.redo.status and getPlayerStorageValue(cid, config.redo.storageValue) ~= TRUE then
players.done = true
else
v.itemPos.stackpos = 1
local item = getThingfromPos(v.itemPos)
if item.itemid ~= v.itemId then
players.item = true
else
table.insert(players, player)
end
end
end
if players.level then
doPlayerSendCancel(cid, "All players need to be level " .. config.level .. " or above.")
elseif players.vocation then
doPlayerSendCancel(cid, "All players must stand on the correct tiles.")
elseif players.done then
doPlayerSendCancel(cid, "A player in your team has already done this quest.")
elseif players.item then
doPlayerSendCancel(cid, "All items must be on the correct positions.")
else
for k, player in ipairs(players) do
doSendMagicEffect(getCreaturePosition(player), CONST_ME_POFF)
doTeleportThing(player, config[k].newPos)
doSendMagicEffect(getCreaturePosition(player), CONST_ME_TELEPORT)
end
end
return TRUE
end
<-------->
Depois Va Em Action.Xml e Adicione a Seguinte Tag.
<action uniqueid="UNIQUEID DA ALAVANCA" script="desertquest.lua"/>
Editem De Acordo Com Sua Vontade ..
itemId = 6119 ----- ID DO ITEM COLOQUE UM ITEM PRA CDA VOCplayerPos = {x=1419, y=53, z=7} -- POSIÇÃO DO PLAYER
newPos = {x=1447, y=53, z=7} --- LOCAL PRA OND O PLAYER VAI DE ACORDO COM A VOC
itemPos = {x=1418, y=53, z=7} --- POSIÇÂO DO ITEM
Meu Primeiro Topico Desculpe Se Poste Em Lgar Errado ou Qualquer Coisa ..
GOSTOU ? REP+ :button_ok:
Valeus ..