Ir para conteúdo

[Spell] Minha Spell Está Dando Erro No .lua


felipapusco

Posts Recomendados

Bom, as vezes meu server anda caindo do nada, e no executer tem 2 erros que dão então poderia ser isto. Lembrando que o serve é 8.60

 

Um é a da spell que diz, a spell apenas da erro mas funciona direitinho no OT:

[Error - Spell Interface]

data/spells/scripts/bomb.lua

Description:

(luaSetCombatArea) Area not found

 

A Spell está assim:

-- Spell by : XOtServX --

 

 

function getTime(s) -- função by : mkalo

local n = math.floor(s / 60)

s = s - (60 * n)

return n, s

end

 

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 1)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 3)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -17.0, 0, -13.8, 0)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 6)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -17.0, 0, -13.8, 0)

 

arr1 = {

{0, 0, 0},

{0, 3, 0},

{0, 0, 0},

}

 

arr3 = {

{0, 1, 1, 1, 0},

{1, 1, 1, 1, 1},

{1, 1, 3, 1, 1},

{1, 1, 1, 1, 1},

{0, 1, 1, 1, 0},

}

 

local area1 = createCombatArea(arr1)

setCombatArea(combat1, area1)

local area2 = createCombatArea(arr2)

setCombatArea(combat2, area2)

 

local function onCastSpell1(parameters)

doCombat(parameters.cid, combat1, parameters.var)

end

 

local function onCastSpell2(parameters)

doCombat(parameters.cid, combat2, parameters.var)

end

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var}

local pos = getPlayerPosition(cid)

local storage = 15456

addEvent(onCastSpell1, 0, parameters)

 

-- Configs --

 

local tempo = 5 -- tempo em segundos para acontecer a explosão.

local cd = 5 -- tempo em segundos para usar a explosão.

 

-- daki para baixo , não mexer --

if os.time()-getPlayerStorageValue(cid, storage) <= cd then

minutes,seconds = getTime(cd-(os.time()-getPlayerStorageValue(cid, storage)))

return doPlayerSendTextMessage(cid, 27, "You need to wait " .. minutes .." minutes and ".. seconds .. " seconds to implant other bomb!")

end

 

local i = 0

local tempo2 = 0

while i <= tempo-1 do

addEvent(doSendAnimatedText, 0+tempo2, pos, "Tic Tac!", 108)

tempo2 = tempo2+1000

i = i+1

end

addEvent(onCastSpell2, 1000*tempo, parameters)

addEvent(onCastSpell3, 1000*tempo, parameters)

addEvent(doSendAnimatedText, 1000*tempo, pos, "Explosion!", TEXTCOLOR_RED)

setPlayerStorageValue(cid, storage, os.time()+cd)

return TRUE

end

 

Ela é uma magia de atirar no jogador, ou seja, que nem um exori frigo.

 

_____________________________________________________________________________________________________

 

O outro erro eu não não sei o que poder ser. Ele da o seguinte erro:

[Warning - Vocations::getVocation] Vocation 4294967295 not found.

 

Espero que ajudem, obrigado.

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

Malz,nun entendi muito o script !

Mais tenta ae !

 

 

-- Spell by : XOtServX --


function getTime(s) -- função by : mkalo
local n = math.floor(s / 60)
s = s - (60 * n)
return n, s
end

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 1)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 3)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -17.0, 0, -13.8, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 6)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -17.0, 0, -13.8, 0)

arr1 = {
{0, 0, 0},
{0, 3, 0},
{0, 0, 0},
}

arr2 = {
{0, 1, 1, 1, 0},
{1, 1, 1, 1, 1},
{1, 1, 3, 1, 1},
{1, 1, 1, 1, 1},
{0, 1, 1, 1, 0},
}

local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)
local area2 = createCombatArea(arr2)
setCombatArea(combat2, area2)

local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1, parameters.var)
end

local function onCastSpell2(parameters)
doCombat(parameters.cid, combat2, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
local pos = getPlayerPosition(cid)
local storage = 15456
addEvent(onCastSpell1, 0, parameters)

-- Configs --

local tempo = 5 -- tempo em segundos para acontecer a explosão.
local cd = 5 -- tempo em segundos para usar a explosão.

-- daki para baixo , não mexer --
if os.time()-getPlayerStorageValue(cid, storage) <= cd then
minutes,seconds = getTime(cd-(os.time()-getPlayerStorageValue(cid, storage)))
return doPlayerSendTextMessage(cid, 27, "You need to wait " .. minutes .." minutes and ".. seconds .. " seconds to implant other bomb!")
end

local i = 0
local tempo2 = 0
while i <= tempo-1 do
addEvent(doSendAnimatedText, 0+tempo2, pos, "Tic Tac!", 108)
tempo2 = tempo2+1000
i = i+1
end
addEvent(onCastSpell1, 1000*tempo, parameters)
addEvent(onCastSpell2, 1000*tempo, parameters)
addEvent(doSendAnimatedText, 1000*tempo, pos, "Explosion!", TEXTCOLOR_RED)
setPlayerStorageValue(cid, storage, os.time()+cd)
return TRUE
end

Link para o comentário
Compartilhar em outros sites

Posta seu vocations.xml ae .

<?xml version="1.0" encoding="UTF-8"?>

<vocations>

<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="1">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="2">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="5" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="700" soulmax="100" gainsoulticks="120" fromvoc="3">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="3" gainmanaamount="10" manamultiplier="3.0" attackspeed="700" soulmax="100" gainsoulticks="120" fromvoc="4">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="20" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="20" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="2" gainmanaamount="20" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="2" gainmanaamount="20" manamultiplier="3.0" attackspeed="600" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

<!--

<vocation id="9" name="Extrem Sorcerer" description="an extreme sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="30" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="10" name="Healing Druid" description="an healing druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="30" manamultiplier="1.1" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="11" name="Assassin Paladin" description="an assassin paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="2" gainmanaamount="30" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

<vocation id="12" name="Killer Knight" description="an killer knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="2" gainmanaamount="30" manamultiplier="3.0" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50">

<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>

<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>

</vocation>

-->

</vocations>

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...