Testa ae
[code]local scizor = {lookType = 585}
local sciarea = createCombatArea{
{1, 1, 1},
{1, 2, 1},
{1, 1, 1},
}
function onCastSpell(cid, var)
if getCreatureCondition(cid, CONDITION_OUTFIT) == true then
return true
end
if getCreatureOutfit(cid).lookType == 660 then
doSetCreatureOutfit(cid, scizor, -1)
end
local dmg = damage
setCombatParam(combat, key, value)
if isCreature(params.cid) then
doAreaCombatHealth(params.cid, GROUNDDAMAGE, getThingPos(params.cid), sciarea, -(params.dmg), -((params.dmg)+5), 255)
end
end
local function voltar(params)
if isCreature(params.cid) then
doRemoveCondition(params.cid, CONDITION_OUTFIT)
end
end
local vezes = 1
local delay = 1000 -- não mexe
for i = 1, vezes do
addEvent(damage, delay*i, {cid = cid, dmg = dmg})
end
addEvent(voltar, 1051*vezes, {cid = cid})
Se nao funfa avisa que eu olho de novo
Se ajudei rep++




info
Grupo: Cavaleiro
Registrado: 14/02/11
Posts: 164
Reputação: +12
bem eu n tenho conhecimento nenhum em spell
,
mais eu tentei fazer 1 atack como se fosse o rollout do golem, só que com o scizor, bem ele faz tudo certinho mais n hita e da 1 erro no console
esse erro :
[01/08/2011 12:37:31] [Error - Spell Interface]
[01/08/2011 12:37:31] In a timer event called from:
[01/08/2011 12:37:31] data/spells/scripts/poke/scizor dance.lua:onCastSpell
[01/08/2011 12:37:31] Description:
[01/08/2011 12:37:31] data/spells/scripts/poke/scizor dance.lua:20: attempt to perform arithmetic on field 'dmg' (a table value)
[01/08/2011 12:37:31] stack traceback:
[01/08/2011 12:37:31] data/spells/scripts/poke/scizor dance.lua:20: in function <data/spells/scripts/poke/scizor dance.lua:18>
e ta ai o script :
local scizor = {lookType = 585}
local sciarea = createCombatArea{
{1, 1, 1},
{1, 2, 1},
{1, 1, 1},
}
function onCastSpell(cid, var)
if getCreatureCondition(cid, CONDITION_OUTFIT) == true then
return true
end
if getCreatureOutfit(cid).lookType == 660 then
doSetCreatureOutfit(cid, scizor, -1)
end
local dmg = damage
local function damage(params.cid)
if isCreature(params.cid) then
doAreaCombatHealth(params.cid, GROUNDDAMAGE, getThingPos(params.cid), sciarea, -(params.dmg), -((params.dmg)+5), 255)
end
end
local function voltar(params)
if isCreature(params.cid) then
doRemoveCondition(params.cid, CONDITION_OUTFIT)
end
end
local vezes = 1
local delay = 1000 -- não mexe
for i = 1, vezes do
addEvent(damage, delay*i, {cid = cid, dmg = dmg})
end
addEvent(voltar, 1051*vezes, {cid = cid})
end
dou REP+ pra quem ajudar