Username: Password:

Author Topic: change location with commands  (Read 470 times)

Offline hazael

  • Bug
  • *
  • Posts: 1
  • Cookies 0
  • I love Mindee-BOT!
    • View Profile
change location with commands
« on: October 05, 2024, 07:19:12 PM »
The command below is not changing the route, can anyone help?

def onReceivePrivateMessage(name, text):
    if (name not in allowedNames):
        return

    elif ("Logout" in text):
        script.Logout()

    elif ("Until" in text):
        time = text.split()[-1]
        script.LogoutUntil(time)

    elif ("Base" in text):
        script.GetWay() != to_base:
            script.StatusMessage('Back to base...')
            ChangeWay(to_base)

    elif ("Hunt" in text):
        script.GetWay() != to_hunt:
            script.StatusMessage('Back to hunt...')
            ChangeWay(to_hunt)



Offline =Mindee=

  • Commander Shepard
  • BOT Developer Administrator
  • Dragon
  • *****
  • Posts: 2,807
  • Cookies 9022
  • We'll bang, OKAY?
    • View Profile
    • http://mindee-bot.com
Re: change location with commands
« Reply #1 on: October 07, 2024, 01:52:16 PM »
The command below is not changing the route, can anyone help?

def onReceivePrivateMessage(name, text):
    if (name not in allowedNames):
        return

    elif ("Logout" in text):
        script.Logout()

    elif ("Until" in text):
        time = text.split()[-1]
        script.LogoutUntil(time)

    elif ("Base" in text):
        script.GetWay() != to_base:
            script.StatusMessage('Back to base...')
            ChangeWay(to_base)

    elif ("Hunt" in text):
        script.GetWay() != to_hunt:
            script.StatusMessage('Back to hunt...')
            ChangeWay(to_hunt)

You have syntax errors. Forgot to put if before script.GetWay.


Mindee-BOT creator, founder and developer.