roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,188
- Solutions
- 34
- Reaction score
- 200
HI! I have a server 0.4 and i'm changing to server 1.2 (all is version 8.6).
In source 0.4, this works fine, if player use the spell and die, nothing happens... but in 1.2 if player use spell and die, the server crash, have some solution in source files?
obs: the problem inst with the spell script, because it works fine in tfs 0.4
Look this video in tfs 1.2: If i use spell its ok... but if i use the spell and log-out the server crashes.
In source 0.4, this works fine, if player use the spell and die, nothing happens... but in 1.2 if player use spell and die, the server crash, have some solution in source files?
obs: the problem inst with the spell script, because it works fine in tfs 0.4
Look this video in tfs 1.2: If i use spell its ok... but if i use the spell and log-out the server crashes.
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_NONE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 167)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.2, 1, -1.2, 1)
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, 35)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 132)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -99.2, 2, -80.2, 2)
setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, 35)
arr1 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 3, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0}
}
arr2 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 3, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0}
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
local function onCastSpell1(parameters)
return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
end
local function onCastSpell2(parameters)
return isPlayer(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 2300, parameters)
return TRUE
end
Last edited: