Postado Agosto 15, 2015 9 anos alguém consegue fazer esta spell pra mim? obrigado Esse post me lembrou do filme Sempre ao Seu Lado (segura a referencia). Bom... Crie um arquivo .lua nas spells e cole isso dentro: local config = { gatesTime = 10, -- tempo em segundos exhaustStorage = 41000, exhaustTime = 15, createGates = {2720, 1438, 1438, 1438, 2720} -- ID dos portoes na ordem certa } local combat = createCombatObject() setCombatArea(combat, createCombatArea({ {1, 1, 3, 1, 1} })) local permittedPos = {} function onTargetTile(cid, pos) table.insert(permittedPos[cid], pos) end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") local function doSpell(cid, var) if(not isCreature(cid)) then return true end doCombat(cid, combat, var) for n, pos in ipairs(permittedPos[cid]) do doSendMagicEffect(pos, 5) doCreateItem(config.createGates[n], 1, pos) addEvent(function() if(getTileItemById(pos, config.createGates[n]).uid > 0) then doRemoveItem(getTileItemById(pos, config.createGates[n]).uid, 1) end end, config.gatesTime*1000) end return true end function onCastSpell(cid, var) permittedPos[cid] = {} if(isPlayer(cid) and exhaustion.check(cid, config.exhaustStorage)) then doPlayerSendCancel(cid, "Aguarde "..exhaustion.get(cid, config.exhaustStorage).." segundo"..(exhaustion.get(cid, config.exhaustStorage) > 1 and "s" or "").." para usar novamente.") doSendMagicEffect(getThingPos(cid), 2) return false end return doSpell(cid, var) end Espero que saiba ao menos configurar... Em spells.xml adicione a Tag: <instant name="NOME" words="NOME" lvl="50" mana="500" direction="1" aggressive="1" exhaustion="0" maglv="5" needlearn="0" event="script" value="NOME.lua"> <vocation id="1-2"/> </instant>
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.