Jump to content

Help with this mcm menu


bwins95

Recommended Posts

I've managed to write this script and it compiles successfully. i just can't get the add spell part to add the spell when I check the box.

 

Scriptname MyConfigmenu extends SKI_ConfigBase

 

Spell property aaaaa auto

GlobalVariable Property TestSpellMCM Auto

 

; OIDs

int TestSpellMCMToggle

 

event OnPageReset(string page)

AddHeaderOption("Group 1")

TestSpellMCMTOggle = AddToggleOption("spell", TestSpellMCM.GetValue() != 0.0)

endEvent

 

event OnOptionSelect(int option)

if option == TestSpellMCMToggle

Bool toggleVal = (TestSpellMCM.GetValue() == 0.0)

If toggleVal

TestSpellMCM.SetValue(1.0)

Elseif toggleVal

TestSpellMCM.SetValue(0.0)

EndIf

SetToggleOptionValue(option, toggleVal)

Game.GetPlayer().AddSpell(aaaaa)

endif

endEvent

 

Event OnOptionDefault(Int option)

Float value

If option == TestSpellMCMToggle

TestSpellMCM.SetValue(1.0)

SetToggleOptionValue(option, True)

endif

endEvent

 

Event OnOptionHighlight(Int option)

If option == TestSpellMCMToggle

SetInfoText("Adds spell.")

endif

endEvent

Edited by bwins95
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...