Postado Abril 1, 2015 10 anos Oi Pessoas, Vou deixar este erro aqui aver se você me ajudar, Obrigado antecipadamente. PD; Desculpen eu ñao falo muito br;DD [spoiler*]oi[/spoiler*] [01/04/2015 11:20:49] [Error - Spell Interface] [01/04/2015 11:20:49] In a timer event called from: [01/04/2015 11:20:49] data/spells/scripts/Hitmontop.lua:onCastSpell [01/04/2015 11:20:49] Description: [01/04/2015 11:20:49] data/spells/scripts/Hitmontop.lua:44: attempt to perform arithmetic on field 'dmg' (a nil value) [01/04/2015 11:20:49] stack traceback: [01/04/2015 11:20:49] data/spells/scripts/Hitmontop.lua:44: in function <data/spells/scripts/Hitmontop.lua:42> [01/04/2015 11:23:13] [Error - Spell Interface] [01/04/2015 11:23:13] In a timer event called from: [01/04/2015 11:23:13] data/spells/scripts/scyther.lua:onCastSpell [01/04/2015 11:23:13] Description: [01/04/2015 11:23:13] data/spells/scripts/scyther.lua:44: attempt to perform arithmetic on field 'dmg' (a nil value) [01/04/2015 11:23:13] stack traceback: [01/04/2015 11:23:13] data/spells/scripts/scyther.lua:44: in function <data/spells/scripts/scyther.lua:42> Editado Abril 1, 2015 10 anos por Sweet Raztaman (veja o histórico de edições)
Postado Abril 1, 2015 10 anos Autor [spoiler*] SCYTHER local scyther = {lookType = 1169} local scythe1 = createCombatArea{ {0, 0, 0}, {0, 0, 0}, {0, 2, 0}, {1, 0, 0}, } local scythe2 = createCombatArea{ {1, 0, 0}, {0, 0, 0}, {0, 2, 0}, } local scythe3 = createCombatArea{ {1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}, } local scythe4 = createCombatArea{ {0, 0, 0, 1}, {0, 0, 2, 0}, {0, 0, 0, 0}, } local rollarea = createCombatArea{ {1, 1, 1}, {1, 2, 1}, {1, 1, 1}, } function onCastSpell(cid, var) if getCreatureCondition(getCreatureMaster(cid), CONDITION_INFIGHT) == TRUE then return true end if getCreatureCondition(cid, CONDITION_OUTFIT) == true then return true end doCreatureSay(cid, "", TALKTYPE_MONSTER) if getCreatureOutfit(cid).lookType == 1170 then doSetCreatureOutfit(cid, scyther, -1) doChangeSpeed(cid, -1000) damage = 1500 end local dmg = damage local function damage(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, BUGDAMAGE, getThingPos(params.cid), rollarea, -(params.dmg), -(params.dmg), 255) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe1, 0, 0, 128) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe2, 0, 0, 131) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe3, 0, 0, 129) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe4, 0, 0, 130) end end local function voltar(params) if isCreature(params.cid) then doRemoveCondition(params.cid, CONDITION_OUTFIT) doChangeSpeed(cid, 1000) doRemoveCondition(getCreatureMaster(cid),CONDITION_INFIGHT) end end local vezes = 3 local delay = 600 -- não mexe for i = 1, vezes do addEvent(damage, delay*i, {cid = cid, dmg = dmg}) end addEvent(voltar, 800*vezes, {cid = cid}) end [/spoiler*] Hitmontop [spoiler*] local Hitmontop = {lookType = 1194} local scythe1 = createCombatArea{ {0, 0, 0}, {0, 0, 0}, {0, 2, 0}, {1, 0, 0}, } local scythe2 = createCombatArea{ {1, 0, 0}, {0, 0, 0}, {0, 2, 0}, } local scythe3 = createCombatArea{ {1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}, } local scythe4 = createCombatArea{ {0, 0, 0, 1}, {0, 0, 2, 0}, {0, 0, 0, 0}, } local rollarea = createCombatArea{ {1, 1, 1}, {1, 2, 1}, {1, 1, 1}, } function onCastSpell(cid, var) if getCreatureCondition(getCreatureMaster(cid), CONDITION_INFIGHT) == TRUE then return true end if getCreatureCondition(cid, CONDITION_OUTFIT) == true then return true end doCreatureSay(cid, "", TALKTYPE_MONSTER) if getCreatureOutfit(cid).lookType == 1195 then doSetCreatureOutfit(cid, Hitmontop, -1) doChangeSpeed(cid, -1000) damage = 1500 end local dmg = damage local function damage(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, FIGHTINGDAMAGE, getThingPos(params.cid), rollarea, -(params.dmg), -(params.dmg), 255) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe1, 0, 0, 128) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe2, 0, 0, 131) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe3, 0, 0, 129) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe4, 0, 0, 130) end end local function voltar(params) if isCreature(params.cid) then doRemoveCondition(params.cid, CONDITION_OUTFIT) doChangeSpeed(cid, 1000) doRemoveCondition(getCreatureMaster(cid),CONDITION_INFIGHT) end end local vezes = 3 local delay = 400 -- não mexe for i = 1, vezes do addEvent(damage, delay*i, {cid = cid, dmg = dmg}) end addEvent(voltar, 600*vezes, {cid = cid}) end [/spoiler*] Editado Abril 1, 2015 10 anos por Sweet Raztaman (veja o histórico de edições)
Postado Abril 1, 2015 10 anos Esse e o e do scyther e não o do hitmontop? @Edit desculpe não tinha visto os 2 pois você não separou Hitmontop Mostrar conteúdo oculto local Hitmontop = {lookType = 1194} local scythe1 = createCombatArea{ {0, 0, 0}, {0, 0, 0}, {0, 2, 0}, {1, 0, 0}, } local scythe2 = createCombatArea{ {1, 0, 0}, {0, 0, 0}, {0, 2, 0}, } local scythe3 = createCombatArea{ {1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}, } local scythe4 = createCombatArea{ {0, 0, 0, 1}, {0, 0, 2, 0}, {0, 0, 0, 0}, } local rollarea = createCombatArea{ {1, 1, 1}, {1, 2, 1}, {1, 1, 1}, } function onCastSpell(cid, var) if getCreatureCondition(getCreatureMaster(cid), CONDITION_INFIGHT) == TRUE then return true end if getCreatureCondition(cid, CONDITION_OUTFIT) == true then return true end doCreatureSay(cid, "", TALKTYPE_MONSTER) if getCreatureOutfit(cid).lookType == 1195 then doSetCreatureOutfit(cid, Hitmontop, -1) doChangeSpeed(cid, -1000) damage = 1500 end local dmg = damage local function damage(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, FIGHTINGDAMAGE, getThingPos(params.cid), rollarea, -(params.cid), -(params.cid), 255) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe1, 0, 0, 128) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe2, 0, 0, 131) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe3, 0, 0, 129) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe4, 0, 0, 130) end end local function voltar(params) if isCreature(params.cid) then doRemoveCondition(params.cid, CONDITION_OUTFIT) doChangeSpeed(cid, 1000) doRemoveCondition(getCreatureMaster(cid),CONDITION_INFIGHT) end end local vezes = 3 local delay = 400 -- não mexe for i = 1, vezes do addEvent(damage, delay*i, {cid = cid, dmg = dmg}) end addEvent(voltar, 600*vezes, {cid = cid}) end Editado Abril 1, 2015 10 anos por Septy (veja o histórico de edições)
Postado Abril 1, 2015 10 anos Autor Em 01/04/2015 em 18:07, Septy disse: Esse e o e do scyther e não o do hitmontop? @Edit desculpe não tinha visto os 2 pois você não separou Hitmontop Mostrar conteúdo oculto Mostrar conteúdo oculto local Hitmontop = {lookType = 1194} local scythe1 = createCombatArea{ {0, 0, 0}, {0, 0, 0}, {0, 2, 0}, {1, 0, 0}, } local scythe2 = createCombatArea{ {1, 0, 0}, {0, 0, 0}, {0, 2, 0}, } local scythe3 = createCombatArea{ {1, 0, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 0}, } local scythe4 = createCombatArea{ {0, 0, 0, 1}, {0, 0, 2, 0}, {0, 0, 0, 0}, } local rollarea = createCombatArea{ {1, 1, 1}, {1, 2, 1}, {1, 1, 1}, } function onCastSpell(cid, var) if getCreatureCondition(getCreatureMaster(cid), CONDITION_INFIGHT) == TRUE then return true end if getCreatureCondition(cid, CONDITION_OUTFIT) == true then return true end doCreatureSay(cid, "", TALKTYPE_MONSTER) if getCreatureOutfit(cid).lookType == 1195 then doSetCreatureOutfit(cid, Hitmontop, -1) doChangeSpeed(cid, -1000) damage = 1500 end local dmg = damage local function damage(params) if isCreature(params.cid) then doAreaCombatHealth(params.cid, FIGHTINGDAMAGE, getThingPos(params.cid), rollarea, -(params.cid), -(params.cid), 255) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe1, 0, 0, 128) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe2, 0, 0, 131) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe3, 0, 0, 129) doAreaCombatHealth(params.cid, element, getThingPos(params.cid), scythe4, 0, 0, 130) end end local function voltar(params) if isCreature(params.cid) then doRemoveCondition(params.cid, CONDITION_OUTFIT) doChangeSpeed(cid, 1000) doRemoveCondition(getCreatureMaster(cid),CONDITION_INFIGHT) end end local vezes = 3 local delay = 400 -- não mexe for i = 1, vezes do addEvent(damage, delay*i, {cid = cid, dmg = dmg}) end addEvent(voltar, 600*vezes, {cid = cid}) end como eu fazo pra arrumar isso?
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.