Ir para conteúdo

[Spell] Ajuda ?


theu1995

Posts Recomendados

bem eu n tenho conhecimento nenhum em spell x.x,

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

Link para o comentário
Compartilhar em outros sites

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++

Editado por mulizeu
Link para o comentário
Compartilhar em outros sites

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++

 

 

pow cara n deu tbm :x , eu coloquei com esse script que tu mando com o "

 " na primeira linha lá e deu isso 

[02/08/2011 07:31:44] [Error - LuaScriptInterface::loadFile] data/spells/scripts/poke/scizor dance.lua:1: unexpected symbol near '['

[02/08/2011 07:31:44] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/poke/scizor dance.lua)

[02/08/2011 07:31:44] data/spells/scripts/poke/scizor dance.lua:1: unexpected symbol near '['

 

ai eu tentei tbm sem o " [code] " e deu isso :

[02/08/2011 07:41:41] [Error - Spell Interface]

[02/08/2011 07:41:41] data/spells/scripts/poke/scizor dance.lua

[02/08/2011 07:41:41] Description:

[02/08/2011 07:41:41] (luaAddEvent) Callback parameter should be a function.

 

Link para o comentário
Compartilhar em outros sites

Tenta com esse aki entao

 

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
function damage(param,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 

 

Se ajudei Rep++

Link para o comentário
Compartilhar em outros sites

Tenta com esse aki entao

 

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
function damage(param,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 

 

Se ajudei Rep++

 

n t ahitando :x , quando ele solta o passive da esso console :

[02/08/2011 16:16:32] [Error - Spell Interface]

[02/08/2011 16:16:32] In a timer event called from:

[02/08/2011 16:16:32] data/spells/scripts/poke/scizor dance.lua:onCastSpell

[02/08/2011 16:16:32] Description:

[02/08/2011 16:16:32] data/spells/scripts/poke/scizor dance.lua:20: attempt to index global 'params' (a nil value)

[02/08/2011 16:16:32] stack traceback:

[02/08/2011 16:16:32] data/spells/scripts/poke/scizor dance.lua:20: in function <data/spells/scripts/poke/scizor dance.lua:19>

 

 

n sie se o problema ta na tag que eu to usando sei lá , to usand essa aqui:

<instant name="Scizor Dance" words="scizor attack" lvl="9999" mana="160" prem="1" selftarget="1" exhaustion="2000" needlearn="0" event="script" value="poke/scizor dance.lua">

</instant>

 

 

se você posta a spell eu eu n responder é que to na escola, de noite é tenso ;s

Link para o comentário
Compartilhar em outros sites

Ae cara testa essa

local scizor = {lookType = 585}

local rollarea = createCombatArea{
{1, 1, 1},
{1, 2, 1},
{1, 1, 1},
}

function onCastSpell(cid, var)
if getCreatureCondition(cid, CONDITION_OUTFIT) == true then
return true
end
doCreatureSay(cid, "Scizor Attack!", TALKTYPE_MONSTER)

if getCreatureOutfit(cid).lookType == 585 then
doSetCreatureOutfit(cid, golem, -1)
damage = 140
end
local dmg = damage
local function damage(params)
if isCreature(params.cid) then
doAreaCombatHealth(params.cid, BUGDDAMAGE, getThingPos(params.cid), rollarea, -(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 = 8
local delay = 1000 
for i = 1, vezes do
addEvent(damage, delay*i, {cid = cid, dmg = dmg})
end
addEvent(voltar, 1051*vezes, {cid = cid})
end 

 

Agora e pra pegar...!

 

Se ajudei Rep++

Editado por mulizeu
Link para o comentário
Compartilhar em outros sites

ae cara vlws deu certo eu só tive que mudar uma coisa :D

essa parte : if getCreatureOutfit(cid).lookType == 585 then doSetCreatureOutfit(cid, golem, -1)

 

 

pro looktype do Scizor e o nome ionde ta gomlem pra scizor :D , como eu disse fui pra escola de noite ai n deu pra dar seu REP+ mais ta ai e vlws :]

Editado por MaatheeuusYuurii
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...