Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a lil help #47

Open
shararaspark opened this issue Mar 20, 2023 · 3 comments
Open

Need a lil help #47

shararaspark opened this issue Mar 20, 2023 · 3 comments

Comments

@shararaspark
Copy link

idk how does it switch chars on its own, and in chars cfg i changed it according to mine but still doesn't work by it, Also when I start in on an alt it just goes for the 1520 not 1475 as i changed on the cfg.
May you please help because I am a little bit pepega and I am not really good with Python.
I apologize if I am of any bothering.

@any-other-guy
Copy link
Owner

you will need to enable multi char mode, and set your main characer in config.py. Also set your character.py accordingly with all characters you want to do in a cycle.

@Krazeecode
Copy link

One thing I find is that the default set up below is for 15 chars. Since the scroll down will make the 10th (9th) char is on the second row instead of the last row. When it scroll all the way down, it will then select second row, which is the 7th (6th) char again.
"charPositions": [
[760, 440],
[960, 440],
[1160, 440],
[760, 530],
[960, 530],
[1160, 530],
[760, 620],
[960, 620],
[1160, 620],
[760, 530],
[960, 530],
[1160, 530],
[760, 620],
[960, 620],
[1160, 620],
]

Regarding switch char, you need to log into LA, on your mainchar (whatever char position that you put on the Config file).
It will then identify your mainchar position among all the chars. After it finished that main char, then it will keep going. when the cycle is done, it will end back to the main char and run endless chaos.
Gotta setup the index in Char file correctly that matches the positions of your chars in game. First char (position) is 0.

Turn on True for multicharmode in Config file and True for GFN (even though you don't use it).

@BoredCoder95
Copy link

I edited my copy to be able to run up to the full 24 characters

in "config.py", add to the end of the config ={}

    "SwitchCharactersX": 540,
    "SwitchCharactersY": 682,
    # Scroll Up
    "CharacterScrollUpX": 1260,
    "CharacterScrollUpY": 392,
    # Scroll Down
    "CharacterScrollDownX": 1260,
    "CharacterScrollDownY": 639,
    # Switch Characters Connect
    "CharacterConnectX": 1022,
    "CharacterConnectY": 684,
    "CharacterConnectOkX": 915,
    "CharacterConnectOkY": 583,
    # row 1
    "Character0X": 760,
    "Character0Y": 435,
    "Character1X": 970,
    "Character1Y": 435,
    "Character2X": 1150,
    "Character2Y": 435,
    # row 2
    "Character3X": 760,
    "Character3Y": 525,
    "Character4X": 970,
    "Character4Y": 525,
    "Character5X": 1150,
    "Character5Y": 525,
    # row 3
    "Character6X": 760,
    "Character6Y": 615,
    "Character7X": 970,
    "Character7Y": 615,
    "Character8X": 1150,
    "Character8Y": 615,

in "bot.py", define a new switch character function, I put this right under the original so as to ensure its defined prior to being referenced

def switchToCharacterNew(index):
    sleep(1500, 1600)
    print("switching to {}".format(index))
    pyautogui.press('esc')
    sleep(1500, 1600)
    pydirectinput.click(x=config["SwitchCharactersX"], y=config["SwitchCharactersY"], button="left")
    sleep(500, 600)
    pydirectinput.click(x=config["CharacterScrollUpX"], y=config["CharacterScrollUpY"], button="left")
    sleep(500, 600)
    pydirectinput.click(x=config["CharacterScrollUpX"], y=config["CharacterScrollUpY"], button="left")
    sleep(500, 600)
    pydirectinput.click(x=config["CharacterScrollUpX"], y=config["CharacterScrollUpY"], button="left")
    sleep(500, 600)
    pydirectinput.click(x=config["CharacterScrollUpX"], y=config["CharacterScrollUpY"], button="left")
    sleep(500, 600)
    pydirectinput.click(x=config["CharacterScrollUpX"], y=config["CharacterScrollUpY"], button="left")
    sleep(500, 600)
    pydirectinput.click(x=config["CharacterScrollUpX"], y=config["CharacterScrollUpY"], button="left")
    sleep(500, 600)
    pydirectinput.click(x=config["CharacterScrollUpX"], y=config["CharacterScrollUpY"], button="left")
    sleep(1500, 1600)
    # Rows 1-3
    if index==0:
        pydirectinput.click(x=config["Character0X"], y=config["Character0Y"], button="left")
    elif index==1:
        pydirectinput.click(x=config["Character1X"], y=config["Character1Y"], button="left")
    elif index==2:
        pydirectinput.click(x=config["Character2X"], y=config["Character2Y"], button="left")
    elif index==3:
        pydirectinput.click(x=config["Character3X"], y=config["Character3Y"], button="left")
    elif index==4:
        pydirectinput.click(x=config["Character4X"], y=config["Character4Y"], button="left")
    elif index==5:
        pydirectinput.click(x=config["Character5X"], y=config["Character5Y"], button="left")
    elif index==6:
        pydirectinput.click(x=config["Character6X"], y=config["Character6Y"], button="left")
    elif index==7:
        pydirectinput.click(x=config["Character7X"], y=config["Character7Y"], button="left")
    elif index==8:
        pydirectinput.click(x=config["Character8X"], y=config["Character8Y"], button="left")
    # Row 4
    elif index==9:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character6X"], y=config["Character6Y"], button="left")
    elif index==10:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character7X"], y=config["Character7Y"], button="left")
    elif index==11:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character8X"], y=config["Character8Y"], button="left")
    # Row 5
    elif index==12:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character6X"], y=config["Character6Y"], button="left")
    elif index==13:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character7X"], y=config["Character7Y"], button="left")
    elif index==14:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character8X"], y=config["Character8Y"], button="left")
    # Row 6
    elif index==15:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character6X"], y=config["Character6Y"], button="left")
    elif index==16:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character7X"], y=config["Character7Y"], button="left")
    elif index==17:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character8X"], y=config["Character8Y"], button="left")
    # Row 7
    elif index==18:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character6X"], y=config["Character6Y"], button="left")
    elif index==19:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character7X"], y=config["Character7Y"], button="left")
    elif index==20:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character8X"], y=config["Character8Y"], button="left")
    # Row 8
    elif index==21:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character6X"], y=config["Character6Y"], button="left")
    elif index==22:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character7X"], y=config["Character7Y"], button="left")
    elif index==23:
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["CharacterScrollDownX"], y=config["CharacterScrollDownY"], button="left")
        sleep(200, 300)
        pydirectinput.click(x=config["Character8X"], y=config["Character8Y"], button="left")
    sleep(1500, 1600)
    pydirectinput.click(x=config["CharacterConnectX"], y=config["CharacterConnectY"], button="left")
    sleep(1500, 1600)
    pydirectinput.click(x=config["CharacterConnectOkX"], y=config["CharacterConnectOkY"], button="left")
    sleep(25000, 26000)
    
    states["currentCharacter"] = index
    states["abilityScreenshots"] = []
    sleep(10000, 12000)
    if config["GFN"] == True:
        sleep(8000, 9000)

Comment out any functions calls to the original switch character function, and call the new one instead

#switchToCharacter(config["mainCharacter"])
switchToCharacterNew(config["mainCharacter"])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants