how to gain xp with an attack spell created?
Posted: Thu Nov 29, 2012 9:49 am
hello all,
Here I create a new attack spell (black_bolt) but when I kill a monster I have no xp gain.
I look at the forum but I do not understand how?
A little help would be welcome ...
And i want to make a "party: shakecamera" when the missile hits monster, decor and party, is it possible?
thank you in advance
defineSpell{
name = "blackbolt",
uiName = "blackbolt",
skill = "spellcraft",
level = 1,
runes = "ABCD",
manaCost = 1,
onCast = function(caster, x, y, direction, skill)
local dx,dy = getForward(party.facing)
local x,y = party.x + dx, party.y + dy
spawn("blackbolt", party.level, x, y, party.facing)
--caster:damage(1, "physical")
--caster:damage(1, "poison")
--caster:modifyFood(-100)
end
}
Ps: it is possible to decrease energy of caster ?
Here I create a new attack spell (black_bolt) but when I kill a monster I have no xp gain.
I look at the forum but I do not understand how?
A little help would be welcome ...
And i want to make a "party: shakecamera" when the missile hits monster, decor and party, is it possible?
thank you in advance
defineSpell{
name = "blackbolt",
uiName = "blackbolt",
skill = "spellcraft",
level = 1,
runes = "ABCD",
manaCost = 1,
onCast = function(caster, x, y, direction, skill)
local dx,dy = getForward(party.facing)
local x,y = party.x + dx, party.y + dy
spawn("blackbolt", party.level, x, y, party.facing)
--caster:damage(1, "physical")
--caster:damage(1, "poison")
--caster:modifyFood(-100)
end
}
Ps: it is possible to decrease energy of caster ?