So... I have created a script which looks at affects and creates/toggles a variable for the spell/skill name from 0 to 1. Example:
You are affected by:
Skill: 'berserk' modified hit roll by XX for XX hours.
Will change @berserk to 1.
Similarly, I have set "You feel your pulse slow down." to set @berserk to 0.
Now, how to make the following work is what I cannot figure out:
I want a button with caption Berserk that is clickable when @berserk=0. When I click it, it should send the berserk command to the mud. However it should remain clickable untill I see berserk in my skills list (which will mean @berserk=1). Upon seeing it, it will become unclickable and the caption will be Berserking. When my "pulse slows down" and @berserk becomes 0, the button will become clickable again with the caption Berserk.
Any ideas what the code needs to be?
Thanks in advance