Ta sendo um desafio pra mim, estou a 7 dias tentando arrumar isso. Tenho uma magia com um sistema que empurra o jogador para direção que ele estiver olhando, feito pelo DOKMOS porem não consigo colocar dano nessa magia com formula porque da um dos seguintes erros: 
  
Erros 
  
  
  
  
  
Quote 
  
[19/03/2012 14:47:48] data/spells/scripts/outras/ice push.lua:onCastSpell 
[19/03/2012 14:47:48] Description: 
[19/03/2012 14:47:48] (luaCreateCombatArea) This function can only be used while loading the script. 
  
ou 
  
[19/03/2012 15:03:15] [C]: in function 'getn' 
[19/03/2012 15:03:15] data/lib/Getposfromarea.lua:2: in function 'getPosfromArea' 
[19/03/2012 15:03:15] data/spells/scripts/outras/ice push.lua:72: in function <data/spells/scripts/outras/ice push.lua:55> 
  
As formas que eu tentei foram essas: 
  
Usando local combat 
  
  
  
  
  
Quote 
  
local combat1 = createCombatObject() 
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) 
function onGetFormulaValues(cid, level, skill) 
  
min = -(level * 0.90 + skill * 0.70) * 1.0 
max = -(level * 1.00 + skill * 0.80) * 1.0 
  
return min, max 
end 
  
setCombatCallback(combat1, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") 
  
local function UM(cid) 
local area1 = { 
{0, 0, 0}, 
{0, 0, 0}, 
{1, 1, 1}, 
{0, 1, 0}, 
{0, 3, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
} 
  
pos = getPosfromArea(cid,area1) 
n = 0 
  
local area1 = createCombatArea(area1) 
setCombatArea(combat1, area1) 
  
while n < #pos do 
n = n+1 
doSendMagicEffect(pos[n],2) 
thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253} 
if isCreature(getThingfromPos(thing).uid) == TRUE then 
doPushCreature(getThingfromPos(thing).uid,getPlayerLookDir(cid)) 
end 
end 
end 
  
  
local combat2 = createCombatObject() 
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) 
function onGetFormulaValues(cid, level, skill) 
  
min = -(level * 0.90 + skill * 0.70) * 1.0 
max = -(level * 1.00 + skill * 0.80) * 1.0 
  
return min, max 
end 
  
setCombatCallback(combat2, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") 
  
local function DOIS(cid) 
local area2 = { 
{1, 1, 1}, 
{1, 1, 1}, 
{0, 0, 0}, 
{0, 0, 0}, 
{0, 3, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
} 
  
  
pos = getPosfromArea(cid,area2) 
n = 0 
  
  
while n < #pos do 
n = n+1 
doSendMagicEffect(pos[n],2) 
thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253} 
if isCreature(getThingfromPos(thing).uid) == TRUE then 
doPushCreature(getThingfromPos(thing).uid,getPlayerLookDir(cid)) 
end 
end 
end 
  
  
function onCastSpell(cid, words, param) 
doSendAnimatedText(getThingPos(cid), "Ice", 215) 
addEvent(UM, 1, cid) 
addEvent(DOIS, 300, cid) 
return TRUE 
end 
  
Usando function oncastspell 
  
  
  
  
  
Quote 
  
  
function onCastSpell(cid, words, param) 
  
local function UM(cid) 
local area = { 
{0, 0, 0}, 
{0, 0, 0}, 
{1, 1, 1}, 
{0, 1, 0}, 
{0, 3, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
} 
  
pos = getPosfromArea(cid,area) 
n = 0 
  
while n < #pos do 
n = n+1 
doSendMagicEffect(pos[n],2) 
thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253} 
if isCreature(getThingfromPos(thing).uid) == TRUE then 
doPushCreature(getThingfromPos(thing).uid,getPlayerLookDir(cid)) 
end 
end 
  
end 
  
local function DOIS(cid) 
local area = { 
{1, 1, 1}, 
{1, 1, 1}, 
{0, 0, 0}, 
{0, 0, 0}, 
{0, 3, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
{0, 0, 0}, 
} 
  
pos = getPosfromArea(cid,area) 
n = 0 
  
while n < #pos do 
n = n+1 
doSendMagicEffect(pos[n],2) 
thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253} 
if isCreature(getThingfromPos(thing).uid) == TRUE then 
doPushCreature(getThingfromPos(thing).uid,getPlayerLookDir(cid)) 
end 
end 
end 
  
doSendAnimatedText(getThingPos(cid), "Ice", 215) 
addEvent(UM, 1, cid) 
addEvent(DOIS, 300, cid) 
return TRUE 
end 
Alguem me ajuda por favor, essa ultima empurra mas nao da dano, alguem pode me ajudar??  
REP+ pra quem solucionar por 1 mes vei, de verdade