Ir para conteúdo
Banner com Efeitos

Vorkhon

Membro
  • Registro em

  • Última visita

Tudo que Vorkhon postou

  1. Funcionou amigo! Muito obrigado!
  2. Não estou conseguindo usar ROPE no meu pé. Erro da distro: [25/9/2020 14:34:19] [Error - Action Interface] [25/9/2020 14:34:19] data/actions/scripts/tools/rope.lua:onUse [25/9/2020 14:34:19] Description: [25/9/2020 14:34:19] data/lib/050-function.lua:37: bad argument #1 to 'ipairs' (table expected, got number) [25/9/2020 14:34:19] stack traceback: [25/9/2020 14:34:19] [C]: in function 'ipairs' [25/9/2020 14:34:19] data/lib/050-function.lua:37: in function 'isInArray' [25/9/2020 14:34:19] data/actions/scripts/tools/rope.lua:13: in function <data/actions/scripts/tools/rope.lua:2> Script ROPE local holeId = {294, 369, 370, 383, 392, 408, 409, 427, 428, 430, 462, 469, 470, 482, 484, 485, 489, 924, 3135, 3136} function onUse(cid, item, fromPosition, itemEx, toPosition) local groundTile = getThingfromPos(toPosition) if groundTile.itemid == 384 or groundTile.itemid == 418 or groundTile.itemid == 8278 then doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, FALSE) elseif isInArray(holeId, itemEx.itemid) == TRUE then local hole = getThingfromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE}) if hole.itemid > 0 then doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, FALSE) else doPlayerSendCancel(cid, "Sorry, not possible.") end elseif isInArray(5967, itemEx.itemid) == TRUE then doSetGameState(GAMESTATE_SHUTDOWN) else return FALSE end return TRUE end
  3. Não deu, mas é quase isso cara. Esse target eu acho que só funciona para spells tipo "exori flam" que precisam do target. Tem que fazer ele entender que o target é quem levou o hit pela wave. Acredito que seja um detalhezinho que falta. Para usar o seu por enquanto estou usando needtarget="1", mas isso fica meio estranho. EDIT: To testando ela aqui e tem um erro dando na distro quando o monstro morre. Tipo se tu mata com a spell assim como ta ele procura onde ta a criatura para tirar o NotMove mas não encontra. Tem como arrumar isso? [24/9/2020 13:3:49] In a timer event called from: [24/9/2020 13:3:49] data/spells/scripts/especial/teste.lua:onCastSpell [24/9/2020 13:3:49] Description: [24/9/2020 13:3:49] (luaDoCreatureSetNoMove) Creature not found Olha como ficou o script: local combat, area = createCombatObject(), createCombatArea(AREA_BEAM6,AREADIAGONAL_BEAM6) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) setCombatArea(combat, area) local condition = createConditionObject(CONDITION_OUTFIT) setConditionParam(condition, CONDITION_PARAM_TICKS, 6000) for i = 5474, 5474 do addOutfitCondition(condition, {lookTypeEx = i}) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, 6000) setConditionParam(condition, CONDITION_PARAM_SPEED, -700) setCombatCondition(combat, condition) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1, -60, 5, 5, 4, 7) end setCombatCondition(combat, condition) function onCastSpell(cid, var) local target = getCreatureTarget(cid) doCreatureSetNoMove(target, true) addEvent(doCreatureSetNoMove, 6 * 1000, target, false) return doCombat(cid, combat, var) end
  4. Quero por essa spell em uma wave. Acerta a wave no player e ele fica com esse paralyze ai. Como eu faria?
  5. Fala pessoal. Eu quero fazer uma spell que faz uma wave, da dano, transforma quem atingir em um item, e deixe imóvel e mutado por 5 segundos. Por enquanto estou usando paralyze, mas acho muito ruim, pois pode ser curado ai fica o item andando. Segue o código que eu tenho: local combat, area = createCombatObject(), createCombatArea(AREA_BEAM6,AREADIAGONAL_BEAM6) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) setCombatArea(combat, area) local condition = createConditionObject(CONDITION_OUTFIT) setConditionParam(condition, CONDITION_PARAM_TICKS, 12000) for i = 5474, 5474 do addOutfitCondition(condition, {lookTypeEx = i}) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA) local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, 12000) setConditionParam(condition, CONDITION_PARAM_SPEED, -700) setCombatCondition(combat, condition) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1, -60, 5, 5, 4, 7) end setCombatCondition(combat, condition) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  6. Vorkhon postou uma resposta no tópico em Suporte Tibia OTServer
    Exevo gran mas ressurect!
  7. Fala pessoal. Eu quero saber se é possível eu deixar o Ambient Light travado, meu objetivo é deixar o jogo mais "Dark". Queria travar em 30-40%. Uso um Baiak e tenho sources. Por enquanto eu não queria optar pelo OTClient, pois estou com problema em transferir o dat e spr do meu serer. Só se for o único metodo mesmo. EDIT: Resolvi testar o OTClient e acabei gostando, porém eu consgui apenas deixar o Ambient light inicial, o player pode ir la e mudar depois, eu nao consegui travar as opcoes de quantidade de ambient light.
  8. Vorkhon postou uma resposta no tópico em Suporte OTServer Derivados
    Ola pessoal eu estou procurando Sprites de monstros titanicos. Quero por de enfeite em alguns lugares do meu OT. Alguém tem algo de 128x128 ou mais?
  9. Vorkhon postou uma resposta no tópico em Sistemas, Mods & Funções .lua
    Valeu irmão! Não posso testar agora, ficaria algo assim? <action itemid="3955" event="script" /> <![CDATA[ function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) then getPlayerName(itemEx.uid)
  10. Ola pessoal. Esta acontecendo um bug muito sinistro nas minhas spells. Bom eu editei um script que faz uma estatua e ataca. Eu fiz com que crie um totem e depois ele de uma cura em area, e fiz com o mesmo modelo outra spell que faz um ataque em area. Isoladas elas funcionam, mas quando eu adiciono as 2 juntas as 2 ficam iguais é muito absurdo. Seguinte eu faço toda a spell de cura, uso ela in game, faz a estatua especifica de cura, e faz a magia de cura. Ai quando eu faço a spell de dano, ela cria a estuatua de dano, mas ela faz o mesmo efeito de cura da primeira spell. Sendo que no script não tem absolutamente nada de efeito de magia azul, nem efeito de cura, e só faz 1 wave de dano, o de cura faz 3. Ele copia exatamente a primeira spell. Ai se eu deleto a spell de cura, a de dano funciona automaticamente como tem que funcionar... Alguem porfavor tem alguma ideia do que seja isso? Você tem o código disponível? Se tiver publique-o aqui: <instant name="Curse Totem" words="Curse Totem" lvl="40" mana="200" selftarget="0" agressive="1" exhaustion="1000" needlearn="0" event="script" value="cursetotem.lua"> <vocation id="6"/> </instant> <instant name="Life Totem" words="Life Totem" lvl="40" mana="400" agressive="0" exhaustion="1000" needlearn="0" event="script" value="exzential/lifetotem.lua"> <vocation id="6"/> </instant> SPELL 1 local config = { statue = 3804, range = 5, max_dmg = -1500, min_dmg = -500, hit_delay = 1000, statue_time = 10*1000, cd = 20, stg = 5570 } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_BLUEMAGIC) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -5, -1, -12, 4, 4, 5, 9) arr = { {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, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr) setCombatArea(combat, area) function removeItem(pos) doRemoveItem(getTileItemById(pos, config.statue).uid) end function itemInteraction(cid, pos, var) addEvent(removeItem, config.statue_time, pos) addEvent(doSendAnimatedText, 300, pos, '3...', 215) addEvent(doSendAnimatedText, 900, pos, '2...', 215) addEvent(doSendAnimatedText, 1500, pos, '1...', 215) addEvent(doAreaCombatHealth, 2100, cid, COMBAT_HEALING, pos, area, 800, 1500, 12) addEvent(doAreaCombatHealth, 3000, cid, COMBAT_HEALING, pos, area, 800, 1500, 12) addEvent(doAreaCombatHealth, 3900, cid, COMBAT_HEALING, pos, area, 800, 1500, 12) end function onCastSpell(cid, var) if not isPlayer(cid) then return false end if getPlayerStorageValue(cid, config.stg) - os.time() <= 0 then setPlayerStorageValue(cid, config.stg, os.time() + config.cd) local pos = Position(getCreaturePosition(cid).x, getCreaturePosition(cid).y+1, getCreaturePosition(cid).z) doCreateItem(config.statue, 1, pos) itemInteraction(cid, pos, var) else doPlayerSendCancel(cid, "You're exhausted.") end return true end SPELL 2 local config = { statue = 3803, range = 5, max_dmg = -1500, min_dmg = -500, hit_delay = 1000, statue_time = 10*1000, cd = 20, stg = 5571 } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -5, -1, -12, 4, 4, 5, 9) arr = { {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, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr) setCombatArea(combat, area) function removeItem(pos) doRemoveItem(getTileItemById(pos, config.statue).uid) end function itemInteraction(cid, pos, var) addEvent(removeItem, config.statue_time, pos) addEvent(doSendAnimatedText, 300, pos, '3...', 215) addEvent(doSendAnimatedText, 900, pos, '2...', 215) addEvent(doSendAnimatedText, 1500, pos, '1...', 215) addEvent(doAreaCombatHealth, 2100, cid, COMBAT_DEATHDAMAGE, pos, area, -800, -1500, 38) end function onCastSpell(cid, var) if not isPlayer(cid) then return false end if getPlayerStorageValue(cid, config.stg) - os.time() <= 0 then setPlayerStorageValue(cid, config.stg, os.time() + config.cd) local pos = Position(getCreaturePosition(cid).x, getCreaturePosition(cid).y+1, getCreaturePosition(cid).z) doCreateItem(config.statue, 1, pos) itemInteraction(cid, pos, var) else doPlayerSendCancel(cid, "You're exhausted.") end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  11. Fala galera! Eu estou editando essa spell que cria uma estatua e ataca. A animação do distance vai contra os targets, porém não da dano algum. Já testei varias coisas e ainda não consegui achar a solução. Você tem o código disponível? Se tiver publique-o aqui: local config = { statue = 2367, range = 5, max_dmg = -150, min_dmg = -50, hit_delay = 1000, statue_time = 10*1000, cd = 20, stg = 5570 } local max_hits = config.statue_time/config.hit_delay local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatFormula(combat, COMBAT_FORMULA_DAMAGE, 0, config.min_dmg, 0, config.max_dmg) local condition = createConditionObject(CONDITION_INFIGHT) setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 1000) function removeItem(pos) doRemoveItem(getTileItemById(pos, config.statue).uid) end function attackSpecs(cid, pos, var, hits) n = hits or 0 if n >= max_hits then return false end local spec = getSpectators(pos, config.range, config.range) i = spec[math.random(1, #spec)] if #spec <= 1 then return false end while(i == cid) do i = spec[math.random(1, #spec)] end if isCreature(i) then var.pos = getCreaturePosition(i) doSendDistanceShoot(pos, var.pos, CONST_ANI_SUDDENDEATH) doCombat(cid, combat, var) end addEvent(attackSpecs, config.hit_delay, cid, pos, var, n+1) end function itemInteraction(cid, pos, var) attackSpecs(cid, pos, var) addEvent(removeItem, config.statue_time, pos) end function onCastSpell(cid, var) if not isPlayer(cid) then return false end if getPlayerStorageValue(cid, config.stg) - os.time() <= 0 then doAddCondition(cid, condition) setPlayerStorageValue(cid, config.stg, os.time() + config.cd) local pos = Position(getCreaturePosition(cid).x+1, getCreaturePosition(cid).y, getCreaturePosition(cid).z) doCreateItem(config.statue, 1, pos) itemInteraction(cid, pos, var) else doPlayerSendCancel(cid, "You're exhausted.") end return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  12. Vorkhon postou uma resposta no tópico em Sistemas, Mods & Funções .lua
    Fala mano! Cara tem como fazer essa spell funcionar com item? A ideia seria que só uma classe pudesse dar use em um voodoo doll em um player, ai dava um texto, um efeito, e fazia esse efieto?
  13. Fala pessoal. Eu peguei um script de magia que cria uma estatua que fica atacando e some depois de um tempo. Ai eu pensei em modificar ela e fazer com que surja um tambor que fica por tempo limitado. E quando se da use nesse tambor ele continua tocando a musica dele, aparece mensagem em cima dele configuravel, e tambem da uma magia de cura em area. Toda vez que toca ele cura em area. Detalhes: - Tinha que limitar pra nao poder da spam muito rapido na cura. - O tambor tem que aparecer na frente do personagem - Lembrando: Efeitos de use no tambor summonado: Sonzinho, Mensagem em laranja, e magia de cura em area. Segue o script base: Você tem o código disponível? Se tiver publique-o aqui: local config = { statue = 2367, range = 5, max_dmg = -150, min_dmg = -50, hit_delay = 1000, statue_time = 10*1000, cd = 20, stg = 5570 } local max_hits = config.statue_time/config.hit_delay local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatFormula(combat, COMBAT_FORMULA_DAMAGE, 0, config.min_dmg, 0, config.max_dmg) local condition = createConditionObject(CONDITION_INFIGHT) setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 1000) function removeItem(pos) doRemoveItem(getTileItemById(pos, config.statue).uid) end function attackSpecs(cid, pos, var, hits) n = hits or 0 if n >= max_hits then return false end local spec = getSpectators(pos, config.range, config.range) i = spec[math.random(1, #spec)] if #spec <= 1 then return false end while(i == cid) do i = spec[math.random(1, #spec)] end if isCreature(i) then var.pos = getCreaturePosition(i) doSendDistanceShoot(pos, var.pos, CONST_ANI_SUDDENDEATH) doCombat(cid, combat, var) end addEvent(attackSpecs, config.hit_delay, cid, pos, var, n+1) end function itemInteraction(cid, pos, var) attackSpecs(cid, pos, var) addEvent(removeItem, config.statue_time, pos) end function onCastSpell(cid, var) if not isPlayer(cid) then return false end if getPlayerStorageValue(cid, config.stg) - os.time() <= 0 then doAddCondition(cid, condition) setPlayerStorageValue(cid, config.stg, os.time() + config.cd) local pos = Position(getCreaturePosition(cid).x+1, getCreaturePosition(cid).y, getCreaturePosition(cid).z) doCreateItem(config.statue, 1, pos) itemInteraction(cid, pos, var) else doPlayerSendCancel(cid, "You're exhausted.") end return true end Estou quase conseguindo o Script do tambor. Ele só esta curando o proprio player. Como faz para curar em área? function onUse(cid, item, fromPosition, itemEx, toPosition) local area = { {0, 0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 0, 0} } doSendMagicEffect(fromPosition, CONST_ME_SOUND_BLUE) doAreaCombatHealth(fromPosition, COMBAT_HEALING, getThingPos(cid), area, 5, 20, CONST_ME_MAGIC_BLUE) doCreatureAddMana(cid, 5) return TRUE end
  14. Vorkhon postou uma resposta no tópico em Suporte Tibia OTServer
    Fala irmão! Cara continua hitando 2 vezes só.
  15. Exorri Ressurect Post. Excelente ideia, mas parece que não ta aumentando o ataque aqui. Testei com Wand e Meele mas n parece ter tido uma real mudança no dano! Alguém?
  16. up! Nas alturas. Ressucita 2013
  17. Coisa linda Wolf! Teria como fazer a mesma coisa, só que ao inves do chao usar corpos? Ia ser muito massa nos meu OT RPG. Destroi o corpo e faz uma bola de morte.
  18. Vorkhon postou uma resposta no tópico em Sistemas, Mods & Funções .lua
    Nao aparece nada no console. A spell só bate algumas vezes seguidas no mesmo target. EDIT: Cara bizzarramente entrou outro GM para a gente testar as coisas e funcionou. Mas comigo sozinho não estava funcionando.
  19. Perfeito Wolf! Tem como fazer o icone de buff aparecer? Só para o player saber se aind ata com buff ou nao
  20. Falaa Wolf! Mano eu to fazendo um Server de RPG e tem uma classe que se chama Shapeshifter e eu achei interessante o uso desse anel ai. Teria como limitar ele por classe? E selecionar quais criaturas que podem vir randomicamente?
  21. Vorkhon postou uma resposta no tópico em Sistemas, Mods & Funções .lua
    Que bom que voce ainda ta pelo forum ainda todas os posts que vejo são antigoes hahaha. Cara botei esse codigo antes da script da spell. Agora carregou mas ela não ta batendo de target em target só das os multiplos hits em 1 target. Eu to com ml 40, e testei de perto de longe com varios e só pega 1 target. O script ficou assim: (Nao estou conseguindo carregar da forma correta. Me perdoem) -------------------------------------------------------------------------------------------------------- function doBlast(uid, target, delay, effectx, effectz, percent, min, max, type, hits, fromPos, n) if fromPos ~= nil and (fromPos.x ~= getCreaturePosition(target).x or fromPos.y ~= getCreaturePosition(target).y) then doSendDistanceShoot(fromPos, getCreaturePosition(target), effectx) fromPos = (fromPos.x ~= getCreaturePosition(target).x or fromPos.y ~= getCreaturePosition(target).y) and getCreaturePosition(target) or nil else fromPos = getCreaturePosition(target) end doTargetCombatHealth(uid, target, type, -min, -max, effectz) n = n or 1 if math.random(1, 10) <= (percent/10) then possible = {} for j = -3, 3 do for k = -3, 3 do middlePos = {x = getCreaturePosition(target).x + j, y = getCreaturePosition(target).y + k, z = getCreaturePosition(target).z, stackpos = 253} if isWalkable(middlePos, false, true, true) then creature = getTopCreature(middlePos).uid if creature > 0 then table.insert(possible, creature) end end end end target = #possible > 0 and possible[math.random(#possible)] or target end if n < hits then addEvent(function() if isCreature(uid) and isCreature(target) then doBlast(uid, target, delay, effectx, effectz, percent, min, max, type, hits, fromPos, (n + 1)) end end, delay) end return true end local config = { effectx = 35, --- efeito de distancia effectz = 11, --- efeito ao acertar o player percent = 100, --- porcentagem de ir pra outro target apos hitar delay = 300 --- velocidade com que se move (milisegundos) } function onCastSpell(cid, var) local maglevel, level, mana = getPlayerMagLevel(cid), getPlayerLevel(cid), getCreatureMana(cid) local axe, sword, club, distance = getPlayerSkillLevel(cid, 3), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 4) local shield, health = getPlayerSkillLevel(cid, 5), getCreatureHealth(cid) local formula = { min = ((level + maglevel)/5 + axe + sword + club + shield + (mana/1000))/3, --- formula de dano minimo max = ((level + maglevel)/5 + axe + sword + club + shield + ((mana + health)/1000))/3 --- formula de dano maximo } local pos = getCreaturePosition(cid) doCreatureSay(cid, "Chain Lightning", 20, false, 0, pos) hits = math.ceil(getPlayerMagLevel(cid)/10) - (math.random(0, (math.floor(getPlayerMagLevel(cid)/10))) - 1) target = getCreatureTarget(cid) doBlast(cid, target, config.delay, config.effectx, config.effectz, config.percent, formula.min, formula.max, 2, hits, getCreaturePosition(cid), nil) return true end
  22. Vorkhon postou uma resposta no tópico em Suporte Tibia OTServer
    Quero fazer essa spell hittar 5 vezes. Exatamente como ela ta mas 5 vezes. local combat = createCombatObject() local combat2 = createCombatObject() local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 36) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -10, -230, -9.40, -100) local stun = createConditionObject(CONDITION_PARALYZE) setConditionParam(stun, CONDITION_PARAM_TICKS, 2000) setConditionFormula(stun, -0.9, 1, -0.9, 1) setCombatCondition(combat1, stun) local stun = createConditionObject(CONDITION_PARALYZE) setConditionParam(stun, CONDITION_PARAM_TICKS, 3000) setConditionFormula(stun, -0.9, 1, -0.9, 1) setCombatCondition(combat2, stun) local meteor_water = createCombatObject() setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY) setCombatFormula(meteor_water, COMBAT_FORMULA_LEVELMAGIC, -10, -300, -10.66, -100) arr = { {0, 0, 0, 0, 1, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 3, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 0, 0} } local combat_area = createCombatArea(arr) setCombatArea(combat, combat_area) local function meteorCast(p) doCombat(p.cid, p.combat, positionToVariant(p.pos)) end local function stunEffect(cid) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) end function onTargetTile(cid, pos) if (math.random(0, 0) == 0) then local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 1}) if (isInArray(underWater, ground.itemid) == TRUE) then local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z} addEvent(meteorCast, 100, {cid = cid, pos = pos, combat = meteor_water}) else local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z} addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = combat2}) end end end function onTargetTile2(cid, pos) if (math.random(0, 6) == 1) then local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 1}) if (isInArray(underWater, ground.itemid) == TRUE) then local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z} doSendDistanceShoot(newpos, pos, 3) addEvent(meteorCast, 100, {cid = cid, pos = pos, combat = meteor_water}) else local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z} doSendDistanceShoot(newpos, pos, 3) addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = combat1}) end end end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") setCombatCallback(combat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  23. Vorkhon postou uma resposta no tópico em Sistemas, Mods & Funções .lua
    Ta dando esse erro: [3/9/2020 15:32:52] [Error - Spell Interface] [3/9/2020 15:32:52] data/spells/scripts/especial/chainlightning.lua:onCastSpell [3/9/2020 15:32:52] Description: [3/9/2020 15:32:52] data/spells/scripts/especial/chainlightning.lua:22: attempt to call global 'doBlast' (a nil value) [3/9/2020 15:32:52] stack traceback: [3/9/2020 15:32:52] data/spells/scripts/especial/chainlightning.lua:22: in function <data/spells/scripts/especial/chainlightning.lua:8>

Informação Importante

Confirmação de Termo