Ir para conteúdo
  • Cadastre-se

Normal Alguém da uma ajudinha nesse script


Posts Recomendados

quero que alguém me ajude a colocar para verificar se está usando tal addon se tiver ele segue com essa script

 

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

Link para o post
Compartilhar em outros sites
15 minutos atrás, Sekk disse:

manda a magia inteira, n é esse parte q faz a verificação

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)
return doCombat(cid, combat, var)
end

16 minutos atrás, Sekk disse:

manda a magia inteira, n é esse parte q faz a verificação

Nessa que mandei já contém paralyze, só que quero que só de paralyze quando tiver o addon druid full 

 

Link para o post
Compartilhar em outros sites

@kiinho

 

Desculpa, não sei se funciona, estou meio perdido com a função getCreatureOutfit(cid), mas tenta ai:

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()
local z = getCreatureOutfit(cid)
outfit = {z.lookType = 30 , z.lookHead = 0, z.lookBody = 0, z.lookLegs = 0, z.lookFeet = 0, z.lookAddons = 0}
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)
if getCreatureOutfit(cid) ~= outfit then
doSendPlayerCancel(cid, "Sorry, you cannot cast this spell.")
else
return doCombat(cid, combat, var)
end
end

 

 

Link para o post
Compartilhar em outros sites
16 horas atrás, Sekk disse:

@kiinho

 

Desculpa, não sei se funciona, estou meio perdido com a função getCreatureOutfit(cid), mas tenta ai:

  Ocultar conteúdo


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()
local z = getCreatureOutfit(cid)
outfit = {z.lookType = 30 , z.lookHead = 0, z.lookBody = 0, z.lookLegs = 0, z.lookFeet = 0, z.lookAddons = 0}
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)
if getCreatureOutfit(cid) ~= outfit then
doSendPlayerCancel(cid, "Sorry, you cannot cast this spell.")
else
return doCombat(cid, combat, var)
end
end

 

 

 

Da esse erro.

 

[Error - LuaScriptInterface::loadFile] data/spells/scripts/attack/exori mas frigo.lua:5: '}' expected near '='
[Warning - Event::loadScript] Cannot load script (data/spells/scripts/attack/exori mas frigo.lua)
data/spells/scripts/attack/exori mas frigo.lua:5: '}' expected near '='

Link para o post
Compartilhar em outros sites

@kiinho

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()
local z = getCreatureOutfit(cid)
local outfit = {z.lookType = 30 , z.lookHead = 0, z.lookBody = 0, z.lookLegs = 0, z.lookFeet = 0, z.lookAddons = 0}
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)
if getCreatureOutfit(cid) ~= outfit then
doSendPlayerCancel(cid, "Sorry, you cannot cast this spell.")
else
return doCombat(cid, combat, var)
end
end

 

Link para o post
Compartilhar em outros sites
Em 20/02/2017 ás 12:03, Sekk disse:

@kiinho


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()
local z = getCreatureOutfit(cid)
local outfit = {z.lookType = 30 , z.lookHead = 0, z.lookBody = 0, z.lookLegs = 0, z.lookFeet = 0, z.lookAddons = 0}
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)
if getCreatureOutfit(cid) ~= outfit then
doSendPlayerCancel(cid, "Sorry, you cannot cast this spell.")
else
return doCombat(cid, combat, var)
end
end

 

 

Em 20/02/2017 ás 12:03, Sekk disse:

@kiinho


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()
local z = getCreatureOutfit(cid)
local outfit = {z.lookType = 30 , z.lookHead = 0, z.lookBody = 0, z.lookLegs = 0, z.lookFeet = 0, z.lookAddons = 0}
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)
if getCreatureOutfit(cid) ~= outfit then
doSendPlayerCancel(cid, "Sorry, you cannot cast this spell.")
else
return doCombat(cid, combat, var)
end
end

 

Ainda não funciona

Link para o post
Compartilhar em outros sites
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. 

 

Link para o post
Compartilhar em outros sites
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

Link para o post
Compartilhar em outros sites

@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)
Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo