Jump to content

Ranked Match Grind


langdon

Recommended Posts

I ended up getting all the online trophies with my alt in 507 matches (should've been less than that though).

 

Here's what I did:

- Wrote a script to automate everything over remote play (below)

- Ran 1 version of the script on my laptop (connected to alt)

- Ran 1 version of the script on my desktop (connected to main)

- Traded wins until 14-14 (probably not necessary, but this got us both to Bronze 1 -- I was really testing)

- Let my alt win a bunch more (maybe 30-14) to help unlock 🏆 A World of Challengers later

- Traded wins again until 100-100 (also probably not necessary)

- Had my main win every game (or at least try to) from then on

 

I ended in 402 wins and 105 losses.  The 5 additional losses were because I idled both consoles in the middle of a match which causes an indefinite search/timeout/lose in Ranked, so I unnecessarily lost some points there.

 

I've heard other players only getting 1 point from a beginner while they're in silver, so I'm thinking trading wins had something to do with the amount of points I was receiving in the end.

 

Anyway, here's the script for whatever it's worth.

 

Requirements:

- AutoHotkey 1.1

- Remote Play 5.5 (maximized, but not full screen)

- PS4KeyboardMouseAdapter (default key binds)

- 1440p resolution (I don't know how to write these scripts to where it's resolution independent, so you'll need to tweak for 1080/2160) which isn't fun)

 

On 1 computer you'll want to set win := false on line 22, and true on the other.  If you want to trade wins, uncomment line 54.

 

CoordMode, Pixel, Window

; TODO
; 1. decimations?

#NoEnv
#SingleInstance, Force

SetBatchLines, -1
SetKeyDelay, 0, 128 ; hold buttons for 4 frames
SetTitleMatchMode, 2

#f8::Edit
+#f8::Reload

F4::
WaitFor("1p blue", 248, 103, 280, 125, 0x1796DE, 30)
WaitFor("2p green", 2287, 100, 2319, 122, 0x5F9E28, 30)
Return

F1::
  win := true

  SearchRanked()

  Loop {
    side := ChooseCharacter()

    ; game 1
    Fight(side, win)

    WaitForPostGameMenu()
    Sleep 256
    Send v

    ; game 2
    Fight(side, win)

    WaitForPostGameMenu()
    Sleep 256
    Send v

    ; game 3
    Fight(side, win)

    ; search again
    WaitForPostGameMenu()
    Sleep 256
    Send s
    Send s
    Send v

    ; trade wins
    ;win := !win
  }
Return

WaitForPostGameMenu() {
  WaitFor("post game menu", 1820, 840, 1830, 850, 0xD40B06)
}

Fight(side, win) {
  ;WaitFor("fight", 1267, 142, 1270, 145, 0xE3E3E3)
  ;WaitFor("red 1p health bar", 709, 104, 709, 194, 0x850102, 50)
  WaitForBoth("blue green avatars", 248, 103, 280, 125, 0x1796DE, 30, 2287, 100, 2319, 122, 0x5F9E28, 30)

  ToolTip "waiting for round to truly begin"
  Sleep 3000

  if (win = true) {
    ; Sleep for 3 attacks to get hit
    ToolTip "waiting to take damage"
    Sleep 2500

    ToolTip "murdering opponent"
    Loop 12 {
      Send f
      Sleep 640
    }

    ;WaitFor("round transition", 500, 500, 600, 600, 0x000000)
    If (side = 1) {
      WaitForAbsenceOf("red 1p health bar", 709, 104, 709, 194, 0x850102, 50)
    }
    Else {
      WaitForAbsenceOf("red 2p health bar", 1742, 104, 1742, 194, 0x850102, 50)
    }

    ;WaitFor("fight", 1267, 142, 1270, 145, 0xE3E3E3)
    ;WaitFor("red 1p health bar", 709, 104, 709, 194, 0x850102, 50)
    WaitForBoth("blue green avatars", 248, 103, 280, 125, 0x1796DE, 30, 2287, 100, 2319, 122, 0x5F9E28, 30)

    ToolTip "waiting for round to truly begin"
    Sleep 3000

    ; ; for some reason they show the timer when saying "round 2 fight", but not round 1 so we have to wait
    ; Sleep 1536

    ; Sleep for 3 attacks to get hit
    ToolTip "waiting to take damage"
    Sleep 2500

    ToolTip "murdering opponent w/ EX at the end"
    Loop 8 {
      Send f
      Sleep 640
    }

    ExFireball(side)
  }
  Else {
    ; perform 3 attacks
    ToolTip "doing damage then losing"
    Loop 3 {
      Send f
      Sleep 640
    }

    If (side = 2) {
      WaitForAbsenceOf("red 1p health bar", 709, 104, 709, 194, 0x850102, 50)
    }
    Else {
      WaitForAbsenceOf("red 2p health bar", 1742, 104, 1742, 194, 0x850102, 50)
    }

    ;WaitFor("fight", 1267, 142, 1270, 145, 0xE3E3E3)
    ;WaitFor("red 1p health bar", 709, 104, 709, 194, 0x850102, 50)
    WaitForBoth("blue green avatars", 248, 103, 280, 125, 0x1796DE, 30, 2287, 100, 2319, 122, 0x5F9E28, 30)

    ToolTip "waiting for round to truly begin"
    Sleep 3000

    ; perform 3 attacks
    ToolTip "doing damage then losing"
    Loop 3 {
      Send f
      Sleep 640
    }

    If (side = 2) {
      WaitForAbsenceOf("red 1p health bar", 709, 104, 709, 194, 0x850102, 50)
    }
    Else {
      WaitForAbsenceOf("red 2p health bar", 1742, 104, 1742, 194, 0x850102, 50)
    }
  }
}

ChooseCharacter() {
  WaitFor("character select", 1589, 1156, 1600, 1166, 0x731E26)

  Loop {
    If !WinActive("Remote") {
      Return
    }

    ToolTip "detecting player side"

    ; player 1 detection
    PixelSearch, cx, cy, 651, 1348, 656, 1353, 0x212C34, 10, Fast RGB

    If (ErrorLevel == 0) {
      ToolTip "detected player 1"
      side := 1
      Break
    }

    ; player 2 detection
    PixelSearch, cx, cy, 2138, 838, 2145, 845, 0xD7B3AC, 10, Fast RGB

    If (ErrorLevel == 0) {
      ToolTip "detected player 2"
      side := 2
      Break
    }
  }

  Sleep 512

  ; if we're on the player 1 side, get to the player 2 starting position
  If (side = 1) {
    Send a
    Sleep 256
  }

  ; choose Erzsebet
  Send a
  Sleep 256
  Send s
  Sleep 256
  Send v

  ; choose stage
  If (side = 1) {
    WaitFor("stage select", 940, 960, 943, 963, 0xFBDDAC)
    Sleep 512
    Send v
  }

  Return side
}

SearchRanked() {
  ToolTip "Choosing Online"
  Send s
  Send s
  Send v

  ; desktop
  WaitFor("purple loading indicator", 2190, 1245, 2205, 1260, 0x774288)
  WaitForAbsenceOf("purple loading indicator", 2190, 1245, 2205, 1260, 0x774288)

  ; laptop
  ;WaitFor("purple loading indicator", 2147, 1238, 2167, 1258, 0xB97AE2)
  ;WaitForAbsenceOf("purple loading indicator", 2147, 1238, 2167, 1258, 0xB97AE2)

  Sleep 512

  ToolTip "Choosing Ranked"
  Send s
  Send v

  WaitFor("ranked search", 1280, 416, 1300, 440, 0x4C3759)
}

Kick() {
  Send {Right down}
  Sleep 50
  Send {Enter}
  Send {Right up}
  Sleep 900
  Send {Right down}
  Sleep 50
  Send {Enter}
  Send {Right up}
}

Fireball() {
  Send {Down down}
  Sleep 50
  Send {Right down}
  Sleep 50
  Send {Down up}
  Sleep 50
  Send {F down}
  Sleep 50
  Send {F up}
  Send {Right up}
  Sleep 650
  Send {Left}
  Sleep 20
  Send {Left}
}

ExFireball(side) {
  Send {s down}
  Sleep 128

  If (side = 1) {
    Send {d down}
  }
  Else {
    Send {a down}
  }

  Sleep 128
  Send {s up}
  Send o

  If (side = 1) {
    Send {d up}
  }
  Else {
    Send {a up}
  }
}

WaitFor(subject, x1, y1, x2, y2, color, variation := 10) {
  Loop {
    If !WinActive("Remote") {
      Return
    }

    PixelSearch, cx, cy, x1, y1, x2, y2, color, variation, Fast RGB

    If (ErrorLevel == 0) {
      ToolTip "Found: %subject% at %cx%x%cy%"
      Return
    }
    Else {
      ToolTip "WaitFor %subject% (%ErrorLevel%)"
    }

    Sleep 128
  }
}

WaitForAbsenceOf(subject, x1, y1, x2, y2, color, variation := 10) {
  Loop {
    If !WinActive("Remote") {
      Return
    }

    PixelSearch, cx, cy, x1, y1, x2, y2, color, variation, Fast RGB

    If (ErrorLevel == 0) {
      ToolTip "WaitForAbsenceOf %subject% -- still found at %cx%x%cy%"
    }
    Else {
      ToolTip "Found absent: %subject% (%ErrorLevel%)"
      Return
    }

    Sleep 128
  }
}

WaitForBoth(subject, x1a, y1a, x2a, y2a, colora, variationa, x1b, y1b, x2b, y2b, colorb, variationb) {
  Loop {
    If !WinActive("Remote") {
      Return
    }

    PixelSearch, cxa, cya, x1a, y1a, x2a, y2a, colora, variationa, Fast RGB
    errora := ErrorLevel
    PixelSearch, cxb, cyb, x1a, y1a, x2a, y2a, colora, variationa, Fast RGB
    errorb := ErrorLevel

    If (errora = 0 && errorb = 0) {
      ToolTip "Found: %subject% at %cxa%x%cya% and %cxb%x%cyb%"
      Return
    }
    Else {
      ToolTip "WaitForBoth: %subject% (%errora% and %errorb%)"
    }

    Sleep 128
  }
}

 

Edited by langdon
  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...