Mindee-BOT

Mindee-BOT Community => Scripting => Request => Topic started by: hazael on October 05, 2024, 07:19:12 pm

Title: change location with commands
Post by: hazael 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)
Title: Re: change location with commands
Post by: =Mindee= 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.