• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OpenTibia SpellCreator: A graphical spell creation enviroment

I figure out the bug bro :)

When i added this line i dont get the timer error.

Code:
function RunPart(c,cid,var) -- Part
if isPlayer(cid) then
	doCombat(cid, c, var)
end
end
 
That's something I've figured out myself already, it's just something you never care about until it happens.
It's already added for the next release, like several other things.
 
Nice job :), of course I gave you reputation.

My work in this awesome application
WrEoCr.gif
 
Last edited:
That's something I've figured out myself already, it's just something you never care about until it happens.
It's already added for the next release, like several other things.

Hmm.. so monster spells won't work without manually editing a few lines? :(

Red
 
While this software does not cover every aspect of creating spells, at least we don't have to deal with manually setting up all the animation stuff.
 
Another small issue is when you load a recent spell the length of the spell is not loaded, so if you save a 5000ms spell it loads the spell with 2000ms and you have to write in 5000ms to see the whole spell.
 
Illusion mentioned a distance effect feature, it would be nice to have it.
Upon using a spell, it would use a distance effect to a selected location.
 
If the current TFS spell system has a way to create this effect it'd be easy to add, but as far as I know it doesn't.
If you know a way to add this using the original TFS spell system, tell me. Otherwise I'll find a workaround to create the same effect elsehow :).

Current known bugs;
- Lua script errors on logout (Fixed next release)
- Exception once .gif generation (?) (File locking?) (Not reproduced yet)
- Save/Loading current time fails
- Messed up tab order (Fixed next release)
- Parsing of 9.5x .dat fails

It's somewhat hard to keep track of the bugs :p.

Next release changes;
- Feature to select spr/dat files from a certain directory

Please post here if I missed some bug or really important feature out :).
 
I think it's something like this:

doSendDistanceShoot(fromPos, toPos, effectID)
 
I think it's something like this:

doSendDistanceShoot(fromPos, toPos, effectID)

Look how area effects are currently being displayed; it's not using a separate function (instead just the TFS spell system).
 
Look how area effects are currently being displayed; it's not using a separate function (instead just the TFS spell system).

So what? You can still use that function, I just tested it and it works fine.

Try this spell:
Lua:
-- SpellCreator generated.

-- =============== COMBAT VARS ===============
-- Areas/Combat for 400ms
local combat4_NewItem77349 = createCombatObject()
setCombatParam(combat4_NewItem77349, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat4_NewItem77349, COMBAT_PARAM_TYPE, CONST_ME_ENERGYHIT)
setCombatParam(combat4_NewItem77349, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatArea(combat4_NewItem77349,createCombatArea({{2},
{0},
{0},
{0},
{0},
{1}}))
function getDmg_NewItem77349(cid, level, maglevel)
	return (10)*-1,(20)*-1 
end
setCombatCallback(combat4_NewItem77349, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_NewItem77349")

-- Areas/Combat for 300ms
local combat3_NewItem77349 = createCombatObject()
setCombatParam(combat3_NewItem77349, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat3_NewItem77349, COMBAT_PARAM_TYPE, CONST_ME_ENERGYHIT)
setCombatParam(combat3_NewItem77349, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatArea(combat3_NewItem77349,createCombatArea({{2},
{0},
{0},
{0},
{1}}))
function getDmg_NewItem77349(cid, level, maglevel)
	return (10)*-1,(20)*-1 
end
setCombatCallback(combat3_NewItem77349, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_NewItem77349")

-- Areas/Combat for 200ms
local combat2_NewItem77349 = createCombatObject()
setCombatParam(combat2_NewItem77349, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat2_NewItem77349, COMBAT_PARAM_TYPE, CONST_ME_ENERGYHIT)
setCombatParam(combat2_NewItem77349, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatArea(combat2_NewItem77349,createCombatArea({{2},
{0},
{0},
{1}}))
function getDmg_NewItem77349(cid, level, maglevel)
	return (10)*-1,(20)*-1 
end
setCombatCallback(combat2_NewItem77349, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_NewItem77349")

-- Areas/Combat for 100ms
local combat1_NewItem77349 = createCombatObject()
setCombatParam(combat1_NewItem77349, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat1_NewItem77349, COMBAT_PARAM_TYPE, CONST_ME_ENERGYHIT)
setCombatParam(combat1_NewItem77349, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatArea(combat1_NewItem77349,createCombatArea({{2},
{0},
{1}}))
function getDmg_NewItem77349(cid, level, maglevel)
	return (10)*-1,(20)*-1 
end
setCombatCallback(combat1_NewItem77349, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_NewItem77349")

-- Areas/Combat for 0ms
local combat0_NewItem77349 = createCombatObject()
setCombatParam(combat0_NewItem77349, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat0_NewItem77349, COMBAT_PARAM_TYPE, CONST_ME_ENERGYHIT)
setCombatParam(combat0_NewItem77349, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatArea(combat0_NewItem77349,createCombatArea({{2},
{1}}))
function getDmg_NewItem77349(cid, level, maglevel)
	return (10)*-1,(20)*-1 
end
setCombatCallback(combat0_NewItem77349, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_NewItem77349")

-- =============== CORE FUNCTIONS ===============
function RunPart(c,cid,var) -- Part
	doCombat(cid, c, var)
end

function onCastSpell(cid, var)
fromPos = getCreaturePosition(cid)

	addEvent(RunPart,400,combat4_NewItem77349,cid,var)
	addEvent(RunPart,400,doSendDistanceShoot(fromPos, {x=fromPos.x, y=fromPos.y-5, z=fromPos.z}, CONST_ANI_FIRE))
	addEvent(RunPart,300,combat3_NewItem77349,cid,var)
	addEvent(RunPart,200,combat2_NewItem77349,cid,var)
	addEvent(RunPart,100,combat1_NewItem77349,cid,var)
	RunPart(combat0_NewItem77349,cid,var)
	return true
end

You can insert that function under addEvent at a specific timespan as you could choose in the program.
You just need to program it so it recognizes the location of the square of the target animation destination.
 
Woops, stinks that you can't edit posts.

Remove all of these lines:
Lua:
setCombatParam(combat1_NewItem77349, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)

I forgot to remove them, don't think it even matters, but it's not needed, it will still work with the function.
 
Back
Top