
Tudo que xWhiteWolf postou
-
(Resolvido)Spell diferente
local config = { tempo = 10, --- tempo que vai durar a spell percent = 20, -- quanto % vai aumentar cooldown = 20, --- tempo entre um uso e outro effect1 = 39, -- efeito ao executar a spell effect2 = 13 -- efeito que vai ficar saindo por segundo enquanto ela tiver ativa } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setCombatParam(combat, COMBAT_PARAM_EFFECT, config.effect1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, config.tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUBPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORDPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_AXEPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 100+config.percent) setCombatCondition(combat, condition) function onCastSpell(cid, var) if getCreatureHealth(cid) <= (getCreatureMaxHealth(cid) * 0.3) then if os.time() - getPlayerStorageValue(cid, 54693) >= config.cooldown then doPlayerSetStorageValue(cid, 54693, os.time()) doCombat(cid, combat, var) for n = 1, config.tempo do addEvent(function() if isCreature(cid) then doSendMagicEffect(getCreaturePosition(cid), config.effect2) end end, (n - 1) * 1000) end else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 54693))).." seconds.") return false end else doPlayerSendCancel(cid, "You can only use this skill when you're with less than 30 percent of your life.") return false end return true end
-
[Duvida] Alguem Adiciona Dano ao usar na minha spell?
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -140, 2, -138, 2) setCombatParam(combat, COMBAT_PARAM_HITCOLOR, 89) function onCastSpell(cid, var) local waittime = 2 local storage = 7867 if exhaustion.check(cid, storage) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") return false end local target = getCreatureTarget(cid) local storagee = 2524 local position3 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} local position4 = {x=getThingPosition(getCreatureTarget(cid)).x, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} if exhaustion.check(cid, storagee) then doSendMagicEffect(position3, 159) doSendMagicEffect(getPlayerPosition(target), 25) doSendMagicEffect(getPlayerPosition(cid), 12) exhaustion.set(cid, storage, waittime) return false end local position1 = {x=getThingPosition(getCreatureTarget(cid)).x, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(position1, 230) exhaustion.set(cid, storage, waittime) doCreatureAddHealth(cid, -1000) return doCombat(cid, combat, var) end se quiser mudar a quantidade altere aqui: se deixar valores positivos ele vai adicionar vida, como é -1000 ele vai remover 1000.
-
(Resolvido)Spells diferentes
creaturescripts.xml <event type="statschange" name="defensive2" event="script" value="defensive2.lua"/> login.lua ---------- Defensive 2 ---------------- registerCreatureEvent(cid, "defensive2") if getPlayerStorageValue(cid, 3482102) < 0 then setPlayerStorageValue(cid, 3482102, 0) end defensive2.lua: local config = { storage = 3482102, effect1 = 2, --- efeito ao ser atacado e teleportar percent = 30 -- porcentagem de esquivar } function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS)) then if getPlayerStorageValue(cid,config.storage) > 0 and isCreature(attacker) and math.random(1,100) <= config.percent then doSendMagicEffect(getCreaturePosition(cid), config.effect1) doTeleportThing(cid, getCreaturePosition(attacker), false) doTargetCombatHealth(cid, attacker, 1, -50, -100, 255) setPlayerStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage) - 1) doPlayerSendTextMessage(cid, 20, "You have now ".. getPlayerStorageValue(cid, config.storage) .." charge(s).") return true end end return true end spells.xml: <instant name="kawarimi no jutsu attack" words="kawarimi no jutsu attack" lvl="16" mana="500" prem="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="especiais/kawarimiattack.lua"> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> </instant> kawarimiattack.lua local config = { storage = 3482102, cooldown = 3, --- tempo entre um uso e outro maxcharge = 20, --- máximo de cargas que dá pra acumular effect1 = 29 -- efeito que sai ao falar a spell } function onCastSpell(cid, var) if getPlayerStorageValue(cid, config.storage) >= 20 then doPlayerSendCancel(cid, "You already reached the max of charges for this skill.") return false end if os.time() - getPlayerStorageValue(cid, 55700) >= config.cooldown then setPlayerStorageValue(cid, 55700, os.time()) doSendMagicEffect(getCreaturePosition(cid), config.effect1) setPlayerStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage) + 1) doPlayerSendTextMessage(cid, 27, "You have now ".. getPlayerStorageValue(cid, config.storage) .." charge(s).") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55700))).." seconds.") return false end return true end Quando eu falei em duplicar tudo e mudar os nomes/storages era isso que eu tava falando..
-
(Resolvido)Spell de revidar ataque
qual a versão do seu server.. isso aí só funciona em 8.54+
-
Volatile Spiderling
essa linha vc teria que trocar pelo semelhante no seu server.. se for a função é só trocar, se não é só abrir o constant lua e procurar TALKTYPE_MONSTER_YELL = 20 Sobre o segundo problema, realmente, qnd der eu arrumo isso.. precisa só passar a spell do attack pra defesa que daí ela vai executar independente de ter alguém por perto ou não haha EDIT: se quiser arurmar é só trocar a spell da spider por isso daqui (a da spider mesmo, não a de invocar ela): local poisonpowder = createConditionObject(CONDITION_POISON) setConditionParam(poisonpowder, CONDITION_PARAM_DELAYED, 1) local damageTable = { {4, -3}, {9, -2}, {20, -1} } for i = 1, #damageTable do local t = damageTable[i] addDamageCondition(poisonpowder, t[1], 4000, t[2]) end local arr = { {0, 1, 0}, {1, 3, 1}, {0, 1, 0} } local area = createCombatArea(arr) function onCastSpell(cid, var) addEvent(function() if isCreature(cid) then doAreaCombatHealth(cid, 1, getThingPos(cid), area, -1, -30, 20) doAreaCombatCondition(cid, getThingPos(cid), area, poisonpowder, 255) doSendMagicEffect(getThingPos(cid), 16) doRemoveCreature(cid) end end, 100) return true end e o monstro spider vai ficar assim (perceba que tirei o ataque e coloquei na defesa) <?xml version="1.0" encoding="UTF-8"?> <monster name="Clone Spider" nameDescription="a spider" race="venom" experience="12" speed="152" manacost="210"> <health now="20" max="20"/> <look type="30" corpse="0"/> <targetchange interval="2000" chance="0"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="1"/> <flag convinceable="1"/> <flag pushable="0"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <!--<attack name="poison explosion" interval="1000" range="1" chance="50"/>--> </attacks> <defenses armor="2" defense="2"> <defense name="poison explosion" interval="4000" chance="99" duration="5000"> </defense> </defenses> <elements> <element firePercent="-10"/> </elements> <script> <event name="Spider"/> </script> </monster> perceba que vc pode manter ambos ativados (a spell de ataque pra ele só ativar a explosão qnd tiver a 1 sqm de distância do target e a spell de defesa pra explodir dps de X segundos se ele não tiver target) se usar o script anterior (só alterando os intervals).. seguinte: <defense name="poison explosion" interval="4000" chance="99" duration="5000"> a cada 4 segundos ele tem 99% de chance de executar o scrit e explodir, como isso é uma defesa e não um ataque ele vai utilizar mesmo q vc não esteja na dela da spider e mesmo q nao haja inimigos
-
[Duvida] Alguem Adiciona Dano ao usar na minha spell?
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 2) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -9.0, -30, -10.0, 4) function onCastSpell(cid, var) local waittime = 2 local storage = 7867 if exhaustion.check(cid, storage) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") return false end local target = getCreatureTarget(cid) local storagee = 2524 local position3 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} local position4 = {x=getThingPosition(getCreatureTarget(cid)).x, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} if exhaustion.check(cid, storagee) then doSendMagicEffect(position3, 159) doSendMagicEffect(getPlayerPosition(target), 25) doSendMagicEffect(getPlayerPosition(cid), 12) exhaustion.set(cid, storage, waittime) return false end local position1 = {x=getThingPosition(getCreatureTarget(cid)).x, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(position1, 230) exhaustion.set(cid, storage, waittime) return doCombat(cid, combat, var) end testa assim
-
[SPELL] Kamui in
não daria certo nesse caso haha mas isso resolve um monte de outros problemas
-
[Pedido] Mensagem de cooldown restante
nesse caso vc teria que fazer a exhaust por storage.. é a unica forma :/
-
(Resolvido)[Spell] Exori Element
<instant name="testeTK" words="exevoelemental" lvl="16" mana="500" soul="50" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script" value="especiais/exevoelemental.lua"> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> </instant> local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1) local deathpowder = createConditionObject(CONDITION_CURSED) setConditionParam(deathpowder, CONDITION_PARAM_DELAYED, 1) addDamageCondition(deathpowder, 10, 1000, -200) setCombatCondition(combat3, deathpowder) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, parameters.combat3, parameters.var) end function onCastSpell(cid, var) local parameters = {cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3} addEvent(onCastSpell1, 1000, parameters) addEvent(onCastSpell2, 1500, parameters) addEvent(onCastSpell3, 2000, parameters) return true end
-
(Resolvido)Spells diferentes
muda isCreature(attacker) pra isPlayer(attacker)
-
(Resolvido)Spell para ficar intocavel
podia pelo menos me agradecer dando rep no tópico né, to fazendo tudo de boa vontade..
-
(Resolvido)Spells diferentes
1- creaturescripts.xml <event type="statschange" name="defensive1" event="script" value="defensive1.lua"/> login.lua ---------- Defensive 1 ---------------- registerCreatureEvent(cid, "defensive1") if getPlayerStorageValue(cid, 3482101) < 0 then setPlayerStorageValue(cid, 3482101, 0) end creaturescripts\scripts\defensive1.lua local config = { storage = 3482101, effect1 = 2, --- efeito ao ser atacado estando invulnerável percent = 30 -- porcentagem de esquivar } function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS)) then if getPlayerStorageValue(cid,config.storage) > 0 and isCreature(attacker) and math.random(1,100) <= config.percent then doSendMagicEffect(getCreaturePosition(cid), config.effect1) doSendAnimatedText(getCreaturePosition(cid), "-kawarimi-", 215) setPlayerStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage) - 1) doPlayerSendTextMessage(cid, 20, "You have now ".. getPlayerStorageValue(cid, config.storage) .." charge(s).") return false end end return true end 2- creaturescripts\scripts\defensive2.lua local config = { storage = 3482101, effect1 = 2, --- efeito ao ser atacado e teleportar percent = 30 -- porcentagem de esquivar } function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS)) then if getPlayerStorageValue(cid,config.storage) > 0 and isCreature(attacker) and math.random(1,100) <= config.percent then doSendMagicEffect(getCreaturePosition(cid), config.effect1) doTeleportThing(cid, getCreaturePosition(attacker), false) doTargetCombatHealth(cid, attacker, 1, -50, -100, 255) setPlayerStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage) - 1) doPlayerSendTextMessage(cid, 20, "You have now ".. getPlayerStorageValue(cid, config.storage) .." charge(s).") return true end end return true end (o resto é a mesma coisa, só muda os storages e os nomes né) Agora pra ambos vc vai fazer essa mesma spell: spells.xml <instant name="kawarimi no jutsu defensive" words="kawarimi no jutsu defensive" lvl="16" mana="500" prem="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="especiais/kawarimi.lua"> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> </instant> data\spells\scripts\especiais\kawarimi.lua local config = { storage = 3482101, cooldown = 3, --- tempo entre um uso e outro maxcharge = 20, --- máximo de cargas que dá pra acumular effect1 = 29 -- efeito que sai ao falar a spell } function onCastSpell(cid, var) if getPlayerStorageValue(cid, config.storage) >= 20 then doPlayerSendCancel(cid, "You already reached the max of charges for this skill.") return false end if os.time() - getPlayerStorageValue(cid, 55697) >= config.cooldown then setPlayerStorageValue(cid, 55697, os.time()) doSendMagicEffect(getCreaturePosition(cid), config.effect1) setPlayerStorageValue(cid, config.storage, getPlayerStorageValue(cid, config.storage) + 1) doPlayerSendTextMessage(cid, 27, "You have now ".. getPlayerStorageValue(cid, config.storage) .." charge(s).") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55697))).." seconds.") return false end return true end Lembrando que se vc quiser ter ambas as spells vc precisa duplicar os scripts e mudar os storages/nomes
-
(Resolvido)Spell para ficar intocavel
só muda a spell e tira a condition invisible: local config = { storage = 3482101, cooldown = 30, --- tempo entre um uso e outro duration = 5, --- duração effect1 = 29 -- efeito que sai ao falar a spell } function onCastSpell(cid, var) if os.time() - getPlayerStorageValue(cid, 55695) >= config.cooldown then setPlayerStorageValue(cid, 55695, os.time()) doSendMagicEffect(getCreaturePosition(cid), config.effect1) setPlayerStorageValue(cid, config.storage, os.time() + config.duration) doCreatureSay(cid,"UNTOUCHABLE!!!", 19) doPlayerSendTextMessage(cid, 27, "You have now ".. config.duration .." seconds of invulnerability.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55695))).." seconds.") return false end return true end
-
(Resolvido)Spell para ficar intocavel
@skailord, você não pode dar up no tópico dos outros a não ser que tenha passado 24 hrs. Leia as regras spells\scripts\especiais\invencible.lua local config = { storage = 3482101, cooldown = 30, --- tempo entre um uso e outro duration = 5, --- duração effect1 = 29 -- efeito que sai ao falar a spell } local outfit = createConditionObject(CONDITION_INVISIBLE, config.duration * 1000, false) function onCastSpell(cid, var) if os.time() - getPlayerStorageValue(cid, 55695) >= config.cooldown then setPlayerStorageValue(cid, 55695, os.time()) doSendMagicEffect(getCreaturePosition(cid), config.effect1) setPlayerStorageValue(cid, config.storage, os.time() + config.duration) doCreatureSay(cid,"UNTOUCHABLE!!!", 19) doAddCondition(cid, outfit) doPlayerSendTextMessage(cid, 27, "You have now ".. config.duration .." seconds of invulnerability.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55695))).." seconds.") return false end return true end spells.xml <instant name="testeTK" words="naruto3" lvl="16" mana="500" prem="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="especiais/invencible.lua"> </instant> creaturescripts\scripts\login.lua: ---------- Invencible ---------------- registerCreatureEvent(cid, "invencible") if getPlayerStorageValue(cid, 3482101) ~= 0 then setPlayerStorageValue(cid, 3482101, 0) end creaturescripts.xml: <event type="statschange" name="invencible" event="script" value="invencible.lua"/> creaturescripts\scripts\invencible.lua local config = { storage = 3482101, effect1 = 2 --- efeito ao ser atacado estando invulnerável } function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS)) then if getPlayerStorageValue(cid,config.storage) - os.time() > 0 and isCreature(attacker) then doSendMagicEffect(getCreaturePosition(cid), config.effect1) doSendAnimatedText(getCreaturePosition(cid), "0", 180) return false end end return true end Usei o mesmo storage da outra spell que fiz pra vc uchihagaeshi, mude o storage em todos os scripts ;]
- (Resolvido)Ajuda Spell Do Video
-
(Resolvido)Spell de revidar ataque
spells/scripts/especiais/uchihagaeshi.lua local config = { storage = 3482101, cooldown = 20, effect1 = 29 --- efeito que sai qnd usa a spell } function onCastSpell(cid, var) if getPlayerStorageValue(cid, config.storage) == 1 then doPlayerSendCancel(cid, "Your skill is already active.") return false end if os.time() - getPlayerStorageValue(cid, 55694) >= config.cooldown then setPlayerStorageValue(cid, 55694, os.time()) doSendMagicEffect(getCreaturePosition(cid), config.effect1) setPlayerStorageValue(cid, config.storage, 1) doPlayerSendTextMessage(cid, 27, "You activated your skill, the next damage will be reflected.") else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 55694))).." seconds.") return false end return true end spells.xml <instant name="testeTK" words="naruto3" lvl="16" mana="500" prem="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="especiais/uchihagaeshi.lua"> </instant> creaturescripts.xml: <event type="statschange" name="uchihagaeshi" event="script" value="uchihagaeshi.lua"/> creaturescripts\scripts\uchihagaeshi.lua: local config = { storage = 3482101, effect1 = 17, --- efeito que sai ao dar reflect effect2 = 29 -- efeito que aparece na pessoa que levou reflect } function onStatsChange(cid, attacker, type, combat, value) if value >= 1 and (type == STATSCHANGE_HEALTHLOSS or (getCreatureCondition(cid, CONDITION_MANASHIELD) and type == STATSCHANGE_MANALOSS)) then if getPlayerStorageValue(cid,config.storage) == 1 and isCreature(attacker) then doSendAnimatedText(getCreaturePosition(attacker),"-"..value, 215) doCreatureAddHealth(attacker, -value, true) doCreatureSay(cid,"Uchihagaeshi!", 19) doSendMagicEffect(getCreaturePosition(cid), config.effect1) doSendMagicEffect(getCreaturePosition(attacker), config.effect2) setPlayerStorageValue(cid,config.storage, 0) return false end end return true end creaturescripts\scripts\login.lua: ---------- UCHIHAGAESHI ---------------- registerCreatureEvent(cid, "uchihagaeshi") if getPlayerStorageValue(cid, 3482101) ~= 0 then setPlayerStorageValue(cid, 3482101, 0) end Se for editar storage tem que editar em todos os scripts
-
(Resolvido)Spell diferente
<instant name="testeTK" words="naruto2" lvl="16" mana="500" prem="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="especiais/rage.lua"> <vocation id="5"/> <vocation id="6"/> </instant> local config = { tempo = 10, --- tempo que vai durar a spell percent = 20, -- quanto % vai aumentar cooldown = 20, --- tempo entre um uso e outro effect1 = 39, -- efeito ao executar a spell effect2 = 13 -- efeito que vai ficar saindo por segundo enquanto ela tiver ativa } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setCombatParam(combat, COMBAT_PARAM_EFFECT, config.effect1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, config.tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUBPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORDPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_AXEPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 100+config.percent) setCombatCondition(combat, condition) function onCastSpell(cid, var) if getCreatureHealth(cid) <= (getCreatureMaxHealth(cid) * 0.3) then if os.time() - getPlayerStorageValue(cid, 54693) >= config.cooldown then doPlayerSetStorageValue(cid, 54693, os.time()) doCombat(cid, combat, var) for n = 1, config.tempo do addEvent(function() if isCreature(cid) then doSendMagicEffect(getCreaturePosition(cid), config.effect2) end end, (n - 1) * 1000) end else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, 54693))).." seconds.") end else doPlayerSendCancel(cid, "You can only use this skill when you're with less than 30 percent of your life.") end return true end
-
(Resolvido)[~Duvida~] Como eu faço um combo?
como assim cara, isso daí não é combo.. são só spells soltadas em sequência
-
erro ao usar item na armor para deixar +1.+2...
não conheço pq nunca mexi com 1.0 e nenhuma dessas funções dá pra substituir a do getItemWeaponType :/
-
erro ao usar item na armor para deixar +1.+2...
seu server não tem a função getItemWeaponType.. verifica o novo nome da função pra TFS 1.0 em alguma lista de funções ou para de usar o script
-
(Resolvido)[~Duvida~] Como eu faço um combo?
local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 17) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4, -70, -3, -90, 2, 2, 1, 4) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 17) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -4, -70, -3, -90, 2, 2, 1, 4) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 17) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -4, -70, -3, -90, 2, 2, 1, 4) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 17) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -4, -70, -3, -90, 2, 2, 1, 4) local combat5 = createCombatObject() setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat5, COMBAT_PARAM_EFFECT, 17) setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -4, -70, -3, -90, 2, 2, 1, 4) local combat6 = createCombatObject() setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat6, COMBAT_PARAM_EFFECT, 17) setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -4, -70, -3, -90, 2, 2, 1, 4) local combat7 = createCombatObject() setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat7, COMBAT_PARAM_EFFECT, 17) setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -4, -70, -3, -90, 2, 2, 1, 4) local combat8 = createCombatObject() setCombatParam(combat8, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat8, COMBAT_PARAM_EFFECT, 17) setCombatFormula(combat8, COMBAT_FORMULA_LEVELMAGIC, -4, -70, -3, -90, 2, 2, 1, 4) arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) local area5 = createCombatArea(arr5) local area6 = createCombatArea(arr6) local area7 = createCombatArea(arr7) local area8 = createCombatArea(arr8) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) setCombatArea(combat5, area5) setCombatArea(combat6, area6) setCombatArea(combat7, area7) setCombatArea(combat8, area8) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, parameters.combat3, parameters.var) end local function onCastSpell4(parameters) doCombat(parameters.cid, parameters.combat4, parameters.var) end local function onCastSpell5(parameters) doCombat(parameters.cid, parameters.combat5, parameters.var) end local function onCastSpell6(parameters) doCombat(parameters.cid, parameters.combat6, parameters.var) end local function onCastSpell7(parameters) doCombat(parameters.cid, parameters.combat7, parameters.var) end local function onCastSpell8(parameters) doCombat(parameters.cid, parameters.combat8, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5, combat6 = combat6, combat7 = combat7 , combat8 = combat8 } addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 200, parameters) addEvent(onCastSpell3, 300, parameters) addEvent(onCastSpell4, 400, parameters) addEvent(onCastSpell5, 500, parameters) addEvent(onCastSpell6, 600, parameters) addEvent(onCastSpell7, 700, parameters) addEvent(onCastSpell8, 800, parameters) --1 addEvent(onCastSpell1, 900, parameters) addEvent(onCastSpell2, 1000, parameters) addEvent(onCastSpell3, 1200, parameters) addEvent(onCastSpell4, 1400, parameters) addEvent(onCastSpell5, 1500, parameters) addEvent(onCastSpell6, 1600, parameters) addEvent(onCastSpell7, 1700, parameters) addEvent(onCastSpell8, 1800, parameters) --2 addEvent(onCastSpell1, 1900, parameters) addEvent(onCastSpell2, 2000, parameters) addEvent(onCastSpell3, 2100, parameters) addEvent(onCastSpell4, 2200, parameters) addEvent(onCastSpell5, 2300, parameters) addEvent(onCastSpell6, 2400, parameters) addEvent(onCastSpell7, 2500, parameters) addEvent(onCastSpell8, 2600, parameters) --3 addEvent(onCastSpell1, 2700, parameters) addEvent(onCastSpell2, 2800, parameters) addEvent(onCastSpell3, 2900, parameters) addEvent(onCastSpell4, 3000, parameters) addEvent(onCastSpell5, 3100, parameters) addEvent(onCastSpell6, 3200, parameters) addEvent(onCastSpell7, 3300, parameters) addEvent(onCastSpell8, 3400, parameters) --4 addEvent(onCastSpell1, 3500, parameters) addEvent(onCastSpell2, 3600, parameters) addEvent(onCastSpell3, 3700, parameters) addEvent(onCastSpell4, 3800, parameters) addEvent(onCastSpell5, 3900, parameters) addEvent(onCastSpell6, 4000, parameters) addEvent(onCastSpell7, 4100, parameters) addEvent(onCastSpell8, 4200, parameters) --5 addEvent(onCastSpell1, 4300, parameters) addEvent(onCastSpell2, 4400, parameters) addEvent(onCastSpell3, 4500, parameters) addEvent(onCastSpell4, 4600, parameters) addEvent(onCastSpell5, 4700, parameters) addEvent(onCastSpell6, 4800, parameters) addEvent(onCastSpell7, 4900, parameters) addEvent(onCastSpell8, 5000, parameters) --6 addEvent(onCastSpell1, 5100, parameters) addEvent(onCastSpell2, 5200, parameters) addEvent(onCastSpell3, 5300, parameters) addEvent(onCastSpell4, 5400, parameters) addEvent(onCastSpell5, 5500, parameters) addEvent(onCastSpell6, 5600, parameters) addEvent(onCastSpell7, 5700, parameters) addEvent(onCastSpell8, 5800, parameters) --7 addEvent(onCastSpell1, 5900, parameters) addEvent(onCastSpell2, 6000, parameters) return true end a diferença de uma magia com addEvent pra uma magia comum é que vc precisa definir diversos combats e áreas mas a magia vira um gif...
-
[PEDIDO] Spell Buff
o problema de copiar spell de outros servidores é que você tem que fazer exatamente as alterações que eles fizeram na source.. eu to te falando de antemão que não dá pra criar uma spell assim porque um server tem regras definidas na source, se eles editaram o server inteiro pra alterar as regras aí é com eles.
-
(Resolvido)[~Duvida~] Como eu faço um combo?
copia outra spell que ja tenha isso e edita.. é a forma mais fácil eu acho
- (Resolvido)Spell Henge No Justu
-
(Resolvido)Como mudar effect de um spell
era só adicionar a linha setCombatParam(combat, COMBAT_PARAM_EFFECT, 12) em cada um dos combats.. onde 12 é o efeito, fica assim: local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 124) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 12) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -34.2, 1, -34.2, 1) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 124) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 12) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -33.1, 1, -33.6, 1) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 124) setCombatParam(combat3, COMBAT_PARAM_EFFECT, 12) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -35.4, 1, -32.5, 1) local combat4 = createCombatObject() setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 124) setCombatParam(combat4, COMBAT_PARAM_EFFECT, 12) setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -32.3, 1, -33.5, 1) arr1 = { {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} } arr2 = { {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} } arr3 = { {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} } arr4 = { {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} } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) local area3 = createCombatArea(arr3) local area4 = createCombatArea(arr4) setCombatArea(combat1, area1) setCombatArea(combat2, area2) setCombatArea(combat3, area3) setCombatArea(combat4, area4) local function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end local function onCastSpell2(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var) end local function onCastSpell3(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat3, parameters.var) end local function onCastSpell4(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat4, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 200, parameters) addEvent(onCastSpell2, 300, parameters) addEvent(onCastSpell2, 400, parameters) return TRUE end