Ir para conteúdo
  • 0

Spells Wodbo - Erro No Compilador Mas Funciona


lordrai

Pergunta

Bem, o nome do tópico já fala tudo.

eu andei pesquisando e achei isso no fórum: http://www.xtibia.co...t-spells-wodbo/

 

 

porém como eu adiciono:

 

 

if isPlayer(parameters.cid) then
...
...
...
end

 

em uma magia de área tipo essa:

 

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 87)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr1 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{1, 2, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}
local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)
local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 88)
setCombatFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr10 = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 1, 1, 1, 0, 2},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}
local area10 = createCombatArea(arr10)
setCombatArea(combat10, area10)
local combat100 = createCombatObject()
setCombatParam(combat100, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat100, COMBAT_PARAM_EFFECT, 89)
setCombatFormula(combat100, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr100 = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 2},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}
local area100 = createCombatArea(arr100)
setCombatArea(combat100, area100)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 89)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr2 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{2, 1, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}
local area2 = createCombatArea(arr2)
setCombatArea(combat2, area2)
local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, 88)
setCombatFormula(combat20, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr20 = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 2, 0, 1, 1, 1},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}
local area20 = createCombatArea(arr20)
setCombatArea(combat20, area20)
local combat200 = createCombatObject()
setCombatParam(combat200, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat200, COMBAT_PARAM_EFFECT, 87)
setCombatFormula(combat200, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr200 = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{2, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}
local area200 = createCombatArea(arr200)
setCombatArea(combat200, area200)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 92)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)

local arr3 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 2, 0},
{0, 0, 0, 1, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}
local area3 = createCombatArea(arr3)
setCombatArea(combat3, area3)
local combat30 = createCombatObject()
setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat30, COMBAT_PARAM_EFFECT, 91)
setCombatFormula(combat30, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr30 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 2, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}
local area30 = createCombatArea(arr30)
setCombatArea(combat30, area30)

local combat300 = createCombatObject()
setCombatParam(combat300, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat300, COMBAT_PARAM_EFFECT, 90)
setCombatFormula(combat300, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr300 = {
{0, 0, 2, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}
local area300 = createCombatArea(arr300)
setCombatArea(combat300, area300)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 90)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr4 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 1, 0},
{0, 0, 0, 2, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}
local area4 = createCombatArea(arr4)
setCombatArea(combat4, area4)

local combat40 = createCombatObject()
setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat40, COMBAT_PARAM_EFFECT, 91)
setCombatFormula(combat40, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr40 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 2, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}

local area40 = createCombatArea(arr40)
setCombatArea(combat40, area40)

local combat400 = createCombatObject()
setCombatParam(combat400, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat400, COMBAT_PARAM_EFFECT, 92)
setCombatFormula(combat400, COMBAT_FORMULA_LEVELMAGIC, -4.0, 0, -4.1, 0)
local arr400 = {
{0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 2, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}
local area400 = createCombatArea(arr400)
setCombatArea(combat400, area400)



function ha(cid)
if getPatrzJacolos(cid) == 1 then  

doCombat(cid, combat1, numberToVariant(cid))
doCombat(cid, combat10, numberToVariant(cid))
doCombat(cid, combat100, numberToVariant(cid))
doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1)
elseif getPatrzJacolos(cid) == 2 then  

	 doCombat(cid, combat4, numberToVariant(cid))
doCombat(cid, combat40, numberToVariant(cid))
doCombat(cid, combat400, numberToVariant(cid))
doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1)
elseif getPatrzJacolos(cid) == 3 then  

	 doCombat(cid, combat2, numberToVariant(cid))
doCombat(cid, combat20, numberToVariant(cid))
doCombat(cid, combat200, numberToVariant(cid))
doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1)
elseif getPatrzJacolos(cid) == 0 then  

	 doCombat(cid, combat3, numberToVariant(cid))
doCombat(cid, combat30, numberToVariant(cid))
doCombat(cid, combat300, numberToVariant(cid))
 doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1)
  end
end
function ma2(cid)	  
if isPlayer(cid) == 1 then
	doPlayerSay(cid, 'Me...!', TALKTYPE_ORANGE_1)  
end		  
if isCreature(cid) == 1 then
end
		addEvent(ha,0,cid)
  end
function ha2(cid)	  
if isPlayer(cid) == 1 then
	doPlayerSay(cid, 'Ha...!', TALKTYPE_ORANGE_1)
end	  
if isCreature(cid) == 1 then
end	
		addEvent(ma2,0,cid)
  end
function ma(cid)  
if isPlayer(cid) == 1 then  
	doPlayerSay(cid, 'Me...!', TALKTYPE_ORANGE_1)
end		
if isCreature(cid) == 1 then
end	
		addEvent(ha2,0,cid)
  end
function ka(cid)  
if isPlayer(cid) == 1 then  
	doPlayerSay(cid, 'Ka...!', TALKTYPE_ORANGE_1)
end	  
if isCreature(cid) == 1 then
end	
		addEvent(ma,0,cid)
  end
function onCastSpell(cid, var)
if isCreature(cid) == 1 then
  addEvent(ka,0,cid)
end
end

?????

 

 

 

e outro erro é esse...

erro4a3f.jpg

 

 

ALGUEM ME AJUDA PORFAVOR...

 

Agradeço muito.

 

.

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

3 respostass a esta questão

Posts Recomendados

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...