Por brendomaster, 14 de jun. de 2011 em Archived
info
Grupo: Campones
Registrado: 24/05/11
Posts: 37
Reputação: 0
Char no Tibia: Angel Ikari
Bom gente eu tenho um ot de pokemon e as spell dao dando muito erro tem como alguem me ajuda olha um dos erros
[14/06/2011 19:02:09] [Error - Spell Interface] [14/06/2011 19:02:10] In a timer event called from: [14/06/2011 19:02:10] data/spells/scripts/poke/dizzy punch.lua:onCastSpell [14/06/2011 19:02:10] Description: [14/06/2011 19:02:10] data/spells/scripts/poke/dizzy punch.lua:71: attempt to index global 'speedselvagem' (a nil value) [14/06/2011 19:02:10] stack traceback: [14/06/2011 19:02:10] data/spells/scripts/poke/dizzy punch.lua:71: in function <data/spells/scripts/poke/dizzy punch.lua:66>
[14/06/2011 19:02:10] In a timer event called from:
[14/06/2011 19:02:10] data/spells/scripts/poke/dizzy punch.lua:onCastSpell
[14/06/2011 19:02:10] Description:
[14/06/2011 19:02:10] data/spells/scripts/poke/dizzy punch.lua:71: attempt to index global 'speedselvagem' (a nil value)
[14/06/2011 19:02:10] stack traceback:
[14/06/2011 19:02:10] data/spells/scripts/poke/dizzy punch.lua:71: in function <data/spells/scripts/poke/dizzy punch.lua:66>
Script
function onCastSpell(cid, var) doCreatureSay(cid, "DIZZY PUNCH!", TALKTYPE_MONSTER) addEvent(doAreaCombatHealth, 0, getCreatureSummons(cid)[1], FIGHTINGDAMAGE, getThingPos(getCreatureTarget(cid)), 0, -0, -0, 3) local function throw(params) doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)), 26) end addEvent(throw, 0, {cid = cid}) local alvo = getCreatureTarget(cid) doCreatureSetNoMove(alvo, true) doChangeSpeed(alvo, -(getCreatureSpeed(alvo))) local function confuse(params) if isCreature(params.alvo) then local posa = getThingPos(params.alvo) random = math.random(1,1000) if random >= 501 then rx = math.random(-1,1) if rx ~= 0 then ry = 0 else ry = math.random(-1,1) end else ry = math.random(-1,1) if ry ~= 0 then rx = 0 else rx = math.random(-1,1) end end local posr = {x=posa.x+(rx),y=posa.y+(ry),z=posa.z} if isWalkable(posr, params.alvo, 0, 0) then doChangeSpeed(params.alvo, 175) doTeleportThing(params.alvo, posr, true) doChangeSpeed(params.alvo, -175) local posd = getThingPos(params.alvo) addEvent(doSendMagicEffect, 300, posd, 31) else random = math.random(1,1000) if random >= 501 then rx = math.random(-1,1) if rx ~= 0 then ry = 0 else ry = math.random(-1,1) end else ry = math.random(-1,1) if ry ~= 0 then rx = 0 else rx = math.random(-1,1) end end end local posr = {x=posa.x+(rx),y=posa.y+(ry),z=posa.z} if isWalkable(posr, params.alvo, 0, 0) then doChangeSpeed(params.alvo, 175) doTeleportThing(params.alvo, posr, true) doChangeSpeed(params.alvo, -175) local posd = getThingPos(params.alvo) doSendMagicEffect(posd, 31) end else end end local function speed(params) if isCreature(params.alvo) then doCreatureSetNoMove(params.alvo, false) if not isPlayer(params.alvo) then doChangeSpeed(params.alvo, -(getCreatureSpeed(params.alvo))) doChangeSpeed(params.alvo, speedselvagem[getCreatureName(params.alvo)].speed) else doChangeSpeed(params.alvo, -(getCreatureSpeed(params.alvo))) doChangeSpeed(params.alvo, 250) end else end end addEvent(confuse, 1000, {alvo = alvo}) addEvent(confuse, 2000, {alvo = alvo}) addEvent(confuse, 3000, {alvo = alvo}) addEvent(confuse, 4000, {alvo = alvo}) addEvent(confuse, 5000, {alvo = alvo}) addEvent(confuse, 6000, {alvo = alvo}) addEvent(speed, 6200, {alvo = alvo}) return true end
doCreatureSay(cid, "DIZZY PUNCH!", TALKTYPE_MONSTER)
addEvent(doAreaCombatHealth, 0, getCreatureSummons(cid)[1], FIGHTINGDAMAGE, getThingPos(getCreatureTarget(cid)), 0, -0, -0, 3)
local function throw(params)
doSendDistanceShoot(getThingPos(params.cid), getThingPos(getCreatureTarget(params.cid)), 26)
end
addEvent(throw, 0, {cid = cid})
local alvo = getCreatureTarget(cid)
doCreatureSetNoMove(alvo, true)
doChangeSpeed(alvo, -(getCreatureSpeed(alvo)))
local function confuse(params)
if isCreature(params.alvo) then
local posa = getThingPos(params.alvo)
random = math.random(1,1000)
if random >= 501 then
rx = math.random(-1,1)
if rx ~= 0 then
ry = 0
else
ry = math.random(-1,1)
if ry ~= 0 then
rx = 0
local posr = {x=posa.x+(rx),y=posa.y+(ry),z=posa.z}
if isWalkable(posr, params.alvo, 0, 0) then
doChangeSpeed(params.alvo, 175)
doTeleportThing(params.alvo, posr, true)
doChangeSpeed(params.alvo, -175)
local posd = getThingPos(params.alvo)
addEvent(doSendMagicEffect, 300, posd, 31)
doSendMagicEffect(posd, 31)
local function speed(params)
doCreatureSetNoMove(params.alvo, false)
if not isPlayer(params.alvo) then
doChangeSpeed(params.alvo, -(getCreatureSpeed(params.alvo)))
doChangeSpeed(params.alvo, speedselvagem[getCreatureName(params.alvo)].speed)
doChangeSpeed(params.alvo, 250)
addEvent(confuse, 1000, {alvo = alvo})
addEvent(confuse, 2000, {alvo = alvo})
addEvent(confuse, 3000, {alvo = alvo})
addEvent(confuse, 4000, {alvo = alvo})
addEvent(confuse, 5000, {alvo = alvo})
addEvent(confuse, 6000, {alvo = alvo})
addEvent(speed, 6200, {alvo = alvo})
return true
Registrado: 11/07/08
Posts: 17
Reputação: +17
Bom dia, você ja tentou baixar a spell de outro OT? as vezes é um erro bobo mas que é chato de encontrar. te recomendo baixar outro ot, e pegar a spell.
Espero ter ajudado.
info
Grupo: Campones
Registrado: 24/05/11
Posts: 37
Reputação: 0
Char no Tibia: Angel Ikari
Bom gente eu tenho um ot de pokemon e as spell dao dando muito erro tem como alguem me ajuda olha um dos erros
Script