Ir para conteúdo

Featured Replies

Postado
  • Autor
55 minutos atrás, Sekk disse:

q erro?

O mesmo, quando entro no jogo falo nome da magia e não reconhece.

Assim, o objetivo da minha spell é  a seguinte: usar normalmente a spell só que verificar se ta usando outfit se tiver, adiciona paralyze no alvo, se não tiver outfit ele usa a magia normalmente sem paralyze, se conseguir agradeço. 

 

  • Respostas 13
  • Visualizações 464
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
Spoiler

local water = {490, 491, 492, 493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625}
local combat = createCombatObject()
local meteor = createCombatObject()
setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(meteor, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -7.2, -400, -7.3, -400)
local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(stun, -0.9, 1, -0.9, 1)
setCombatCondition(meteor, stun)
local meteor_water = createCombatObject()
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatFormula(meteor_water, COMBAT_FORMULA_LEVELMAGIC, -7.2, -400, -7.3, -400)
combat_arr = {
{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, 1, 3, 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},
{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 combat_area = createCombatArea(combat_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(water, ground.itemid) == TRUE) then
local newpos = {x = pos.x + 9, y = pos.y - 8, z = pos.z}
doSendDistanceShoot(newpos, pos, 28)
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, 28)
addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = meteor})
end
end
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
local otf = {lookType = 0, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0} -- configure sua roupa aqui
if getCreatureOutfit(cid) == otf then
doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Blablablabla para usar essa spell.")
return false
end
return true
end

 

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Postado
  • Autor

@KotZletY e @Sekk

 

Não era bem o que eu queria.

O que eu quero e ninguém ta conseguindo entender é o seguinte.

Nessa parte, queria que transformasse isso

Tem como ajeitar isso?

Eu quero que a spell use normalmente sem ter o outfit, porém se tiver o outfit ele adiciona o paralyze que seria:

 

local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(stun, -0.9, 1, -0.9, 1)
setCombatCondition(meteor, stun)

 

Tentei juntar os dois, e deu nisso:

 

function onCastSpell(cid, var)
local otf = {lookType = 0, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0} -- configure sua roupa aqui
if getCreatureOutfit(cid) == otf then
doCombat(cid, combat, var)
local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(stun, -0.9, 1, -0.9, 1)
setCombatCondition(meteor, stun)

return TRUE

else

return FALSE
end

 

Agradeço se vc puder arrumar isso :D

Queria adaptar isso a spell que mandei para vcs, nela ja tinha o paralyze, só queria que usasse paralyze quando tivesse com esse outfit, caso não tenha o outfit, usar a spell sem paralyze.

@KotZletY up

Editado por kiinho (veja o histórico de edições)

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo