Thorn
Spriting since 2013
Hello guys, i need your help plz, i made a spell (actually many spells) in spellcreator, and they work great for me when i add local cid = creature:getId()
I use tfs 1.3...and these spells are really old, idk what tfs, maybe 0.4?
well, what i need is to be able to add this:
into here:
Is it possible?? i would be really gratefull!! thanks guys! D;
I use tfs 1.3...and these spells are really old, idk what tfs, maybe 0.4?
well, what i need is to be able to add this:
Lua:
function onGetFormulaValues(player, level, maglevel)
local level = player:getLevel()
local min = 400+maglevel*30.8 + level*4.2
local max = 700+maglevel*35.1 + level*4.4
return -min, -max
end
into here:
Lua:
-- SpellCreator generated.
-- =============== COMBAT VARS ===============
-- Areas/Combat for 0ms
local combat0_Brush = createCombatObject()
setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat0_Brush, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat0_Brush, COMBAT_PARAM_BLOCKSHIELD, true)
setCombatArea(combat0_Brush,createCombatArea({{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0},
{0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0},
{1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1},
{0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0},
{0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0},
{0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}}))
function getDmg_Brush(cid, level, maglevel)
return (10)*-1,(20)*-1
end
setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush")
local dfcombat0_Brush = {CONST_ANI_FIRE,0,0,1,-1,2,-2,-1,1,-2,2,-3,3,1,1,2,2,3,3,-1,-1,-2,-2,-3,-3,3,-3,4,1,4,-1,-4,1,-4,-1,0,5,0,-5,5,0,-5,0,3,-1,2,-1,3,1,2,1,1,3,1,2,-1,3,-1,2,-2,1,-3,1,-3,-1,-2,-1,-1,-2,-1,-3,1,-2,1,-3}local combat0_Brush_2 = createCombatObject()
setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)
setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatArea(combat0_Brush_2,createCombatArea({{0, 0, 0, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 0, 1, 0, 1, 0, 0},
{0, 1, 0, 0, 1, 0, 0, 1, 0},
{0, 0, 0, 0, 1, 0, 0, 0, 0},
{1, 1, 1, 1, 2, 1, 1, 1, 1},
{0, 0, 0, 0, 1, 0, 0, 0, 0},
{0, 1, 0, 0, 1, 0, 0, 1, 0},
{0, 0, 1, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 0, 0, 0}}))
function getDmg_Brush_2(cid, level, maglevel)
return (10)*-1,(20)*-1
end
setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2")
local dfcombat0_Brush_2 = {CONST_ANI_FIRE,1,0,2,0,3,0,-1,0,-2,0,-3,0,-4,0,4,0,0,-1,0,-2,0,-3,0,-4,0,1,0,2,0,3,0,4,3,2,2,3,1,4,-1,4,-2,3,-3,2,-1,-4,1,-4,2,-3,3,-2,-2,-3,-3,-2}
-- =============== CORE FUNCTIONS ===============
local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part
if (isCreature(cid)) then
doCombat(cid, c, var)
if (dirList ~= nil) then -- Emit distance effects
local i = 2;
while (i < #dirList) do
doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])
i = i + 2
end
end
end
end
function onCastSpell(creature, var)
local cid = creature:getId()
local startPos = getCreaturePosition(cid)
RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)
RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos)
return true
end
Is it possible?? i would be really gratefull!! thanks guys! D;