This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [ELUNA] All spells unlearn system  (Read 834 times)

gazara353

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 2
    • View Profile
[ELUNA] All spells unlearn system
« on: March 12, 2017, 08:12:34 am »
Hello everyone i have a little problem with RemoveSpell() method on Eluna. What i'm trying to do is unlearn or remove multiple spells from a player. I used a code for learning multiple spells and made it to unlearn them but it don't work.

This works:
   local Spells = {48467, 48463, 48568, 49800, 48572, 48470, 48451, 48469, 50464}
       
   for k,v in ipairs(Spells) do
           plr:LearnSpell(v);
   end

but this not:
   local Spells = {48467, 48463, 48568, 49800, 48572, 48470, 48451, 48469, 50464}
   
   for k,v in ipairs(Spells) do
      plr:RemoveSpell(v);
   end


EDIT:
Now it works fine and i posted the updated code.
« Last Edit: March 19, 2017, 04:38:47 pm by gazara353 »