I'll update my exsp files...
EDIT: EXSP Full updated, I'll take care of EXSP Lite tonight.
Thanks Diarmuid and JKos to have updated your frameworks. Now, AIswitcher runs with your spell framework. It's perfect.Diarmuid wrote:That's golden!![]()
![]()
![]()
I'll update my exsp files...
EDIT: EXSP Full updated, I'll take care of EXSP Lite tonight.
Yes, but if you have the onDrawGui hook defined in gw in a cloneObject of the party, it might override the framework dynamic hooks, and exsp timer might just not work at all, without you noticing it. It doesn't crash, it just won't detect spells and trigger hooks. That's what happend for me at least.Damonya wrote: PS : personally no problem either with grimwidget
Code: Select all
function autoexec()
exsp:addSpellHooks("name_of_the_spell",
{
onMonsterHit = function(self, monster)
if monster.name == "name_of_the_monster" then
local level, x, y = self:getPosition()
local power, ordinal = self.power, self.ordinal
local facing = (self.facing + 2)%4
local dx,dy = getForward((self.facing+2)%4)
exsp:spellSpawn("name_of_the_spell", level, x+dx, y+dy, facing, {power = power, ordinal = ordinal})
end
end
})
endCode: Select all
function autoexec()
exsp:addSpellHooks("name_of_the_spell",
{
onMonsterHit = function(self, monster)
if monster.name == "name_of_the_monster" then
local power, ordinal = self.power, self.ordinal
local facing = (self.facing + 2)%4
exsp:spellSpawn(self.name, monster.id, facing, {power = power, ordinal = ordinal})
end
end
})
endReally? I'll test it, one second, it shouldn't...Damonya wrote:No you should add dx dy, otherwise the monster hurt with his own spell.
ok sorry, I tested again and in fact I was wrong. This is because I tested with poison_bolt and this is the normal behavior of this spell. damage of the spell projectile + poison damage = 2 times damage.Diarmuid wrote:EDIT: Indeed, the code I put above works fine.Damonya wrote:No you should add dx dy, otherwise the monster hurt with his own spell.
Code: Select all
function autoexec()
exsp:addSpellHooks("your_spell_name",
{
onPass = function(self)
if self:getCollisionAhead() == "your_monster_name" then
self:destroy()
return false
end
end
})
exsp:addSpellHooks("your_spell_name",
{
onMonsterHit = function(self, monster)
if monster.name == "your_monster_name" then
local power, ordinal = self.power, self.ordinal
local facing = self.facing
exsp:spellSpawn("your_spell_name", monster.id, facing, {power = power, ordinal = ordinal})
end
end
})
end