Postado Novembro 14, 2012 12 anos Bom, esse script funciona da seguinte maneira. Uma quest que ao clicar no baú, cada vocação ganha o Item configurável por voce. Ex: Mage ganha wand, Kina ganha Sword, Pally Bolt etc... Isso tudo em só 1 Chest. Citar <action actionid="ACTION_ID;" event="script" value="SCRIPT_NAME.lua"/> actions/scripts/script.lua Citar local config = { [ACTION_ID] = { premiumOnly = false, storage = 15150, level = 20, t = { [{1, 5}] = { {ITEM_ID, COUNT}, {ITEM_ID, COUNT} }, [{2, 6}] = { {ITEM_ID, COUNT}, {ITEM_ID, COUNT} }, [{3, 7}] = { {ITEM_ID, COUNT}, {ITEM_ID, COUNT} }, [{4, 8}] = { {ITEM_ID, COUNT}, {ITEM_ID, COUNT} } } } } function onUse(cid, item, fromPosition, itemEx, toPosition) local v = config[item.actionid] if(v.premiumOnly) then if(not isPremium(cid)) then doPlayerSendCancel(cid, "Sorry, you are not a Premium member.") return true end end if(getCreatureStorage(cid, v.storage) > 0) then doPlayerSendCancel(cid, "The " .. getItemName(item.uid) .. " is empty.") return true end if(getPlayerLevel(cid) < v.level) then doPlayerSendCancel(cid, "Sorry, not possible.") return true end for voc, k in pairs(v.t) do if(isInArray(voc, getPlayerVocation(cid))) then for i = 1, #k do local id = doCreateItemEx(k[1], k[2] or 1) if(doPlayerAddItemEx(cid, id) ~= RETURNVALUE_NOERROR) then return doPlayerSendCancel(cid, #k == 1 and "You cannot carry this item." or "You cannot carry these items."), false end end doCreatureSetStorage(cid, v.storage, 1) local msg = "You have found" if #k > 0 then for p = 1, #k do msg = msg .. " " .. k[p][2] .. " " .. (#k == 1 and "" .. getItemInfo(k[p][1]).name .. "" or "" .. getItemInfo(k[p][1]).plural .. "") .. " " end end doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, msg) doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_BLUE) end end return true end Créditos: J.Dre
Postado Novembro 14, 2012 12 anos eu tinha feito um script assim pra um ot de war que eu pretendia abrir kkk (mais não deu \:) o script é legal, principalmente pra galera do baiak que bota as quest la de item vip no final 16/11/2014 23/11/2014 RIP AnneMotta 21/01/2012 - 15/01/2014 Liga das lendas: DIAMOND É A META
Postado Dezembro 27, 2014 10 anos Parecido com o meu kk (http://www.tibiaking.com/forum/topic/48280-action-vocation-quest/). Apesar do seu ter mais funções, como level minimo e premium. Mas acho que deveria tirar o level do chest e colocar na door para entrar na quest. Porque as vezes a pessoa faz a quest, e quando chega no final, não tem level pra pegar o premio hehe. Enfim, gostei, reputado "Chegamos a este mundo com os olhos fechados... E a maioria escolhe viver com os olhos assim."
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.