Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- CardSortType_Rarity := 1
- CardSortType_Level := 2
- CardSortType_ATK := 3
- CardSortType_DEF := 4
- CardSortOrder_Ascending := 1
- CardSortOrder_Descending := 2
- MsgBox, 4, Flygon's beginner Deck, Press the Yes button if your game is in windowed mode. If you need to cancel the process, press ESC.
- LastWinW := 0
- LastWinH := 0
- IfMsgBox Yes
- {
- WinWaitActive, masterduel
- WinGetPos,X,Y,LastWinW,LastWinH,A
- ResizeWin(512, 512)
- RemoveMainDeckMonsters()
- ; RemoveMainDeckMonsters ensures the mouse is not pointing at the button of display unowned cards.
- DisplayUnownedCards()
- RemoveExtraDeckMonsters()
- ClearAllFilters()
- SetCardSortMethod(CardSortType_Rarity, CardSortOrder_Descending)
- ; Here we start main deck monsters.
- AddCardByText("Tri-brigade Nervall", 3)
- AddCardByText("Maxx C", 3)
- AddCardByText("Tri-brigade Kerass", 2)
- AddCardByText("Tri-brigade Kit", 3)
- AddCardByText("Ash Blossom & Joyous Spring", 3)
- AddCardByText("Rescue Cat", 3)
- AddCardByText("Destiny HERO - Celestial", 1)
- AddCardByText("Zoodiac Thoroughblade", 1)
- AddCardByText("Tri-brigade Fraktall", 3)
- AddCardByText("Destiny HERO - Dasher", 1)
- AddCardByText("The Primal Being", 1)
- AddCardByText("s Feather Duster", 1)
- ; The period is important for this card.
- AddCardByText("You can only activate 1 fusion destiny per turn.", 2)
- AddCardByText("You can only activate 1 Lightning Storm per turn.", 1)
- AddCardByText("Fire Formation - Tenki", 3)
- AddCardByText("Called By The Grave", 2)
- AddCardByText("Crossout Designator", 2)
- AddCardByText("Forbidden Droplet", 2)
- AddCardByText("Infinite Impermanence", 3)
- AddCardByText("Tri-brigade Revolt", 1)
- ; Now we switch to extra deck monsters.
- AddCardByText("Destiny HERO - Destroyer Phoenix Enforcer", 1)
- AddCardByText("Zoodiac Boarbow", 1)
- AddCardByText("Zoodiac Drident", 1)
- AddCardByText("Zoodiac Chakanine", 1)
- AddCardByText("Divine Arsenal AA-ZEUS - Sky Thunder", 1)
- AddCardByText("Salamangreat Almiraj", 1)
- AddCardByText("Ancient Warriors Oath - Double Dragon Lords", 1)
- AddCardByText("Tri-brigade Ferrijit the Barren Blossom", 1)
- AddCardByText("Tri-brigade Bearbrumm the Rampant Rampager", 1)
- AddCardByText("the Desperate Doom Eagle", 1)
- AddCardByText("Bow of the Goddess", 1)
- AddCardByText("Accesscode Talker", 1)
- AddCardByText("Tri-brigade Shuraig the Ominous Omen", 2)
- AddCardByText("Predaplant Verte Anaconda", 1)
- ResizeWin(LastWinW, LastWinH)
- }
- Else
- {
- Return
- }
- ResizeWin(Width = 0,Height = 0)
- {
- WinGetPos,X,Y,W,H,A
- if(%Width% = 0)
- {
- Width := W
- }
- if(%Height% = 0)
- {
- Height := H
- }
- WinMove,A,,%X%,%Y%,%Width%,%Height%
- }
- DisplayUnownedCards()
- {
- PixelGetColor, OutputVar, 464, 181
- OutputVar += 0
- if(OutputVar < 2000)
- {
- Click, 464 181
- Sleep, 3000
- }
- }
- RemoveMainDeckMonsters()
- {
- ; 70 instead of 65 to account for situations where the player already has an open menu.
- Loop, 70
- {
- Click, 148 197 Right
- Sleep, 100
- }
- }
- RemoveExtraDeckMonsters()
- {
- Loop, 20
- {
- Click, 150 341 Right
- Sleep, 100
- }
- }
- ClearAllFilters()
- {
- Click, 467 198
- Sleep, 2000
- }
- SetCardSortMethod(cardtype, cardorder)
- {
- CardSortType_Rarity := 1
- CardSortType_Level := 2
- CardSortType_ATK := 3
- CardSortType_DEF := 4
- CardSortOrder_Ascending := 1
- CardSortOrder_Descending := 2
- Sleep, 1000
- Click, 419 195
- Sleep, 3000
- targetScreenPosX := 255
- if(cardorder = CardSortOrder_Descending)
- {
- targetScreenPosX += 63
- }
- targetScreenPosY := 0
- switch %cardtype%
- {
- case %CardSortType_Rarity%: targetScreenPosY = 150
- case %CardSortType_Level%: targetScreenPosY = 177
- case %CardSortType_ATK%: targetScreenPosY = 207
- case %CardSortType_DEF%: targetScreenPosY = 232
- }
- Click, %targetScreenPosX%, %targetScreenPosY%
- Sleep, 3000
- }
- AddCardByText(text, copies)
- {
- text := StrReplace(text, "/", "{NumpadDiv}")
- text := StrReplace(text, "+", "{NumpadAdd}")
- text := StrReplace(text, "-", "{NumpadSub}")
- Click, 383 180
- Sleep, 200
- Send, %text%
- Sleep, 200
- Send, {Enter}
- Sleep, 1000
- Loop, %copies%
- {
- Click, 360 225 Right
- Sleep, 100
- }
- Click, 443 181
- Sleep, 1000
- }
- /::
- WinWaitActive, masterduel
- WinGetPos,X,Y,LastWinW,LastWinH,A
- ResizeWin(512, 512)
- MouseGetPos, xpos, ypos
- clipboard = Click, %xpos% %ypos%
- return
- Esc::
- if(%LastWinW% != 0 && %LastWinH% != 0)
- {
- ResizeWin(LastWinW, LastWinH)
- }
- ExitApp ; Exit script with Escape key
- return
Add Comment
Please, Sign In to add comment