-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
- 0 respostas
- 608 visualizações
-
- 0 respostas
- 516 visualizações
-
- 0 respostas
- 1633 visualizações
-
- 0 respostas
- 1255 visualizações
-
- 1 resposta
- 2329 visualizações
-

Pergunta
eduardo190696 47
opa, queria que meus summon tivessem ataques estilo de pokemon, então resolvi pegar um script de poketibia dos "m1", só que quando vou usar, tem horas que não hita nada, tem horas que heala o inimigo e tem horas que funciona
-----------------NORMAL Quick Attack------------------------------ local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 111) setCombatFormula(combat1, COMBAT_FORMULA_DAMAGE, -6.6, 0, -5.7, 0) ---------------- Wirlwind ------------------------------- local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 42) setCombatFormula(combat2, COMBAT_FORMULA_DAMAGE, -6.6, 0, -5.7, 0) arr2 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0}, {0, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0}, {0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 3, 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}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } local area2 = createCombatArea(arr2) setCombatArea(combat2, area2) local c = { ["Dragon Lord"] = {x = {m6 = combat1, spell = "Test 1", minLv = 1,distance = 3 }}, ["Dragon"] = {x = {m6 = combat2, spell = "Test 2", minLv = 1,distance = 3 }}, } function onSay(cid, var) local summ = getCreatureSummons(cid) if #summ == 0 then return doPlayerSendCancel(cid, "Sorry, but you need a summon.") end for n = 1, #summ do for name, _ in pairs(c) do if getCreatureName(summ[n]):lower() == name:lower() then local con = c[name].x if getPlayerLevel(cid) < con.minLv then return doPlayerSendCancel(cid, "Sorry, but you must be level " .. con.minLv .. " or higher to cast.") and doSendMagicEffect(getThingPos(cid), 2) end local distance = (not con.distance) and 1 or con.distance if not isCreature(getCreatureTarget(cid)) or getCreatureTarget(cid) == summ[n] then return doPlayerSendCancel(cid, "Invalid target.") and doSendMagicEffect(getThingPos(cid), 2) end if getDistanceBetween(getThingPos(summ[n]), getThingPos(getCreatureTarget(cid))) > distance then return doPlayerSendCancel(cid, "Sorry, your summon is too far away.") and doSendMagicEffect(getThingPos(cid), 2) end doCombat(summ[n], con.m6, numberToVariant(getCreatureTarget(cid))) doCreatureSay(cid, name .. ", " .. con.spell .. ".") doSendMagicEffect(getThingPos(cid), 2) end end end return true endLink para o comentário
https://xtibia.com/forum/topic/194551-duvida-summon-spell-por-talkactions/Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados