Mindee-BOT

Mindee-BOT Community => Help Board => Topic started by: Dimitrilki on November 17, 2020, 09:26:22 PM

Title: script.IsSkillEnabled(2) always true
Post by: Dimitrilki on November 17, 2020, 09:26:22 PM
script.IsSkillEnabled() returns if the bot's checkbox is enabled, therefore it always receives True. To check if the skill is activated, use this script.IsSkillActivated()
Title: Re: script.IsSkillEnabled(2) always true
Post by: MikeOwh on November 17, 2020, 10:52:59 PM
script.IsSkillEnabled() returns if the bot's checkbox is enabled, therefore it always receives True. To check if the skill is activated, use this script.IsSkillActivated()
Shit, I edit your comment, I'm an idiot.
Title: Re: script.IsSkillEnabled(2) always true
Post by: Dimitrilki on November 17, 2020, 11:08:52 PM
is there any functions that let me know if i'm able to use the skill or not? or it just spams the use of it if some meet conditions


and yeah, u changed it xD
Title: Re: script.IsSkillEnabled(2) always true
Post by: Dimitrilki on November 17, 2020, 11:20:30 PM
Nvm, there's no need.

just wanted to wait till the skill is charged if i use it so just did it this way

if script.IsSkillActivated(2):
   script.StatusMessage('Skill Used')
   script.PauseMovementEx(105)
Title: Re: script.IsSkillEnabled(2) always true
Post by: MikeOwh on November 17, 2020, 11:24:12 PM
Nvm, there's no need.

just wanted to wait till the skill is charged if i use it so just did it this way

if script.IsSkillActivated(2):
   script.StatusMessage('Skill Used')
   script.PauseMovementEx(105)
That should work.
Title: Re: script.IsSkillEnabled(2) always true
Post by: Dimitrilki on November 17, 2020, 11:56:57 PM
Actually i'd like to know why when i use:

def onSkillActivated(2):

 i do get a "SyntaxError unexpected token '2' " can u help me out with that question pls?

and i'd like to know the correct usage of that function
Title: Re: script.IsSkillEnabled(2) always true
Post by: =Mindee= on November 18, 2020, 11:16:27 PM
Actually i'd like to know why when i use:

def onSkillActivated(2):

 i do get a "SyntaxError unexpected token '2' " can u help me out with that question pls?

and i'd like to know the correct usage of that function

That's an event, not a function. Event has variables which then you can use below in your following code.
Code: [Select]
def onSkillActivated(skill):
    if skill == 1:
        script.Alarm('Left skill is activated')
    else:
        script.Alarm('Right skill is activated')