so how about dota completely change abilities when equipped aganim scepter?
how to completely replacing abilities without changing its lvl and without troubles
You can do a few things:
1) Change the ability to a new one and make sure you keep the level as you switch back and forth.
2) Check when you cast the spell if the user has the item that changes the spell (and you just add in the tooltip of the spell what the bonuses are).
3) Use a dummy hero ability for levelling the actual ability (which is not a hero ability). When you get the item, increase levels of the ability. You could set it up like:
Level 1 - level 1 ability without item bonus
Level 2 - level 2 ability without item bonus
Level 3 - level 3 ability without item bonus
Level 4 - level 1 ability with item bonus
Level 5 - level 2 ability with item bonus
Level 6 - level 3 ability with item bonus
And then you add 3 when the hero gets the item and subtract 3 when they lose it.
There are probably more solutions, but I won't bother trying to think of them lol.