Postado Julho 1, 2016 10 anos Este é um post popular. Eae galera, me deram ideia de uma spell bem legal então vou compartilhar com vocês, ela se trata de uma chuva de flechas. Código: Spoiler local config = { storage = 22004, cd = 10, --- duração effect1 = 22 -- efeito que sai ao falar a spell } --setPlayerStorageValue(target, 3482098, os.time() + config.duration) local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1, -60, 5, 5, 4, 7) local area = createCombatArea( { {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, }) setCombatArea(combat, area) function onCastSpell(cid, var) if exhaustion.check(cid, config.storage) == false then exhaustion.set(cid, config.storage, config.cd) pos = getPlayerPosition(cid) for i = 0, 7 do for j = 0, 7 do for s = 0, 255 do local player1 = getThingfromPos({x = pos.x+i, y = pos.y+j, z = pos.z, stackpos = s}) if isCreature(player1.uid) == TRUE then local pos2 = getCreaturePosition(player1.uid) doSendDistanceShoot(pos, pos2, config.effect1) end end end end for i = 0, 7 do for j = 0, 7 do for s = 0, 255 do local player1 = getThingfromPos({x = pos.x-i, y = pos.y-j, z = pos.z, stackpos = s}) if isCreature(player1.uid) == TRUE then local pos2 = getCreaturePosition(player1.uid) doSendDistanceShoot(pos, pos2, config.effect1) end end end end for i = 0, 7 do for j = 0, 7 do for s = 0, 255 do local player1 = getThingfromPos({x = pos.x-i, y = pos.y+j, z = pos.z, stackpos = s}) if isCreature(player1.uid) == TRUE then local pos2 = getCreaturePosition(player1.uid) doSendDistanceShoot(pos, pos2, config.effect1) end end end end for i = 0, 7 do for j = 0, 7 do for s = 0, 255 do local player1 = getThingfromPos({x = pos.x+i, y = pos.y-j, z = pos.z, stackpos = s}) if isCreature(player1.uid) == TRUE then local pos2 = getCreaturePosition(player1.uid) doSendDistanceShoot(pos, pos2, config.effect1) end end end end return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Cooldown for Chuva de Flechas is " ..exhaustion.get(cid, config.storage).." seconds") return false end end no spells.xml: Citar <instant name="Chuva de Flechas" words="chuva de flechas" lvl="80" manapercent="25" prem="1" soul="0" aggressive="0" exhaustion="1000" selftarget="1" needlearn="0" event="script" value="especiais/mas shadow.lua"> <vocation id="2"/> <vocation id="6"/> </instant> Um gif da spell: http://giphy.com/gifs/r0DNAlUJKUxeo
Postado Julho 1, 2016 10 anos Parabéns, seu tópico de conteúdo foi aprovado! Muito obrigado pela sua contribuição, nós do Tibia King agradecemos. Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP. Spoiler Congratulations, your content has been approved! Thank you for your contribution, we of Tibia King we are grateful. Your content will help many other users, you received +1 REP. ➥ Regras | Seções OTServ | Seções BOT
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.