Username: Password:

Author Topic: script.IsSkillEnabled(2) always true  (Read 52 times)

Offline Dimitrilki

  • Bug
  • *
  • Posts: 4
  • Cookies 0
  • I love Mindee-BOT!
    • View Profile
script.IsSkillEnabled(2) always true
« 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()
« Last Edit: November 17, 2020, 10:52:22 PM by DemonLord »



Offline DemonLord

  • Administrator
  • Wolf
  • *****
  • Posts: 115
  • Cookies 10001
    • View Profile
Re: script.IsSkillEnabled(2) always true
« Reply #1 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.

Offline Dimitrilki

  • Bug
  • *
  • Posts: 4
  • Cookies 0
  • I love Mindee-BOT!
    • View Profile
Re: script.IsSkillEnabled(2) always true
« Reply #2 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

Offline Dimitrilki

  • Bug
  • *
  • Posts: 4
  • Cookies 0
  • I love Mindee-BOT!
    • View Profile
Re: script.IsSkillEnabled(2) always true
« Reply #3 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)

Offline DemonLord

  • Administrator
  • Wolf
  • *****
  • Posts: 115
  • Cookies 10001
    • View Profile
Re: script.IsSkillEnabled(2) always true
« Reply #4 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.

Offline Dimitrilki

  • Bug
  • *
  • Posts: 4
  • Cookies 0
  • I love Mindee-BOT!
    • View Profile
Re: script.IsSkillEnabled(2) always true
« Reply #5 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

Offline =Mindee=

  • Commander Shepard
  • BOT Developer Administrator
  • Dragon
  • *****
  • Posts: 2,667
  • Cookies 9017
  • We'll bang, OKAY?
    • View Profile
    • http://mindee-bot.com
Re: script.IsSkillEnabled(2) always true
« Reply #6 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')

« Last Edit: November 18, 2020, 11:21:21 PM by =Mindee= »


Mindee-BOT creator, founder and developer.