Postado Janeiro 9, 2017 8 anos Boa Noite, pessoal estou com um probleminha que eu mesmo não consigo resolver, na humildade alguém poderia achar o erro para mim? Obrigado =) Segue o erro no exe.\/ [Error - Spell Interface] data/spells/scripts/sharingam/vip/chuva de metero.lua Description: (luaSetCombatArea) Combat not found Segue o Script da magia \/ local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -2.2, -150, -2.5, 1) arr1 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) setCombatArea(combat2, area1) function onCastSpell(cid, var) -- ----------------------------------------------------------------------------- tempo = os.time() tempoex = getPlayerStorageValue(cid,111150) if tempoex + 1 > tempo and tempoex ~= -1 then doPlayerSendCancel(cid,"You are exhausted. ".. os.time()) return TRUE else setPlayerStorageValue(cid,111150, os.time()) end -- ----------------------------------------------------------------------------- local parameters = { cid = cid, var = var, combat1 = combat1 } position = getCreaturePosition(cid) spell = 0 while spell < 20 do posi = {x = position.x - 5, y = position.y - 5, z = position.z} -- postiro = {x = posi.x + math.random(1, 10), y = posi.y + math.random(1, 10), z = posi.z} postiro = {x = posi.x + 14 , y = posi.y - 1, z = posi.z} poshit = {x = posi.x + math.random(2, 8), y = posi.y + math.random(2, 8), z = posi.z} doSendDistanceShoot(postiro, poshit, 3) doSendMagicEffect(poshit,6) doSendMagicEffect({x = poshit.x + 1, y = poshit.y, z = poshit.z},6) doSendMagicEffect({x = poshit.x , y = poshit.y + 1, z = poshit.z},6) doSendMagicEffect({x = poshit.x - 1, y = poshit.y, z = poshit.z},6) doSendMagicEffect({x = poshit.x, y = poshit.y - 1, z = poshit.z},6) spell = spell + 1 end return doCombat(cid, combat2, var) end
Postado Janeiro 9, 2017 8 anos local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.2, -150, -2.5, 1) arr = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area = createCombatArea(arr) setCombatArea(combat, area) function onCastSpell(cid, var) -- ----------------------------------------------------------------------------- tempo = os.time() tempoex = getPlayerStorageValue(cid,111150) if tempoex + 1 > tempo and tempoex ~= -1 then doPlayerSendCancel(cid,"You are exhausted. ".. os.time()) return TRUE else setPlayerStorageValue(cid,111150, os.time()) end -- ----------------------------------------------------------------------------- local parameters = { cid = cid, var = var, combat1 = combat1 } position = getCreaturePosition(cid) spell = 0 while spell < 20 do posi = {x = position.x - 5, y = position.y - 5, z = position.z} -- postiro = {x = posi.x + math.random(1, 10), y = posi.y + math.random(1, 10), z = posi.z} postiro = {x = posi.x + 14 , y = posi.y - 1, z = posi.z} poshit = {x = posi.x + math.random(2, 8), y = posi.y + math.random(2, 8), z = posi.z} doSendDistanceShoot(postiro, poshit, 3) doSendMagicEffect(poshit,6) doSendMagicEffect({x = poshit.x + 1, y = poshit.y, z = poshit.z},6) doSendMagicEffect({x = poshit.x , y = poshit.y + 1, z = poshit.z},6) doSendMagicEffect({x = poshit.x - 1, y = poshit.y, z = poshit.z},6) doSendMagicEffect({x = poshit.x, y = poshit.y - 1, z = poshit.z},6) spell = spell + 1 end return doCombat(cid, combat, var) end Troque poe este script teste e me avise.
Postado Janeiro 14, 2017 8 anos @mixmasao está funcionando, mais com um erro de sintexe, local parameters = { cid = cid, var = var, combat1 = combat1 } o combat1 não existe, então deveria ser combat, que é o que existe.
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.