Postado Dezembro 15, 2012 12 anos Fala pessoal do Tibia Burger King, sejam bem vindos ao meu primeiro tópico, onde vou ensina-los a criar uma quest parecida com a desert, do tibia global. Primeiramente, crie um arquivo na pasta Actions Chamado desertquest.lua e coloque isto lá 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, vá em Actions.XML e adicione a seguinte TAG: <action uniqueid="UNIQUEID DA ALAVANCA" script="desertquest.lua"/> Para editar, apenas mudem aqui: itemId = 6119 ----- Id do item, coloque 1 para cada vocação. playerPos = {x=1419, y=53, z=7} -- Posição do player newPos = {x=1447, y=53, z=7} --- Local aonde o player ficará de acordo com sua vocação itemPos = {x=1418, y=53, z=7} --- Posição do item É isso ae galera, como eu disse, é meu primeiro tópico, se tiver em lugar errado e tals, desculpem-me. Se gostarem, rep+!
Postado Maio 4, 2014 11 anos Rodrigo, cuidado, você reviveu um tópico de 2012, leia as regras! STYLLER OT 2022
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.