diff --git a/BotZoneV2.7.3.py b/BotZoneV2.7.3.py
deleted file mode 100644
index 092c724..0000000
--- a/BotZoneV2.7.3.py
+++ /dev/null
@@ -1,223 +0,0 @@
-from colorama import init, Fore, Back, Style
-import commands
-import config
-import sys
-import os
-import webbrowser
-
-
-# Coloroma autoreset
-init(autoreset=True)
-if not os.path.isdir("Saves"):
- try:
- os.mkdir('Saves')
- os.mkdir('Saves/ios')
- os.mkdir('Saves/android')
- os.mkdir('Saves/Jp')
- os.mkdir('Saves/Jp/ios')
- os.mkdir('Saves/Jp/android')
- os.mkdir('Saves/fresh')
- os.mkdir('Saves/fresh/ios')
- os.mkdir('Saves/fresh/android')
- except:
- print(Fore.RED + Style.BRIGHT + 'Unable to create saves file')
-
-while True:
-
- # Decide which client to use.
- print(' ')
- print(" ___ __ ____ ")
- print(" / _ )___ / //_ / ___ ___ ___ ")
- print(" / _ / _ \/ __// /_/ _ \/ _ \/ -_)")
- print("/____/\___/\__//___/\___/_//_/\__/")
-
- print('Choose a version')
- print('---------------------------------')
- print(' ')
- while True:
- print('Which version? (' + 'Jp: 1 ' + 'or ' 'Global: 2' ')',end='')
- client = input(" ")
- if client.lower() == '1':
- config.client = 'japan'
- while True:
- print(" ___ __ ____ ")
- print(" / _ )___ / //_ / ___ ___ ___ ")
- print(" / _ / _ \/ __// /_/ _ \/ _ \/ -_)")
- print("/____/\___/\__//___/\___/_//_/\__/")
- print("-----------------------------------")
- print("Possible by SomeNi")
- print(" ")
- print("[ Status ] -> You're curently on JP")
- print(" ")
- print("[ 0 ] -> New Account")
- print("[ 1 ] -> Transfer Account")
- print("[ 2 ] -> Load From Save")
- print("[ 3 ] -> Daily Logins")
- print("[ 4 ] -> Update Both DataBase")
- print("[ 5 ] -> BotZone Discord Link")
- print("[ 6 ] -> Update Glb DataBase")
- print("[ 7 ] -> Update JP DataBase")
- print(" ")
-
- command = input('Enter your choice: ')
- if command == '0':
- print(' ')
- config.identifier = commands.signup()
- commands.Jp_save_account()
- config.access_token, config.secret = commands.signin(config.identifier)
- commands.tutorial()
- commands.daily_login()
- break
- elif command == '1':
- print(' ')
- commands.Jp_transfer_account()
- commands.daily_login()
- break
- elif command == '2':
- print(' ')
- commands.Jp_load_account()
- commands.daily_login()
- commands.accept_gifts()
- commands.accept_missions()
- break
- elif command == '3':
- print('')
- commands.Jp_bulk_daily_logins()
- break
- elif command == '4':
- print('')
- commands.db_download()
- elif command == '6':
- commands.glb_db_download()
- #elif command == '7':
- # commands.jp_db_download()
- elif command == '5':
- webbrowser.open(commands.discordurl, new=0, autoraise=True)
- elif command == 'exit':
- exit()
- else:
- print(Fore.RED + Style.BRIGHT + "Command not understood")
-
- # User commands.
- while True:
- print('---------------------------------')
- print(
- Fore.CYAN + Style.BRIGHT + "Type" + Fore.YELLOW + Style.BRIGHT + " 'help'" + Fore.CYAN + Style.BRIGHT + " to view all commands.")
-
- # Set up comma separated chain commands. Handled via stdin
- try:
- command = input()
- except:
- sys.stdin = sys.__stdin__
- command = input()
-
- if command == 'exit':
- break
- # Pass command to command executor and handle keyboard interrupts.
- try:
- commands.user_command_executor(command)
- except KeyboardInterrupt:
- print(Fore.CYAN + Style.BRIGHT + 'User interrupted process.')
- except Exception as e:
- print(Fore.RED + Style.BRIGHT + repr(e))
- break
- elif client.lower() == '2':
- config.client = 'global'
- print(' ')
- while True:
- print(" ___ __ ____ ")
- print(" / _ )___ / //_ / ___ ___ ___ ")
- print(" / _ / _ \/ __// /_/ _ \/ _ \/ -_)")
- print("/____/\___/\__//___/\___/_//_/\__/")
- print("-----------------------------------")
-
- print(" ")
- print("[ Status ] -> You're curently on Global")
- print(" ")
- print("[ 0 ] -> New Account")
- print("[ 1 ] -> Transfer Account")
- print("[ 2 ] -> Load From Save")
- print("[ 3 ] -> Load Fresh Account")
- print("[ 4 ] -> New Fresh Account")
- print("[ 5 ] -> Update Both DataBase")
- print("[ 6 ] -> BotZone Discord Link")
- print("[ 7 ] -> Update Glb DataBase")
- print("[ 8 ] -> Update JP DataBase")
- print(" ")
-
- command = input('Enter your choice: ')
- if command == '0':
- print(' ')
- config.identifier = commands.signup()
- commands.save_account()
- config.access_token, config.secret = commands.signin(config.identifier)
- commands.tutorial()
- commands.daily_login()
- break
- elif command == '1':
- print(' ')
- commands.transfer_account()
- commands.daily_login()
- break
- elif command == '2':
- print(' ')
- commands.load_account()
- commands.daily_login()
- commands.accept_gifts()
- commands.accept_missions()
- break
- elif command == '4':
- print(' ')
- config.identifier = commands.signup()
- commands.fresh_save_account()
- config.access_token, config.secret = commands.signin(config.identifier)
- commands.tutorial()
- commands.daily_login()
- break
- elif command == '3':
- print(' ')
- commands.fresh_load_account()
- commands.daily_login()
- commands.accept_gifts()
- commands.accept_missions()
- break
- elif command == '5':
- print(' ')
- commands.db_download()
- elif command == '7':
- commands.glb_db_download()
- # elif command == '8':
- # commands.jp_db_download()
- elif command == '6':
- webbrowser.open(commands.discordurl, new=0, autoraise=True)
- elif command == 'exit':
- exit()
- else:
- print(Fore.RED + Style.BRIGHT + "Command not understood")
-
- # User commands.
- while True:
- print('---------------------------------')
- print(
- "Type" + " 'help'" + " to view all commands.")
-
- # Set up comma separated chain commands. Handled via stdin
- try:
- command = input()
- except:
- sys.stdin = sys.__stdin__
- command = input()
-
- if command == 'exit':
- break
- # Pass command to command executor and handle keyboard interrupts.
- try:
- commands.user_command_executor(command)
- except KeyboardInterrupt:
- print(Fore.CYAN + Style.BRIGHT + 'User interrupted process.')
- except Exception as e:
- print(Fore.RED + Style.BRIGHT + repr(e))
-
- break
- else:
- print(Fore.RED + Style.BRIGHT + "Command not understood")
diff --git a/JAMIRU_stage_id.txt b/JAMIRU_stage_id.txt
new file mode 100755
index 0000000..dea5798
--- /dev/null
+++ b/JAMIRU_stage_id.txt
@@ -0,0 +1,976 @@
+ID: 999999 Name: Tuning Quest Area: 999
+ID: 946005 Name: PHY Hidden Potential Event Area: 946
+ID: 946004 Name: STR Hidden Potential Event Area: 946
+ID: 946003 Name: INT Hidden Potential Event Area: 946
+ID: 946002 Name: TEQ Hidden Potential Event Area: 946
+ID: 946001 Name: AGL Hidden Potential Event Area: 946
+ID: 944001 Name: PHY Hidden Potential Event Area: 944
+ID: 943001 Name: STR Hidden Potential Event Area: 943
+ID: 942001 Name: INT Hidden Potential Event Area: 942
+ID: 941001 Name: TEQ Hidden Potential Event Area: 941
+ID: 940001 Name: AGL Hidden Potential Event Area: 940
+ID: 711003 Name: Dragon Stone Stage Area: 711
+ID: 711002 Name: Potential Orb Stage Area: 711
+ID: 711001 Name: Zeni Stage Area: 711
+ID: 710020 Name: "Potara" Only Area: 710
+ID: 710019 Name: "Majin Buu Saga" Only Area: 710
+ID: 710018 Name: "Realm of Gods" Only Area: 710
+ID: 710017 Name: "Resurrected Warriors" Only Area: 710
+ID: 710016 Name: "Hybrid Saiyans" Only Area: 710
+ID: 710015 Name: "Peppy Gals" Only Area: 710
+ID: 710014 Name: "Shadow Dragon Saga" Only Area: 710
+ID: 710013 Name: "Fusion" Only Area: 710
+ID: 710012 Name: Extreme Class Only Area: 710
+ID: 710011 Name: Super Class Only Area: 710
+ID: 710010 Name: [VS. Super PHY] Super Battle Road Area: 710
+ID: 710009 Name: [VS. Extreme PHY] Super Battle Road Area: 710
+ID: 710008 Name: [VS. Super STR] Super Battle Road Area: 710
+ID: 710007 Name: [VS. Extreme STR] Super Battle Road Area: 710
+ID: 710006 Name: [VS. Super INT] Super Battle Road Area: 710
+ID: 710005 Name: [VS. Extreme INT] Super Battle Road Area: 710
+ID: 710004 Name: [VS. Super TEQ] Super Battle Road Area: 710
+ID: 710003 Name: [VS. Extreme TEQ] Super Battle Road Area: 710
+ID: 710002 Name: [VS. Super AGL] Super Battle Road Area: 710
+ID: 710001 Name: [VS. Extreme AGL] Super Battle Road Area: 710
+ID: 704003 Name: ?????? Area: 704
+ID: 704002 Name: ??????? Area: 704
+ID: 704001 Name: ?????? Area: 704
+ID: 703004 Name: Final Stage Area: 703
+ID: 703003 Name: Semifinal Stage Area: 703
+ID: 703002 Name: 2nd Preliminary Stage Area: 703
+ID: 703001 Name: Preliminary Stage Area: 703
+ID: 702003 Name: Final Stage Area: 702
+ID: 702002 Name: Semifinal Stage Area: 702
+ID: 702001 Name: Preliminary Stage Area: 702
+ID: 701007 Name: Dokkan Event Boss Rush 7 Area: 701
+ID: 701006 Name: Dokkan Event Boss Rush 6 Area: 701
+ID: 701005 Name: Dokkan Event Boss Rush 5 Area: 701
+ID: 701004 Name: Dokkan Event Boss Rush 4 Area: 701
+ID: 701003 Name: Dokkan Event Boss Rush 3 Area: 701
+ID: 701002 Name: Dokkan Event Boss Rush 2 Area: 701
+ID: 701001 Name: Dokkan Event Boss Rush 1 Area: 701
+ID: 604003 Name: Super Saiyan Awakens Area: 604
+ID: 604002 Name: Vegeta's Confidence Area: 604
+ID: 604001 Name: Prince's Pride Area: 604
+ID: 603003 Name: Protector of Future Peace Area: 603
+ID: 603002 Name: A Gift from Time Traveling Area: 603
+ID: 603001 Name: "Hope" Returns Area: 603
+ID: 602004 Name: [VS. Extreme AGL] Summit of the Universe Area: 602
+ID: 602003 Name: [VS. Extreme STR] Summit of the Universe Area: 602
+ID: 602002 Name: True Fear Area: 602
+ID: 602001 Name: Defying the Emperor Area: 602
+ID: 601004 Name: [VS. Super PHY] Transcended Warrior Area: 601
+ID: 601003 Name: [VS. Super TEQ] Transcended Warrior Area: 601
+ID: 601002 Name: The Real Battle Area: 601
+ID: 601001 Name: Challenging the Legend Area: 601
+ID: 552001 Name: Go! Warriors of the New Generation! Area: 552
+ID: 551001 Name: Ever-Evolving Prince Area: 551
+ID: 550001 Name: Full-Power Showdown! Area: 550
+ID: 549001 Name: The Omnipotent Saiyan Warrior Area: 549
+ID: 548001 Name: The Greatest Saiyan Adversary Area: 548
+ID: 547001 Name: The Deadliest Assassin Area: 547
+ID: 546001 Name: Infinite Mechanical Power Area: 546
+ID: 545001 Name: Ever-Evolving Evil Area: 545
+ID: 544001 Name: Ever-Evolving Power Area: 544
+ID: 543001 Name: Superb Ranger Area: 543
+ID: 542001 Name: Transcend Super Saiyan 4! Area: 542
+ID: 541001 Name: A Heart Filled With Hope Area: 541
+ID: 540002 Name: Confronting the Strongest of All Universes Area: 540
+ID: 540001 Name: Jiren the Grey Area: 540
+ID: 539001 Name: Arrival of the Universe-Crusher Area: 539
+ID: 538001 Name: Kaboom! Ultra Instinct Area: 538
+ID: 537001 Name: The Ultimate Pair of the Present World! Area: 537
+ID: 536001 Name: The Ultimate Pair of the Otherworld! Area: 536
+ID: 535002 Name: Phantom Majin Resurrected! Area: 535
+ID: 535001 Name: Mysterious Hero Area: 535
+ID: 534001 Name: The Unknown Battle Area: 534
+ID: 533002 Name: The True Golden Frieza Area: 533
+ID: 533001 Name: Evil Emperor: 24-Hour Revival Area: 533
+ID: 532001 Name: The Ultimate Super Gogeta Area: 532
+ID: 531001 Name: All-Time Nastiest Evolution Area: 531
+ID: 530001 Name: Hell's Ultimate Weapon Area: 530
+ID: 529001 Name: The Saiyan Veiled with Mysteries Area: 529
+ID: 528001 Name: Mighty Warrior: 24-Hour Revival Area: 528
+ID: 527001 Name: Battle of the Strongest Area: 527
+ID: 526002 Name: The Unrivaled Super Saiyan 4! Area: 526
+ID: 526001 Name: The Crimson Flash! Super Saiyan 4! Area: 526
+ID: 525002 Name: The Supreme Super Saiyan 4! Area: 525
+ID: 525001 Name: The Scarlet Hero! Super Saiyan 4! Area: 525
+ID: 524002 Name: Battle for Honor and Pride Area: 524
+ID: 524001 Name: The Epic Battle Begins!! Area: 524
+ID: 523002 Name: Last Judgment...Or Last Hope Area: 523
+ID: 523001 Name: The Ultimate Power of a God Area: 523
+ID: 522001 Name: A New Hope Area: 522
+ID: 521001 Name: Bespectacled Super Girl Area: 521
+ID: 520002 Name: Searing Rose-Colored Fury Area: 520
+ID: 520001 Name: Rose-Tinted Plot Area: 520
+ID: 519002 Name: Sublime Blue! Area: 519
+ID: 519001 Name: Fusion in Blue Area: 519
+ID: 518003 Name: Black Harbinger of Destruction Area: 518
+ID: 518002 Name: Dark Nightmare Area: 518
+ID: 518001 Name: A Mysterious Dark Foe Area: 518
+ID: 517003 Name: Countdown to the Crash Area: 517
+ID: 517002 Name: The Strongest Shadow Dragon Area: 517
+ID: 517001 Name: The Unprecedented Foe Area: 517
+ID: 516001 Name: Emperor's Obsession Area: 516
+ID: 515003 Name: The Strongest Majin is Born! Area: 515
+ID: 515002 Name: Horrendous Majin's Onslaught Area: 515
+ID: 515001 Name: Majin's Transformation Area: 515
+ID: 514001 Name: Ceaseless Combat Area: 514
+ID: 513003 Name: One Powerful Super Fusion! Area: 513
+ID: 513002 Name: Super Gotenks! Area: 513
+ID: 513001 Name: Fusion of Hope! Area: 513
+ID: 512003 Name: Ultimate Splendor Area: 512
+ID: 512002 Name: Meet Vegito Area: 512
+ID: 512001 Name: Miraculous Fusion Area: 512
+ID: 511002 Name: God of Destruction's Wrath Area: 511
+ID: 511001 Name: God of Destruction's Whim Area: 511
+ID: 510002 Name: The Most Powerful Blow Area: 510
+ID: 510001 Name: Saiyan's Pride Area: 510
+ID: 509002 Name: Yamcha's Premonition Area: 509
+ID: 509001 Name: Yamcha is Beaten! Area: 509
+ID: 508003 Name: The Ultimate Form Area: 508
+ID: 508002 Name: The Extreme Force Area: 508
+ID: 508001 Name: Unawakened Ability Area: 508
+ID: 507002 Name: Full-Power Final Battle Area: 507
+ID: 507001 Name: Fear Beyond Death Area: 507
+ID: 506003 Name: Overwhelming Force of Evil! Area: 506
+ID: 506002 Name: Demon of War Area: 506
+ID: 506001 Name: Innocent Monstrosity Area: 506
+ID: 505003 Name: Fusion Reborn! Area: 505
+ID: 505002 Name: Peerless Warrior's Victory Area: 505
+ID: 505001 Name: An Incredible Failure Area: 505
+ID: 504002 Name: Ultimate Finishing Move Area: 504
+ID: 504001 Name: Limit-Breaking Saiyan Area: 504
+ID: 503003 Name: Regression to Evil Area: 503
+ID: 503002 Name: Never-Ending Nightmare Area: 503
+ID: 503001 Name: Strange Battle Area: 503
+ID: 502003 Name: Waking Nightmare Area: 502
+ID: 502002 Name: The Extreme Terror Area: 502
+ID: 502001 Name: The Cell Games Area: 502
+ID: 501003 Name: The Demon Returns Area: 501
+ID: 501002 Name: Awakening Beyond Area: 501
+ID: 501001 Name: Prologue to Ruin Area: 501
+ID: 422002 Name: The Time Patrol Warrior Area: 422
+ID: 422001 Name: The Space-Time Traveler Area: 422
+ID: 421002 Name: Proof of Genius Area: 421
+ID: 421001 Name: Prodigy Prince Area: 421
+ID: 420002 Name: The Strongest Space Pirate Area: 420
+ID: 420001 Name: The Ancient Space Pirate Area: 420
+ID: 419001 Name: Guardian of the Sanctuary Area: 419
+ID: 418003 Name: Heroes Get Exhausted!? Area: 418
+ID: 418002 Name: A Pudgy Hero? Area: 418
+ID: 418001 Name: A Fusion of Super Forces!? Area: 418
+ID: 417002 Name: Proud Martial Artist Area: 417
+ID: 417001 Name: Full-Hearted Fighter Area: 417
+ID: 416002 Name: The Power of Piccolo Reborn Area: 416
+ID: 416001 Name: Divine Demonic Namekian Warrior Area: 416
+ID: 415002 Name: Earth-Shaking Power Area: 415
+ID: 415001 Name: Gentle Destroyer Area: 415
+ID: 414002 Name: Warrior of Hope Area: 414
+ID: 414001 Name: The Time-Traveling Warrior Area: 414
+ID: 413002 Name: Behind the Mask Area: 413
+ID: 413001 Name: The Masked Martial Artist Area: 413
+ID: 412002 Name: True Strength Area: 412
+ID: 412001 Name: The Best Fighter of West Quadrant Area: 412
+ID: 411002 Name: An Unexpectedly Powerful Man! Area: 411
+ID: 411001 Name: The Mysterious Mask Area: 411
+ID: 410001 Name: King Piccolo's Successor Area: 410
+ID: 409002 Name: An Invasion Bet on Primacy Area: 409
+ID: 409001 Name: Savage Sovereign Area: 409
+ID: 408002 Name: Dignity of a Clan Area: 408
+ID: 408001 Name: Cold-Blooded King Area: 408
+ID: 406003 Name: Raging Counterstrike Area: 406
+ID: 406002 Name: The Best Form of Persistence Area: 406
+ID: 406001 Name: Vicious Mechanical Monarch Area: 406
+ID: 405002 Name: The Determined Martial Artist Area: 405
+ID: 405001 Name: Master of Masters Area: 405
+ID: 404002 Name: The Assassin's Struggle Area: 404
+ID: 404001 Name: Mercenary Tao Strikes Back Area: 404
+ID: 403002 Name: Super Saiyan Goku Area: 403
+ID: 403001 Name: An Epic Showdown Area: 403
+ID: 401002 Name: The Final Showdown Area: 401
+ID: 401001 Name: Fearsome Super Elite Area: 401
+ID: 356001 Name: On the Desert Planet Area: 356
+ID: 355011 Name: Clash Between the Strongest Area: 355
+ID: 355010 Name: Nonstop Battles Area: 355
+ID: 355009 Name: Resentful Saiyan Area: 355
+ID: 355008 Name: Endless Evolution Area: 355
+ID: 355007 Name: Wrath or Battle Instinct Area: 355
+ID: 355006 Name: Low-Class Warrior and the Warrior in Exile Area: 355
+ID: 355005 Name: Super Saiyan Area: 355
+ID: 355004 Name: Broly Area: 355
+ID: 355003 Name: Paragus Area: 355
+ID: 355002 Name: Planet Vampa Area: 355
+ID: 355001 Name: Goku and Vegeta Area: 355
+ID: 354005 Name: Upa's Wish Area: 354
+ID: 354004 Name: Tien's Distress Area: 354
+ID: 354003 Name: Battle in Penguin Village! Area: 354
+ID: 354002 Name: The Mifan Empire's Plot Area: 354
+ID: 354001 Name: Reach for Victory! Martial Arts Tournament Area: 354
+ID: 353005 Name: The Terrifying Plan to Destroy the Sun Area: 353
+ID: 353004 Name: Goku Transforms?! Area: 353
+ID: 353003 Name: Sleeping Princess Area: 353
+ID: 353002 Name: Devil's Castle Area: 353
+ID: 353001 Name: Goku and Krillin Area: 353
+ID: 352006 Name: A Girl's Wish Area: 352
+ID: 352005 Name: To the Land of Gurumes! Area: 352
+ID: 352004 Name: Venerable Master Roshi Area: 352
+ID: 352003 Name: Yamcha the Hyena Area: 352
+ID: 352002 Name: In the Nighttime Forest... Area: 352
+ID: 352001 Name: Encounters and Departures Area: 352
+ID: 351003 Name: Videl Learns to Fly Area: 351
+ID: 351002 Name: Intensive Training Begins! Area: 351
+ID: 351001 Name: Hero of Hercule City Area: 351
+ID: 349005 Name: Showdown with Coora Area: 349
+ID: 349004 Name: The Nightmare Returns Area: 349
+ID: 349003 Name: Super Saiyan Tag Team! Area: 349
+ID: 349002 Name: Coora's Resurrection Area: 349
+ID: 349001 Name: New Namek's Threat Area: 349
+ID: 348004 Name: Aftermath of a Fierce Fight... Area: 348
+ID: 348003 Name: Accelerating Rampage Area: 348
+ID: 348002 Name: A Series of Tragedies Area: 348
+ID: 348001 Name: Birth of a Majin Area: 348
+ID: 347010 Name: Furious Transformation! Area: 347
+ID: 347009 Name: Dastardly Space Pirate Area: 347
+ID: 347008 Name: Mystery Planet Area: 347
+ID: 347007 Name: A Lone Warrior's Last Battle Area: 347
+ID: 347006 Name: Futile Struggle Area: 347
+ID: 347005 Name: Prelude to Doom Area: 347
+ID: 347004 Name: Frieza's Betrayal Area: 347
+ID: 347003 Name: Vegeta, Prince of the Saiyans Area: 347
+ID: 347002 Name: The Phantom Fist Area: 347
+ID: 347001 Name: Saiyans from Planet Vegeta Area: 347
+ID: 346008 Name: Body Change Area: 346
+ID: 346007 Name: The Captain Cometh! Area: 346
+ID: 346006 Name: Guru in Peril Area: 346
+ID: 346005 Name: Showdown! Jeice and Burter Area: 346
+ID: 346004 Name: Goku Finally Arrives! Area: 346
+ID: 346003 Name: Imminent Showdown Area: 346
+ID: 346002 Name: Relentless Recoome Area: 346
+ID: 346001 Name: Behold the Ginyu Force! Area: 346
+ID: 345007 Name: After the Tables Have Turned Area: 345
+ID: 345006 Name: Clash! Super Saiyan 4 vs. Super #17 Area: 345
+ID: 345005 Name: Fusion of Two Android #17s! Area: 345
+ID: 345004 Name: Formidable Foes Resurrected from Hell Area: 345
+ID: 345003 Name: Tragic Siblings Area: 345
+ID: 345002 Name: Hell Demons Cell & Frieza Area: 345
+ID: 345001 Name: Harbinger of Cataclysm Area: 345
+ID: 344009 Name: Universe Survival Showdown Area: 344
+ID: 344008 Name: Mastery of Ultra Instinct! Area: 344
+ID: 344007 Name: Proud 'Til the Very End Area: 344
+ID: 344006 Name: Toppo, God of Destruction, Cometh! Area: 344
+ID: 344005 Name: Onslaught of Fire and Fury Area: 344
+ID: 344004 Name: Bid for Supreme Dominance Area: 344
+ID: 344003 Name: Total War! Universe 3 vs. Universe 7 Area: 344
+ID: 344002 Name: Showdown! Namekians of Universe 6 Area: 344
+ID: 344001 Name: The Climactic Battle for Love Area: 344
+ID: 343006 Name: Super Namekian vs. The Power of Friendship Area: 343
+ID: 343005 Name: An Evil Namekian?! Area: 343
+ID: 343004 Name: Enter Goku! Area: 343
+ID: 343003 Name: Demons From Outer Space! Area: 343
+ID: 343002 Name: Planet in Darkness Area: 343
+ID: 343001 Name: A Shadow Looming Over Earth Area: 343
+ID: 341007 Name: Another Battle-Crazed Saiyan Clash! Area: 341
+ID: 341006 Name: Saiyan Oath Area: 341
+ID: 341005 Name: Goku vs. Jiren Area: 341
+ID: 341004 Name: Magical Girl Fighters From Universe 2 Area: 341
+ID: 341003 Name: The Warrior of Justice Draws Nigh! Area: 341
+ID: 341002 Name: The Berserker Awakens! Area: 341
+ID: 341001 Name: The Long-Awaited Tournament of Power Area: 341
+ID: 340003 Name: Paikuhan's True Power Area: 340
+ID: 340002 Name: Battle in Hell Area: 340
+ID: 340001 Name: Champions of the Otherworld Area: 340
+ID: 339008 Name: Great Conflict Ahead Area: 339
+ID: 339007 Name: Vegeta's On a Roll! Area: 339
+ID: 339006 Name: Vegeta and Zarbon Area: 339
+ID: 339005 Name: Vegeta vs. Dodoria Area: 339
+ID: 339004 Name: Assault on a Certain Village Area: 339
+ID: 339003 Name: Vegeta the Traitor Area: 339
+ID: 339002 Name: Dark Clouds Over Planet Namek Area: 339
+ID: 339001 Name: To Planet Namek! Area: 339
+ID: 338006 Name: Wrath of the Dragon! Area: 338
+ID: 338005 Name: Sorrowful Fate Area: 338
+ID: 338004 Name: Return of the Phantom Majin Area: 338
+ID: 338003 Name: Budding Bonds Area: 338
+ID: 338002 Name: Bewitching Monster Area: 338
+ID: 338001 Name: Tapion the Hero Area: 338
+ID: 337004 Name: To a New Realm Area: 337
+ID: 337003 Name: Vegeta's Rage Area: 337
+ID: 337002 Name: Birthday Party and the God of Destruction Area: 337
+ID: 337001 Name: Vegeta's Family Day Area: 337
+ID: 336004 Name: Raditz's Battle Area: 336
+ID: 336003 Name: Raditz's Pride Area: 336
+ID: 336002 Name: Father's Dream Area: 336
+ID: 336001 Name: Raditz the Weakling Area: 336
+ID: 335012 Name: Team Universe 7, Assemble! Area: 335
+ID: 335011 Name: The Tenth Warrior Area: 335
+ID: 335010 Name: The Emperor of Evil Returns Area: 335
+ID: 335009 Name: See The Wall That Must Be Passed Area: 335
+ID: 335008 Name: The Tenshin-Style Dojo's Mystery!? Area: 335
+ID: 335007 Name: Trading Blows for the First Time Area: 335
+ID: 335006 Name: High-Spirited Warriors Area: 335
+ID: 335005 Name: Goku the Recruiter Area: 335
+ID: 335004 Name: Make Way for Toppo, Warrior of Justice! Area: 335
+ID: 335003 Name: Bergamo the Crusher Vs. Goku Area: 335
+ID: 335002 Name: Awaken Your Sleeping Battle Spirit! Area: 335
+ID: 335001 Name: Losers Erased in the Tournament of Power! Area: 335
+ID: 334004 Name: Fusion Mayhem! Area: 334
+ID: 334003 Name: Enter Abo and Kado! Area: 334
+ID: 334002 Name: Vegeta's Little Brother?! Area: 334
+ID: 334001 Name: Peaceful Days Area: 334
+ID: 333005 Name: Broly, Tenacious Beast Area: 333
+ID: 333004 Name: The Tag Team Challenge Area: 333
+ID: 333003 Name: The Demon Returns! Area: 333
+ID: 333002 Name: Showdown! Bio-Warrior Area: 333
+ID: 333001 Name: Hercule's Secret?! Area: 333
+ID: 332005 Name: Proof of Courage Area: 332
+ID: 332004 Name: Lord Yao the Marauder Area: 332
+ID: 332003 Name: Monster of Mount Paozu Area: 332
+ID: 332002 Name: The Journey Begins Area: 332
+ID: 332001 Name: Great Ancestor Area: 332
+ID: 331006 Name: Stop the Reckless Majin! Area: 331
+ID: 331005 Name: Defeat the King of Demon Realm! Area: 331
+ID: 331004 Name: Young Hearts, Liberated! Area: 331
+ID: 331003 Name: Intercept the Alien Warrior! Area: 331
+ID: 331002 Name: Pure Heart, Evil Ambition Area: 331
+ID: 331001 Name: Fight On! Hero of Justice! Area: 331
+ID: 330006 Name: SS4 vs. Giant Ape Baby Area: 330
+ID: 330005 Name: The Almighty Super Saiyan 4 Area: 330
+ID: 330004 Name: Giant Ape Wreckin' Rampage Area: 330
+ID: 330003 Name: Majin Power Combined Area: 330
+ID: 330002 Name: The Trouble with Tuffles Area: 330
+ID: 330001 Name: The Board Game Domain Area: 330
+ID: 329002 Name: Boss Rabbit's Magic Touch Area: 329
+ID: 329001 Name: The Rabbit Mob Hits the Scene Area: 329
+ID: 328007 Name: Final Judgment Area: 328
+ID: 328006 Name: The Zero Mortals Plan Area: 328
+ID: 328005 Name: Rematch With Goku Black Area: 328
+ID: 328004 Name: Trunks' Determination Area: 328
+ID: 328003 Name: Universe 10 Zamasu Area: 328
+ID: 328002 Name: Message From the Future Area: 328
+ID: 328001 Name: A Dark New Enemy Appears Area: 328
+ID: 327006 Name: Arale Saves the Day! Area: 327
+ID: 327005 Name: The World's Greatest Assassin! Area: 327
+ID: 327004 Name: Showdown at Penguin Village! Area: 327
+ID: 327003 Name: An Ally of Justice Appears! Area: 327
+ID: 327002 Name: An All-Out Battle for Love?! Area: 327
+ID: 327001 Name: To Penguin Village! Area: 327
+ID: 326006 Name: Blast! Family Kamehameha! Area: 326
+ID: 326005 Name: Broly's Back! Area: 326
+ID: 326004 Name: Let's Join Forces! Area: 326
+ID: 326003 Name: Legendary Super Saiyan Area: 326
+ID: 326002 Name: Fates Intertwined Area: 326
+ID: 326001 Name: Mysterious New Planet Vegeta Area: 326
+ID: 325008 Name: The Match Concludes! Area: 325
+ID: 325007 Name: Meet the Assassin Hit! Area: 325
+ID: 325006 Name: The Saiyan of Universe 6 Area: 325
+ID: 325005 Name: Magetta vs. Vegeta Area: 325
+ID: 325004 Name: The Furious Battle! Area: 325
+ID: 325003 Name: Frost vs. Goku Area: 325
+ID: 325002 Name: The Match Begins! Area: 325
+ID: 325001 Name: Universe 6 vs. Universe 7 Area: 325
+ID: 324010 Name: The Two-Top on Earth!? Area: 324
+ID: 324009 Name: Saiyans' and Tuffles' Fate Area: 324
+ID: 324008 Name: The Revenging Attack! Area: 324
+ID: 324007 Name: Fight! Super Baby! Area: 324
+ID: 324006 Name: Nightmarish Battle Area: 324
+ID: 324005 Name: Return to Earth Area: 324
+ID: 324004 Name: Ambition Achieved!? Area: 324
+ID: 324003 Name: Baby vs. The Greatest Namekian Area: 324
+ID: 324002 Name: The Worst Brotherly Spat!? Area: 324
+ID: 324001 Name: Target the Saiyans! Area: 324
+ID: 323010 Name: The Strongest Warrior Awakens! Area: 323
+ID: 323009 Name: The Decisive Battle at Last! Area: 323
+ID: 323008 Name: The Quiet Wrath of Goku Area: 323
+ID: 323007 Name: Ferocity of the Saiyans Area: 323
+ID: 323006 Name: Attack of the Saiyans Area: 323
+ID: 323005 Name: The Fight in the Next World Area: 323
+ID: 323004 Name: Deeds Done by the Full Moon Area: 323
+ID: 323003 Name: Goodbye, Goku! Area: 323
+ID: 323002 Name: An Enemy in Common Area: 323
+ID: 323001 Name: The Mysterious Alien Warrior Area: 323
+ID: 322010 Name: Baby the Wicked Life Form Area: 322
+ID: 322009 Name: General Rilldo Area: 322
+ID: 322008 Name: Release! The All-Out Goku Area: 322
+ID: 322007 Name: Enigmatic Planet M-2 Area: 322
+ID: 322006 Name: Luud Activated!! Area: 322
+ID: 322005 Name: Planet Luud's Plot Area: 322
+ID: 322004 Name: Hot Pursuit Brothers Area: 322
+ID: 322003 Name: Planet Gelbo and Zoonama Area: 322
+ID: 322002 Name: Merchants' Planet Imecka! Area: 322
+ID: 322001 Name: The Mysterious New Dragon Balls Area: 322
+ID: 321012 Name: Gohan and Trunks Area: 321
+ID: 321011 Name: Peace for the Future Area: 321
+ID: 321010 Name: Long-Cherished Wish Fulfilled Area: 321
+ID: 321009 Name: Parental Bond Area: 321
+ID: 321008 Name: The Fruits of Training Area: 321
+ID: 321007 Name: Chance Meeting with Father Area: 321
+ID: 321006 Name: Beginning of the Journey Area: 321
+ID: 321005 Name: Last Hope Area: 321
+ID: 321004 Name: The Last Fighters Area: 321
+ID: 321003 Name: The End of Hope Area: 321
+ID: 321002 Name: The Androids' Arrival Area: 321
+ID: 321001 Name: Revenge of Frieza and King Cold Area: 321
+ID: 320024 Name: Galactic Adventurer Area: 320
+ID: 320023 Name: Explosive Parental Bond Area: 320
+ID: 320022 Name: Proud Bloodline Area: 320
+ID: 320021 Name: The Power of the Majin Area: 320
+ID: 320020 Name: In Defiance of the Heaven Area: 320
+ID: 320019 Name: God of All Saiyans Area: 320
+ID: 320018 Name: Limit-Smashing Super Saiyan Area: 320
+ID: 320017 Name: Fusion for Justice Area: 320
+ID: 320016 Name: Strength of the Sanctuary Area: 320
+ID: 320015 Name: Paragon of Justice Area: 320
+ID: 320014 Name: Strongest Under the Heavens Area: 320
+ID: 320013 Name: Devastating True Power Area: 320
+ID: 320012 Name: Unstoppable Parent and Child Area: 320
+ID: 320011 Name: One Who Wields True Power Area: 320
+ID: 320010 Name: The Boy From the Future Area: 320
+ID: 320009 Name: A Legendary Fighter Area: 320
+ID: 320008 Name: Technique Beyond Limit Area: 320
+ID: 320007 Name: Bond of Master and Disciple Area: 320
+ID: 320006 Name: Venerable Master Roshi Area: 320
+ID: 320005 Name: The Righteous Shen Style Area: 320
+ID: 320004 Name: Seasoned Martial Artist Area: 320
+ID: 320003 Name: Golden Combination Area: 320
+ID: 320002 Name: Youth With a Future Area: 320
+ID: 320001 Name: Transmogrified Monster Area: 320
+ID: 319023 Name: The Variable Majin Area: 319
+ID: 319022 Name: The Dark Prince Returns Area: 319
+ID: 319021 Name: The Android Born from Hate Area: 319
+ID: 319020 Name: Wild Hatred Area: 319
+ID: 319019 Name: Magnified Malice Area: 319
+ID: 319018 Name: Warrior of Hate Area: 319
+ID: 319017 Name: Burning for Vengeance Area: 319
+ID: 319016 Name: Depths of Despair Area: 319
+ID: 319015 Name: Metallic Demon Area: 319
+ID: 319014 Name: Wicked Bloodline Area: 319
+ID: 319013 Name: An Unusual Villain Area: 319
+ID: 319012 Name: Being of Hate and Ruin Area: 319
+ID: 319011 Name: Superior Strength Area: 319
+ID: 319010 Name: Heart Cold as Deep Space Area: 319
+ID: 319009 Name: Destroyer of the Universe Area: 319
+ID: 319008 Name: Walking Obliterator Area: 319
+ID: 319007 Name: Space Pirate Area: 319
+ID: 319006 Name: Frieza's Right Hand Area: 319
+ID: 319005 Name: Royal Might Area: 319
+ID: 319004 Name: Prince of the Saiyans Area: 319
+ID: 319003 Name: Invincible Warrior Area: 319
+ID: 319002 Name: Miniature Menace Area: 319
+ID: 319001 Name: Clayborn Warrior Area: 319
+ID: 318005 Name: Metal Coora’s Crew Area: 318
+ID: 318004 Name: The Nightmare Returns Area: 318
+ID: 318003 Name: Super Saiyan Tag Team Area: 318
+ID: 318002 Name: Coora’s Resurrection Area: 318
+ID: 318001 Name: New Namek’s Threat Area: 318
+ID: 317001 Name: Evil Charisma Area: 317
+ID: 316001 Name: Joker Area: 316
+ID: 315011 Name: Blood of the Saiyan Race Area: 315
+ID: 315010 Name: Sworn Enemy Area: 315
+ID: 315009 Name: Outclassed Area: 315
+ID: 315008 Name: Peace Restored Area: 315
+ID: 315007 Name: Spirit Bomb Miracle Area: 315
+ID: 315006 Name: Furious Goku Area: 315
+ID: 315005 Name: Ambitious Turles Area: 315
+ID: 315004 Name: Crumbling Earth Area: 315
+ID: 315003 Name: Mechanical Malice Area: 315
+ID: 315002 Name: Retaliating with Skill Area: 315
+ID: 315001 Name: Earth’s Greatest Threat Area: 315
+ID: 314012 Name: Stronger than Ever! Area: 314
+ID: 314011 Name: The Best Teacher in the Universe Area: 314
+ID: 314010 Name: Challenging the Destruction God Area: 314
+ID: 314009 Name: Battle of Gods Area: 314
+ID: 314008 Name: Super Saiyan God is Born Area: 314
+ID: 314007 Name: Vegeta's Pride Area: 314
+ID: 314006 Name: Fusion Counterattack Area: 314
+ID: 314005 Name: The Strongest Fighter: Gohan Area: 314
+ID: 314004 Name: Countdown to Destruction Area: 314
+ID: 314003 Name: Crème Caramel Fury Area: 314
+ID: 314002 Name: In Search of the Super Saiyan God Area: 314
+ID: 314001 Name: Destruction God Awakens Area: 314
+ID: 313001 Name: Stop the Reckless Majin! Area: 313
+ID: 312001 Name: Defeat the King of Demon Realm! Area: 312
+ID: 311001 Name: Young Hearts, Liberated! Area: 311
+ID: 310001 Name: Intercept the Alien Warrior! Area: 310
+ID: 309001 Name: Pure Heart, Evil Ambition Area: 309
+ID: 308001 Name: Fight On! Hero of Justice! Area: 308
+ID: 307010 Name: Strongest Clan in the Universe Area: 307
+ID: 307009 Name: History of Oppression Area: 307
+ID: 307008 Name: Like Father, Like Son Area: 307
+ID: 307007 Name: Strongest Vs. Strongest Area: 307
+ID: 307006 Name: Goku Revived! Area: 307
+ID: 307005 Name: Piccolo's Here! Area: 307
+ID: 307004 Name: Senzu Bean of Hope Area: 307
+ID: 307003 Name: To Korin's Tower Area: 307
+ID: 307002 Name: Coora's Squad Strikes! Area: 307
+ID: 307001 Name: Encroaching Evil Area: 307
+ID: 306010 Name: The Greatest Challenge Area: 306
+ID: 306009 Name: Seriously Serious Fight Area: 306
+ID: 306008 Name: Extreme Peril Area: 306
+ID: 306007 Name: Formidable Boujack! Area: 306
+ID: 306006 Name: Vicious Galactic Warrior Area: 306
+ID: 306005 Name: The Seal is Lifted Area: 306
+ID: 306004 Name: Mysterious Galactic Warrior Area: 306
+ID: 306003 Name: The Finals Commence! Area: 306
+ID: 306002 Name: The Worst Match Ever?! Area: 306
+ID: 306001 Name: World Tournament Time! Area: 306
+ID: 305013 Name: Full-Power Whis?! Area: 305
+ID: 305012 Name: The End of the Battle Beyond Gods Area: 305
+ID: 305011 Name: A Trial Beyond Divinity Area: 305
+ID: 305010 Name: Battle of Ultra Evolution Area: 305
+ID: 305009 Name: Destiny Packs a Punch Area: 305
+ID: 305008 Name: Chilling Bloodline Area: 305
+ID: 305007 Name: Beginning of Karma Area: 305
+ID: 305006 Name: 3rd Transformation Area: 305
+ID: 305005 Name: Frieza's Transformation Area: 305
+ID: 305004 Name: Frieza's Fury Area: 305
+ID: 305003 Name: Ginyu Force Rules Area: 305
+ID: 305002 Name: Namek Occupation Area: 305
+ID: 305001 Name: Foreshadowing of Despair Area: 305
+ID: 304012 Name: Battling the Unknown Area: 304
+ID: 304011 Name: Indefectible Invasion Area: 304
+ID: 304010 Name: Frieza's Army Reborn Area: 304
+ID: 304009 Name: Malevolent Resurgence Area: 304
+ID: 304008 Name: No Limits! Area: 304
+ID: 304007 Name: Gotta Get Stronger! Area: 304
+ID: 304006 Name: On the Shoulders of Gods Area: 304
+ID: 304005 Name: Top-Level Training Area: 304
+ID: 304004 Name: Pilaf's Back for More... Area: 304
+ID: 304003 Name: Problem Solved! Area: 304
+ID: 304002 Name: Fight for Peace! Area: 304
+ID: 304001 Name: Prolific Patrolmen Area: 304
+ID: 303009 Name: Furious Transformation! Area: 303
+ID: 303008 Name: Dastardly Space Pirate Area: 303
+ID: 303007 Name: Mystery Planet Area: 303
+ID: 303006 Name: Last Battle Area: 303
+ID: 303005 Name: Futile Struggle Area: 303
+ID: 303004 Name: Prelude to Doom Area: 303
+ID: 303003 Name: Frieza’s Betrayal Area: 303
+ID: 303002 Name: Planet Vegeta’s Prince Area: 303
+ID: 303001 Name: Go Team Bardock! Area: 303
+ID: 302005 Name: Red-Hot Rumble Area: 302
+ID: 302004 Name: The Prince Cometh Area: 302
+ID: 302003 Name: Goku’s Wrath Area: 302
+ID: 302002 Name: Saiyan Rampage Area: 302
+ID: 302001 Name: Here Come the Saiyans Area: 302
+ID: 301005 Name: Last Chance Area: 301
+ID: 301004 Name: Gohan Erupts! Area: 301
+ID: 301003 Name: Dire Straits Area: 301
+ID: 301002 Name: Saiyan Showdown Area: 301
+ID: 301001 Name: Raditz the Saiyan Area: 301
+ID: 179002 Name: Clash! Dokkan Butoden Part 2 Area: 179
+ID: 179001 Name: Clash! Dokkan Butoden Part 1 Area: 179
+ID: 178001 Name: Challenging the Super Champion! Area: 178
+ID: 177001 Name: Even More Secret Adventures Area: 177
+ID: 175003 Name: The Long-awaited Fight! Goku vs. Monaka Area: 175
+ID: 175002 Name: Chaotic Victory Celebration Area: 175
+ID: 175001 Name: Universe 6 vs. Universe 7 Area: 175
+ID: 173007 Name: Final Showdown with Majin Buu Area: 173
+ID: 173006 Name: The Prince of Destruction Returns Area: 173
+ID: 173005 Name: Pair Left on a Disappearing Planet Area: 173
+ID: 173004 Name: Saiyan Attack! Area: 173
+ID: 173003 Name: The Demon King of Old... Restored! Area: 173
+ID: 173002 Name: Showdown! Mercenary Tao Area: 173
+ID: 173001 Name: Reich Pilaf's World Conquest Area: 173
+ID: 171001 Name: Ghostly Prank Area: 171
+ID: 169001 Name: Go, Launch, Go! Area: 169
+ID: 168001 Name: Go, Launch, Go! Area: 168
+ID: 167001 Name: Go, Launch, Go! Area: 167
+ID: 166001 Name: Go, Launch, Go! Area: 166
+ID: 165001 Name: Go, Launch, Go! Area: 165
+ID: 164001 Name: Go, Launch, Go! Area: 164
+ID: 163001 Name: Go, Launch, Go! Area: 163
+ID: 162009 Name: Showdown with Android #21 Area: 162
+ID: 162008 Name: The Final Battle Looms Area: 162
+ID: 162007 Name: Reunion with Frieza Area: 162
+ID: 162006 Name: The Mastermind Revealed Area: 162
+ID: 162005 Name: SOS from Piccolo Area: 162
+ID: 162004 Name: Red Ribbon Army's Plot Area: 162
+ID: 162003 Name: Rescuing Krillin Area: 162
+ID: 162002 Name: Clone Warrior Area: 162
+ID: 162001 Name: A Mysterious Pulse and Earth in Peril Area: 162
+ID: 161001 Name: Little Rangers' Task Area: 161
+ID: 160004 Name: Return of the Magical Girl Fighters Area: 160
+ID: 160003 Name: Love Lasts Forever! Area: 160
+ID: 160002 Name: Believe in Love! Area: 160
+ID: 160001 Name: Let's Spread Love! Area: 160
+ID: 159001 Name: Goku Departs! Area: 159
+ID: 158005 Name: [PHY] Special Training Area: 158
+ID: 158004 Name: [STR] Special Training Area: 158
+ID: 158003 Name: [INT] Special Training Area: 158
+ID: 158002 Name: [TEQ] Special Training Area: 158
+ID: 158001 Name: [AGL] Special Training Area: 158
+ID: 157001 Name: [PHY] Special Training Area: 157
+ID: 156001 Name: [STR] Special Training Area: 156
+ID: 155001 Name: [INT] Special Training Area: 155
+ID: 154001 Name: [TEQ] Special Training Area: 154
+ID: 153001 Name: [AGL] Special Training Area: 153
+ID: 152001 Name: Majin Buu’s Candy Mischief Area: 152
+ID: 151001 Name: Forces of the Otherworld Area: 151
+ID: 150001 Name: Adventure Of Her Own Area: 150
+ID: 149005 Name: ????????? Area: 149
+ID: 149004 Name: ????????? Area: 149
+ID: 149003 Name: ????????? Area: 149
+ID: 149002 Name: ????????? Area: 149
+ID: 149001 Name: ????????? Area: 149
+ID: 147036 Name: Miracle-Makers Never Surrender Area: 147
+ID: 147035 Name: Rematch with Super Saiyan Rosé! Area: 147
+ID: 147034 Name: The Truth Will Out Area: 147
+ID: 147033 Name: A New Dark Enemy Appears! Area: 147
+ID: 147032 Name: Universe 6's Strongest Warrior Area: 147
+ID: 147031 Name: Saiyan Pride Area: 147
+ID: 147030 Name: Vegeta's All-Out Battle Area: 147
+ID: 147029 Name: The Vengeful Golden Frieza Area: 147
+ID: 147028 Name: God of Destruction vs. SS God Area: 147
+ID: 147027 Name: The Shadow Dragons' Master Area: 147
+ID: 147026 Name: Warrior of the Sun: Nuova Shenron Area: 147
+ID: 147025 Name: Baby vs. Goku Area: 147
+ID: 147024 Name: Planet M-2 Area: 147
+ID: 147023 Name: Finding a Strong Guy! Area: 147
+ID: 147022 Name: The Journey Unfolds Area: 147
+ID: 147021 Name: Stronger Than Ever! Area: 147
+ID: 147020 Name: Battle for the Universe Area: 147
+ID: 147019 Name: Meet Vegito Area: 147
+ID: 147018 Name: Warrior's Resolve Area: 147
+ID: 147017 Name: The Fated Battle! Area: 147
+ID: 147016 Name: Best of the Boys Area: 147
+ID: 147015 Name: I Am Saiyaman Area: 147
+ID: 147014 Name: Successor of the Strongest Area: 147
+ID: 147013 Name: The Android Cell Area: 147
+ID: 147012 Name: Awaken as a Super Saiyan Area: 147
+ID: 147011 Name: The Other Super Saiyan! Area: 147
+ID: 147010 Name: Legendary Super Saiyan Area: 147
+ID: 147009 Name: The Showdown Begins Area: 147
+ID: 147008 Name: Behold the Ginyu Force! Area: 147
+ID: 147007 Name: Goku vs. Vegeta Area: 147
+ID: 147006 Name: Ferocity of the Saiyans Area: 147
+ID: 147005 Name: The Mysterious Alien Warrior Area: 147
+ID: 147004 Name: Battle for the Future Area: 147
+ID: 147003 Name: The Demon King Piccolo! Area: 147
+ID: 147002 Name: The Notorious Mercenary Area: 147
+ID: 147001 Name: The Adventure Begins Area: 147
+ID: 146005 Name: PHY Hidden Potential Event Area: 146
+ID: 146004 Name: STR Hidden Potential Event Area: 146
+ID: 146003 Name: INT Hidden Potential Event Area: 146
+ID: 146002 Name: TEQ Hidden Potential Event Area: 146
+ID: 146001 Name: AGL Hidden Potential Event Area: 146
+ID: 144001 Name: PHY Hidden Potential Event Area: 144
+ID: 143001 Name: STR Hidden Potential Event Area: 143
+ID: 142001 Name: INT Hidden Potential Event Area: 142
+ID: 141001 Name: TEQ Hidden Potential Event Area: 141
+ID: 140001 Name: AGL Hidden Potential Event Area: 140
+ID: 139001 Name: Captain Yamcha's Grand Slam! Area: 139
+ID: 138001 Name: The Peculiar Penguin Village Area: 138
+ID: 137001 Name: In the Fused World... Area: 137
+ID: 136030 Name: ????????!! Area: 136
+ID: 136029 Name: ?6??????? Area: 136
+ID: 136028 Name: ??????? Area: 136
+ID: 136027 Name: ??????????! Area: 136
+ID: 136026 Name: ???????????? Area: 136
+ID: 136025 Name: ????????????! Area: 136
+ID: 136024 Name: ???????!! Area: 136
+ID: 136023 Name: ???M2 Area: 136
+ID: 136022 Name: ???????!! Area: 136
+ID: 136021 Name: ?????… Area: 136
+ID: 136020 Name: ?????!! Area: 136
+ID: 136019 Name: ????????? Area: 136
+ID: 136018 Name: ????? Area: 136
+ID: 136017 Name: ??????!! Area: 136
+ID: 136016 Name: ??????!! Area: 136
+ID: 136015 Name: ?????????????? Area: 136
+ID: 136014 Name: ?????? Area: 136
+ID: 136013 Name: ?????? Area: 136
+ID: 136012 Name: ??????????? Area: 136
+ID: 136011 Name: ??????????? Area: 136
+ID: 136010 Name: ???????? Area: 136
+ID: 136009 Name: ??????? Area: 136
+ID: 136008 Name: ?????????!! Area: 136
+ID: 136007 Name: ??????? Area: 136
+ID: 136006 Name: ???????! Area: 136
+ID: 136005 Name: ??????? Area: 136
+ID: 136004 Name: ??????????! Area: 136
+ID: 136003 Name: ??????????!! Area: 136
+ID: 136002 Name: ???????“???” Area: 136
+ID: 136001 Name: ??????? Area: 136
+ID: 135002 Name: Pan's Next Secret Adventure Area: 135
+ID: 135001 Name: Pan's Secret Adventure Area: 135
+ID: 134001 Name: The Genius Bulma's Battle Prep Area: 134
+ID: 133002 Name: Endless Adventure Area: 133
+ID: 133001 Name: Adventure of Gratitude Area: 133
+ID: 132001 Name: Turtle School Training! Area: 132
+ID: 131001 Name: Hercule’s World Tournament Area: 131
+ID: 130001 Name: Training in the Clouds Area: 130
+ID: 126001 Name: Snake Way Area: 126
+ID: 125001 Name: Snake Way Area: 125
+ID: 120002 Name: Even More Training Area: 120
+ID: 120001 Name: Training at Korin's Tower Area: 120
+ID: 116001 Name: Big Bucks Hercule Challenge Area: 116
+ID: 115002 Name: Champion’s Real Power! Area: 115
+ID: 115001 Name: Big Bucks Hercule Challenge Area: 115
+ID: 111005 Name: [PHY] Awakening Medal Area: 111
+ID: 111004 Name: [STR] Awakening Medal Area: 111
+ID: 111003 Name: [INT] Awakening Medal Area: 111
+ID: 111002 Name: [TEQ] Awakening Medal Area: 111
+ID: 111001 Name: [AGL] Awakening Medal Area: 111
+ID: 110001 Name: [PHY] Awakening Medal Area: 110
+ID: 109001 Name: [STR] Awakening Medal Area: 109
+ID: 108001 Name: [INT] Awakening Medal Area: 108
+ID: 107001 Name: [TEQ] Awakening Medal Area: 107
+ID: 106001 Name: [AGL] Awakening Medal Area: 106
+ID: 105001 Name: [PHY] Awakening Medal Area: 105
+ID: 104001 Name: [STR] Awakening Medal Area: 104
+ID: 103001 Name: [INT] Awakening Medal Area: 103
+ID: 102001 Name: [TEQ] Awakening Medal Area: 102
+ID: 101001 Name: [AGL] Awakening Medal Area: 101
+ID: 27003 Name: Training and Experience Area: 27
+ID: 27002 Name: Training with Piccolo Area: 27
+ID: 27001 Name: Resumption Area: 27
+ID: 26008 Name: Reclaiming Identity Area: 26
+ID: 26007 Name: An Ace in the Hole Area: 26
+ID: 26006 Name: Demonic Scientist Area: 26
+ID: 26005 Name: Dr. Gero's Smirk Area: 26
+ID: 26004 Name: A Loyal Android Area: 26
+ID: 26003 Name: Bio-Soldier Area: 26
+ID: 26002 Name: A Staff Officer's Battle Area: 26
+ID: 26001 Name: A Heart Lost Area: 26
+ID: 25008 Name: A Bizarre Reunion Area: 25
+ID: 25007 Name: A New Sworn Enemy...?! Area: 25
+ID: 25006 Name: A New Sworn Enemy Area: 25
+ID: 25005 Name: The Brother of Frieza Area: 25
+ID: 25004 Name: Fierce Battle against Abo and Kado Area: 25
+ID: 25003 Name: Abo-Kado Fusion! Area: 25
+ID: 25002 Name: Alien Warrior Encounter 7 Area: 25
+ID: 25001 Name: Alien Warrior Encounter 6 Area: 25
+ID: 24008 Name: Androids #17 and #18 Area: 24
+ID: 24007 Name: The Ultimate Android Area: 24
+ID: 24006 Name: #17 x 2 Area: 24
+ID: 24005 Name: Mysterious #17 Area: 24
+ID: 24004 Name: Tenacious Scientist Area: 24
+ID: 24003 Name: Promises Area: 24
+ID: 24002 Name: One Big Chance Area: 24
+ID: 24001 Name: A Bad Feeling About This Area: 24
+ID: 23008 Name: Fighting Runs in the Family Area: 23
+ID: 23007 Name: Cell's Predicament Area: 23
+ID: 23006 Name: Have the Tables Turned?! Area: 23
+ID: 23005 Name: Evolution Area: 23
+ID: 23004 Name: Contact Area: 23
+ID: 23003 Name: Cell and Vegeta Area: 23
+ID: 23002 Name: Decisions Area: 23
+ID: 23001 Name: A Cruel Twist of Fate Area: 23
+ID: 22008 Name: Accelerating Danger Area: 22
+ID: 22007 Name: Indomitable Human Spirit Area: 22
+ID: 22006 Name: Destroyer of the Universe - 4 Area: 22
+ID: 22005 Name: Destroyer of the Universe - 3 Area: 22
+ID: 22004 Name: Destroyer of the Universe - 2 Area: 22
+ID: 22003 Name: Destroyer of the Universe - 1 Area: 22
+ID: 22002 Name: Turles Returns! Area: 22
+ID: 22001 Name: The Nightmare Begins Area: 22
+ID: 21003 Name: Probe Area: 21
+ID: 21002 Name: A Mysterious Saiyan Area: 21
+ID: 21001 Name: After Awakening Area: 21
+ID: 20008 Name: The Angry Majin Area: 20
+ID: 20007 Name: Resurrection Area: 20
+ID: 20006 Name: Countdown Area: 20
+ID: 20005 Name: Lord of the Demon Realm Area: 20
+ID: 20004 Name: The Second Assassin Area: 20
+ID: 20003 Name: The First Assassin Area: 20
+ID: 20002 Name: Subjugated by Ambition Area: 20
+ID: 20001 Name: Nothing Ventured... Area: 20
+ID: 19008 Name: The Mysterious Duo Area: 19
+ID: 19007 Name: An Unseen Enemy Part 5 Area: 19
+ID: 19006 Name: An Unseen Enemy Part 4 Area: 19
+ID: 19005 Name: An Unseen Enemy Part 3 Area: 19
+ID: 19004 Name: An Unseen Enemy Part 2 Area: 19
+ID: 19003 Name: An Unseen Enemy Part 1 Area: 19
+ID: 19002 Name: The Recruited Warrior Area: 19
+ID: 19001 Name: The Forgotten Champion Area: 19
+ID: 18008 Name: Master of the Demon Realm, Part 3 Area: 18
+ID: 18007 Name: Master of the Demon Realm, Part 2 Area: 18
+ID: 18006 Name: Master of the Demon Realm, Part 1 Area: 18
+ID: 18005 Name: A Surprising End Area: 18
+ID: 18004 Name: Frieza's Final Transformation Area: 18
+ID: 18003 Name: Sovereign of the Warrior Race Area: 18
+ID: 18002 Name: Commander's Will Area: 18
+ID: 18001 Name: Coora's Armored Squad Area: 18
+ID: 17008 Name: Frieza's Second Transformation Area: 17
+ID: 17007 Name: Frieza's Transformation Area: 17
+ID: 17006 Name: Deepening Destiny Area: 17
+ID: 17005 Name: Imperial Power Area: 17
+ID: 17004 Name: The Elite Force's True Power Area: 17
+ID: 17003 Name: Zarbon's Transformation Area: 17
+ID: 17002 Name: Breaking the Siege Area: 17
+ID: 17001 Name: Frieza's Army Attacks! Area: 17
+ID: 16008 Name: Ending of the Body Exchange Area: 16
+ID: 16007 Name: Showdown! New Ginyu Force?! Area: 16
+ID: 16006 Name: Reunion with Goku? Area: 16
+ID: 16005 Name: Ginyu's Trespass! Area: 16
+ID: 16004 Name: Turles the New Saiyan Area: 16
+ID: 16003 Name: Saiyan Tag Team Returns! Area: 16
+ID: 16002 Name: Saiyan Trio Area: 16
+ID: 16001 Name: Reunion with Krillin Area: 16
+ID: 15003 Name: The Challengers Area: 15
+ID: 15002 Name: Lost Warrior Area: 15
+ID: 15001 Name: Extraordinary Evil Area: 15
+ID: 14008 Name: Nightmarish Android Area: 14
+ID: 14007 Name: All Guns Blazing Area: 14
+ID: 14006 Name: Aggressive Circuitry Area: 14
+ID: 14005 Name: Martial Warrior's Offense Area: 14
+ID: 14004 Name: Intense Onslaught Area: 14
+ID: 14003 Name: Ultimate Weapon Unleashed Area: 14
+ID: 14002 Name: Destiny Repeated Area: 14
+ID: 14001 Name: In Pursuit of Dr. Gero! Area: 14
+ID: 13008 Name: Missing Target Area: 13
+ID: 13007 Name: Bloodcurdling Message Area: 13
+ID: 13006 Name: Plundered Energy Area: 13
+ID: 13005 Name: Dr. Gero's Counterattack Area: 13
+ID: 13004 Name: Ginyu's Big Mistake Area: 13
+ID: 13003 Name: Unwanted Battle Area: 13
+ID: 13002 Name: Uninvited Enemies Area: 13
+ID: 13001 Name: A Peculiar Goku Area: 13
+ID: 12008 Name: Enter the Savior?! Area: 12
+ID: 12007 Name: Intellect and Speed Area: 12
+ID: 12006 Name: Explosive Power Area: 12
+ID: 12005 Name: Exquisite Team-Up Area: 12
+ID: 12004 Name: Telekinetic Rampage Area: 12
+ID: 12003 Name: Battle-Smart Brawler 5 Area: 12
+ID: 12002 Name: Battle-Smart Brawler 4 Area: 12
+ID: 12001 Name: Return of the Elites! Area: 12
+ID: 11008 Name: Best Team There Is Area: 11
+ID: 11007 Name: Battle-Smart Brawler 3 Area: 11
+ID: 11006 Name: Battle-Smart Brawler 2 Area: 11
+ID: 11005 Name: Battle-Smart Brawler 1 Area: 11
+ID: 11004 Name: The Wayward Invader Area: 11
+ID: 11003 Name: The Wayward Champion Area: 11
+ID: 11002 Name: Find Goku! Part 6 Area: 11
+ID: 11001 Name: Find Goku! Part 5 Area: 11
+ID: 10008 Name: Conflicting Motives Area: 10
+ID: 10007 Name: Unexpected Savior Area: 10
+ID: 10006 Name: Ace in the Hole Area: 10
+ID: 10005 Name: Dr. Gero's Ambition Area: 10
+ID: 10004 Name: Red Ribbon's Return 3 Area: 10
+ID: 10003 Name: Red Ribbon's Return 2 Area: 10
+ID: 10002 Name: Red Ribbon's Return 1 Area: 10
+ID: 10001 Name: To the Lab Area: 10
+ID: 9003 Name: Resolution Area: 9
+ID: 9002 Name: Super Saiyan Showdown! Area: 9
+ID: 9001 Name: Ultimate Saiyan Area: 9
+ID: 8010 Name: Galactic Overlord Frieza Area: 8
+ID: 8009 Name: Raging Battle Area: 8
+ID: 8008 Name: Captain Ginyu Arrives! Area: 8
+ID: 8007 Name: Offense and Defense Part 7 Area: 8
+ID: 8006 Name: Offense and Defense Part 6 Area: 8
+ID: 8005 Name: Offense and Defense Part 5 Area: 8
+ID: 8004 Name: Offense and Defense Part 4 Area: 8
+ID: 8003 Name: Offense and Defense Part 3 Area: 8
+ID: 8002 Name: Offense and Defense Part 2 Area: 8
+ID: 8001 Name: Offense and Defense Part 1 Area: 8
+ID: 7010 Name: Saiyan's Pride Area: 7
+ID: 7009 Name: Saiyan Tagteam Area: 7
+ID: 7008 Name: Elite Warrior Area: 7
+ID: 7007 Name: Let the Games Begin Area: 7
+ID: 7006 Name: Saiyan Attack Area: 7
+ID: 7005 Name: Enter Goku! Area: 7
+ID: 7004 Name: Find Goku! Part 4 Area: 7
+ID: 7003 Name: Find Goku! Part 3 Area: 7
+ID: 7002 Name: Find Goku! Part 2 Area: 7
+ID: 7001 Name: Find Goku! Part 1 Area: 7
+ID: 6010 Name: Cell's Ambition Area: 6
+ID: 6009 Name: Cell Approaches Area: 6
+ID: 6008 Name: Nightmare Team Assault Area: 6
+ID: 6007 Name: Unending Energy of Terror Area: 6
+ID: 6006 Name: Enter Android #17! Area: 6
+ID: 6005 Name: Android #18's Super Power Area: 6
+ID: 6004 Name: Android #18's Games Part 3 Area: 6
+ID: 6003 Name: Android #18's Games Part 2 Area: 6
+ID: 6002 Name: Android #18's Games Part 1 Area: 6
+ID: 6001 Name: Android Appearance Area: 6
+ID: 5010 Name: The Mighty Ginyu Force Area: 5
+ID: 5009 Name: Purple Comet Area: 5
+ID: 5008 Name: Red Magma Area: 5
+ID: 5007 Name: Blue Hurricane Area: 5
+ID: 5006 Name: Orange-Haired Hazard Area: 5
+ID: 5005 Name: Psychokinesis Area: 5
+ID: 5004 Name: Before the Storm Area: 5
+ID: 5003 Name: Piccolo's Terms Area: 5
+ID: 5002 Name: Intensive Training Area: 5
+ID: 5001 Name: Pint-Sized Super Warrior Area: 5
+ID: 4008 Name: Brutal Counterattack Area: 4
+ID: 4007 Name: The Beautiful Warrior Zarbon Area: 4
+ID: 4006 Name: Alien Warrior Encounter 5 Area: 4
+ID: 4005 Name: Alien Warrior Encounter 4 Area: 4
+ID: 4004 Name: Pursuer Who Summons Death Area: 4
+ID: 4003 Name: Alien Warrior Encounter 3 Area: 4
+ID: 4002 Name: Alien Warrior Encounter 2 Area: 4
+ID: 4001 Name: Alien Warrior Encounter 1 Area: 4
+ID: 3008 Name: Fierce Fight for Honor Area: 3
+ID: 3007 Name: Crane School Pride Area: 3
+ID: 3006 Name: Revenge of Crane School Area: 3
+ID: 3005 Name: Turtle School Trial Lesson Area: 3
+ID: 3004 Name: Clever Krillin Area: 3
+ID: 3003 Name: Telekinetic Threat Area: 3
+ID: 3002 Name: World's Greatest Teacher Area: 3
+ID: 3001 Name: Squad Leader Area: 3
+ID: 2005 Name: Malicious Android: Cell Area: 2
+ID: 2004 Name: New Enemy Area: 2
+ID: 2003 Name: Mysterious Ki Area: 2
+ID: 2002 Name: Ghost Town Investigation Area: 2
+ID: 2001 Name: Premonition of Doom Area: 2
+ID: 1005 Name: Invasion of the Warrior Race Area: 1
+ID: 1004 Name: Reinvestigation Area: 1
+ID: 1003 Name: Unrivaled Assassin Area: 1
+ID: 1002 Name: Pursuing Mercenary Tao Area: 1
+ID: 1001 Name: After the Tournament... Area: 1
+ID: 1 Name: To the Tournament! Area: 10001
+
+The Horrific Cell Games
+--------------------------------------------
+The Cell Games 502001 Difficulties: [0, 1, 2] AreaID: 502
+The Extreme Terror 502002 Difficulties: [2] AreaID: 502
+Waking Nightmare 502003 Difficulties: [3] AreaID: 502
+Tournament of Destiny 502004 Difficulties: [2, 4] AreaID: 502
+
+Transcendent Awakening Surpassing the Strongest
+--------------------------------------------
+Let's Go, Gohan! 555001 Difficulties: [2, 4] AreaID: 555
+
+Extreme Z-Area Androids/Cell Saga
+-------------------------------------------
+Invincible Battle Form (Goku) 714001 Difficulties [2,3] AreaID: 714
+Answers Found in Training (Vegeta) 714002 Difficulties [2,3]
+
+Infinite Dragon Ball History
+--------------------------------------
+Androids/Cell Saga (vs. Super Warriors) 713001 Difficulties: [5] AreaID: 713
+Androids/Cell Saga (vs. Androids) Difficulties 713002 [5] AreaID: 713
+
+Evolution of the Ultimate Life Form
+--------------------------------------
+The Android Cell 182001 Difficulties [1] AreaID: 182
+The First Evolution 182002 Difficulties [1] AreaID: 182
+Perfect Form Achieved 182003 Difficulties [1] AreaID: 182
+Cell's Offspring 182004 Difficulties [1] AreaID: 182
+Perfect Form at Full Power 182005 [1] AreaID: 182
+
+Warrior of Fury! Super Saiyan
+-----------------------------------
+This Is It! Super Saiyan! 553001 Difficulties [2,4] AreaID: 553
+
+Cataclysmic Clash! Final Showdown with Frieza
+-----------------------------------
+Come Forth, Porunga! 362001 Difficulties: [0, 2] AreaID: 362
+Frieza's Fearsome Transformation! 362002 Difficulties: [0, 2] AreaID: 362
+Fearless Piccolo 362003 Difficulties: [0, 2] AreaID: 362
+Frieza's Second Transformation 362004 Difficulties: [0, 2] AreaID: 362
+Frieza or Vegeta? 362005 Difficulties: [0, 2] AreaID: 362
+The Ultimate Battle Begins! 362006 Difficulties: [0, 2] AreaID: 362
+Kaioken... Times Twenty?! 362007 Difficulties: [0, 2] AreaID: 362
+The Last Chance! Large Spirit Bomb 362008 Difficulties: [0, 2] AreaID: 362
+The Legendary Super Saiyan 362009 Difficulties: [0, 2] AreaID: 362
+Final Clash Between the Two Warriors 362010 Difficulties: [0, 2] AreaID: 362
+Quiet Yet Fierce Battle 362011 Difficulties: [0, 2] AreaID: 362
+End of Everything 362012 Difficulties: [0, 2] AreaID: 362
+
+Fighting Legend: Goku.
+-----------------------------------
+Area id : 712. Stage id : 712001 difficulty [ 5 ]
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 65c5ca8..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,165 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
diff --git a/Lrfarm.py b/Lrfarm.py
deleted file mode 100644
index 96a7e8f..0000000
--- a/Lrfarm.py
+++ /dev/null
@@ -1,483 +0,0 @@
-import commands
-from colorama import init, Fore, Back, Style
-# Coloroma autoreset
-init(autoreset=True)
-
-
-def t():
-
- print(" Lr Trunks")
- stage = input('What stage would you like to complete(Proud Bloodline 320022) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Raging Counterstrike 406003) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Dignity of a Clan 408002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(The Strongest Space Pirate 420002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Warrior of Hope 414002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(The Time Patrol Warrior 422002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def mv():
- print("Majin Vegeta")
- stage = input('What stage would you like to complete(The Dark Prince Returns 319022) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(15): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(The Strongest Shadow Dragon 517002) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Dark Nightmare 518002) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Fusion in Blue 519001) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Rose-Tinted Plot 520001) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(A New Hope 522001) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def gv():
- print(" Lr Super Saiyan Goku & Super Saiyan Vegeta")
- stage = input('What stage would you like to complete(The Ultimate Pair of the Present World 537001) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Ultimate Splendor 512003) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(7): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def b():
- print("Lr Full Power Boujack (Galactic Warrior)")
- stage = input('What stage would you like to complete( Extreme Peril 306008) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(25): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def c():
- print("Lr Cell (Perfect Form) & Cell Jr")
- stage = input('What stage would you like to complete(Waking Nightmare 502003) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(7): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def tm():
- print("Lr Trunks (Teen) (Future) & Mai (Future)")
- stage = input('What stage would you like to complete( The Zero Mortals Plan 328006) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(20): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(Dark Nightmare 518002) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(1): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete( Rose-Tinted Plot 520001) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(1): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(Fusion in Blue 519001) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(1): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete( The Epic Battle Begins 524001) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(1): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(A New Hope 522001) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(2): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete( Last Judgment...Or Last Hope 523002) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(2): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(Searing Rose-Colored Fury 520002) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(2): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete( Sublime Blue! 519002) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(2): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def bw():
- print("Lr Beerus & Whis")
- stage = input('What stage would you like to complete(God of Destruction Wrath 511002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(7): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Destruction God Awakens 314001) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(4): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(In Search of the Super Saiyan God 314002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(7): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Vegeta Pride 314007) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(4): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def gg():
- print("Lr Super Saiyan Gohan (Teen) & Super Saiyan Goten (Kid)")
- stage = input('What stage would you like to complete(Go! Warriors of the New Generation 552001) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(10): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Blast! Family Kamehameha! 326006) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(20): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def vg():
- print("Lr Super Saiyan Goku (Angel) & Super Saiyan Vegeta (Angel)")
- stage = input('What stage would you like to complete(The Ultimate Pair of the Otherworld 536001) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(10): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Fusion Reborn! 326006) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(7): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def tg():
- print("Lr Trunks (Kid) & Goten (Kid)")
- stage = input('What stage would you like to complete(An Unexpectedly Powerful Man! 411002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Super Gotenks! 513002) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(One Powerful Super Fusion! 513003) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def gh():
- print(" Lr Super Saiyan 2 Gohan")
- stage = input('What stage would you like to complete(Waking Nightmare 502003) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def ggg():
- print(" Lr Super Saiyan 3 Goku")
- stage = input('What stage would you like to complete(Super Saiyan Goku 403002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Phantom Majin Resurrected! 535002) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(Mighty Warrior: 24-Hour Revival 528001) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(Ultimate Finishing Move 504002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(4): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def bd():
- print("Lr Bardock")
- stage = input('What stage would you like to complete(Saiyans from Planet Vegeta 347001) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(10): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete( 534001 The Unknown Battle) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(347007 A Lone Warriors Last Battle) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete( 602002 True Fear) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(602003 Summit of the Universe) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def gb():
- print("Lr Goku Black (Super Saiyan Rosé) & Zamasu")
- stage = input('What stage would you like to complete( 518002 Dark Nightmare) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(519001 Fusion in Blue) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete( 520001 Rose-Tinted Plot) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(522001 A New Hope) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete( 523002 Last Judgment...Or Last Hope) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(524001 The Epic Battle Begins) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(3): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def gf():
- print("Lr Goku & Frieza (Final Form) (Angel)")
- stage = input('What stage would you like to complete( 544001 Ever-Evolving Power) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(Ever-Evolving Evil) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(538001 Kaboom! Ultra Instinct) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- "BREAK"
- stage = input('What stage would you like to complete(533002 The True Golden Frieza) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def by():
- print("Lr Legendary Super Saiyan Broly")
- stage = input('What stage would you like to complete(501003 The Demon Returns) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-def android():
- print("Lr Android 17&18")
- stage = input('What stage would you like to complete(501002 awakening beyond) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
- stage = input('What stage would you like to complete(502002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
- stage = input('What stage would you like to complete(503002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
- stage = input('What stage would you like to complete(504002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
- stage = input('What stage would you like to complete(505002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
- stage = input('What stage would you like to complete(506002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
- stage = input('What stage would you like to complete(507002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(508002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(510002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(511002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(512002) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(513002) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(514001) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(515002) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(516001) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-def Androids():
- print("Lr Android 17&18/android#17")
- stage = input('What stage would you like to complete(543001) : ')
- difficulty = input('Enter the difficulty|(4:Super 2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
- stage = input('What stage would you like to complete(366008) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
- stage = input('What stage would you like to complete(503002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
- stage = input('What stage would you like to complete(366008) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
- stage = input('What stage would you like to complete(415002) : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
\ No newline at end of file
diff --git a/__pycache__/commands.cpython-37.pyc b/__pycache__/commands.cpython-37.pyc
deleted file mode 100644
index c1159e7..0000000
Binary files a/__pycache__/commands.cpython-37.pyc and /dev/null differ
diff --git a/__pycache__/config.cpython-37.pyc b/__pycache__/config.cpython-37.pyc
deleted file mode 100644
index dfd2f4a..0000000
Binary files a/__pycache__/config.cpython-37.pyc and /dev/null differ
diff --git a/__pycache__/decryptor.cpython-37.pyc b/__pycache__/decryptor.cpython-37.pyc
deleted file mode 100644
index 312471c..0000000
Binary files a/__pycache__/decryptor.cpython-37.pyc and /dev/null differ
diff --git a/__pycache__/packet.cpython-37.pyc b/__pycache__/packet.cpython-37.pyc
deleted file mode 100644
index e077729..0000000
Binary files a/__pycache__/packet.cpython-37.pyc and /dev/null differ
diff --git a/aa.py b/aa.py
deleted file mode 100644
index 3472657..0000000
--- a/aa.py
+++ /dev/null
@@ -1,400 +0,0 @@
-import commands
-from colorama import init, Fore, Back, Style
-# Coloroma autoreset
-init(autoreset=True)
-
-
-def ss():
- print("TEQ Super Saiyan God SS Vegito")
- stage = input('What stage would you like to complete(519002 Sublime Blue!) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def sss():
- print("PHY Super Saiyan Broly")
- stage = input('What stage would you like to complete(548001 The Greatest Saiyan Adversary) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def ssss():
- print("STR Super Gogeta")
- stage = input('What stage would you like to complete(505003 Fusion Reborn!) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(2): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def s():
- print("AGL Super Saiyan Gogeta")
- stage = input('What stage would you like to complete(549001 The Omnipotent Saiyan Warrior) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def a():
- print("INT SSJ3 Bardock")
- stage = input('What stage would you like to complete(534001 The Unknown Battle : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def aa():
- print("STR SSJ4 Goku")
- stage = input('What stage would you like to complete(525001 The Scarlet Hero! Super Saiyan 4! : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def aaa():
- print("INT UI Goku")
- stage = input('What stage would you like to complete(538001 Kaboom! Ultra Instinct : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def aaaa():
- print("AGL SSJ4 Vegeta")
- stage = input('What stage would you like to complete(526001 The Crimson Flash! Super Saiyan 4 : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def b():
- print("PHY FP Frieza")
- stage = input('What stage would you like to complete(507002 Full-Power Final Battle : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def bb():
- print("TEQ Golden Frieza")
- stage = input('What stage would you like to complete(516001 Emperors Obsession Area : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def bbb():
- print("AGL SSJ3 Goku")
- stage = input('What stage would you like to complete(504002 Ultimate Finishing Move Area : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(10): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def bbbb():
- print("TEQ SSJ4 Gogeta")
- stage = input('What stage would you like to complete(532001 The Ultimate Super Gogeta : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def c():
- print("INT Super Gogeta")
- stage = input('What stage would you like to complete(505003 Fusion Reborn!) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def cc():
- print("SSJ3 Gotenks")
- stage = input('What stage would you like to complete(513002 Super Gotenks) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-def ccc():
- print("TEQ FP SSJ4 Goku")
- stage = input('What stage would you like to complete(542001 Transcend Super Saiyan 4) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def cccc():
- print("STR Jiren")
- stage = input('What stage would you like to complete(540002 Confronting the Strongest of All Universes) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def d():
- print("INT Golden Frieza")
- stage = input('What stage would you like to complete(533002 The True Golden Frieza) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def dd():
- print("PHY Android 17")
- stage = input('What stage would you like to complete(543001 Superb Ranger) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def ddd():
- print("TEQ Hit")
- stage = input('What stage would you like to complete(547001 The Deadliest Assassin) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def dddd():
- print("AGL SSBE Vegeta")
- stage = input('What stage would you like to complete(524002 Battle for Honor and Pride) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def e():
- print("PHY Kid Buu")
- stage = input('What stage would you like to complete(524003 Regression to Evil) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def ee():
- print("INT Kid Buu")
- stage = input('What stage would you like to complete(524003 Regression to Evil) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def eee():
- print("TEQ SSJ3 Goku (Angel)")
- stage = input('What stage would you like to complete(528001 Mighty Warrior: 24-Hour Revival) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def eeee():
- print("PHY Goku Black")
- stage = input('What stage would you like to complete(518002 Dark Nightmare) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def f():
- print("INT Goku Black")
- stage = input('What stage would you like to complete(518003 Black Harbinger of Destruction) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def ff():
- print("TEQ SSG Goku")
- stage = input('What stage would you like to complete(549001 The Omnipotent Saiyan Warrior) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def ffx():
- print("STR SSG Vegeta")
- stage = input('What stage would you like to complete(549001 The Omnipotent Saiyan Warrior) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def fff():
- print("AGL SSGSS Goku")
- stage = input('What stage would you like to complete(514001 Ceaseless Combat) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def ffff():
- print("STR Toppo")
- stage = input('What stage would you like to complete(524002 Battle for Honor and Pride) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def g():
- print("STR Rose Goku Black")
- stage = input('What stage would you like to complete(520002 Searing Rose-Colored Fury) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def gg():
- print("PHY SSGSS Vegito")
- stage = input('What stage would you like to complete(519001 Fusion in Blue) : ')
- difficulty = input('Enter the difficulty|(3:Super): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def ggg():
- print("STR SSJ3 Goku")
- stage = input('What stage would you like to complete(504002 Ultimate Finishing Move Area : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(10): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def gggx():
- print("TEQ SSJ3 Broly")
- stage = input('What stage would you like to complete(531001 All-Time Nastiest Evolution : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def gggg():
- print("AGL Transgoku")
- stage = input('What stage would you like to complete(544001 Ever-Evolving Power : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def h():
- print("STR SSJ3 Vegeta")
- stage = input('What stage would you like to complete(510002 The Most Powerful Blow : ')
- difficulty = input('Enter the difficulty|(2:Z-Hard): ')
- loop = input('Enter how many times to execute(10): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def hh():
- print("PHY SSJ3 Gotenks")
- stage = input('What stage would you like to complete(513003 One Powerful Super Fusion! : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def hhh():
- print("AGL Turles")
- stage = input('What stage would you like to complete(539001 Arrival of the Universe-Crusher! : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def hhhh():
- print("STR Janemba")
- stage = input('What stage would you like to complete(506003 Overwhelming Force of Evil! : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def j():
- print("INT Janemba")
- stage = input('What stage would you like to complete(506003 Overwhelming Force of Evil! : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(2): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def jj():
- print("TEQ TransFrieza")
- stage = input('What stage would you like to complete(545001 Ever-Evolving Evil : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(11): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
-
-#####################################################################################################################
-def jjj():
- print("AGL Broly")
- stage = input('What stage would you like to complete(548001 The Greatest Saiyan Adversary) : ')
- difficulty = input('Enter the difficulty|(4:Super2): ')
- loop = input('Enter how many times to execute(5): ')
- for i in range(int(loop)):
- commands.complete_stage(stage, difficulty)
-
diff --git a/commands.py b/commands.py
deleted file mode 100644
index df0eda3..0000000
--- a/commands.py
+++ /dev/null
@@ -1,6456 +0,0 @@
-import base64
-from colorama import init, Fore, Back, Style
-import config
-import decryptor
-import io
-import json
-from orator import DatabaseManager, Model
-import os
-import packet
-import PySimpleGUI as sg
-from random import choice
-from random import randint
-import re
-import requests
-from string import ascii_uppercase
-import sys
-import time
-import webbrowser
-from random import *
-import extra
-import Lrfarm
-import aa
-# Coloroma autoreset
-init(autoreset=True)
-
-
-def complete_stage(stage_id, difficulty, kagi=None):
- # Completes a given stage stage name or ID has been supplied as a string
- # kagi must be correct kagi item ID if used
- # Check if user has supplied a stage name and searches DB for correct stage id
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/user'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user'
- else:
- url = 'http://ishin-production.aktsk.jp/user'
- r = requests.get(url, headers=headers)
- user = r.json()
-
- print(Fore.GREEN + 'Account Rank:' + str(get_user()['user']['rank']))
- print('Stones: ' + str(user['user']['stone']))
- if not stage_id.isnumeric():
-
- try:
- config.Model.set_connection_resolver(config.db_glb)
- stage_id = str(config.Quests.where('name', 'like', '%' + stage_id
- + '%').first().id)
- except AttributeError:
- config.Model.set_connection_resolver(config.db_jp)
- stage_id = str(config.Quests.where('name', 'like', '%' + stage_id
- + '%').first().id)
- except:
- print(Fore.RED + Style.BRIGHT + "Could not find stage name in databases")
- return 0
- # Retrieve correct stage name to print
- # Check if GLB database has id, if not try JP DB.
-
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.Quests.find_or_fail(int(stage_id))
- stage_name = config.Quests.find_or_fail(int(stage_id)).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
- config.Quests.find_or_fail(int(stage_id))
- stage_name = config.Quests.find_or_fail(int(stage_id)).name
-
- try:
- print('Begin stage: ' + stage_name + ' ' + stage_id + ' | Difficulty: ' \
- + str(difficulty) + ' Deck: ' + str(config.deck))
- except:
- print(Fore.RED + Style.BRIGHT + 'Does this quest exist?')
- return 0
-
- # Begin timer for overall stage completion, rounded to second.
- timer_start = int(round(time.time(), 0))
-
- # Form First Request
- APIToken = ''.join(choice(ascii_uppercase) for i in range(63))
- friend = get_friend(stage_id, difficulty)
-
- if friend['is_cpu'] == False:
- if kagi != None:
- sign = json.dumps({'difficulty': difficulty, 'eventkagi_item_id': kagi, 'friend_id': friend['id'],
- 'is_playing_script': True, 'selected_team_num': config.deck})
- else:
- sign = json.dumps({'difficulty': difficulty, 'friend_id': friend['id'], 'is_playing_script': True,
- 'selected_team_num': config.deck})
- else:
- if kagi != None:
- sign = json.dumps({'difficulty': difficulty, 'eventkagi_item_id': kagi, 'cpu_friend_id': friend['id'],
- 'is_playing_script': True, 'selected_team_num': config.deck})
- else:
- sign = json.dumps({'difficulty': difficulty, 'cpu_friend_id': friend['id'], 'is_playing_script': True,
- 'selected_team_num': config.deck})
-
- enc_sign = packet.encrypt_sign(sign)
-
- # ## Send First Request
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/quests/' + stage_id
- + '/sugoroku_maps/start'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- data = {'sign': enc_sign}
-
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/quests/' + stage_id \
- + '/sugoroku_maps/start'
- else:
- url = 'http://ishin-production.aktsk.jp/quests/' + stage_id \
- + '/sugoroku_maps/start'
-
- r = requests.post(url, data=json.dumps(data), headers=headers)
-
- # Form second request
- # Time for request sent
-
- if 'sign' in r.json():
- dec_sign = packet.decrypt_sign(r.json()['sign'])
- elif 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + str(r.json()['error']))
- # Check if error was due to lack of stamina
- if r.json()['error']['code'] == 'act_is_not_enough':
- # Check if allowed to refill stamina
- if config.allow_stamina_refill == True:
- refill_stamina()
- r = requests.post(url, data=json.dumps(data),
- headers=headers)
- else:
- print(Fore.RED + Style.BRIGHT + 'Stamina refill not allowed.')
- return 0
- elif r.json()['error']['code'] == 'active_record/record_not_found':
- return 0
- elif r.json()['error']['code'] == 'invalid_area_conditions_potential_releasable':
- print(Fore.RED + Style.BRIGHT + 'You do not meet the coniditions to complete potential events')
- return 0
- else:
- print(Fore.RED + Style.BRIGHT + str(r.json()['error']))
- return 0
- else:
- print(Fore.RED + Style.BRIGHT + str(r.json()))
- return 0
- if 'sign' in r.json():
- dec_sign = packet.decrypt_sign(r.json()['sign'])
- # Retrieve possible tile steps from response
- steps = []
- for x in dec_sign['sugoroku']['events']:
- steps.append(x)
-
- finish_time = int(round(time.time(), 0) + 90)
- start_time = finish_time - randint(6200000, 8200000)
- damage = randint(500000, 1000000)
-
- # Hercule punching bag event damage
- if str(stage_id)[0:3] in ('711', '185'):
- damage = randint(100000000, 101000000)
-
- sign = {
- 'actual_steps': steps,
- 'difficulty': difficulty,
- 'elapsed_time': finish_time - start_time,
- 'energy_ball_counts_in_boss_battle': [4, 6, 0, 6, 4, 3, 0, 0, 0, 0, 0, 0, 0, ],
- 'has_player_been_taken_damage': False,
- 'is_cheat_user': False,
- 'is_cleared': True,
- 'is_defeated_boss': True,
- 'is_player_special_attack_only': True,
- 'max_damage_to_boss': damage,
- 'min_turn_in_boss_battle': 0,
- 'quest_finished_at_ms': finish_time,
- 'quest_started_at_ms': start_time,
- 'steps': steps,
- 'token': dec_sign['token'],
- }
-
- enc_sign = packet.encrypt_sign(json.dumps(sign))
-
- # Send second request
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/quests/' + stage_id
- + '/sugoroku_maps/finish'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- data = {'sign': enc_sign}
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/quests/' + stage_id \
- + '/sugoroku_maps/finish'
- else:
- url = 'http://ishin-production.aktsk.jp/quests/' + stage_id \
- + '/sugoroku_maps/finish'
-
- r = requests.post(url, data=json.dumps(data), headers=headers)
- dec_sign = packet.decrypt_sign(r.json()['sign'])
-
- # ## Print out Items from Database
- if 'items' in dec_sign:
- supportitems = []
- awakeningitems = []
- trainingitems = []
- potentialitems = []
- treasureitems = []
- carditems = []
- trainingfields = []
- stones = 0
- supportitemsset = set()
- awakeningitemsset = set()
- trainingitemsset = set()
- potentialitemsset = set()
- treasureitemsset = set()
- carditemsset = set()
- trainingfieldsset = set()
- print('Items:')
- print('-------------------------')
- if 'quest_clear_rewards' in dec_sign:
- for x in dec_sign['quest_clear_rewards']:
- if x['item_type'] == 'Point::Stone':
- stones += x['amount']
- for x in dec_sign['items']:
- if x['item_type'] == 'SupportItem':
-
- # print('' + SupportItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- supportitems.append(x['item_id'])
- supportitemsset.add(x['item_id'])
- elif x['item_type'] == 'PotentialItem':
-
- # print('' + PotentialItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- potentialitems.append(x['item_id'])
- potentialitemsset.add(x['item_id'])
- elif x['item_type'] == 'TrainingItem':
-
- # print('' + TrainingItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- trainingitems.append(x['item_id'])
- trainingitemsset.add(x['item_id'])
- elif x['item_type'] == 'AwakeningItem':
-
- # print('' + AwakeningItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- awakeningitems.append(x['item_id'])
- awakeningitemsset.add(x['item_id'])
- elif x['item_type'] == 'TreasureItem':
-
- # print('' + TreasureItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- treasureitems.append(x['item_id'])
- treasureitemsset.add(x['item_id'])
- elif x['item_type'] == 'Card':
-
- # card = Cards.find(x['item_id'])
-
- carditems.append(x['item_id'])
- carditemsset.add(x['item_id'])
- elif x['item_type'] == 'Point::Stone':
-
- # print('' + card.name + '['+rarity+']'+ ' x '+str(x['quantity']))
- # print('' + TreasureItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- stones += 1
- elif x['item_type'] == 'TrainingField':
-
- # card = Cards.find(x['item_id'])
-
- for i in range(x['quantity']):
- trainingfields.append(x['item_id'])
- trainingfieldsset.add(x['item_id'])
- else:
- print(x['item_type'])
-
- # Print items
- for x in supportitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.SupportItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.CYAN + Style.BRIGHT + config.SupportItems.find(x).name + ' x' \
- + str(supportitems.count(x)))
- for x in awakeningitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.AwakeningItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.MAGENTA + Style.BRIGHT + config.AwakeningItems.find(x).name + ' x' \
- + str(awakeningitems.count(x)))
- for x in trainingitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.TrainingItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.RED + Style.BRIGHT + config.TrainingItems.find(x).name + ' x' \
- + str(trainingitems.count(x)))
- for x in potentialitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.PotentialItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(config.PotentialItems.find_or_fail(x).name + ' x' \
- + str(potentialitems.count(x)))
- for x in treasureitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.TreasureItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.GREEN + Style.BRIGHT + config.TreasureItems.find(x).name + ' x' \
- + str(treasureitems.count(x)))
- for x in trainingfieldsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.TrainingFields.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(config.TrainingFields.find(x).name + ' x' \
- + str(trainingfields.count(x)))
- for x in carditemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.Cards.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(config.Cards.find(x).name + ' x' + str(carditems.count(x)))
- print(Fore.YELLOW + Style.BRIGHT + 'Stones x' + str(stones))
- zeni = '{:,}'.format(dec_sign['zeni'])
- print('Zeni: ' + zeni)
- if 'gasha_point' in dec_sign:
- print('Friend Points: ' + str(dec_sign['gasha_point']))
-
- print('--------------------------')
-
- # Sell Cards
-
- i = 0, 1
- card_list = []
- if 'user_items' in dec_sign:
- if 'cards' in dec_sign['user_items']:
- for x in dec_sign['user_items']['cards']:
- if config.Cards.find(x['card_id']).rarity == 0:
- card_list.append(x['id'])
- if config.Cards.find(x['card_id']).rarity == 1:
- card_list.append(x['id'])
- if config.Cards.find(x['card_id']).rarity == 2:
- card_list.append(x['id'])
-
- if len(card_list) > 0:
- sell_cards(card_list)
- if len(card_list) > 1:
- sell_cards(card_list)
- if len(card_list) > 2:
- sell_cards(card_list)
-
- # ## Finish timing level
-
- timer_finish = int(round(time.time(), 0))
- timer_total = timer_finish - timer_start
-
- # #### COMPLETED STAGE
-
- print(Fore.GREEN + Style.BRIGHT + 'Completed stage: ' + str(stage_id) + ' in ' \
- + str(timer_total) + ' seconds')
- print('##############################################')
-
-
-####################################################################
-def get_friend(
- stage_id,
- difficulty,
-):
- # Returns supporter for given stage_id & difficulty
- # Chooses cpu_supporter if possible
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/quests/' + stage_id
- + '/supporters'),
- 'Content-type': 'application/json',
- 'X-Platform': 'config.platform',
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/quests/' + stage_id \
- + '/supporters'
- else:
- url = 'http://ishin-production.aktsk.jp/quests/' + stage_id \
- + '/supporters'
-
- r = requests.get(url, headers=headers)
-
- '''
- if 'supporters' not in r.json():
- print('Bandai has temp blocked connection... Attempting sign in...')
- response = SignIn(signup, AdId, UniqueId)
- RefreshClient()
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': GetMac('GET', '/quests/' + stage_id
- + '/supporters', MacId, secret1),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- r = requests.get(url, headers=headers)
- '''
- # If CPU supporter available, choose it every time
- if 'cpu_supporters' in r.json():
- if int(difficulty) == 5:
- if 'super_hard3' in r.json()['cpu_supporters']:
- if len(r.json()['cpu_supporters']['super_hard3'
- ]['cpu_friends']) > 0:
- return {
- 'is_cpu': True,
- 'id': r.json()['cpu_supporters']['super_hard3']
- ['cpu_friends'][0]['id']
- }
- if int(difficulty) == 4:
- if 'super_hard2' in r.json()['cpu_supporters']:
- if len(r.json()['cpu_supporters']['super_hard2'
- ]['cpu_friends']) > 0:
- return {
- 'is_cpu': True,
- 'id': r.json()['cpu_supporters']['super_hard2']
- ['cpu_friends'][0]['id']
- }
- if int(difficulty) == 3:
- if 'super_hard1' in r.json()['cpu_supporters']:
- if len(r.json()['cpu_supporters']['super_hard1'
- ]['cpu_friends']) > 0:
- return {
- 'is_cpu': True,
- 'id': r.json()['cpu_supporters']['super_hard1']
- ['cpu_friends'][0]['id']
- }
- if int(difficulty) == 2:
- if 'very_hard' in r.json()['cpu_supporters']:
- if len(r.json()['cpu_supporters']['very_hard'
- ]['cpu_friends']) > 0:
- return {
- 'is_cpu': True,
- 'id': r.json()['cpu_supporters']['very_hard']
- ['cpu_friends'][0]['id']
- }
- if int(difficulty) == 1:
- if 'hard' in r.json()['cpu_supporters']:
- if len(r.json()['cpu_supporters']['hard']['cpu_friends'
- ]) > 0:
- return {
- 'is_cpu': True,
- 'id': r.json()['cpu_supporters']['hard']
- ['cpu_friends'][0]['id']
- }
- if int(difficulty) == 0:
- if 'normal' in r.json()['cpu_supporters']:
- if len(r.json()['cpu_supporters']['normal'
- ]['cpu_friends']) > 0:
- return {
- 'is_cpu': True,
- 'id': r.json()['cpu_supporters']['normal']
- ['cpu_friends'][0]['id']
- }
-
- return {
- 'is_cpu': False,
- 'id': r.json()['supporters'][0]['id']
- }
-
-
-####################################################################
-def refill_stamina():
- # ## Restore user stamina
-
- stones = get_user()['user']['stone']
- if stones < 1:
- print(Fore.RED + Style.BRIGHT + 'You have no stones left...')
- return 0
- if config.client == 'global':
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/user/recover_act_with_stone'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- url = 'https://ishin-global.aktsk.com/user/recover_act_with_stone'
- else:
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/user/recover_act_with_stone'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- url = 'http://ishin-production.aktsk.jp/user/recover_act_with_stone'
-
- r = requests.put(url, headers=headers)
- print(Fore.GREEN + Style.BRIGHT + 'STAMINA RESTORED')
-
-
-####################################################################
-def get_user():
- # Returns user response from bandai
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/user'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user'
- else:
- url = 'http://ishin-production.aktsk.jp/user'
- r = requests.get(url, headers=headers)
- return r.json()
-
-
-####################################################################
-def sell_cards(card_list):
- # Takes cards list and sells them in batches of 99
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/cards/sell'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/cards/sell'
- else:
- url = 'http://ishin-production.aktsk.jp/cards/sell'
-
- cards_to_sell = []
- i = 0
- for card in card_list:
- i += 1
- cards_to_sell.append(card)
- if i == 99:
- data = {'card_ids': cards_to_sell}
- r = requests.post(url, data=json.dumps(data), headers=headers)
- print('Sold Cards x' + str(len(cards_to_sell)))
- if 'error' in r.json():
- print(r.json()['error'])
- return 0
- i = 0
- cards_to_sell[:] = []
- if i != 0:
- data = {'card_ids': cards_to_sell}
- r = requests.post(url, data=json.dumps(data), headers=headers)
- print('Sold Cards x' + str(len(cards_to_sell)))
- # print(r.json())
-
-
-####################################################################
-def signup():
- # returns string identifier to be formatted and used by SignIn function
-
- # Set platform to use
- set_platform()
-
- # Generate AdId and Unique ID to send to Bandai
- config.AdId = packet.guid()['AdId']
- config.UniqueId = packet.guid()['UniqueId']
-
- user_acc = {
- 'ad_id': config.AdId,
- 'country': 'AU',
- 'currency': 'AUD',
- 'device': 'samsung',
- 'device_model': 'SM-G930V',
- 'os_version': '6.0',
- 'platform': config.platform,
- 'unique_id': config.UniqueId,
- }
- user_account = json.dumps({'user_account': user_acc})
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/auth/sign_up'
- else:
- url = 'http://ishin-production.aktsk.jp/auth/sign_up'
- r = requests.post(url, data=user_account, headers=headers)
-
- # ## It is now necessary to solve the captcha. Opens browser window
- # ## in order to solve it. Script waits for user input before continuing
- if 'captcha_url' not in r.json():
- print(Fore.RED + Style.BRIGHT + 'Captcha could not be loaded...')
- return None
-
- url = r.json()['captcha_url']
- webbrowser.open(url, new=2)
- captcha_session_key = r.json()['captcha_session_key']
- print(
- 'Opening captcha in browser. Press' + Fore.RED + Style.BRIGHT + ' ENTER ' + Style.RESET_ALL + 'once you have solved it...')
- input()
-
- # ## Query sign up again passing the captcha session key.
- # ## Bandais servers check if captcha was solved relative to the session key
-
- data = {'captcha_session_key': captcha_session_key,
- 'user_account': user_acc}
-
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/auth/sign_up'
- else:
- url = 'http://ishin-production.aktsk.jp/auth/sign_up'
-
- r = requests.post(url, data=json.dumps(data), headers=headers)
-
- # ##Return identifier for account, this changes upon transferring account
- try:
- return base64.b64decode(r.json()['identifier']).decode('utf-8')
- except:
- return None
-
-####################################################################
-####################################################################
-def signin(identifier):
- # Takes account identifier and encodes it properly, sending BASIC Authorization
- # request to bandai.
- # Returns tuple
-
- # Format identifier to receive access_token and secret
- basic_pwacc = identifier.split(':')
- complete_string = basic_pwacc[1] + ':' + basic_pwacc[0]
- basic_accpw = 'Basic ' \
- + base64.b64encode(complete_string.encode('utf-8'
- )).decode('utf-8')
- data = json.dumps({
- 'ad_id': packet.guid()['AdId'],
- 'unique_id': packet.guid()['UniqueId']
- })
-
- # print(data)
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': basic_accpw,
- 'Content-type': 'application/json',
- 'X-ClientVersion': '////',
- 'X-Language': 'en',
- 'X-UserCountry': 'AU',
- 'X-UserCurrency': 'AUD',
- 'X-Platform': config.platform,
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/auth/sign_in'
- else:
- url = 'http://ishin-production.aktsk.jp/auth/sign_in'
-
- r = requests.post(url, data=data, headers=headers)
-
- if 'captcha_url' in r.json():
- print(r.json())
- url = r.json()['captcha_url']
- webbrowser.open(url, new=2)
- captcha_session_key = r.json()['captcha_session_key']
- print(
- 'Opening captcha in browser. Press' + Fore.RED + Style.BRIGHT + ' ENTER ' + Style.RESET_ALL + 'once you have solved it...')
- input()
- r = requests.post(url, data=data, headers=headers)
-
- print(Fore.RED + Style.BRIGHT + 'SIGN IN COMPLETE' + Style.RESET_ALL)
-
- try:
- return (r.json()['access_token'], r.json()['secret'])
- except:
- return None
-
-
-####################################################################
-def get_transfer_code():
- # Returns transfer code in dictionary
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/auth/link_codes'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- data = {'eternal': 1}
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/auth/link_codes'
- else:
- url = 'http://ishin-production.aktsk.jp/auth/link_codes'
-
- r = requests.post(url, data=json.dumps(data), headers=headers)
- try:
- print('Transfer Code:' + r.json()['link_code'])
- return {'transfer_code': r.json()['link_code']}
- except:
- return None
-
-
-####################################################################
-def tutorial():
- # ##Progress NULL TUTORIAL FINISH
-
- print(Fore.CYAN + Style.BRIGHT + 'Tutorial Progress: 1/8')
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/tutorial/finish'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/tutorial/finish'
- else:
- url = 'http://ishin-production.aktsk.jp/tutorial/finish'
- r = requests.put(url, headers=headers)
-
- # ##Progress NULL Gasha
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/tutorial/gasha'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/tutorial/gasha'
- else:
- url = 'http://ishin-production.aktsk.jp/tutorial/gasha'
- r = requests.post(url, headers=headers)
- print(Fore.CYAN + Style.BRIGHT + 'Tutorial Progress: 2/8')
-
- # ##Progress to 999%
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/tutorial'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- progress = {'progress': '999'}
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/tutorial'
- else:
- url = 'http://ishin-production.aktsk.jp/tutorial'
- r = requests.put(url, data=json.dumps(progress), headers=headers)
- print(Fore.CYAN + Style.BRIGHT + 'Tutorial Progress: 3/8')
-
- # ##Change User name
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/user'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- user = {'user': {'name': make_name()}}
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user'
- else:
- url = 'http://ishin-production.aktsk.jp/user'
- r = requests.put(url, data=json.dumps(user), headers=headers)
- print(Fore.CYAN + Style.BRIGHT + 'Tutorial Progress: 4/8')
-
- # ##/missions/put_forward
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/missions/put_forward'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/missions/put_forward'
- else:
- url = 'http://ishin-production.aktsk.jp/missions/put_forward'
- r = requests.post(url, headers=headers)
- print(Fore.CYAN + Style.BRIGHT + 'Tutorial Progress: 5/8')
-
- # ##Apologies accept
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/apologies/accept'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/apologies/accept'
- else:
- url = 'http://ishin-production.aktsk.jp/apologies/accept'
- r = requests.put(url, headers=headers)
-
- # ##On Demand
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/user'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user'
- else:
- url = 'http://ishin-production.aktsk.jp/user'
- data = {'user': {'is_ondemand': True}}
- r = requests.put(url, data=json.dumps(data), headers=headers)
- print(Fore.CYAN + Style.BRIGHT + 'Tutorial Progress: 6/8')
-
- # ##Hidden potential releasable
-
- print(Fore.CYAN + Style.BRIGHT + 'Tutorial Progress: 7/8')
- print(Fore.CYAN + Style.BRIGHT + 'Tutorial Progress: 8/8')
- print(Fore.RED + Style.BRIGHT + 'TUTORIAL COMPLETE')
-
-
-####################################################################
-def jp_db_download():
- #
- jp_out_of_date = False
-
- # Check local DB versions in help.txt
- while True:
- if os.path.isfile('help.txt'):
- f = open(os.path.join('help.txt'), 'r')
- local_version_jp = f.readline().rstrip()
- f.close()
- break
- else:
- f = open(os.path.join('help.txt'), 'w')
- f.write('111\n')
- f.write('111\n')
- f.close()
-
- # Check what is the current client this may end up being unnecessary
- original_client = config.client
-
-
-
- # Set second db to download to jp.
- config.client = 'japan'
- config.identifier = signup()
- config.access_token, config.secret = signin(config.identifier)
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/client_assets/database'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- 'X-Language': 'en',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/client_assets/database'
- else:
- url = 'http://ishin-production.aktsk.jp/client_assets/database'
-
- r = requests.get(url, allow_redirects=True, headers=headers)
- if local_version_jp != str(r.json()['version']):
- jp_out_of_date = True
- jp_current = r.json()['version']
-
- print(Fore.RED + Style.BRIGHT + 'JP DB out of date...')
- print(Fore.RED + Style.BRIGHT + 'Downloading...')
- url = r.json()['url']
- r = requests.get(url, allow_redirects=True)
- open('dataenc_jp.db', 'wb').write(r.content)
-
- # Revert client to original
- config.client = original_client
-
- print(Fore.RED + Style.BRIGHT \
- + 'Decrypting Latest Databases... This can take a few minutes...')
-
- # Calling database decrypt script
-
-
- if jp_out_of_date:
- print('Decrypting JP Database')
- decryptor.main(p='2db857e837e0a81706e86ea66e2d1633')
- with open('help.txt', 'r') as file:
- data = file.readlines()
- data[1] = str(jp_current) + '\n'
- with open('help.txt', 'w') as file:
- file.writelines(data)
-
- print(Fore.GREEN + Style.BRIGHT + 'Database update complete.')
-
-def glb_db_download():
- #
- glb_out_of_date = False
-
- # Check local DB versions in help.txt
- while True:
- if os.path.isfile('help.txt'):
- f = open(os.path.join('help.txt'), 'r')
- local_version_glb = f.readline().rstrip()
- f.close()
- break
- else:
- f = open(os.path.join('help.txt'), 'w')
- f.write('111\n')
- f.write('111\n')
- f.close()
-
- # Check what is the current client this may end up being unnecessary
- original_client = config.client
-
- # Set first db to download to global.
- config.client = 'global'
- config.identifier = signup()
- config.access_token, config.secret = signin(config.identifier)
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/client_assets/database'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- 'X-Language': 'en',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/client_assets/database'
- else:
- url = 'http://ishin-production.aktsk.jp/client_assets/database'
-
- r = requests.get(url, allow_redirects=True, headers=headers)
- if local_version_glb != str(r.json()['version']):
- glb_out_of_date = True
- glb_current = r.json()['version']
-
- print(Fore.RED + Style.BRIGHT + 'GLB DB out of date...')
- print(Fore.RED + Style.BRIGHT + 'Downloading...')
- url = r.json()['url']
- r = requests.get(url, allow_redirects=True)
- open('dataenc_glb.db', 'wb').write(r.content)
-
-
-
- # Revert client to original
- config.client = original_client
-
- print(Fore.RED + Style.BRIGHT \
- + 'Decrypting Latest Databases... This can take a few minutes...')
-
- # Calling database decrypt script
- if glb_out_of_date:
- print('Decrypting Global Database')
- decryptor.main()
- with open('help.txt', 'r') as file:
- data = file.readlines()
- data[0] = str(glb_current) + '\n'
- with open('help.txt', 'w') as file:
- file.writelines(data)
-
-
- print(Fore.GREEN + Style.BRIGHT + 'Database update complete.')
-
-def db_download():
- #
- #jp_out_of_date = False
- #JP is broken
- glb_out_of_date = False
-
- # Check local DB versions in help.txt
- while True:
- if os.path.isfile('help.txt'):
- f = open(os.path.join('help.txt'), 'r')
- local_version_glb = f.readline().rstrip()
- local_version_jp = f.readline().rstrip()
- f.close()
- break
- else:
- f = open(os.path.join('help.txt'), 'w')
- f.write('111\n')
- f.write('111\n')
- f.close()
-
- # Check what is the current client this may end up being unnecessary
- original_client = config.client
-
- # Set first db to download to global.
- config.client = 'global'
- config.identifier = signup()
- config.access_token, config.secret = signin(config.identifier)
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/client_assets/database'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- 'X-Language': 'en',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/client_assets/database'
- else:
- url = 'http://ishin-production.aktsk.jp/client_assets/database'
-
- r = requests.get(url, allow_redirects=True, headers=headers)
- if local_version_glb != str(r.json()['version']):
- glb_out_of_date = True
- glb_current = r.json()['version']
-
- print(Fore.RED + Style.BRIGHT + 'GLB DB out of date...')
- print(Fore.RED + Style.BRIGHT + 'Downloading...')
- url = r.json()['url']
- r = requests.get(url, allow_redirects=True)
- open('dataenc_glb.db', 'wb').write(r.content)
-
- # Set second db to download to jp.
- config.client = 'japan'
- config.identifier = signup()
- config.access_token, config.secret = signin(config.identifier)
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/client_assets/database'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- 'X-Language': 'en',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/client_assets/database'
- else:
- url = 'http://ishin-production.aktsk.jp/client_assets/database'
-
- r = requests.get(url, allow_redirects=True, headers=headers)
- if local_version_jp != str(r.json()['version']):
- jp_out_of_date = True
- jp_current = r.json()['version']
-
- print(Fore.RED + Style.BRIGHT + 'JP DB out of date...')
- print(Fore.RED + Style.BRIGHT + 'Downloading...')
- url = r.json()['url']
- r = requests.get(url, allow_redirects=True)
- open('dataenc_jp.db', 'wb').write(r.content)
-
- # Revert client to original
- config.client = original_client
-
- print(Fore.RED + Style.BRIGHT \
- + 'Decrypting Latest Databases... This can take a few minutes...')
-
- # Calling database decrypt script
- if glb_out_of_date:
- print('Decrypting Global Database')
- decryptor.main()
- with open('help.txt', 'r') as file:
- data = file.readlines()
- data[0] = str(glb_current) + '\n'
- with open('help.txt', 'w') as file:
- file.writelines(data)
-
- if jp_out_of_date:
- print('Decrypting JP Database')
- decryptor.main(p='2db857e837e0a81706e86ea66e2d1633')
- with open('help.txt', 'r') as file:
- data = file.readlines()
- data[1] = str(jp_current) + '\n'
- with open('help.txt', 'w') as file:
- file.writelines(data)
-
- print(Fore.GREEN + Style.BRIGHT + 'Database update complete.')
-
-
-####################################################################
-def accept_missions():
- # Accept all remaining missions
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/missions'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////'
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/missions'
- else:
- url = 'http://ishin-production.aktsk.jp/missions'
- r = requests.get(url, headers=headers)
- missions = r.json()
- mission_list = []
- for mission in missions['missions']:
- if mission['completed_at'] != None and mission['accepted_reward_at'] == None:
- mission_list.append(mission['id'])
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/missions/accept'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////'
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/missions/accept'
- else:
- url = 'http://ishin-production.aktsk.jp/missions/accept'
- data = {"mission_ids": mission_list}
- r = requests.post(url, data=json.dumps(data), headers=headers)
- if 'error' not in r.json():
- print(Fore.GREEN + Style.BRIGHT + 'Accepted missions')
-
-
-####################################################################
-def accept_gifts():
- # Gets Gift Ids
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/gifts'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/gifts'
- else:
- url = 'http://ishin-production.aktsk.jp/gifts'
- r = requests.get(url, headers=headers)
-
- gifts = []
- for x in r.json()['gifts']:
- gifts.append(x['id'])
-
- # AcceptGifts
- if len(gifts) == 0:
- print('No gifts to accept...')
- return 0
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/gifts/accept'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/gifts/accept'
- else:
- url = 'http://ishin-production.aktsk.jp/gifts/accept'
-
- chunks = [gifts[x:x + 25] for x in range(0, len(gifts), 25)]
- for data in chunks:
- data = {'gift_ids': data}
- r = requests.post(url, data=json.dumps(data), headers=headers)
- if 'error' not in r.json():
- print(Fore.GREEN + Style.BRIGHT + 'Gifts Accepted...')
- else:
- print(r.json())
-
-
-####################################################################
-def change_supporter():
- # Needs to have translation properly implemented!
-
- ###Get user cards
- print(Fore.CYAN + Style.BRIGHT + 'Fetching user cards...')
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/cards'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/cards'
- else:
- url = 'http://ishin-production.aktsk.jp/cards'
- r = requests.get(url, headers=headers)
- master_cards = r.json()['cards']
- print(Fore.GREEN + Style.BRIGHT + 'Done...')
-
- ###Sort user cards into a list of dictionaries with attributes
- print(Fore.CYAN + Style.BRIGHT + 'Fetching card attributes...')
- card_list = []
- for card in master_cards:
- ###Get card collection object from database
- try:
- config.Model.set_connection_resolver(config.db_glb)
- db_card = config.Cards.find_or_fail(card['card_id'])
- except:
- config.Model.set_connection_resolver(config.db_jp)
- db_card = config.Cards.find_or_fail(card['card_id'])
- # db_card = config.Cards.where('id','=',card['card_id']).first()
-
- ###Get card rarity
- if db_card.rarity == 0:
- rarity = 'N'
- elif db_card.rarity == 1:
- rarity = 'R'
- elif db_card.rarity == 2:
- rarity = 'SR'
- elif db_card.rarity == 3:
- rarity = 'SSR'
- elif db_card.rarity == 4:
- rarity = 'UR'
- elif db_card.rarity == 5:
- rarity = 'LR'
- ###Get card Type
- if str(db_card.element)[-1] == '0':
- type = '[AGL] '
- elif str(db_card.element)[-1] == '1':
- type = '[TEQ] '
- elif str(db_card.element)[-1] == '2':
- type = '[INT] '
- elif str(db_card.element)[-1] == '3':
- type = '[STR] '
- elif str(db_card.element)[-1] == '4':
- type = '[PHY] '
- ###Get card categories list
- categories = []
- # Get category id's given card id
- card_card_categories = config.CardCardCategories.where(
- 'card_id', '=', db_card.id).get()
-
- try:
- for category in card_card_categories:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- categories.append(config.CardCategories.find(
- category.card_category_id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- categories.append(config.CardCategories.find(
- category.card_category_id).name)
- except:
- None
- ###Get card link_skills list
- link_skills = []
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill1_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill1_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill2_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill2_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill3_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill3_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill4_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill4_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill5_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill5_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill6_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill6_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill7_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill7_id).name)
- except:
- None
- except:
- None
-
- dict = {
- 'ID': db_card.id,
- 'Rarity': rarity,
- 'Name': db_card.name,
- 'Type': type,
- 'Cost': db_card.cost,
- 'Hercule': db_card.is_selling_only,
- 'HP': db_card.hp_init,
- 'Categories': categories,
- 'Links': link_skills,
- 'UniqueID': card['id']
- }
- card_list.append(dict)
- print(Fore.GREEN + Style.BRIGHT + "Done...")
-
- ###Sort cards
- print(Fore.CYAN + Style.BRIGHT + "Sorting cards...")
- card_list = sorted(card_list, key=lambda k: k['Name'])
- card_list = sorted(card_list, key=lambda k: k['Rarity'])
- card_list = sorted(card_list, key=lambda k: k['Cost'])
- print(Fore.GREEN + Style.BRIGHT + "Done...")
- ###Define cards to display
- cards_to_display_dicts = []
- cards_to_display = []
- # Take cards in card_list that aren't hercule statues or kais?
- for char in card_list:
- if char['Hercule'] != 1 and char['HP'] > 5:
- cards_to_display_dicts.append(char)
- cards_to_display.append(
- char['Type'] + char['Rarity'] + ' ' + char['Name'] + ' | ' + str(char['ID']) + ' | ' + str(
- char['UniqueID']) + ' | ' ' x '+str(['quantity']))
-
- ###Define links to display
- links_master = []
- config.Model.set_connection_resolver(config.db_jp)
- for link in config.LinkSkills.all():
- links_master.append(link.name)
- try:
- config.Model.set_connection_resolver(config.db_glb)
- links_master.append(config.LinkSkills.find_or_fail(link.id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- links_master.append(config.LinkSkills.find_or_fail(link.id).name)
-
- links_to_display = sorted(links_master)
-
- ###Define categories to display
- categories_master = []
- config.Model.set_connection_resolver(config.db_jp)
- for category in config.CardCategories.all():
- try:
- config.Model.set_connection_resolver(config.db_glb)
- categories_master.append(config.CardCategories.find_or_fail(category.id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- categories_master.append(config.CardCategories.find_or_fail(category.id).name)
-
- categories_to_display = sorted(categories_master)
-
- ###Define window layout
-
- col1 = [[sg.Listbox(values=(cards_to_display), size=(30, 20), key='CARDS')],
- [sg.Listbox(values=([]), size=(30, 6), key='CARDS_CHOSEN')],
- [sg.Button(button_text='Set as Supporter', key='choose_card')]]
-
- col2 = [[sg.Listbox(values=(sorted(categories_to_display)), size=(25, 20), key='CATEGORIES')],
- [sg.Listbox(values=([]), size=(25, 6), key='CATEGORIES_CHOSEN')],
- [sg.Button(button_text='Choose Categories', key='choose_categories'),
- sg.Button(button_text='Clear Categories', key='clear_categories')]]
-
- col3 = [[sg.Listbox(values=(sorted(links_to_display)), size=(25, 20), key='LINKS')],
- [sg.Listbox(values=([]), size=(25, 6), key='LINKS_CHOSEN')],
- [sg.Button(button_text='Choose Links', key='choose_links'),
- sg.Button(button_text='Clear Links', key='clear_links')]]
-
- layout = [[sg.Column(col1), sg.Column(col2), sg.Column(col3)]]
- window = sg.Window('Supporter Update', grab_anywhere=True, keep_on_top=True).Layout(layout)
-
- ###Begin window loop
- chosen_links = []
- chosen_categories = []
-
- ###
- chosen_cards_ids = []
- chosen_cards_unique_ids = []
- chosen_cards_names = []
- chosen_cards_to_display = []
-
- while len(chosen_cards_ids) < 1:
- event, values = window.Read()
-
- if event == None:
- return 0
-
- if event == 'choose_card':
- if len(values['CARDS']) < 1:
- continue
- # Get ID of chosen card to send to bandai
- chosen_line = values['CARDS'][0]
- char_name, char_id, char_unique_id = chosen_line.split(' | ')
- chosen_cards_ids.append(int(char_id))
- chosen_cards_unique_ids.append(int(char_unique_id))
- try:
- config.Model.set_connection_resolver(config.db_glb)
- chosen_cards_names.append(config.Cards.find(char_id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- chosen_cards_names.append(config.Cards.find(char_id).name)
-
- # Chosen cards to display in lower box
- chosen_cards_to_display.append(chosen_line)
-
- if event == 'choose_categories':
- for category in values['CATEGORIES']:
- chosen_categories.append(category)
- categories_to_display.remove(category)
-
- if event == 'clear_categories':
- categories_to_display.extend(chosen_categories)
- chosen_categories[:] = []
- categories_to_display = sorted(categories_to_display)
-
- if event == 'choose_links':
- for link in values['LINKS']:
- chosen_links.append(link)
- links_to_display.remove(link)
-
- if event == 'clear_links':
- links_to_display.extend(chosen_links)
- chosen_links[:] = []
- links_to_display = sorted(links_to_display)
- break
-
- ###Re-populate cards to display, checking filter criteria
- cards_to_display[:] = []
- for char in cards_to_display_dicts:
- if char['Name'] in chosen_cards_names:
- continue
-
- if len(list(set(chosen_links) & set(char['Links']))) != len(chosen_links):
- # print("List intersection")
- continue
-
- if len(list(set(chosen_categories) & set(char['Categories']))) != len(chosen_categories):
- # print("Category intersectino")
- continue
-
- cards_to_display.append(
- char['Type'] + char['Rarity'] + ' ' + char['Name'] + ' | ' + str(char['ID']) + ' | ' + str(
- char['UniqueID']))
-
- ###Update window elements
- window.FindElement('CARDS').Update(values=cards_to_display)
- window.FindElement('CARDS_CHOSEN').Update(values=chosen_cards_to_display)
- window.FindElement('CATEGORIES').Update(values=categories_to_display)
- window.FindElement('CATEGORIES_CHOSEN').Update(values=chosen_categories)
- window.FindElement('LINKS').Update(values=links_to_display)
- window.FindElement('LINKS_CHOSEN').Update(values=chosen_links)
-
- window.Close()
- ###Send selected supporter to bandai
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/support_leaders'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/support_leaders'
- else:
- url = 'http://ishin-production.aktsk.jp/support_leaders'
- # print(chosen_cards_unique_ids)
- data = {'support_leader_ids': chosen_cards_unique_ids}
- # print(data)
- r = requests.put(url, data=json.dumps(data), headers=headers)
- if 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + str(r.json()))
- else:
- # print(r.json())
- print(chosen_cards_names)
- print(Fore.GREEN + Style.BRIGHT + "Supporter updated!")
-
- return 0
-
-
-####################################################################
-def change_team():
- # Needs to have translation properly implemented!
-
- ###Get user deck to change
- chosen_deck = int(input("Enter the deck number you would like to change: "))
-
- ###Get user cards
- print(Fore.CYAN + Style.BRIGHT + 'Fetching user cards...')
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/cards'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/cards'
- else:
- url = 'http://ishin-production.aktsk.jp/cards'
- r = requests.get(url, headers=headers)
- master_cards = r.json()['cards']
- print(Fore.GREEN + Style.BRIGHT + 'Done...')
-
- ###Sort user cards into a list of dictionaries with attributes
- print(Fore.CYAN + Style.BRIGHT + 'Fetching card attributes...')
- card_list = []
- for card in master_cards:
- ###Get card collection object from database
- try:
- config.Model.set_connection_resolver(config.db_glb)
- db_card = config.Cards.find_or_fail(card['card_id'])
- except:
- config.Model.set_connection_resolver(config.db_jp)
- db_card = config.Cards.find_or_fail(card['card_id'])
- # db_card = config.Cards.where('id','=',card['card_id']).first()
-
- ###Get card rarity
- if db_card.rarity == 0:
- rarity = 'N'
- elif db_card.rarity == 1:
- rarity = 'R'
- elif db_card.rarity == 2:
- rarity = 'SR'
- elif db_card.rarity == 3:
- rarity = 'SSR'
- elif db_card.rarity == 4:
- rarity = 'UR'
- elif db_card.rarity == 5:
- rarity = 'LR'
- ###Get card Type
- if str(db_card.element)[-1] == '0':
- type = '[AGL] '
- elif str(db_card.element)[-1] == '1':
- type = '[TEQ] '
- elif str(db_card.element)[-1] == '2':
- type = '[INT] '
- elif str(db_card.element)[-1] == '3':
- type = '[STR] '
- elif str(db_card.element)[-1] == '4':
- type = '[PHY] '
- ###Get card categories list
- categories = []
- # Get category id's given card id
- card_card_categories = config.CardCardCategories.where(
- 'card_id', '=', db_card.id).get()
-
- try:
- for category in card_card_categories:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- categories.append(config.CardCategories.find(
- category.card_category_id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- categories.append(config.CardCategories.find(
- category.card_category_id).name)
- except:
- None
- ###Get card link_skills list
- link_skills = []
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill1_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill1_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill2_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill2_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill3_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill3_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill4_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill4_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill5_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill5_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill6_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill6_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill7_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill7_id).name)
- except:
- None
- except:
- None
-
- dict = {
- 'ID': db_card.id,
- 'Rarity': rarity,
- 'Name': db_card.name,
- 'Type': type,
- 'Cost': db_card.cost,
- 'Hercule': db_card.is_selling_only,
- 'HP': db_card.hp_init,
- 'Categories': categories,
- 'Links': link_skills,
- 'UniqueID': card['id']
- }
- card_list.append(dict)
- print(Fore.GREEN + Style.BRIGHT + "Done...")
-
- ###Sort cards
- print(Fore.CYAN + Style.BRIGHT + "Sorting cards...")
- card_list = sorted(card_list, key=lambda k: k['Name'])
- card_list = sorted(card_list, key=lambda k: k['Rarity'])
- card_list = sorted(card_list, key=lambda k: k['Cost'])
- print(Fore.GREEN + Style.BRIGHT + "Done...")
- ###Define cards to display
- cards_to_display_dicts = []
- cards_to_display = []
- # Take cards in card_list that aren't hercule statues or kais?
- for char in card_list:
- if char['Hercule'] != 1 and char['HP'] > 5:
- cards_to_display_dicts.append(char)
- cards_to_display.append(
- char['Type'] + char['Rarity'] + ' ' + char['Name'] + ' | ' + str(char['ID']) + ' | ' + str(
- char['UniqueID']))
-
- ###Define links to display
- links_master = []
- config.Model.set_connection_resolver(config.db_jp)
- for link in config.LinkSkills.all():
- links_master.append(link.name)
- try:
- config.Model.set_connection_resolver(config.db_glb)
- links_master.append(config.LinkSkills.find_or_fail(link.id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- links_master.append(config.LinkSkills.find_or_fail(link.id).name)
-
- links_to_display = sorted(links_master)
-
- ###Define categories to display
- categories_master = []
- config.Model.set_connection_resolver(config.db_jp)
- for category in config.CardCategories.all():
- try:
- config.Model.set_connection_resolver(config.db_glb)
- categories_master.append(config.CardCategories.find_or_fail(category.id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- categories_master.append(config.CardCategories.find_or_fail(category.id).name)
-
- categories_to_display = sorted(categories_master)
-
- ###Define window layout
-
- col1 = [[sg.Listbox(values=(cards_to_display), size=(30, 20), key='CARDS')],
- [sg.Listbox(values=([]), size=(30, 6), key='CARDS_CHOSEN')],
- [sg.Button(button_text='Choose Card', key='choose_card'),
- sg.Button(button_text='Confirm Team', key='confirm_team')]]
-
- col2 = [[sg.Listbox(values=(sorted(categories_to_display)), size=(25, 20), key='CATEGORIES')],
- [sg.Listbox(values=([]), size=(25, 6), key='CATEGORIES_CHOSEN')],
- [sg.Button(button_text='Choose Categories', key='choose_categories'),
- sg.Button(button_text='Clear Categories', key='clear_categories')]]
-
- col3 = [[sg.Listbox(values=(sorted(links_to_display)), size=(25, 20), key='LINKS')],
- [sg.Listbox(values=([]), size=(25, 6), key='LINKS_CHOSEN')],
- [sg.Button(button_text='Choose Links', key='choose_links'),
- sg.Button(button_text='Clear Links', key='clear_links')]]
-
- layout = [[sg.Column(col1), sg.Column(col2), sg.Column(col3)]]
- window = sg.Window('Deck Update', grab_anywhere=True, keep_on_top=True).Layout(layout)
-
- ###Begin window loop
- chosen_links = []
- chosen_categories = []
-
- ###
- chosen_cards_ids = []
- chosen_cards_unique_ids = []
- chosen_cards_names = []
- chosen_cards_to_display = []
-
- while len(chosen_cards_ids) < 6:
- event, values = window.Read()
-
- if event == None:
- return 0
-
- if event == 'choose_card':
- if len(values['CARDS']) < 1:
- continue
- # Get ID of chosen card to send to bandai
- chosen_line = values['CARDS'][0]
- char_name, char_id, char_unique_id = chosen_line.split(' | ')
- chosen_cards_ids.append(int(char_id))
- chosen_cards_unique_ids.append(int(char_unique_id))
- try:
- config.Model.set_connection_resolver(config.db_glb)
- chosen_cards_names.append(config.Cards.find(char_id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- chosen_cards_names.append(config.Cards.find(char_id).name)
-
- # Chosen cards to display in lower box
- chosen_cards_to_display.append(chosen_line)
-
- if event == 'choose_categories':
- for category in values['CATEGORIES']:
- chosen_categories.append(category)
- categories_to_display.remove(category)
-
- if event == 'clear_categories':
- categories_to_display.extend(chosen_categories)
- chosen_categories[:] = []
- categories_to_display = sorted(categories_to_display)
-
- if event == 'choose_links':
- for link in values['LINKS']:
- chosen_links.append(link)
- links_to_display.remove(link)
-
- if event == 'clear_links':
- links_to_display.extend(chosen_links)
- chosen_links[:] = []
- links_to_display = sorted(links_to_display)
-
- if event == 'confirm_team':
- if len(chosen_cards_unique_ids) < 6:
- if len(chosen_cards_unique_ids) == 0:
- print(Fore.RED + Style.BRIGHT + 'No cards selected.')
- return 0
- loop = 6 - len(chosen_cards_unique_ids)
- for i in range(int(loop)):
- chosen_cards_unique_ids.append('0')
- break
-
- ###Re-populate cards to display, checking filter criteria
- cards_to_display[:] = []
- for char in cards_to_display_dicts:
- if char['Name'] in chosen_cards_names:
- continue
-
- if len(list(set(chosen_links) & set(char['Links']))) != len(chosen_links):
- # print("List intersection")
- continue
-
- if len(list(set(chosen_categories) & set(char['Categories']))) != len(chosen_categories):
- # print("Category intersectino")
- continue
-
- cards_to_display.append(
- char['Type'] + char['Rarity'] + ' ' + char['Name'] + ' | ' + str(char['ID']) + ' | ' + str(
- char['UniqueID']))
-
- ###Update window elements
- window.FindElement('CARDS').Update(values=cards_to_display)
- window.FindElement('CARDS_CHOSEN').Update(values=chosen_cards_to_display)
- window.FindElement('CATEGORIES').Update(values=categories_to_display)
- window.FindElement('CATEGORIES_CHOSEN').Update(values=chosen_categories)
- window.FindElement('LINKS').Update(values=links_to_display)
- window.FindElement('LINKS_CHOSEN').Update(values=chosen_links)
-
- window.Close()
- ###Send selected team to bandai
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/teams'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/teams'
- else:
- url = 'http://ishin-production.aktsk.jp/teams'
- # print(chosen_cards_unique_ids)
- data = {'selected_team_num': 1, 'user_card_teams': [
- {'num': chosen_deck, 'user_card_ids': chosen_cards_unique_ids},
- ]}
- # print(data)
- r = requests.post(url, data=json.dumps(data), headers=headers)
- if 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + str(r.json()))
- else:
- # print(r.json())
- print(chosen_cards_names)
- print(Fore.GREEN + Style.BRIGHT + "Deck updated!")
-
- return 0
-
-
-####################################################################
-def get_kagi_id(stage):
- # return kagi ID to use for a stage
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/eventkagi_items'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/eventkagi_items'
- else:
- url = 'http://ishin-production.aktsk.jp/eventkagi_items'
- r = requests.get(url, headers=headers)
-
- kagi_items = r.json()['eventkagi_items']
- area_id = config.Quests.find(stage).area_id
- area_category = config.Area.find(area_id).category
- areatabs = config.AreaTabs.all()
- for tab in areatabs:
- j = json.loads(tab.area_category_ids)
- if area_category in j['area_category_ids']:
- kagi_id = int(tab.id)
- print('Kagi ID: ' + str(tab.id))
- break
- for kagi in kagi_items:
- if kagi['eventkagi_item_id'] == kagi_id:
- if kagi['quantity'] > 0:
- print('kagi_id' + kagi_id)
- return kagi_id
- else:
- return None
-
- return None
-
-
-####################################################################
-
-def complete_unfinished_quest_stages():
- # ## Will eventually use this to streamline stuff
- # type: (object, object) -> object
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/user_areas'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user_areas'
- else:
- url = 'http://ishin-production.aktsk.jp/user_areas'
- r = requests.get(url, headers=headers)
-
- maps = []
- for user in r.json()['user_areas']:
- for map in user['user_sugoroku_maps']:
- if map['cleared_count'] == 0 and map['sugoroku_map_id'] < 999999 and map['sugoroku_map_id'] > 100:
- maps.append(map)
-
- if len(maps) == 0:
- print("No quests to complete!")
- print('--------------------------------------------')
- return 0
-
- i = 0
- while i == 0:
- # print(maps)
- for map in maps:
- complete_stage(str(map['sugoroku_map_id'])[:-1], str(map['sugoroku_map_id'])[-1])
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/user_areas'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- r = requests.get(url, headers=headers)
- maps_check = []
- # print(r.json())
- for user in r.json()['user_areas']:
- for map in user['user_sugoroku_maps']:
- if map['cleared_count'] == 0 and map['sugoroku_map_id'] < 999999 and map['sugoroku_map_id'] > 100:
- maps_check.append(map)
- if maps_check == maps:
- i = 1
- else:
- maps = maps_check
- refresh_client()
- return 1
-
-
-####################################################################
-def refresh_client():
- config.access_token, config.secret = signin(config.identifier)
- print(Fore.GREEN + Style.BRIGHT + 'Refreshed Token')
-
-
-####################################################################
-def change_name():
- # Changes name associated with account
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/user'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- name = input('What would you like to change your name to?: ')
- user = {'user': {'name': name}}
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user'
- else:
- url = 'http://ishin-production.aktsk.jp/user'
- r = requests.put(url, data=json.dumps(user), headers=headers)
- if 'error' in r.json():
- print(r.json())
- else:
- print("Name changed to: " + name)
-
-
-####################################################################
-def increase_capacity():
- # Increases account card capacity by 5 every time it is called
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/user/capacity/card'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user/capacity/card'
- else:
- url = 'http://ishin-production.aktsk.jp/user/capacity/card'
-
- r = requests.post(url, headers=headers)
- if 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + str(r.json()))
- else:
- print(Fore.GREEN + Style.BRIGHT + 'Card capacity +5')
-
-
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/user'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user'
- else:
- url = 'http://ishin-production.aktsk.jp/user'
- r = requests.get(url, headers=headers)
- current_rank = int(r.json()['user']['rank'])
-
- print('Your current rank is: ' +str(current_rank))
- goal_rank = int(input('What rank would you like to achieve? \n'))
- print('Ok, farming till rank: ' +str(goal_rank))
-
- # just for bugtracking
- # with open('personal.json', 'w') as json_file:
- # json.dump(r.json(), json_file)
-
- levels_to_farm = goal_rank - current_rank
- print(Fore.RED + Style.BRIGHT + 'Levels to farm: ' +str(levels_to_farm))
-
- while int(current_rank) < int(goal_rank):
- #If your current rank is lower than goal rank we gonna farm.
- print('Farming...')
- complete_stage('27003', 2)
- #test:
- #complete_stage('1001', 1)
- r = requests.get(url, headers=headers)
- current_rank = int(r.json()['user']['rank'])
- print('Your current rank is: ' +str(current_rank))
- levels_to_farm = goal_rank - current_rank
- print('Still to go: ' +str(levels_to_farm))
- if goal_rank == current_rank:
- print(Fore.GREEN + Style.BRIGHT + 'Done!')
-
-
-=======
-
-####################################################################
-
-def get_user_info():
- # ## Returns User dictionary and info
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/user'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user'
- else:
- url = 'http://ishin-production.aktsk.jp/user'
- r = requests.get(url, headers=headers)
- user = r.json()
-
- print('Account OS: ' + config.platform.upper())
- print('User ID: ' + str(user['user']['id']))
- print('Stones: ' + str(user['user']['stone']))
- print('Zeni: ' + str(user['user']['zeni']))
- print('Rank: ' + str(user['user']['rank']))
- print('Stamina: ' + str(user['user']['act']))
- print('Name: ' + str(user['user']['name']))
- print('Total Card Capacity: ' + str(user['user']['total_card_capacity']))
-
-
-####################################################################
-def complete_unfinished_events():
- # ## Will eventually use this to streamline stuff
- # type: (object, object) -> object
- ### Get current event IDs
- # ## Gets current events json which contains some useful data
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/events'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/events'
- else:
- url = 'http://ishin-production.aktsk.jp/events'
- r = requests.get(url, headers=headers)
- events = r.json()
- event_ids = []
- for event in events['events']:
- event_ids.append(event['id'])
- event_ids = sorted(event_ids)
- try:
- event_ids.remove(135)
- except:
- None
-
- ### Complete areas if they are in the current ID pool
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/user_areas'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user_areas'
- else:
- url = 'http://ishin-production.aktsk.jp/user_areas'
- r = requests.get(url, headers=headers)
- areas = r.json()['user_areas']
- i = 1
- for area in areas:
- if area['area_id'] in event_ids:
- for stage in area['user_sugoroku_maps']:
- if stage['cleared_count'] == 0:
- complete_stage(str(stage['sugoroku_map_id'])[:-1], str(stage['sugoroku_map_id'])[-1])
- i += 1
- if i % 30 == 0:
- refresh_client()
-
-
-####################################################################
-def complete_clash():
- print('Fetching current clash...')
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/resources/home?rmbattles=true'),
- 'X-Language': 'en',
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/resources/home?rmbattles=true'
- else:
- url = 'http://ishin-production.aktsk.jp/resources/home?rmbattles=true'
- r = requests.get(url, headers=headers)
- clash_id = r.json()['rmbattles']['id']
-
- #### dropout
- print('Resetting clash to beginning...')
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/rmbattles/' + str(clash_id) + '/stages/dropout'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- sign = {
- 'reason': "dropout"
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/rmbattles/' + str(clash_id) + '/stages/dropout'
- else:
- url = 'http://ishin-production.aktsk.jp/rmbattles/' + str(clash_id) + '/stages/dropout'
-
- r = requests.post(url, data=json.dumps(sign), headers=headers)
- print('Reset complete...')
-
- print('Fetching list of stages from Bandai...')
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/rmbattles/' + str(clash_id)),
- 'X-Language': 'en',
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/rmbattles/' + str(clash_id)
- else:
- url = 'http://ishin-production.aktsk.jp/rmbattles/' + str(clash_id)
-
- r = requests.get(url, headers=headers)
-
- available_stages = []
- for area in r.json()['level_stages'].values():
- for stage in area:
- available_stages.append(stage['id'])
- print('Stages obtained...')
- print('Asking Bandai for available cards...')
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/rmbattles/available_user_cards'),
- 'X-Language': 'en',
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/rmbattles/available_user_cards'
- else:
- url = 'http://ishin-production.aktsk.jp/rmbattles/available_user_cards'
-
- r = requests.get(url, headers=headers)
- print('Cards received...')
- available_user_cards = []
- # print(r.json())
- for card in r.json():
- available_user_cards.append(card)
- available_user_cards = available_user_cards[:99]
-
- if len(available_user_cards) == 0:
- print(Fore.RED + Style.BRIGHT + "Not enough cards to complete Battlefield with!")
- return 0
-
- is_beginning = True
- # print(available_stages)
- print('Sending Bandai full team...')
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/rmbattles/teams/1'),
- 'X-Language': 'en',
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- data = {'user_card_ids': available_user_cards}
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/rmbattles/teams/1'
- else:
- url = 'http://ishin-production.aktsk.jp/rmbattles/teams/1'
-
- r = requests.put(url, data=json.dumps(data), headers=headers)
- print('Sent!')
- print('')
- print('Commencing Ultimate Clash!')
- print('----------------------------')
- for stage in available_stages:
- leader = available_user_cards[0]
- members = available_user_cards[1]
- sub_leader = available_user_cards[2]
-
- sign = {
- 'is_beginning': is_beginning,
- 'user_card_ids': {
- 'leader': leader,
- 'members': members,
- 'sub_leader': sub_leader
- }
- }
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/rmbattles/' + str(clash_id) + '/stages/' + str(stage) + '/start'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/rmbattles/' + str(clash_id) + '/stages/' + str(stage) + '/start'
- else:
- url = 'http://ishin-production.aktsk.jp/rmbattles/' + str(clash_id) + '/stages/' + str(stage) + '/start'
-
- r = requests.post(url, data=json.dumps(sign), headers=headers)
- print('Commencing Stage ' + Fore.YELLOW + str(stage))
-
- is_beginning = False
-
- ###Second request
- finish_time = int(round(time.time(), 0) + 2000)
- start_time = finish_time - randint(40000000, 50000000)
- if 'sign' in r.json():
- dec_sign = packet.decrypt_sign(r.json()['sign'])
- enemy_hp = 0
- try:
- for enemy in dec_sign['enemies']:
- enemy_hp += enemy[0]['hp']
- except:
- print('nah')
-
- sign = {
- 'damage': enemy_hp,
- 'finished_at_ms': finish_time,
- 'finished_reason': 'win',
- 'is_cleared': True,
- 'remaining_hp': 0,
- 'round': 0,
- 'started_at_ms': start_time,
- 'token': dec_sign['token']
- }
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/rmbattles/' + str(clash_id) + '/stages/finish'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/rmbattles/' + str(clash_id) + '/stages/finish'
- else:
- url = 'http://ishin-production.aktsk.jp/rmbattles/' + str(clash_id) + '/stages/finish'
-
- r = requests.post(url, data=json.dumps(sign), headers=headers)
- print('Completed Stage ' + Fore.YELLOW + str(stage))
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/rmbattles/teams/1'),
- 'X-Language': 'en',
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/rmbattles/teams/1'
- else:
- url = 'http://ishin-production.aktsk.jp/rmbattles/teams/1'
-
- r = requests.get(url, headers=headers)
- print('----------------------------')
- if 'sortiable_user_card_ids' not in r.json():
- return 0
- available_user_cards = r.json()['sortiable_user_card_ids']
-
-
-####################################################################
-def complete_area(area_id):
- # completes all stages and difficulties of a given area.
- # JP Translated
-
- # Check if GLB database has id, if not try JP DB.
- if config.client == 'global':
- config.Model.set_connection_resolver(config.db_glb)
- quests = config.Quests.where('area_id', '=', area_id).get()
- else:
- config.Model.set_connection_resolver(config.db_jp)
- quests = config.Quests.where('area_id', '=', area_id).get()
-
- total = 0
- for quest in quests:
- config.Model.set_connection_resolver(config.db_jp)
- sugorokus = config.Sugoroku.where('quest_id', '=', quest.id).get()
- total += len(sugorokus)
- i = 1
- for quest in quests:
- config.Model.set_connection_resolver(config.db_jp)
- sugorokus = config.Sugoroku.where('quest_id', '=', quest.id).get()
- difficulties = []
- for sugoroku in sugorokus:
- print('Completion of area: ' + str(i) + '/' + str(total))
- complete_stage(str(quest.id), sugoroku.difficulty)
- i += 1
-
-
-####################################################################
-def save_account():
- if not os.path.isdir("Saves"):
- try:
- os.mkdir('Saves')
- os.mkdir('Saves/ios')
- os.mkdir('Saves/android')
- os.mkdir('Saves/Jp')
- os.mkdir('Saves/Jp/ios')
- os.mkdir('Saves/Jp/android')
- os.mkdir('Saves/fresh')
- os.mkdir('Saves/fresh/ios')
- os.mkdir('Saves/fresh/android')
- except:
- print(Fore.RED + Style.BRIGHT + 'Unable to create saves file')
- return 0
-
- valid_save = False
- while valid_save == False:
- save_name = input("What would you like to name the file?")
- while save_name.isalnum() == 0:
- print(Fore.RED + Style.BRIGHT + "Name not allowed!")
- save_name = input('What would you like to name this save?: ')
- if os.path.exists('Saves' + os.sep + config.platform + os.sep + save_name + ".txt"):
- print(Fore.RED + Style.BRIGHT + "File by that name already exists.")
- else:
- try:
- f = open(os.path.join('Saves' + os.sep + config.platform + os.sep + save_name + ".txt"), 'w')
- f.write(str(config.identifier) + '\n')
- f.write(str(config.AdId) + '\n')
- f.write(str(config.UniqueId) + '\n')
- f.write(str(config.platform) + '\n')
- f.write(str(config.client) + '\n')
- f.close()
- print('--------------------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Written details to file: ' + save_name)
- print(Fore.RED + Style.BRIGHT + 'If ' + save_name + ' is deleted your account will be lost!')
- print('--------------------------------------------')
- break
- except Exception as e:
- print(e)
-
-
-####################################################################
-def load_account():
- while 1 == 1:
- print(
- 'Choose your operating system (' + Fore.YELLOW + Style.BRIGHT + 'Android: 1' + Style.RESET_ALL + ' or' + Fore.YELLOW + Style.BRIGHT + ' IOS: 2' + Style.RESET_ALL + ')',end='')
- platform = input('')
- if platform[0].lower() in ['1', '2']:
- if platform[0].lower() == '1':
- config.platform = 'android'
- else:
- config.platform = 'ios'
- break
- else:
- print(Fore.RED + 'Could not identify correct operating system to use.')
-
- while 1 == 1:
- save_name = input("What save would you like to load?: ")
- if os.path.isfile('Saves' + os.sep + config.platform + os.sep + save_name + ".txt"):
- try:
- f = open(os.path.join('Saves', config.platform, save_name + ".txt"), 'r')
- config.identifier = f.readline().rstrip()
- config.AdId = f.readline().rstrip()
- config.UniqueId = f.readline().rstrip()
- config.platform = f.readline().rstrip()
- client = f.readline().rstrip()
- if config.client == client:
- break
- else:
- print(Fore.RED + Style.BRIGHT + 'Save does not match client version.')
-
- except Exception as e:
- print(e)
-
- else:
- print(Fore.RED + Style.BRIGHT + "Could not find " + save_name)
- refresh_client()
-
-
-####################################################################
-
-def daily_login():
- # ## Accepts Outstanding Login Bonuses
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET',
- '/resources/home?apologies=true&banners=true&bonus_schedules=true&budokai=true&comeback_campaigns=true&gifts=true&login_bonuses=true&rmbattles=true'),
- 'X-Language': 'en',
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/resources/home?apologies=true&banners=true&bonus_schedules=true&budokai=true&comeback_campaigns=true&gifts=true&login_bonuses=true&rmbattles=true'
- else:
- url = 'http://ishin-production.aktsk.jp/resources/home?apologies=true&banners=true&bonus_schedules=true&budokai=true&comeback_campaigns=true&gifts=true&login_bonuses=true&rmbattles=true'
- r = requests.get(url, headers=headers)
- if 'error' in r.json():
- print(r.json())
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/login_bonuses/accept'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/login_bonuses/accept'
- else:
- url = 'http://ishin-production.aktsk.jp/login_bonuses/accept'
-
- r = requests.post(url, headers=headers)
- if 'error' in r.json():
- print(r.json())
-
-
-####################################################################
-def dragonballs():
- is_got = 0
- ###Check for Dragonballs
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/dragonball_sets'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////'
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/dragonball_sets'
- else:
- url = 'http://ishin-production.aktsk.jp/dragonball_sets'
- r = requests.get(url, headers=headers)
- if 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + str(r.json()))
- return 0
-
- ####Determine which dragonball set is being used
- set = r.json()['dragonball_sets'][0]['id']
-
- ### Complete stages and count dragonballs
- for dragonball in r.json()['dragonball_sets']:
- for db in reversed(dragonball['dragonballs']):
- if db['is_got'] == True:
- is_got += 1
- elif db['is_got'] == False:
- is_got += 1
- complete_stage(str(db['quest_id']), db['difficulties'][0])
-
- ### If all dragonballs found then wish
- if is_got == 7:
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/dragonball_sets/' + str(set) + '/wishes'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////'
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/dragonball_sets/' + str(set) + '/wishes'
- else:
- url = 'http://ishin-production.aktsk.jp/dragonball_sets/' + str(set) + '/wishes'
-
- r = requests.get(url, headers=headers)
- if 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + str(r.json()))
- return 0
- wish_ids = []
- for wish in r.json()['dragonball_wishes']:
- if wish['is_wishable']:
- print('#########################')
- print('Wish ID: ' + str(wish['id']))
- wish_ids.append(str(wish['id']))
- print(wish['title'])
- print(wish['description'])
- print('')
-
- print(Fore.YELLOW + 'What wish would you like to ask shenron for? ID: ', end='')
- choice = input()
- while choice not in wish_ids:
- print("Shenron did not understand you! ID: ", end='')
- choice = input()
- wish_ids[:] = []
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/dragonball_sets/' + str(set) + '/wishes'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/dragonball_sets/' + str(set) + '/wishes'
- else:
- url = 'http://ishin-production.aktsk.jp/dragonball_sets/' + str(set) + '/wishes'
- data = {'dragonball_wish_ids': [int(choice)]}
- r = requests.post(url, data=json.dumps(data), headers=headers)
- if 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + str(r.json()))
- else:
- print(Fore.YELLOW + 'Wish granted!')
- print('')
-
- dragonballs()
-
- return 0
-
-
-####################################################################
-def transfer_account():
- # Determine correct platform to use
- set_platform()
-
- transfercode = input('Enter your transfer code: ')
-
- config.AdId = packet.guid()['AdId']
- config.UniqueId = packet.guid()['UniqueId']
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- data = {'eternal': True, 'old_user_id': '', 'user_account': {
- 'device': 'samsung',
- 'device_model': 'SM-G930V',
- 'os_version': '6.0',
- 'platform': config.platform,
- 'unique_id': config.UniqueId,
- }}
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/auth/link_codes/' \
- + str(transfercode)
- else:
- url = 'http://ishin-production.aktsk.jp/auth/link_codes/' \
- + str(transfercode)
- print('URL: ' + url)
- r = requests.put(url, data=json.dumps(data), headers=headers)
- if 'error' in r.json():
- print(r.json())
- print(base64.b64decode(r.json()['identifiers']).decode('utf-8'))
- config.identifier = base64.b64decode(r.json()['identifiers']).decode('utf-8')
-
- save_account()
- refresh_client()
-
-
-####################################################################
-def user_command_executor(command):
- if ',' in command:
- command = command.replace(" ", "")
- command = command.replace(",", "\n")
- s = io.StringIO(command + '\n')
- sys.stdin = s
- command = input()
-
- if command == 'help':
- print('---------------------------------')
- print(' ')
- print(Style.BRIGHT + Fore.YELLOW + '\'stage\'' + Style.RESET_ALL + ' | Completes stage given ID or name.')
- print(Style.BRIGHT + Fore.YELLOW + '\'gt\'' + Style.RESET_ALL + ' | Gt DragonBalls.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'area\'' + Style.RESET_ALL + ' | Complete all stages and difficulties in an area.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'cards\'' + Style.RESET_ALL + ' | Provides a GUI to view card information.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'completequests\'' + Style.RESET_ALL + ' | Completes all unfinished quest stages.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'completeevents\'' + Style.RESET_ALL + ' | Completes all unfinished event stages.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'dokkan\'' + Style.RESET_ALL + ' | Completes all event stages, regardless of being finished beforehand.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'potara\'' + Style.RESET_ALL + ' | Provides a series of prompts to collect Potara medals.')
- print(Style.BRIGHT + Fore.YELLOW + '\'bossrush\'' + Style.RESET_ALL + ' | Completes all bossrush stages.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'hercule\'' + Style.RESET_ALL + ' | Completes all Hercule Punch Machine stages.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'completezbattles\'' + Style.RESET_ALL + ' | Completes all unfinished zbattles to stage 30.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'zstages\'' + Style.RESET_ALL + ' | Provides a GUI to complete single Z-Battle stages.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'clash\'' + Style.RESET_ALL + ' | Complete ultimate clash if you have enough UR cards.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'listevents\'' + Style.RESET_ALL + ' | Prints a list of all currently available events.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'summon\'' + Style.RESET_ALL + ' | Provides a GUI to choose what banner to summon.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'listsummons\'' + Style.RESET_ALL + ' | Prints a list of all currently available summons.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'dragonballs\'' + Style.RESET_ALL + ' | Collects Dragonballs and makes wishes.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'omegafarm\'' + Style.RESET_ALL + ' | Completes everything (story, events, zbattle)')
- print(Style.BRIGHT + Fore.YELLOW + '\'info\'' + Style.RESET_ALL + ' | Print out account information.')
- print(Style.BRIGHT + Fore.YELLOW + '\'items\'' + Style.RESET_ALL + ' | Provides a GUI to view user items.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'medals\'' + Style.RESET_ALL + ' | Provides a GUI to view and sell medals.')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'sbr or nbsr\'' + Style.RESET_ALL + ' | sbr)')
- print(
- Style.BRIGHT + Fore.YELLOW + '\'rankup\'' + Style.RESET_ALL + ' | Levels character)')
- print(Style.BRIGHT + Fore.YELLOW + '\'sell\'' + Style.RESET_ALL + ' | Provides a GUI to sell cards.')
- print(Style.BRIGHT + Fore.YELLOW + '\'team\'' + Style.RESET_ALL + ' | Change composition of a deck.')
- print(Style.BRIGHT + Fore.YELLOW + '\'supporter\'' + Style.RESET_ALL + ' | Change your support unit.')
- print(Style.BRIGHT + Fore.YELLOW + '\'deck\'' + Style.RESET_ALL + ' | Select a deck to be the default.')
- print(Style.BRIGHT + Fore.YELLOW + '\'gift\'' + Style.RESET_ALL + ' | Accepts gifts and missions.')
- print(Style.BRIGHT + Fore.YELLOW + '\'transfer\'' + Style.RESET_ALL + ' | Generates User ID and Transfer Code.')
- print(Style.BRIGHT + Fore.YELLOW + '\'capacity\'' + Style.RESET_ALL + ' | Increase card capacity by +5.')
- print(Style.BRIGHT + Fore.YELLOW + '\'name\'' + Style.RESET_ALL + ' | Change account name.')
- print(Style.BRIGHT + Fore.YELLOW + '\'key\'' + Style.RESET_ALL + ' | Kagi stages.')
- print(Style.BRIGHT + Fore.YELLOW + '\'Farm\'' + Style.RESET_ALL + ' | LR medals.')
- print(Style.BRIGHT + Fore.YELLOW + '\'fu\'' + Style.RESET_ALL + ' | 40 ur medals.')
- print(Style.BRIGHT + Fore.YELLOW + '\'TF\'' + Style.RESET_ALL + ' | Treasure Farm.')
- print(Style.BRIGHT + Fore.YELLOW + '\'refresh\'' + Style.RESET_ALL + ' | Reauthenticates the client.')
- elif command == 'TF':
- TF()
- elif command == 'tf':
- TF()
- elif command == 'stage':
- stage = input('What stage would you like to complete?: ')
- difficulty = input('Enter the difficulty|(0:Easy, 1:Hard etc...): ')
- loop = input('Enter how many times to execute: ')
- for i in range(int(loop)):
- complete_stage(stage, difficulty)
- elif command == 'area':
- area = input('Enter the area to complete: ')
- loop = input('How many times to complete the entire area: ')
- for i in range(int(loop)):
- complete_area(area)
- elif command == 'gift':
- accept_gifts()
- accept_missions()
- elif command == 'omegafarm':
- complete_unfinished_quest_stages()
- refresh_client()
- complete_unfinished_events()
- complete_unfinished_zbattles()
- complete_clash()
- accept_gifts()
- accept_missions()
- refresh_client()
- ## When this will get updated, we shall add :finishzbattle,30, + sell + sellhercule + baba(?)
- elif command == 'completequests':
- complete_unfinished_quest_stages()
- elif command == 'completeevents':
- complete_unfinished_events()
- elif command == 'completezbattles':
- complete_unfinished_zbattles()
- elif command == 'zstages':
- complete_zbattle_stage()
- elif command == 'clash':
- complete_clash()
- elif command == 'daily':
- complete_stage('130001', 0)
- complete_stage('131001', 0)
- complete_stage('132001', 0)
- complete_potential()
- accept_gifts()
- accept_missions()
- elif command == 'listevents':
- list_events()
- elif command == 'summon':
- summon()
- elif command == 'listsummons':
- list_summons()
- elif command == 'dragonballs':
- dragonballs()
- elif command == 'info':
- get_user_info()
- elif command == 'items':
- items_viewer()
- elif command == 'medals':
- sell_medals()
- elif command == 'sell':
- sell_cards__bulk_GUI()
- elif command == 'cards':
- list_cards()
- elif command == 'supporter':
- change_supporter()
- elif command == 'team':
- change_team()
- elif command == 'farm':
- lr_farm()
- elif command == 'fu':
- ur_farm()
- elif command == 'deck':
- config.deck = int(input('Enter a deck number to use: '))
- elif command == 'transfer':
- new_transfer()
- elif command == 'capacity':
- valid = False
- while not valid:
- try:
- increase_times = int(input("How many times do you want to increase the capacity? (+5 per time): "))
- valid = True
- except ValueError:
- print("That's not a valid number.")
- # Checking if you have enough Dragon Stones
- if increase_times > get_user()['user']['stone']:
- print("You don't have enough Dragon Stones.")
- pass
- # Increasing the capacity
- else:
- for _ in range(increase_times):
- increase_capacity()
- increase_capacity()
- elif command == 'name':
- change_name()
- elif command == 'dokkan':
- dokkan()
- elif command == 'supporter':
- change_supporter()
- elif command == 'sbr':
- complete_sbr()
- elif command == 'bossrush':
- complete_stage('701001', 3)
- complete_stage('701001', 4)
- complete_stage('701002', 4)
- complete_stage('701002', 5)
- complete_stage('701003', 5)
- complete_stage('701004', 5)
- complete_stage('701005', 5)
- complete_stage('701006', 5)
- complete_stage('701007', 5)
- complete_stage('701008', 5)
- if config.client == "japan":
- complete_stage('701007', 5)
- complete_stage('701008', 5)
- accept_missions()
- elif command == 'potara':
- potara()
- elif command == 'hercule':
- complete_stage('711001', 1)
- complete_stage('711002', 1)
- complete_stage('711003', 1)
- complete_stage('711004', 1)
- complete_stage('711005', 1)
- complete_stage('711006', 1)
- complete_potential()
- accept_gifts()
- accept_missions()
- elif command == 'rankup':
- rankup()
- elif command == 'gt':
- Gt()
- elif command == 'key':
- get_kagi()
- elif command == 'limit':
- limit_stage()
- elif command == 'refresh':
- refresh_client()
- else:
- print('Command not found.')
-
-
-####################################################################
-def complete_unfinished_zbattles(kagi=False):
- # JP Translated
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/events'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/events'
- else:
- url = 'http://ishin-production.aktsk.jp/events'
- r = requests.get(url, headers=headers)
- events = r.json()
- try:
- for event in events['z_battle_stages']:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- x = config.ZBattles.where('z_battle_stage_id', '=', event['id']).first().enemy_name
- except:
- config.Model.set_connection_resolver(config.db_jp)
- print(config.ZBattles.where('z_battle_stage_id', '=', event['id']).first().enemy_name, end='')
- print(Fore.CYAN + Style.BRIGHT + ' | ID: ' + str(event['id']))
-
- # Get current zbattle level
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/user_areas'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user_areas'
- else:
- url = 'http://ishin-production.aktsk.jp/user_areas'
- r = requests.get(url, headers=headers)
- if 'user_z_battles' in r.json():
- zbattles = r.json()['user_z_battles']
- if zbattles == []:
- zbattles = 0
- else:
- zbattles = 0
-
- level = 1
- for zbattle in zbattles:
- if int(zbattle['z_battle_stage_id']) == int(event['id']):
- level = zbattle['max_clear_level'] + 1
- print('Current EZA Level: ' + str(level))
-
- # Stop at level 30 !! This may not work for all zbattle e.g kid gohan
- while level < 31:
- ##Get supporters
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/z_battles/' + str(event['id']) + '/supporters'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/z_battles/' + str(event['id']) + '/supporters'
- else:
- url = 'http://ishin-production.aktsk.jp/z_battles/' + str(event['id']) + '/supporters'
- r = requests.get(url, headers=headers)
- if 'supporters' in r.json():
- supporter = r.json()['supporters'][0]['id']
- elif 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + r.json())
- return 0
- else:
- print(Fore.RED + Style.BRIGHT + 'Problem with ZBattle')
- print(r.raw())
- return 0
-
- ###Send first request
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/z_battles/' + str(event['id']) + '/start'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
-
- if kagi == True:
- sign = json.dumps({
- 'friend_id': supporter,
- 'level': level,
- 'selected_team_num': config.deck,
- 'eventkagi_item_id': 5
- })
- else:
- sign = json.dumps({
- 'friend_id': supporter,
- 'level': level,
- 'selected_team_num': config.deck,
- })
-
- enc_sign = packet.encrypt_sign(sign)
- data = {'sign': enc_sign}
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/z_battles/' + str(event['id']) + '/start'
- else:
- url = 'http://ishin-production.aktsk.jp/z_battles/' + str(event['id']) + '/start'
- r = requests.post(url, data=json.dumps(data), headers=headers)
-
- if 'sign' in r.json():
- dec_sign = packet.decrypt_sign(r.json()['sign'])
- # Check if error was due to lack of stamina
- elif 'error' in r.json():
- if r.json()['error']['code'] == 'act_is_not_enough':
- # Check if allowed to refill stamina
- if config.allow_stamina_refill == True:
- refill_stamina()
- r = requests.post(url, data=json.dumps(data),
- headers=headers)
- else:
- print(r.json())
- return 0
- else:
- print(Fore.RED + Style.BRIGHT + 'Problem with ZBattle')
- print(r.raw())
- return 0
-
- finish_time = int(round(time.time(), 0) + 2000)
- start_time = finish_time - randint(6200000, 8200000)
-
- data = {
- 'elapsed_time': finish_time - start_time,
- 'is_cleared': True,
- 'level': level,
- 's': 'rGAX18h84InCwFGbd/4zr1FvDNKfmo/TJ02pd6onclk=',
- 't': 'eyJzdW1tYXJ5Ijp7ImVuZW15X2F0dGFjayI6MTAwMzg2LCJlbmVteV9hdHRhY2tfY291bnQiOjUsImVuZW15X2hlYWxfY291bnRzIjpbMF0sImVuZW15X2hlYWxzIjpbMF0sImVuZW15X21heF9hdHRhY2siOjEwMDAwMCwiZW5lbXlfbWluX2F0dGFjayI6NTAwMDAsInBsYXllcl9hdHRhY2tfY291bnRzIjpbMTBdLCJwbGF5ZXJfYXR0YWNrcyI6WzMwNjYwNTJdLCJwbGF5ZXJfaGVhbCI6MCwicGxheWVyX2hlYWxfY291bnQiOjAsInBsYXllcl9tYXhfYXR0YWNrcyI6WzEyMzY4NTBdLCJwbGF5ZXJfbWluX2F0dGFja3MiOls0NzcxOThdLCJ0eXBlIjoic3VtbWFyeSJ9fQ==',
- 'token': dec_sign['token'],
- 'used_items': [],
- 'z_battle_finished_at_ms': finish_time,
- 'z_battle_started_at_ms': start_time,
- }
- # enc_sign = encrypt_sign(sign)
-
- headers = {
- 'User-Agent': 'Android',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/z_battles/' + str(event['id']) + '/finish'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/z_battles/' + str(event['id']) + '/finish'
- else:
- url = 'http://ishin-production.aktsk.jp/z_battles/' + str(event['id']) + '/finish'
-
- r = requests.post(url, data=json.dumps(data), headers=headers)
- dec_sign = packet.decrypt_sign(r.json()['sign'])
- # ## Print out Items from Database
- print('Level: ' + str(level))
- # ## Print out Items from Database
- if 'items' in dec_sign:
- supportitems = []
- awakeningitems = []
- trainingitems = []
- potentialitems = []
- treasureitems = []
- carditems = []
- trainingfields = []
- stones = 0
- supportitemsset = set()
- awakeningitemsset = set()
- trainingitemsset = set()
- potentialitemsset = set()
- treasureitemsset = set()
- carditemsset = set()
- trainingfieldsset = set()
- print('Items:')
- print('-------------------------')
- if 'quest_clear_rewards' in dec_sign:
- for x in dec_sign['quest_clear_rewards']:
- if x['item_type'] == 'Point::Stone':
- stones += x['amount']
- for x in dec_sign['items']:
- if x['item_type'] == 'SupportItem':
-
- # print('' + SupportItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- supportitems.append(x['item_id'])
- supportitemsset.add(x['item_id'])
- elif x['item_type'] == 'PotentialItem':
-
- # print('' + PotentialItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- potentialitems.append(x['item_id'])
- potentialitemsset.add(x['item_id'])
- elif x['item_type'] == 'TrainingItem':
-
- # print('' + TrainingItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- trainingitems.append(x['item_id'])
- trainingitemsset.add(x['item_id'])
- elif x['item_type'] == 'AwakeningItem':
-
- # print('' + AwakeningItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- awakeningitems.append(x['item_id'])
- awakeningitemsset.add(x['item_id'])
- elif x['item_type'] == 'TreasureItem':
-
- # print('' + TreasureItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- treasureitems.append(x['item_id'])
- treasureitemsset.add(x['item_id'])
- elif x['item_type'] == 'Card':
-
- # card = Cards.find(x['item_id'])
-
- carditems.append(x['item_id'])
- carditemsset.add(x['item_id'])
- elif x['item_type'] == 'Point::Stone':
-
- # print('' + card.name + '['+rarity+']'+ ' x '+str(x['quantity']))
- # print('' + TreasureItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- stones += 1
- elif x['item_type'] == 'TrainingField':
-
- # card = Cards.find(x['item_id'])
-
- for i in range(x['quantity']):
- trainingfields.append(x['item_id'])
- trainingfieldsset.add(x['item_id'])
- else:
- print(x['item_type'])
-
- # Print items
- for x in supportitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.SupportItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.CYAN + Style.BRIGHT + config.SupportItems.find(x).name + ' x' \
- + str(supportitems.count(x)))
- for x in awakeningitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.AwakeningItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.MAGENTA + Style.BRIGHT + config.AwakeningItems.find(x).name + ' x' \
- + str(awakeningitems.count(x)))
- for x in trainingitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.TrainingItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.RED + Style.BRIGHT + config.TrainingItems.find(x).name + ' x' \
- + str(trainingitems.count(x)))
- for x in potentialitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.PotentialItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(config.PotentialItems.find_or_fail(x).name + ' x' \
- + str(potentialitems.count(x)))
- for x in treasureitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.TreasureItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.GREEN + Style.BRIGHT + config.TreasureItems.find(x).name + ' x' \
- + str(treasureitems.count(x)))
- for x in trainingfieldsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.TrainingFields.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(config.TrainingFields.find(x).name + ' x' \
- + str(trainingfields.count(x)))
- for x in carditemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.Cards.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(config.Cards.find(x).name + ' x' + str(carditems.count(x)))
- print(Fore.YELLOW + Style.BRIGHT + 'Stones x' + str(stones))
- if 'gasha_point' in dec_sign:
- print('Friend Points: ' + str(dec_sign['gasha_point']))
-
- print('--------------------------')
- print('##############################################')
- level += 1
- refresh_client()
-
- except Exception as e:
- print(Fore.RED + Style.BRIGHT + str(e))
- print(Fore.RED + Style.BRIGHT + 'Trouble finding new Z-Battle events')
-
-
-####################################################################
-def set_platform():
- while True:
- print(
- 'Choose your operating system (' + Fore.YELLOW + Style.BRIGHT + 'Android: 1' + Style.RESET_ALL + ' or' + Fore.YELLOW + Style.BRIGHT + ' IOS: 2' + Style.RESET_ALL + ') ',end='')
- platform = input('')
- if platform[0].lower() in ['1', '2']:
- if platform[0].lower() == '1':
- config.platform = 'android'
- else:
- config.platform = 'ios'
- break
- else:
- print(Fore.RED + Style.BRIGHT + 'Could not identify correct operating system to use.')
-
-
-####################################################################
-def list_events():
- # Prints all currently available events
- # JP Translated
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/events'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/events'
- else:
- url = 'http://ishin-production.aktsk.jp/events'
- r = requests.get(url, headers=headers)
- events = r.json()
-
- area_id = None
- for event in events['events']:
- for quest in event['quests']:
- if str(event['id']) != area_id:
- area_id = str(event['id'])
- try:
- config.Model.set_connection_resolver(config.db_glb)
- area_name = str(config.Area.where('id', '=', area_id).first().name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- area_name = str(config.Area.where('id', '=', area_id).first().name)
- print('--------------------------------------------')
- print(Back.BLUE + Fore.WHITE + Style.BRIGHT \
- + area_name)
- print('--------------------------------------------')
-
- ids = quest['id']
- config.Model.set_connection_resolver(config.db_glb)
- sugorokus = config.Sugoroku.where('quest_id', '=', int(ids)).get()
- if len(sugorokus) < 1:
- config.Model.set_connection_resolver(config.db_jp)
- sugorokus = config.Sugoroku.where('quest_id', '=', int(ids)).get()
- difficulties = []
- for sugoroku in sugorokus:
- difficulties.append(sugoroku.difficulty)
- print(config.Quests.find(ids).name + ' ' + str(ids) \
- + ' Difficulties: ' + str(difficulties) \
- + ' AreaID: ' + str(event['id']))
-
-
-####################################################################
-def event_viewer():
- # Event GUI with options to complete stage.
- # JP Translation needs work
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/events'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/events'
- else:
- url = 'http://ishin-production.aktsk.jp/events'
- r = requests.get(url, headers=headers)
- events = r.json()
-
- # Build areas list
- areas_to_display = []
- stage_ids = []
- areas = {}
-
- for event in events['events']:
- area_id = str(event['id'])
- try:
- config.Model.set_connection_resolver(config.db_glb)
- area_name = area_id + ' | ' + str(config.Area.where('id', '=', area_id).first()+ config.Quests('name'))
- except:
- config.Model.set_connection_resolver(config.db_jp)
- area_name = area_id + ' | ' + str(config.Area.where('id', '=', area_id).first()+ config.Quests('name'))
- areas_to_display.append(area_name)
- stage_ids[:] = []
- for quest in event['quests']:
- stage_ids.append(quest['id'])
- areas[area_id] = stage_ids[:]
-
- stages_to_display = []
- difficulties = [0]
- stage_name = ''
-
- col1 = [[sg.Listbox(values=(sorted(areas_to_display)), change_submits=True, size=(30, 20), key='AREAS')]]
- col2 = [[sg.Listbox(values=(sorted(stages_to_display)), change_submits=True, size=(30, 20), key='STAGES')]]
- col3 = [[sg.Text('Name', key='STAGE_NAME', size=(30, 2))],
- [sg.Text('Difficulty: '), sg.Combo(difficulties, key='DIFFICULTIES', size=(6, 3), readonly=True)],
- [sg.Text('How many times to complete:')
- , sg.Spin([i for i in range(1, 999)], key='LOOP', initial_value=1, size=(3, 3))],
- [sg.Button(button_text='Complete Stage', key='COMPLETE_STAGE')]]
-
- layout = [[sg.Column(col1), sg.Column(col2), sg.Column(col3)]]
- window = sg.Window('Event Viewer').Layout(layout)
-
- while True:
- event, values = window.Read()
- if event == None:
- return 0
-
- if event == 'AREAS' and len(values['AREAS']) > 0:
- stages_to_display[:] = []
- # Check if GLB database has id, if not try JP DB.
- area_id = values['AREAS'][0].split(' | ')[0]
-
- for stage_id in areas[area_id]:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- stage_name = config.Quests.find_or_fail(stage_id).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
- stage_name = config.Quests.find_or_fail(stage_id).name
- stages_to_display.append(stage_name + ' | ' + str(stage_id))
-
- if event == 'STAGES' and len(values['STAGES']) > 0:
- difficulties[:] = []
- stage_id = values['STAGES'][0].split(' | ')[1]
- stage_name = values['STAGES'][0].split(' | ')[0]
- sugorokus = config.Sugoroku.where('quest_id', '=', str(stage_id)).get()
- difficulties = []
- for sugoroku in sugorokus:
- difficulties.append(str(sugoroku.difficulty))
- window.FindElement('DIFFICULTIES').Update(values=difficulties)
- window.FindElement('STAGE_NAME').Update(stage_name)
-
- if event == 'COMPLETE_STAGE' and stage_name != '':
- window.Hide()
- window.Refresh()
- for i in range(int(values['LOOP'])):
- complete_stage(stage_id, values['DIFFICULTIES'])
- window.UnHide()
- window.Refresh()
-
- window.FindElement('STAGES').Update(values=stages_to_display)
-
-
-####################################################################
-def complete_potential():
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/events'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/events'
- else:
- url = 'http://ishin-production.aktsk.jp/events'
- r = requests.get(url, headers=headers)
- events = r.json()
- for event in events['events']:
- if event['id'] >= 140 and event['id'] < 145:
- for quest in event['quests']:
- ids = quest['id']
- config.Model.set_connection_resolver(config.db_jp)
- sugorokus = config.Sugoroku.where('quest_id', '=',
- int(ids)).get()
- difficulties = []
- for sugoroku in sugorokus:
- config.Model.set_connection_resolver(config.db_jp)
- complete_stage(str(ids), sugoroku.difficulty)
-
-
-####################################################################
-
-def list_summons():
- # Prints current available summons, could be formatted better but meh
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/gashas'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
-
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/gashas'
- else:
- url = 'http://ishin-production.aktsk.jp/gashas'
-
- r = requests.get(url, headers=headers)
-
- for gasha in r.json()['gashas']:
- print(gasha['name'].replace('\n', ' ') + ' ' + str(gasha['id']))
- if len(gasha['description']) > 0:
- print(Fore.YELLOW + re.sub(r'\{[^{}]*\}', "", gasha['description']).replace('\n', ' '))
-
-
-####################################################################
-def summon():
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/gashas'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
-
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/gashas'
- else:
- url = 'http://ishin-production.aktsk.jp/gashas'
- r = requests.get(url, headers=headers)
- gashas = []
- for gasha in r.json()['gashas']:
- gashas.append(gasha['name'] + ' | ' + str(gasha['id']))
-
- layout = [[sg.Listbox(values=(gashas), size=(30, 20), key='GASHAS')],
- [sg.Radio('Multi', "TYPE", default=True), sg.Radio('Single', "TYPE")],
- [sg.Spin([i for i in range(1, 999)], key='LOOP', initial_value=1, size=(3, 3))],
- [sg.Button(button_text='Summon!', key='SUMMON')]]
- window = sg.Window('Event Viewer').Layout(layout)
-
- while True:
- event, values = window.Read()
- if event == None:
- return 0
-
- if event == 'SUMMON' and len(values['GASHAS']) > 0:
- summon_id = values['GASHAS'][0].split(' | ')[1]
- if values[0]:
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/gashas/' + str(summon_id)
- + '/courses/2/draw'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/gashas/' + str(summon_id) \
- + '/courses/2/draw'
- else:
- url = 'http://ishin-production.aktsk.jp/gashas/' + str(summon_id) \
- + '/courses/2/draw'
- window.Hide()
- window.Refresh()
- for i in range(int(values['LOOP'])):
- r = requests.post(url, headers=headers).json()
- if 'error' in r:
- print(r)
- window.Close()
- return 0
- card_list = []
- for card in r['gasha_items']:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.Cards.find_or_fail(int(card['item_id'])).rarity
- except:
- config.Model.set_connection_resolver(config.db_jp)
- config.Cards.find_or_fail(int(card['item_id'])).rarity
-
- if config.Cards.find(int(card['item_id'])).rarity == 0:
- rarity = Fore.RED + Style.BRIGHT + 'N' + Style.RESET_ALL
- elif config.Cards.find(int(card['item_id'])).rarity == 1:
- rarity = Fore.RED + Style.BRIGHT + 'R' + Style.RESET_ALL
- elif config.Cards.find(int(card['item_id'])).rarity == 2:
- rarity = Fore.RED + Style.BRIGHT + 'SR' + Style.RESET_ALL
- elif config.Cards.find(int(card['item_id'])).rarity == 3:
- rarity = Fore.YELLOW + 'SSR' + Style.RESET_ALL
- elif config.Cards.find(int(card['item_id'])).rarity == 4:
- rarity = Fore.MAGENTA + Style.BRIGHT + 'UR' + Style.RESET_ALL
- elif config.Cards.find(int(card['item_id'])).rarity == 5:
- rarity = Fore.CYAN + 'LR' + Style.RESET_ALL
- if str(config.Cards.find(int(card['item_id'])).element)[-1] == '0':
- type = Fore.CYAN + Style.BRIGHT + 'AGL '
- elif str(config.Cards.find(int(card['item_id'])).element)[-1] == '1':
- type = Fore.GREEN + Style.BRIGHT + 'TEQ '
- elif str(config.Cards.find(int(card['item_id'])).element)[-1] == '2':
- type = Fore.MAGENTA + Style.BRIGHT + 'INT '
- elif str(config.Cards.find(int(card['item_id'])).element)[-1] == '3':
- type = Fore.RED + Style.BRIGHT + 'STR '
- elif str(config.Cards.find(int(card['item_id'])).element)[-1] == '4':
- type = Fore.YELLOW + 'PHY '
- card_list.append(type + config.Cards.find(int(card['item_id'
- ])).name + ' ' + rarity)
- for card in card_list:
- print(card)
- window.UnHide()
- window.Refresh()
-
-
- else:
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/gashas/' + str(summon_id)
- + '/courses/1/draw'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/gashas/' + str(summon_id) \
- + '/courses/1/draw'
- else:
- url = 'http://ishin-production.aktsk.jp/gashas/' + str(summon_id) \
- + '/courses/1/draw'
- window.Hide()
- window.Refresh()
- for i in range(int(values['LOOP'])):
- r = requests.post(url, headers=headers).json()
- if 'error' in r:
- print(r)
- window.Close()
- return 0
- card_list = []
- for card in r['gasha_items']:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.Cards.find_or_fail(int(card['item_id'])).rarity
- except:
- config.Model.set_connection_resolver(config.db_jp)
- config.Cards.find_or_fail(int(card['item_id'])).rarity
-
- if config.Cards.find(int(card['item_id'])).rarity == 0:
- rarity = Fore.RED + Style.BRIGHT + 'N' + Style.RESET_ALL
- elif config.Cards.find(int(card['item_id'])).rarity == 1:
- rarity = Fore.RED + Style.BRIGHT + 'R' + Style.RESET_ALL
- elif config.Cards.find(int(card['item_id'])).rarity == 2:
- rarity = Fore.RED + Style.BRIGHT + 'SR' + Style.RESET_ALL
- elif config.Cards.find(int(card['item_id'])).rarity == 3:
- rarity = Fore.YELLOW + 'SSR' + Style.RESET_ALL
- elif config.Cards.find(int(card['item_id'])).rarity == 4:
- rarity = Fore.MAGENTA + Style.BRIGHT + 'UR' + Style.RESET_ALL
- elif config.Cards.find(int(card['item_id'])).rarity == 5:
- rarity = Fore.CYAN + 'LR' + Style.RESET_ALL
- if str(config.Cards.find(int(card['item_id'])).element)[-1] == '0':
- type = Fore.CYAN + Style.BRIGHT + 'AGL '
- elif str(config.Cards.find(int(card['item_id'])).element)[-1] == '1':
- type = Fore.GREEN + Style.BRIGHT + 'TEQ '
- elif str(config.Cards.find(int(card['item_id'])).element)[-1] == '2':
- type = Fore.MAGENTA + Style.BRIGHT + 'INT '
- elif str(config.Cards.find(int(card['item_id'])).element)[-1] == '3':
- type = Fore.RED + Style.BRIGHT + 'STR '
- elif str(config.Cards.find(int(card['item_id'])).element)[-1] == '4':
- type = Fore.YELLOW + 'PHY '
- card_list.append(type + config.Cards.find(int(card['item_id'
- ])).name + ' ' + rarity)
- for card in card_list:
- print(card)
- window.UnHide()
- window.Refresh()
- print('------------------------------------------')
-
-
-####################################################################
-def sell_cards__bulk_GUI():
- # Provides a GUI to select a range of cards to sell.
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/teams'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
-
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/teams'
- else:
- url = 'http://ishin-production.aktsk.jp/teams'
- r = requests.get(url, headers=headers)
-
- team_cards = []
- for team in r.json()['user_card_teams']:
- team_cards.extend(team['user_card_ids'])
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/support_leaders'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
-
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/support_leaders'
- else:
- url = 'http://ishin-production.aktsk.jp/support_leaders'
- r = requests.get(url, headers=headers)
- team_cards.extend(r.json()['support_leader_ids'])
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/cards'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
-
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/cards'
- else:
- url = 'http://ishin-production.aktsk.jp/cards'
- r = requests.get(url, headers=headers)
-
- cards_master_dict = []
- for card in r.json()['cards']:
- # Avoid selling favourited cards
- if card['is_favorite'] == True:
- continue
- try:
- config.Model.set_connection_resolver(config.db_glb)
- # Quick and dirty way to exclude elder kais from sell
- hp_max = config.Cards.find_or_fail(card['card_id']).hp_max
- if hp_max == 1:
- continue
-
- card_name = config.Cards.find_or_fail(card['card_id']).name
- rarity = config.Cards.find_or_fail(card['card_id']).rarity
- if card['id'] not in team_cards:
- cards_master_dict.append({
- 'card_id': card['card_id'],
- 'unique_id': card['id'],
- 'name': card_name,
- 'rarity': rarity
- })
- except:
- config.Model.set_connection_resolver(config.db_jp)
- # Quick and dirty way to exclude elder kais from sell
- hp_max = config.Cards.find_or_fail(card['card_id']).hp_max
- if hp_max == '1':
- print('max')
- continue
-
- card_name = config.Cards.find_or_fail(card['card_id']).name
- rarity = config.Cards.find_or_fail(card['card_id']).rarity
- if card['id'] not in team_cards:
- cards_master_dict.append({
- 'card_id': card['card_id'],
- 'unique_id': card['id'],
- 'name': card_name,
- 'rarity': rarity
- })
-
- cards_to_display_dicts = []
- cards_to_display_dicts = cards_master_dict[:]
-
- cards_to_display = []
- for card in cards_to_display_dicts:
- cards_to_display.append(card['name'])
-
- col1 = [[sg.Checkbox('N', default=False, key='N', change_submits=True)],
- [sg.Checkbox('R', default=False, key='R', change_submits=True)],
- [sg.Checkbox('SR', default=False, key='SR', change_submits=True)],
- [sg.Checkbox('SSR', default=False, key='SSR', change_submits=True)]]
- col2 = [[sg.Listbox(values=([]), size=(30, 20), key='CARDS')]]
- layout = [[sg.Column(col1), sg.Column(col2)], [sg.Button(button_text='Sell!', key='SELL')]]
- window = sg.Window('Sell Cards').Layout(layout)
- while True:
- event, values = window.Read()
-
- if event == None:
- window.Close()
- return 0
-
- if event in ['N', 'R', 'SR', 'SSR', 'SELL']:
- accepted_rarities = []
- if values['N']:
- accepted_rarities.append(0)
- if values['R']:
- accepted_rarities.append(1)
- if values['SR']:
- accepted_rarities.append(2)
- if values['SSR']:
- accepted_rarities.append(3)
-
- cards_to_display[:] = []
- cards_to_display_dicts[:] = []
- for card in cards_master_dict:
- if card['rarity'] in accepted_rarities:
- cards_to_display.append(card['name'])
- cards_to_display_dicts.append(card)
-
- if event == 'SELL':
- cards_to_sell = []
- window.Hide()
- window.Refresh()
- for card in cards_to_display_dicts:
- cards_to_sell.append(card['unique_id'])
- cards_master_dict.remove(card)
- sell_cards(cards_to_sell)
- cards_to_display[:] = []
- cards_to_display_dicts[:] = []
- cards_to_display_dicts[:] = cards_master_dict
- for card in cards_to_display_dicts:
- if card['rarity'] in accepted_rarities:
- cards_to_display.append(card['name'])
- window.UnHide()
- window.Refresh()
-
- window.FindElement('CARDS').Update(values=cards_to_display)
-
- return 0
-
-
-####################################################################
-def items_viewer():
- # ## Accepts Outstanding Login Bonuses
- headers = {
- 'User-Agent': 'Android',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET',
- '/resources/login?potential_items=true&training_items=true&support_items=true&treasure_items=true&special_items=true'),
- 'X-Language': 'en',
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/resources/login?potential_items=true&training_items=true&support_items=true&treasure_items=true&special_items=true'
- else:
- url = 'http://ishin-production.aktsk.jp/resources/login?potential_items=true&training_items=true&support_items=true&treasure_items=true&special_items=true'
- r = requests.get(url, headers=headers)
-
- col1 = [[sg.Checkbox('Support Items', default=False, key='SUPPORT', change_submits=True)],
- [sg.Checkbox('Training Items', default=False, key='TRAINING', change_submits=True)],
- [sg.Checkbox('Potential Items', default=False, key='POTENTIAL', change_submits=True)],
- [sg.Checkbox('Treasure Items', default=False, key='TREASURE', change_submits=True)],
- [sg.Checkbox('Special Items', default=False, key='SPECIAL', change_submits=True)]]
- col2 = [[sg.Output(size=(40, 30))]]
- layout = [[sg.Column(col1), sg.Column(col2)]]
- window = sg.Window('Items').Layout(layout)
- while True:
- event, values = window.Read()
-
- if event == None:
- window.Close()
- return 0
-
- if event in ['SUPPORT', 'TRAINING', 'POTENTIAL', 'TREASURE', 'SPECIAL']:
- os.system('cls' if os.name == 'nt' else 'clear')
- if values['SUPPORT']:
- print('\n##########################')
- print('Support Items -')
- print('##########################')
- window.Refresh()
- for item in r.json()['support_items']['items']:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- print(str(config.SupportItems.find_or_fail(item['item_id']).name) + ' x' + str(
- item['quantity']))
- except:
- config.Model.set_connection_resolver(config.db_jp)
- print(str(config.SupportItems.find_or_fail(item['item_id']).name) + ' x' + str(
- item['quantity']))
- window.Refresh()
- if values['TRAINING']:
- print('\n##########################')
- print('Training Items -')
- print('##########################')
- window.Refresh()
- for item in r.json()['training_items']:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- print(str(config.TrainingItems.find(item['training_item_id']).name) + ' x' + str(
- item['quantity']))
- except:
- config.Model.set_connection_resolver(config.db_jp)
- print(str(config.TrainingItems.find(item['training_item_id']).name) + ' x' + str(
- item['quantity']))
- window.Refresh()
- if values['POTENTIAL']:
- print('\n##########################')
- print('Potential Items -')
- print('##########################')
- window.Refresh()
- for item in reversed(r.json()['potential_items']['user_potential_items']):
- try:
- config.Model.set_connection_resolver(config.db_glb)
- print(str(config.PotentialItems.find(item['potential_item_id']).name) + ' x' + str(
- item['quantity']))
- print(config.PotentialItems.find(item['potential_item_id']).description)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- print(str(config.PotentialItems.find(item['potential_item_id']).name) + ' x' + str(
- item['quantity']))
- print(config.PotentialItems.find(item['potential_item_id']).description)
- window.Refresh()
- if values['TREASURE']:
- print('\n##########################')
- print('Treasure Items -')
- print('##########################')
- window.Refresh()
- for item in r.json()['treasure_items']['user_treasure_items']:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- print(str(config.TreasureItems.find(item['treasure_item_id']).name) + ' x' + str(
- item['quantity']))
- except:
- config.Model.set_connection_resolver(config.db_jp)
- print(str(config.TreasureItems.find(item['treasure_item_id']).name) + ' x' + str(
- item['quantity']))
- window.Refresh()
- if values['SPECIAL']:
- print('\n##########################')
- print('Special Items -')
- print('##########################')
- window.Refresh()
- for item in r.json()['special_items']:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- print(str(config.SpecialItems.find(item['special_item_id']).name) + ' x' + str(
- item['quantity']))
- except:
- config.Model.set_connection_resolver(config.db_jp)
- print(str(config.SpecialItems.find(item['special_item_id']).name) + ' x' + str(
- item['quantity']))
- window.Refresh()
-
-
-####################################################################
-def list_cards():
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/cards'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/cards'
- else:
- url = 'http://ishin-production.aktsk.jp/cards'
- r = requests.get(url, headers=headers)
- cards = {}
- for card in r.json()['cards']:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- name = config.Cards.find_or_fail(card['card_id']).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
- name = config.Cards.find_or_fail(card['card_id']).name
-
- try:
- config.Model.set_connection_resolver(config.db_glb)
- element = str(config.Cards.find_or_fail(card['card_id']).element)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- element = str(config.Cards.find_or_fail(card['card_id']).element)
-
- if element[-1] == '0':
- element = 'AGL'
- elif element[-1] == '1':
- element = 'TEQ'
- elif element[-1] == '2':
- element = 'INT'
- elif element[-1] == '3':
- element = 'STR'
- elif element[-1] == '4':
- element = 'PHY'
-
- try:
- config.Model.set_connection_resolver(config.db_glb)
- cost = config.Cards.find_or_fail(card['card_id']).cost
- leader_skill_id = config.Cards.find_or_fail(card['card_id']).leader_skill_id
- passive_skill_id = config.Cards.find_or_fail(card['card_id']).passive_skill_set_id
- links_skill_ids = []
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill1_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill2_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill3_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill4_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill5_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill6_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill7_id)
-
- except:
- config.Model.set_connection_resolver(config.db_jp)
- cost = config.Cards.find_or_fail(card['card_id']).cost
- leader_skill_id = config.Cards.find_or_fail(card['card_id']).leader_skill_id
- passive_skill_id = config.Cards.find_or_fail(card['card_id']).passive_skill_set_id
- links_skill_ids = []
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill1_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill2_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill3_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill4_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill5_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill6_id)
- links_skill_ids.append(config.Cards.find_or_fail(card['card_id']).link_skill7_id)
-
- cards[card['card_id']] = {
- 'id': card['card_id'],
- 'unique_id': card['id'],
- 'name': name,
- 'type': element,
- 'cost': cost,
- 'leader_skill_id': leader_skill_id,
- 'link_skill_ids': links_skill_ids,
- 'passive_skill_id': passive_skill_id
- }
- cards_sort = []
- for item in cards:
- cards_sort.append(cards[item])
-
- # Sort cards for listbox
- cards_sort = sorted(cards_sort, key=lambda k: k['name'])
- cards_sort = sorted(cards_sort, key=lambda k: k['cost'])
-
- # Card strings to for listbox value
- cards_to_display = []
- for card in cards_sort:
- cards_to_display.append(card['type'] + ' ' + str(card['cost']) + ' ' + card['name'] + ' | ' + str(card['id']))
-
- col1 = [[sg.Listbox(values=(cards_to_display), size=(30, 30), key='CARDS', change_submits=True,
- font=('Courier', 15, 'bold'))]]
- col2 = [[sg.Text('Type', key='TYPE', font=('', 15, 'bold'), auto_size_text=True),
- sg.Text('Name', key='NAME', size=(None, 3), font=('', 15, 'bold'), auto_size_text=True)],
- [sg.Text('Cost', key='COST', font=('', 10, 'bold'))],
- [sg.Text('Leader Skill', key='LEADERSKILLNAME', size=(None, 1), font=('', 12, 'bold underline'))],
- [sg.Text('Leader Skill Description', key='LEADERSKILLDESC', size=(None, 4), font=('', 10, 'bold'))],
- [sg.Text('Passive', key='PASSIVESKILLNAME', size=(None, 2), font=('', 12, 'bold underline'))],
- [sg.Text('Passive Description', key='PASSIVESKILLDESC', size=(None, 5), font=('', 10, 'bold'))],
- [sg.Text('Link Skill', key='LINKSKILL1', size=(None, 1), font=('', 10, 'bold'))],
- [sg.Text('Link Skill', key='LINKSKILL2', size=(None, 1), font=('', 10, 'bold'))],
- [sg.Text('Link Skill', key='LINKSKILL3', size=(None, 1), font=('', 10, 'bold'))],
- [sg.Text('Link Skill', key='LINKSKILL4', size=(None, 1), font=('', 10, 'bold'))],
- [sg.Text('Link Skill', key='LINKSKILL5', size=(None, 1), font=('', 10, 'bold'))],
- [sg.Text('Link Skill', key='LINKSKILL6', size=(None, 1), font=('', 10, 'bold'))],
- [sg.Text('Link Skill', key='LINKSKILL7', size=(None, 1), font=('', 10, 'bold'))]]
-
- layout = [[sg.Column(col1), sg.Column(col2)]]
- window = sg.Window('Items').Layout(layout)
- while True:
- event, values = window.Read()
-
- if event == None:
- window.Close()
- return 0
-
- if event == 'CARDS':
- # Get Card ID
- card_id = int(values['CARDS'][0].split(' | ')[1])
-
- # Get correct colour for card element
- if cards[card_id]['type'] == 'PHY':
- colour = 'gold2'
- elif cards[card_id]['type'] == 'STR':
- colour = 'red'
- elif cards[card_id]['type'] == 'AGL':
- colour = 'blue'
- elif cards[card_id]['type'] == 'TEQ':
- colour = 'green'
- elif cards[card_id]['type'] == 'INT':
- colour = 'purple'
- else:
- colour = 'black'
-
- # Retrieve leaderskill from DB
- try:
- config.Model.set_connection_resolver(config.db_glb)
- leader_skill_name = config.LeaderSkills.find_or_fail(cards[card_id]['leader_skill_id']).name.replace(
- '\n', ' ')
- leader_skill_desc = config.LeaderSkills.find_or_fail(
- cards[card_id]['leader_skill_id']).description.replace('\n', ' ')
-
- except:
- config.Model.set_connection_resolver(config.db_jp)
- leader_skill_name = config.LeaderSkills.find_or_fail(cards[card_id]['leader_skill_id']).name.replace(
- '\n', ' ')
- leader_skill_desc = config.LeaderSkills.find_or_fail(
- cards[card_id]['leader_skill_id']).description.replace('\n', ' ')
-
- # Retrieve passive skill
- if cards[card_id]['passive_skill_id'] == None:
- passive_skill_name = 'None'
- passive_skill_desc = 'None'
- else:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- passive_skill_name = config.Passives.find_or_fail(cards[card_id]['passive_skill_id']).name.replace(
- '\n', ' ')
- passive_skill_desc = config.Passives.find_or_fail(
- cards[card_id]['passive_skill_id']).description.replace('\n', ' ')
-
- except:
- config.Model.set_connection_resolver(config.db_jp)
- passive_skill_name = config.Passives.find_or_fail(cards[card_id]['passive_skill_id']).name.replace(
- '\n', ' ')
- passive_skill_desc = config.Passives.find_or_fail(
- cards[card_id]['passive_skill_id']).description.replace('\n', ' ')
-
- # Retrieve link skills from DB
- ls1 = None
- ls2 = None
- ls3 = None
- ls4 = None
- ls5 = None
- ls6 = None
- ls7 = None
-
- try:
- config.Model.set_connection_resolver(config.db_glb)
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][0]) != None:
- ls1 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][0]).name.replace('\n', ' ')
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][1]) != None:
- ls2 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][1]).name.replace('\n', ' ')
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][2]) != None:
- ls3 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][2]).name.replace('\n', ' ')
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][3]) != None:
- ls4 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][3]).name.replace('\n', ' ')
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][4]) != None:
- ls5 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][4]).name.replace('\n', ' ')
- else:
- ls5 = 'Link Skill'
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][5]) != None:
- ls6 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][5]).name.replace('\n', ' ')
- else:
- ls6 = 'Link Skill'
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][6]) != None:
- ls7 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][6]).name.replace('\n', ' ')
- else:
- ls7 = 'Link Skill'
- except:
- config.Model.set_connection_resolver(config.db_jp)
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][0]) != None:
- ls1 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][0]).name.replace('\n', ' ')
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][1]) != None:
- ls2 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][1]).name.replace('\n', ' ')
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][2]) != None:
- ls3 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][2]).name.replace('\n', ' ')
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][3]) != None:
- ls4 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][3]).name.replace('\n', ' ')
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][4]) != None:
- ls5 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][4]).name.replace('\n', ' ')
- else:
- ls5 = 'Link Skill'
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][5]) != None:
- ls6 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][5]).name.replace('\n', ' ')
- else:
- ls6 = 'Link Skill'
- if config.LinkSkills.find(cards[card_id]['link_skill_ids'][6]) != None:
- ls7 = config.LinkSkills.find(cards[card_id]['link_skill_ids'][6]).name.replace('\n', ' ')
- else:
- ls7 = 'Link Skill'
-
- window.FindElement('NAME').Update(value=cards[card_id]['name'].replace('\n', ' '))
- window.FindElement('TYPE').Update(value='[' + cards[card_id]['type'] + ']', text_color=colour)
- window.FindElement('COST').Update(value='COST: ' + str(cards[card_id]['cost']))
- window.FindElement('LEADERSKILLNAME').Update(value=leader_skill_name)
- window.FindElement('LEADERSKILLDESC').Update(value=leader_skill_desc)
- window.FindElement('PASSIVESKILLNAME').Update(value=passive_skill_name)
- window.FindElement('PASSIVESKILLDESC').Update(value=passive_skill_desc)
- window.FindElement('LINKSKILL1').Update(value=ls1)
- window.FindElement('LINKSKILL2').Update(value=ls2)
- window.FindElement('LINKSKILL3').Update(value=ls3)
- window.FindElement('LINKSKILL4').Update(value=ls4)
- window.FindElement('LINKSKILL5').Update(value=ls5)
- window.FindElement('LINKSKILL6').Update(value=ls6)
- window.FindElement('LINKSKILL7').Update(value=ls7)
-
-
-####################################################################
-def sell_medals():
- # Get Medals
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/awakening_items'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- config.Model.set_connection_resolver(config.db_glb)
- url = 'https://ishin-global.aktsk.com/awakening_items'
- else:
- config.Model.set_connection_resolver(config.db_jp)
- url = 'http://ishin-production.aktsk.jp/awakening_items'
- r = requests.get(url, headers=headers)
-
- # Create list with ID for listbox
- medal_list = []
- for medal in reversed(r.json()['awakening_items']):
- try:
- config.Model.set_connection_resolver(config.db_glb)
- item = config.Medal.find_or_fail(int(medal['awakening_item_id']))
- except:
- config.Model.set_connection_resolver(config.db_jp)
- item = config.Medal.find_or_fail(int(medal['awakening_item_id']))
-
- medal_list.append(item.name + ' [x' + str(medal['quantity']) + '] | ' + str(item.id))
-
- layout = [[sg.Text('Select a medal-')],
- [sg.Listbox(values=(medal_list), size=(30, 15), key='medal_tally', font=('', 15, 'bold'))],
- [sg.Text('Amount'), sg.Spin([i for i in range(1, 999)], initial_value=1, size=(5, None))],
- [sg.Button(button_text='Sell', key='Medal')]]
-
- window = sg.Window('Medal List', keep_on_top=True).Layout(layout)
- while True:
- event, values = window.Read()
-
- if event == None:
- window.Close()
- return 0
-
- # Check if medal selected and sell
- if event == 'Medal':
- if len(values['medal_tally']) == 0:
- print(Fore.RED + Style.BRIGHT + "You did not select a medal.")
- continue
-
- value = values['medal_tally'][0]
- medal = value.split(' | ')
- medalo = medal[1]
- amount = values[0]
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/awakening_items/exchange'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/awakening_items/exchange'
- else:
- url = 'http://ishin-production.aktsk.jp/awakening_items/exchange'
-
- medal_id = int(medalo)
- chunk = int(amount) // 99
- remainder = int(amount) % 99
-
- window.Hide()
- window.Refresh()
- for i in range(chunk):
- data = {'awakening_item_id': medal_id, 'quantity': 99}
- r = requests.post(url, data=json.dumps(data), headers=headers)
- if 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + str(r.json))
- else:
- print(Fore.GREEN + Style.BRIGHT + 'Sold Medals x' + str(99))
-
- if remainder > 0:
- data = {'awakening_item_id': medal_id, 'quantity': remainder}
- r = requests.post(url, data=json.dumps(data), headers=headers)
- if 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + str(r.json))
- else:
- print(Fore.GREEN + Style.BRIGHT + 'Sold Medals x' + str(remainder))
-
- # New medal list
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/awakening_items'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/awakening_items'
- else:
- url = 'http://ishin-production.aktsk.jp/awakening_items'
- r = requests.get(url, headers=headers)
-
- medal_list[:] = []
- for medal in reversed(r.json()['awakening_items']):
- try:
- config.Model.set_connection_resolver(config.db_glb)
- item = config.Medal.find_or_fail(int(medal['awakening_item_id']))
- except:
- config.Model.set_connection_resolver(config.db_jp)
- item = config.Medal.find_or_fail(int(medal['awakening_item_id']))
-
- medal_list.append(item.name + ' [x' + str(medal['quantity']) + ']' + ' | ' + str(item.id))
-
- window.FindElement('medal_tally').Update(values=medal_list)
- window.UnHide()
- window.Refresh()
-
-
-####################################################################
-def complete_zbattle_stage(kagi=False):
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/events'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/events'
- else:
- url = 'http://ishin-production.aktsk.jp/events'
- r = requests.get(url, headers=headers)
- events = r.json()
-
- zbattles_to_display = []
- for event in events['z_battle_stages']:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- zbattle = config.ZBattles.where('z_battle_stage_id', '=', event['id']).first().enemy_name + ' | ' + str(
- event['id'])
- except:
- config.Model.set_connection_resolver(config.db_jp)
- zbattle = config.ZBattles.where('z_battle_stage_id', '=', event['id']).first().enemy_name + ' | ' + str(
- event['id'])
- zbattles_to_display.append(zbattle)
-
- col1 = [[sg.Text('Select a Z-Battle', font=('', 15, 'bold'))],
- [sg.Listbox(values=(zbattles_to_display), size=(30, 15), key='ZBATTLE', font=('', 15, 'bold'))]]
-
- col2 = [[sg.Text('Select Single Stage:'), sg.Combo(['5', '10', '15', '20', '25', '30'], size=(6, 3), key='LEVEL')],
- [sg.Text('Amount of times: '),
- sg.Spin([i for i in range(1, 999)], initial_value=1, size=(5, None), key='LOOP')],
- [sg.Button(button_text='Go!', key='GO')]]
-
- layout = [[sg.Column(col1), sg.Column(col2)]]
- window = sg.Window('Medal List').Layout(layout)
-
- while True:
- event, values = window.Read()
- if event == None:
- window.Close()
- return 0
-
- if event == 'GO':
- if len(values['ZBATTLE']) == 0:
- print(Fore.RED + Style.BRIGHT + "Select a Z-Battle!")
- continue
-
- for i in range(int(values['LOOP'])):
- window.Hide()
- window.Refresh()
- #
- stage = values['ZBATTLE'][0].split(' | ')[1]
- level = values['LEVEL']
-
- ##Get supporters
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/z_battles/' + str(stage) + '/supporters'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/z_battles/' + str(stage) + '/supporters'
- else:
- url = 'http://ishin-production.aktsk.jp/z_battles/' + str(stage) + '/supporters'
- r = requests.get(url, headers=headers)
- if 'supporters' in r.json():
- supporter = r.json()['supporters'][0]['id']
- elif 'error' in r.json():
- print(Fore.RED + Style.BRIGHT + r.json())
- return 0
- else:
- print(Fore.RED + Style.BRIGHT + 'Problem with ZBattle')
- print(r.raw())
- return 0
-
- ###Send first request
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/z_battles/' + str(stage) + '/start'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
-
- if kagi == True:
- sign = json.dumps({
- 'friend_id': supporter,
- 'level': int(level),
- 'selected_team_num': config.deck,
- 'eventkagi_item_id': 5
- })
- else:
- sign = json.dumps({
- 'friend_id': supporter,
- 'level': int(level),
- 'selected_team_num': config.deck,
- })
-
- enc_sign = packet.encrypt_sign(sign)
- data = {'sign': enc_sign}
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/z_battles/' + str(stage) + '/start'
- else:
- url = 'http://ishin-production.aktsk.jp/z_battles/' + str(stage) + '/start'
- r = requests.post(url, data=json.dumps(data), headers=headers)
-
- if 'sign' in r.json():
- dec_sign = packet.decrypt_sign(r.json()['sign'])
- # Check if error was due to lack of stamina
- elif 'error' in r.json():
- if r.json()['error']['code'] == 'act_is_not_enough':
- # Check if allowed to refill stamina
- if config.allow_stamina_refill == True:
- refill_stamina()
- r = requests.post(url, data=json.dumps(data),
- headers=headers)
- else:
- print(r.json())
- return 0
- else:
- print(Fore.RED + Style.BRIGHT + 'Problem with ZBattle')
- print(r.raw())
- return 0
-
- finish_time = int(round(time.time(), 0) + 2000)
- start_time = finish_time - randint(6200000, 8200000)
-
- data = {
- 'elapsed_time': finish_time - start_time,
- 'is_cleared': True,
- 'level': int(level),
- 's': 'rGAX18h84InCwFGbd/4zr1FvDNKfmo/TJ02pd6onclk=',
- 't': 'eyJzdW1tYXJ5Ijp7ImVuZW15X2F0dGFjayI6MTAwMzg2LCJlbmVteV9hdHRhY2tfY291bnQiOjUsImVuZW15X2hlYWxfY291bnRzIjpbMF0sImVuZW15X2hlYWxzIjpbMF0sImVuZW15X21heF9hdHRhY2siOjEwMDAwMCwiZW5lbXlfbWluX2F0dGFjayI6NTAwMDAsInBsYXllcl9hdHRhY2tfY291bnRzIjpbMTBdLCJwbGF5ZXJfYXR0YWNrcyI6WzMwNjYwNTJdLCJwbGF5ZXJfaGVhbCI6MCwicGxheWVyX2hlYWxfY291bnQiOjAsInBsYXllcl9tYXhfYXR0YWNrcyI6WzEyMzY4NTBdLCJwbGF5ZXJfbWluX2F0dGFja3MiOls0NzcxOThdLCJ0eXBlIjoic3VtbWFyeSJ9fQ==',
- 'token': dec_sign['token'],
- 'used_items': [],
- 'z_battle_finished_at_ms': finish_time,
- 'z_battle_started_at_ms': start_time,
- }
- # enc_sign = encrypt_sign(sign)
-
- headers = {
- 'User-Agent': 'Android',
- 'Accept': '*/*',
- 'Authorization': packet.mac('POST', '/z_battles/' + str(stage) + '/finish'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/z_battles/' + str(stage) + '/finish'
- else:
- url = 'http://ishin-production.aktsk.jp/z_battles/' + str(stage) + '/finish'
-
- r = requests.post(url, data=json.dumps(data), headers=headers)
- dec_sign = packet.decrypt_sign(r.json()['sign'])
- # ## Print out Items from Database
- print('Level: ' + str(level))
- # ## Print out Items from Database
- if 'items' in dec_sign:
- supportitems = []
- awakeningitems = []
- trainingitems = []
- potentialitems = []
- treasureitems = []
- carditems = []
- trainingfields = []
- stones = 0
- supportitemsset = set()
- awakeningitemsset = set()
- trainingitemsset = set()
- potentialitemsset = set()
- treasureitemsset = set()
- carditemsset = set()
- trainingfieldsset = set()
- print('Items:')
- print('-------------------------')
- if 'quest_clear_rewards' in dec_sign:
- for x in dec_sign['quest_clear_rewards']:
- if x['item_type'] == 'Point::Stone':
- stones += x['amount']
- for x in dec_sign['items']:
- if x['item_type'] == 'SupportItem':
-
- # print('' + SupportItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- supportitems.append(x['item_id'])
- supportitemsset.add(x['item_id'])
- elif x['item_type'] == 'PotentialItem':
-
- # print('' + PotentialItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- potentialitems.append(x['item_id'])
- potentialitemsset.add(x['item_id'])
- elif x['item_type'] == 'TrainingItem':
-
- # print('' + TrainingItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- trainingitems.append(x['item_id'])
- trainingitemsset.add(x['item_id'])
- elif x['item_type'] == 'AwakeningItem':
-
- # print('' + AwakeningItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- awakeningitems.append(x['item_id'])
- awakeningitemsset.add(x['item_id'])
- elif x['item_type'] == 'TreasureItem':
-
- # print('' + TreasureItems.find(x['item_id']).name + ' x '+str(x['quantity']))
-
- for i in range(x['quantity']):
- treasureitems.append(x['item_id'])
- treasureitemsset.add(x['item_id'])
- elif x['item_type'] == 'Card':
-
- # card = Cards.find(x['item_id'])
-
- carditems.append(x['item_id'])
- carditemsset.add(x['item_id'])
- elif x['item_type'] == 'Point::Stone':
- stones += 1
- elif x['item_type'] == 'TrainingField':
-
- # card = Cards.find(x['item_id'])
-
- for i in range(x['quantity']):
- trainingfields.append(x['item_id'])
- trainingfieldsset.add(x['item_id'])
- else:
- print(x['item_type'])
-
- # Print items
- for x in supportitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.SupportItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.CYAN + Style.BRIGHT + config.SupportItems.find(x).name + ' x' \
- + str(supportitems.count(x)))
- for x in awakeningitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.AwakeningItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.MAGENTA + Style.BRIGHT + config.AwakeningItems.find(x).name + ' x' \
- + str(awakeningitems.count(x)))
- for x in trainingitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.TrainingItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.RED + Style.BRIGHT + config.TrainingItems.find(x).name + ' x' \
- + str(trainingitems.count(x)))
- for x in potentialitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.PotentialItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(config.PotentialItems.find_or_fail(x).name + ' x' \
- + str(potentialitems.count(x)))
- for x in treasureitemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.TreasureItems.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(Fore.GREEN + Style.BRIGHT + config.TreasureItems.find(x).name + ' x' \
- + str(treasureitems.count(x)))
- for x in trainingfieldsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.TrainingFields.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(config.TrainingFields.find(x).name + ' x' \
- + str(trainingfields.count(x)))
- for x in carditemsset:
- # JP Translation
- try:
- config.Model.set_connection_resolver(config.db_glb)
- config.Cards.find_or_fail(x).name
- except:
- config.Model.set_connection_resolver(config.db_jp)
-
- # Print name and item count
- print(config.Cards.find(x).name + ' x' + str(carditems.count(x)))
- print(Fore.YELLOW + Style.BRIGHT + 'Stones x' + str(stones))
- if 'gasha_point' in dec_sign:
- print('Friend Points: ' + str(dec_sign['gasha_point']))
-
- print('--------------------------')
- print('##############################################')
- window.UnHide()
- window.Refresh()
-
-
-####################################################################
-def bulk_daily_logins():
- layout = [[sg.Text('Choose what gets completed!')],
- [sg.Checkbox('Daily Login', default=True)],
- [sg.Checkbox('Accept Gifts')],
- [sg.Checkbox('Complete Daily Events')],
- [sg.Text('Enter command to execute:')],
- [sg.Input(key='user_input')],
- [sg.Ok()]]
-
- window = sg.Window('Daily Logins', keep_on_top=True).Layout(layout)
- event, values = window.Read()
- window.Close()
- if event == None:
- return 0
-
- login = values[0]
- gift = values[1]
- daily_events = values[2]
- user_input = values['user_input']
- print(user_input)
-
- # Fetch saves to choose from
- files = []
- for subdir, dirs, os_files in os.walk("Saves"):
- for file in sorted(os_files):
- files.append(subdir + os.sep + file)
-
- ### Create window that manages saves selections
- # Layout
- chosen_files = []
- column1 = [
- [sg.Listbox(values=(files), size=(30, None), bind_return_key=True, select_mode='multiple', key='select_save')],
- [sg.Button(button_text='Select All', key='all')]]
- column2 = [[sg.Listbox(values=(chosen_files), size=(30, None), bind_return_key=True, select_mode='multiple',
- key='remove_save')],
- [sg.Button(button_text='Remove All', key='remove_all')]]
- layout = [[sg.Column(column1), sg.Column(column2)],
- [sg.Button(button_text='Start Grind!', key='Done')]]
- window = sg.Window('Saves', keep_on_top=True, font=('Helvetica', 15)).Layout(layout)
-
- while event != 'Done':
- event, value = window.Read()
- if event == 'select_save':
- chosen_files.extend(value['select_save'])
- for save in value['select_save']:
- files.remove(save)
-
- if event == 'remove_save':
- files.extend(value['remove_save'])
- for save in value['remove_save']:
- chosen_files.remove(save)
-
- if event == 'all':
- chosen_files.extend(files)
- files[:] = []
-
- if event == 'remove_all':
- files.extend(chosen_files)
- chosen_files[:] = []
-
- if event == None:
- print(Fore.RED + Style.BRIGHT + 'User terminated daily logins')
- return 0
-
- window.FindElement('select_save').Update(values=sorted(files))
- window.FindElement('remove_save').Update(values=sorted(chosen_files))
-
- window.Close()
-
- ### Execution per file
- for file in chosen_files:
- bulk_daily_save_processor(file, login, gift, daily_events, user_input)
-
-
-####################################################################
-def bulk_daily_save_processor(save, login, gift, daily_events, user_input):
- f = open(os.path.join(save), 'r')
- config.identifier = f.readline().rstrip()
- config.AdId = f.readline().rstrip()
- config.UniqueId = f.readline().rstrip()
- config.platform = f.readline().rstrip()
- config.client = f.readline().rstrip()
- f.close()
-
- try:
- refresh_client()
- except:
- print('Sign in failed' + save + ".txt")
- return 0
-
- ###
- if login == True:
- daily_login()
- if gift == True:
- accept_gifts()
- if daily_events == True:
- complete_stage('130001', 0)
- complete_stage('131001', 0)
- complete_stage('132001', 0)
- complete_potential()
- accept_gifts()
- accept_missions()
- print('Completed Daily Grind')
- while len(user_input) > 1:
- user_command_executor(user_input)
- try:
- user_input = input()
- except:
- sys.stdin = sys.__stdin__
- break
- user_input = input()
-
-
-##############################################################################
-def fresh_save_account():
- if not os.path.isdir("Saves"):
- try:
- os.mkdir('Saves')
- os.mkdir('Saves/ios')
- os.mkdir('Saves/android')
- os.mkdir('Saves/Jp')
- os.mkdir('Saves/Jp/ios')
- os.mkdir('Saves/Jp/android')
- os.mkdir('Saves/fresh')
- os.mkdir('Saves/fresh/ios')
- os.mkdir('Saves/fresh/android')
- except:
- print(Fore.RED + Style.BRIGHT + 'Unable to create saves file')
- return 0
-
- valid_save = False
- while valid_save == False:
- save_name = input("What would you like to name the file?")
- while save_name.isalnum() == 0:
- print(Fore.RED + Style.BRIGHT + "Name not allowed!")
- save_name = input('What would you like to name this save?: ')
- if os.path.exists('Saves' + os.sep + config.platform + os.sep + save_name + ".txt"):
- print(Fore.RED + Style.BRIGHT + "File by that name already exists.")
- else:
- try:
- f = open(os.path.join('Saves/fresh' + os.sep + config.platform + os.sep + save_name + ".txt"), 'w')
- f.write(str(config.identifier) + '\n')
- f.write(str(config.AdId) + '\n')
- f.write(str(config.UniqueId) + '\n')
- f.write(str(config.platform) + '\n')
- f.write(str(config.client) + '\n')
- f.close()
- print('--------------------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Written details to file: ' + save_name)
- print(Fore.RED + Style.BRIGHT + 'If ' + save_name + ' is deleted your account will be lost!')
- print('--------------------------------------------')
- break
- except Exception as e:
- print(e)
-
-
-######################################################################################
-def fresh_load_account():
- while 1 == 1:
- print(
- 'Choose your operating system (' + Fore.YELLOW + Style.BRIGHT + 'Android: 1' + Style.RESET_ALL + ' or' + Fore.YELLOW + Style.BRIGHT + ' IOS: 2' + Style.RESET_ALL + ')',end='')
- platform = input('')
- if platform[0].lower() in ['1', '2']:
- if platform[0].lower() == '1':
- config.platform = 'android'
- else:
- config.platform = 'ios'
- break
- else:
- print(Fore.RED + 'Could not identify correct operating system to use.')
-
- while 1 == 1:
- save_name = input("What save would you like to load?: ")
- if os.path.isfile('Saves/fresh' + os.sep + config.platform + os.sep + save_name + ".txt"):
- try:
- f = open(os.path.join('Saves/fresh', config.platform, save_name + ".txt"), 'r')
- config.identifier = f.readline().rstrip()
- config.AdId = f.readline().rstrip()
- config.UniqueId = f.readline().rstrip()
- config.platform = f.readline().rstrip()
- client = f.readline().rstrip()
- if config.client == client:
- break
- else:
- print(Fore.RED + Style.BRIGHT + 'Save does not match client version.')
-
- except Exception as e:
- print(e)
-
- else:
- print(Fore.RED + Style.BRIGHT + "Could not find " + save_name)
- refresh_client()
-
-
-##########################################################################################
-def fresh_bulk_daily_logins():
- layout = [[sg.Text('Choose what gets completed!')],
- [sg.Checkbox('Daily Login', default=True)],
- [sg.Checkbox('Accept Gifts')],
- [sg.Checkbox('Complete Daily Events')],
- [sg.Text('Enter command to execute:')],
- [sg.Input(key='user_input')],
- [sg.Ok()]]
-
- window = sg.Window('Daily Logins', keep_on_top=True).Layout(layout)
- event, values = window.Read()
- window.Close()
- if event == None:
- return 0
-
- login = values[0]
- gift = values[1]
- daily_events = values[2]
- user_input = values['user_input']
- print(user_input)
-
- # Fetch saves to choose from
- files = []
- for subdir, dirs, os_files in os.walk("Saves/fresh"):
- for file in sorted(os_files):
- files.append(subdir + os.sep + file)
-
- ### Create window that manages saves selections
- # Layout
- chosen_files = []
- column1 = [
- [sg.Listbox(values=(files), size=(30, None), bind_return_key=True, select_mode='multiple', key='select_save')],
- [sg.Button(button_text='Select All', key='all')]]
- column2 = [[sg.Listbox(values=(chosen_files), size=(30, None), bind_return_key=True, select_mode='multiple',
- key='remove_save')],
- [sg.Button(button_text='Remove All', key='remove_all')]]
- layout = [[sg.Column(column1), sg.Column(column2)],
- [sg.Button(button_text='Start Grind!', key='Done')]]
- window = sg.Window('Saves/fresh', keep_on_top=True, font=('Helvetica', 15)).Layout(layout)
-
- while event != 'Done':
- event, value = window.Read()
- if event == 'select_save':
- chosen_files.extend(value['select_save'])
- for save in value['select_save']:
- files.remove(save)
-
- if event == 'remove_save':
- files.extend(value['remove_save'])
- for save in value['remove_save']:
- chosen_files.remove(save)
-
- if event == 'all':
- chosen_files.extend(files)
- files[:] = []
-
- if event == 'remove_all':
- files.extend(chosen_files)
- chosen_files[:] = []
-
- if event == None:
- print(Fore.RED + Style.BRIGHT + 'User terminated daily logins')
- return 0
-
- window.FindElement('select_save').Update(values=sorted(files))
- window.FindElement('remove_save').Update(values=sorted(chosen_files))
-
- window.Close()
-
- for file in chosen_files:
- bulk_daily_save_processor(file, login, gift, daily_events, user_input)
-
-
-########################################################################################################################
-def dokkan():
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/events'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/events'
- else:
- url = 'http://ishin-production.aktsk.jp/events'
- r = requests.get(url, headers=headers)
- events = r.json()
- event_ids = []
- for event in events['events']:
- event_ids.append(event['id'])
- event_ids = sorted(event_ids)
- try:
- event_ids.remove(135)
- except:
- None
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/user_areas'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user_areas'
- else:
- url = 'http://ishin-production.aktsk.jp/user_areas'
- r = requests.get(url, headers=headers)
- areas = r.json()['user_areas']
- i = 1
- for area in areas:
- if area['area_id'] in event_ids:
- for stage in area['user_sugoroku_maps']:
- complete_stage(str(stage['sugoroku_map_id'])[:-1], str(stage['sugoroku_map_id'])[-1])
- i += 1
- if i % 30 == 0:
- refresh_client()
-
-
-class letter():
- # Each letter has a lowercase character, an uppercase character, and
- # identifiers as vowel or consonant.
- def __init__(self, lowerchar, upperchar, is_vowel, is_consonant):
- self.upperchar = upperchar
- self.lowerchar = lowerchar
- self.is_vowel = is_vowel
- self.is_consonant = is_consonant
-
-
-global alphabet
-alphabet = [letter('a', 'A', True, False),
- letter('b', 'B', False, True),
- letter('c', 'C', False, True),
- letter('d', 'D', False, True),
- letter('e', 'E', True, False),
- letter('f', 'F', False, True),
- letter('g', 'G', False, True),
- letter('h', 'H', False, True),
- letter('i', 'I', True, False),
- letter('j', 'J', False, True),
- letter('k', 'K', False, True),
- letter('l', 'L', False, True),
- letter('m', 'M', False, True),
- letter('n', 'N', False, True),
- letter('o', 'O', True, False),
- letter('p', 'P', False, True),
- letter('q', 'Q', False, True),
- letter('r', 'R', False, True),
- letter('s', 'S', False, True),
- letter('t', 'T', False, True),
- letter('u', 'U', True, False),
- letter('v', 'V', False, True),
- letter('w', 'W', False, True),
- letter('x', 'X', False, True),
- letter('y', 'Y', True, True),
- letter('z', 'Z', False, True)
- ]
-
-
-def rand_int(x1, x2):
- # Generate a random integer number between x1 and x2, inclusive.
- r = int(int(x1) + random() * (int(x2) - int(x1)))
- return r
-
-
-def make_name():
- # Determine name length.
- lmin = 3 # Minimum length.
- lmax = 3 # Maximum length.
- name_length = rand_int(lmin, lmax)
-
- # Initialize string.
- my_name = ""
-
- prev_vowel = False # Was the previous letter a vowel?
- prev_consonant = False # Was the previous letter a consonant?
- prev2_vowel = False # Were the previous 2 letters vowels?
- prev2_consonant = False # Were the previous 2 letters consonants?
-
- # Generate letters for name.
- for i in range(0, name_length):
- a = get_letter(prev2_vowel, prev2_consonant)
- if (i == 0):
- my_name = my_name + a.upperchar
- else:
- my_name = my_name + a.lowerchar
- prev2_vowel = (a.is_vowel and prev_vowel)
- prev2_consonant = (a.is_consonant and prev_consonant)
- prev_vowel = a.is_vowel
- prev_consonant = a.is_consonant
-
- return my_name
-
-
-def get_letter(need_consonant, need_vowel):
- global alphabet
- # Generate a random letter.
- done = False
- while (not done):
- a = alphabet[rand_int(0, 25)]
- if ((need_consonant and a.is_vowel) or (need_vowel and a.is_consonant)):
- done = False
- else:
- done = True
- return a
-
-
-def complete_sbr():
- print('------------------------------------')
- while True:
- print(Fore.CYAN + Style.BRIGHT + 'SBR ')
- print('---------------------------------')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + '1-10 :' + Fore.YELLOW + Style.BRIGHT + ' 0')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + '11-20 :' + Fore.YELLOW + Style.BRIGHT + ' 1')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + '21-30 :' + Fore.YELLOW + Style.BRIGHT + ' 2')
- command = input('Enter your choice: ')
- if command == '0':
- print(' ')
- extra.complete_sbr()
- break
- elif command == '1':
- print(' ')
- extra.sbr_next()
- break
- elif command == '2':
- print(' ')
- extra.sbr_new()
-
-
-
-def potara():
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + 'Clear without any Support Items')
- complete_stage('10002', 2)
- complete_stage('11002', 2)
- complete_stage('12002', 2)
- complete_stage('13002', 2)
- complete_stage('14002', 2)
- complete_stage('16002', 2)
- complete_stage('17002', 2)
- complete_stage('18002', 2)
- complete_stage('19002', 3)
- complete_stage('20002', 3)
- complete_stage('22002', 3)
- complete_stage('23002', 3)
- complete_stage('24002', 3)
- complete_stage('25002', 3)
- complete_stage('26002', 3)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + '6 Characters with Link Skill: Z-Fighters')
- change_team()
- complete_stage('10004', 2)
- complete_stage('10006', 2)
- complete_stage('10008', 2)
- complete_stage('11004', 2)
- complete_stage('11006', 2)
- complete_stage('11008', 2)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + '6 Characters with Link Skill: Prodigies')
- change_team()
- complete_stage('12004', 2)
- complete_stage('12006', 2)
- complete_stage('12008', 2)
- complete_stage('13004', 2)
- complete_stage('13006', 2)
- complete_stage('13008', 2)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + '6 Characters with Link Skill: Saiyan Warrior Race')
- change_team()
- complete_stage('14004', 2)
- complete_stage('14006', 2)
- complete_stage('14008', 2)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with a Vegito on your team')
- change_team()
- complete_stage('15002', 2)
- complete_stage('21002', 3)
- complete_stage('27002', 3 )
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + '6 Characters with Link Skill: Golden Warrior')
- change_team()
- complete_stage('16004', 2)
- complete_stage('16006', 2)
- complete_stage('16008', 2)
- complete_stage('17004', 2)
- complete_stage('17006', 2)
- complete_stage('17008', 2)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + '6 Characters with Link Skill: Shocking Speed')
- change_team()
- complete_stage('18004', 2)
- complete_stage('18006', 2)
- complete_stage('18008', 2)
- complete_stage('19004', 3)
- complete_stage('19006', 3)
- complete_stage('19008', 3)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + '6 Characters with Link Skill: Fused Fighter')
- change_team()
- complete_stage('20004', 3)
- complete_stage('20006', 3)
- complete_stage('20008', 3)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + '5 Characters with Link Skill: Fierce Battle')
- change_team()
- complete_stage('22006', 3)
- complete_stage('23006', 3)
- complete_stage('24006', 3)
- complete_stage('25006', 3)
- complete_stage('26006', 3)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + 'AGL Type with Link Skill: Fierce Battle')
- change_team()
- complete_stage('22004', 3)
- complete_stage('22008', 3)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + 'TEQ Type with Link Skill: Fierce Battle')
- change_team()
- complete_stage('23004', 3)
- complete_stage('23008', 3)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + 'INT Type with Link Skill: Fierce Battle')
- change_team()
- complete_stage('24004', 3)
- complete_stage('24008', 3)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + 'STR Type with Link Skill: Fierce Battle')
- change_team()
- complete_stage('25004', 3)
- complete_stage('25008', 3)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + 'PHY Type with Link Skill: Fierce Battle')
- change_team()
- complete_stage('26004', 3)
- complete_stage('26008', 3)
-
-
-def new_transfer():
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/user'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/user'
- else:
- url = 'http://ishin-production.aktsk.jp/user'
- r = requests.get(url, headers=headers)
- user = r.json()
- print('Name: ' + str(user['user']['name']))
- print('Rank: ' + str(user['user']['rank']))
- print('Account OS: ' + config.platform.upper())
- print('User ID: ' + str(user['user']['id']))
- get_transfer_code()
-
-
-
-def rankup():
- #gets current level and level to reach
- reachlv = input('\n\nAt what level are you trying to reach?\n')
- ranklv = get_user()['user']['rank']
- multiplier = input('\nWhat is the current multiplier? ')
- #converts into exp by getting table info
- exp_curr = config.Ranks.find(ranklv).exp_total
- exp_reach = config.Ranks.find(reachlv).exp_total
- exp_needed = exp_reach - exp_curr
- # The amount of exp the last stage gives // ttc= times to complete
- ttc = exp_needed / (float(27600) * float(multiplier))
- ttc = round(ttc+0.999)
- print('Exp needed= ' + str(exp_needed))
- print('The last stage will be done' + str(ttc) + ' times.')
- # lööps bröther
- for i in range(int(ttc)):
- complete_stage('27003', '3', kagi = None)
- print(Fore.GREEN + 'Account Rank:' + str(get_user()['user']['rank']))
-
-
-#######################################################################################################################
-def Jp_save_account():
- if not os.path.isdir("Saves"):
- try:
- os.mkdir('Saves')
- os.mkdir('Saves/ios')
- os.mkdir('Saves/android')
- os.mkdir('Saves/Jp')
- os.mkdir('Saves/Jp/ios')
- os.mkdir('Saves/Jp/android')
- os.mkdir('Saves/fresh')
- os.mkdir('Saves/fresh/ios')
- os.mkdir('Saves/fresh/android')
- except:
- print(Fore.RED + Style.BRIGHT + 'Unable to create saves file')
- return 0
-
- valid_save = False
- while valid_save == False:
- save_name = input("What would you like to name the file?")
- while save_name.isalnum() == 0:
- print(Fore.RED + Style.BRIGHT + "Name not allowed!")
- save_name = input('What would you like to name this save?: ')
- if os.path.exists('Saves/Jp' + os.sep + config.platform + os.sep + save_name + ".txt"):
- print(Fore.RED + Style.BRIGHT + "File by that name already exists.")
- else:
- try:
- f = open(os.path.join('Saves/Jp' + os.sep + config.platform + os.sep + save_name + ".txt"), 'w')
- f.write(str(config.identifier) + '\n')
- f.write(str(config.AdId) + '\n')
- f.write(str(config.UniqueId) + '\n')
- f.write(str(config.platform) + '\n')
- f.write(str(config.client) + '\n')
- f.close()
- print('--------------------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Written details to file: ' + save_name + ".txt")
- print(Fore.RED + Style.BRIGHT + 'If ' + save_name + ' is deleted your account will be lost!')
- print('--------------------------------------------')
- break
- except Exception as e:
- print(e)
-
-
-def Jp_load_account():
- while 1 == 1:
- print(
- 'Choose your operating system (' + Fore.YELLOW + Style.BRIGHT + 'Android: 1' + Style.RESET_ALL + ' or' + Fore.YELLOW + Style.BRIGHT + ' IOS: 2' + Style.RESET_ALL + ')',end='')
- platform = input('')
- if platform[0].lower() in ['1', '2']:
- if platform[0].lower() == '1':
- config.platform = 'android'
- else:
- config.platform = 'ios'
- break
- else:
- print(Fore.RED + 'Could not identify correct operating system to use.')
-
- while 1 == 1:
- save_name = input("What save would you like to load?: ")
- if os.path.isfile('Saves/Jp' + os.sep + config.platform + os.sep + save_name + ".txt"):
- try:
- f = open(os.path.join('Saves/Jp', config.platform, save_name + ".txt"), 'r')
- config.identifier = f.readline().rstrip()
- config.AdId = f.readline().rstrip()
- config.UniqueId = f.readline().rstrip()
- config.platform = f.readline().rstrip()
- client = f.readline().rstrip()
- if config.client == client:
- break
- else:
- print(Fore.RED + Style.BRIGHT + 'Save does not match client version.')
-
- except Exception as e:
- print(e)
-
- else:
- print(Fore.RED + Style.BRIGHT + "Could not find " + save_name)
- refresh_client()
-
-
-##########################################################################################
-def Jp_bulk_daily_logins():
- layout = [[sg.Text('Choose what gets completed!')],
- [sg.Checkbox('Daily Login', default=True)],
- [sg.Checkbox('Accept Gifts')],
- [sg.Checkbox('Complete Daily Events')],
- [sg.Text('Enter command to execute:')],
- [sg.Input(key='user_input')],
- [sg.Ok()]]
-
- window = sg.Window('Daily Logins', keep_on_top=True).Layout(layout)
- event, values = window.Read()
- window.Close()
- if event == None:
- return 0
-
- login = values[0]
- gift = values[1]
- daily_events = values[2]
- user_input = values['user_input']
- print(user_input)
-
- # Fetch saves to choose from
- files = []
- for subdir, dirs, os_files in os.walk("Saves/Jp"):
- for file in sorted(os_files):
- files.append(subdir + os.sep + file)
-
- ### Create window that manages saves selections
- # Layout
- chosen_files = []
- column1 = [
- [sg.Listbox(values=(files), size=(30, None), bind_return_key=True, select_mode='multiple', key='select_save')],
- [sg.Button(button_text='Select All', key='all')]]
- column2 = [[sg.Listbox(values=(chosen_files), size=(30, None), bind_return_key=True, select_mode='multiple',
- key='remove_save')],
- [sg.Button(button_text='Remove All', key='remove_all')]]
- layout = [[sg.Column(column1), sg.Column(column2)],
- [sg.Button(button_text='Start Grind!', key='Done')]]
- window = sg.Window('Saves/fresh', keep_on_top=True, font=('Helvetica', 15)).Layout(layout)
-
- while event != 'Done':
- event, value = window.Read()
- if event == 'select_save':
- chosen_files.extend(value['select_save'])
- for save in value['select_save']:
- files.remove(save)
-
- if event == 'remove_save':
- files.extend(value['remove_save'])
- for save in value['remove_save']:
- chosen_files.remove(save)
-
- if event == 'all':
- chosen_files.extend(files)
- files[:] = []
-
- if event == 'remove_all':
- files.extend(chosen_files)
- chosen_files[:] = []
-
- if event == None:
- print(Fore.RED + Style.BRIGHT + 'User terminated daily logins')
- return 0
-
- window.FindElement('select_save').Update(values=sorted(files))
- window.FindElement('remove_save').Update(values=sorted(chosen_files))
-
- window.Close()
-
- for file in chosen_files:
- bulk_daily_save_processor(file, login, gift, daily_events, user_input)
-
-
-def Jp_transfer_account():
- # Determine correct platform to use
- set_platform()
-
- transfercode = input('Enter your transfer code: ')
-
- config.AdId = packet.guid()['AdId']
- config.UniqueId = packet.guid()['UniqueId']
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- data = {'eternal': True, 'old_user_id': '', 'user_account': {
- 'device': 'samsung',
- 'device_model': 'SM-G930V',
- 'os_version': '6.0',
- 'platform': config.platform,
- 'unique_id': config.UniqueId,
- }}
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/auth/link_codes/' \
- + str(transfercode)
- else:
- url = 'http://ishin-production.aktsk.jp/auth/link_codes/' \
- + str(transfercode)
- print('URL: ' + url)
- r = requests.put(url, data=json.dumps(data), headers=headers)
- if 'error' in r.json():
- print(r.json())
- print(base64.b64decode(r.json()['identifiers']).decode('utf-8'))
- config.identifier = base64.b64decode(r.json()['identifiers']).decode('utf-8')
-
- Jp_save_account()
- refresh_client()
-
-
-########################################################################################################################
-def Gt():
- complete_stage('173001', 1)
- complete_stage('173002', 1)
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + '1 Characters with Link Skill:Turtle School ')
- change_team()
- complete_stage('173003', 1)
- print(Fore.YELLOW + Style.BRIGHT + '1 Characters with Link Skill:Pure Saiyan ')
- change_team()
- complete_stage('173004', 1)
- print(Fore.YELLOW + Style.BRIGHT + '1 Characters with Link Skill:Super Saiyan ')
- change_team()
- complete_stage('173005', 1)
- print(Fore.YELLOW + Style.BRIGHT + ' Use a team made up of only Super characters of each type in level 6 ')
- change_team()
- complete_stage('173006', 1)
- print(Fore.YELLOW + Style.BRIGHT + 'Use a team made up of only characters from the "Buu Saga" category in level 7')
- change_team()
- complete_stage('173007', 1)
- print(Fore.YELLOW + Style.BRIGHT + 'Only teams that include "Giru" can enter this stage.')
- change_team()
- complete_stage('172001', 1)
- complete_stage('172002', 1)
- complete_stage('172003', 1)
- print(Fore.YELLOW + Style.BRIGHT + 'Teams that include the following characters cannot enter this stage. - Pan (GT) - Pan (GT) (Honey) - Goku (GT) & Pan (GT) & Trunks (GT)')
- change_team()
- complete_stage('172004', 1)
- complete_stage('172005', 1)
- complete_stage('172006', 1)
- complete_stage('172007', 1)
-
-
-def get_kagi():
-
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 6.0; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/eventkagi_items'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/eventkagi_items'
- else:
- url = 'http://ishin-production.aktsk.jp/eventkagi_items'
- r = requests.get(url, headers=headers)
- stageid = input('\nWhich Stage do you want to complete?: ')
- kagi_items = r.json()['eventkagi_items']
- area_id = str(config.Quests.find(stageid).area_id)
- area_category = config.Area.find(area_id).category
- areatabs = config.AreaTabs.all()
- for tab in areatabs:
- j = json.loads(tab.area_category_ids)
- if area_category in j['area_category_ids']:
- kagi_id = int(tab.id)
- print('Kagi ID: ' + str(tab.id))
- break
- for kagi in kagi_items:
- if kagi['eventkagi_item_id'] == kagi_id:
- if kagi['quantity'] > 0:
- print('Available')
- diff = input('\nstage difficulty?: \n')
- times = input('\nhow many times do you want to complete?: \n')
- for i in range(int(times)):
- complete_stage(stageid, diff, kagi=kagi_id)
- else:
- print(Fore.RED + '\nThere are not enough keys or that stage does not exist for the keys')
- return None
-
-
-def limit_stage():
- print(Fore.CYAN + Style.BRIGHT + 'Clear all stages with SUPER UNITS ONLY')
- change_team()
- complete_stage('319001', 1)
- complete_stage('319002', 1)
- complete_stage('319003', 1)
- complete_stage('319004', 1)
- complete_stage('319005', 1)
- complete_stage('319006', 1)
- complete_stage('319007', 1)
- complete_stage('319008', 1)
- print(Fore.PURPLE + Style.BRIGHT + 'Clear without PHY character')
- change_team()
- complete_stage('319009', 1)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear without AGL character')
- change_team()
- complete_stage('319010', 1)
- print(Fore.RED + Style.BRIGHT + 'Clear without INT character')
- change_team()
- complete_stage('319011', 1)
- print(Fore.GREEN + Style.BRIGHT + 'Clear without TEQ character')
- change_team()
- complete_stage('319012', 1)
- print(Fore.CYAN + Style.BRIGHT + 'Clear without STR character')
- change_team()
- complete_stage('319013', 1)
- print(Fore.WHITE + Style.BRIGHT + 'Clear with A CHARACTER OF EACH TYPE')
- change_team()
- complete_stage('319014', 2)
- complete_stage('319015', 2)
- complete_stage('319016', 2)
- complete_stage('319017', 2)
- complete_stage('319018', 2)
- complete_stage('319019', 2)
- complete_stage('319020', 2)
- complete_stage('319021', 2)
- complete_stage('319022', 2)
- complete_stage('319023', 2)
- complete_stage('319024', 2)
-
- print(Fore.CYAN + Style.BRIGHT + 'Clear all stages with EXTREME UNITS ONLY')
- change_team()
- complete_stage('320001', 1)
- complete_stage('320002', 1)
- complete_stage('320003', 1)
- complete_stage('320004', 1)
- complete_stage('320005', 1)
- complete_stage('320006', 1)
- complete_stage('320007', 1)
- complete_stage('320008', 1)
- print(Fore.PURPLE + Style.BRIGHT + 'Clear without INT character')
- change_team()
- complete_stage('320009', 1)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear without PHY character')
- change_team()
- complete_stage('320010', 1)
- print(Fore.RED + Style.BRIGHT + 'Clear without STR character')
- change_team()
- complete_stage('320011', 1)
- print(Fore.GREEN + Style.BRIGHT + 'Clear without TEQ character')
- change_team()
- complete_stage('320012', 1)
- print(Fore.CYAN + Style.BRIGHT + 'Clear without AGL character')
- change_team()
- complete_stage('320013', 1)
- print(Fore.WHITE + Style.BRIGHT + 'Clear with A CHARACTER OF EACH TYPE')
- change_team()
- complete_stage('320014', 2)
- complete_stage('320015', 2)
- complete_stage('320016', 2)
- complete_stage('320017', 2)
- complete_stage('320018', 2)
- complete_stage('320019', 2)
- complete_stage('320020', 2)
- complete_stage('320021', 2)
- complete_stage('320022', 2)
- complete_stage('320023', 2)
- complete_stage('320024', 2)
-
-
-def change_supporter():
- # Needs to have translation properly implemented!
-
- ###Get user cards
- print(Fore.CYAN + Style.BRIGHT + 'Fetching user cards...')
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('GET', '/cards'),
- 'Content-type': 'application/json',
- 'X-Language': 'en',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/cards'
- else:
- url = 'http://ishin-production.aktsk.jp/cards'
- r = requests.get(url, headers=headers)
- master_cards = r.json()['cards']
- print(Fore.GREEN + Style.BRIGHT + 'Done...')
-
- ###Sort user cards into a list of dictionaries with attributes
- print(Fore.CYAN + Style.BRIGHT + 'Fetching card attributes...')
- card_list = []
- for card in master_cards:
- ###Get card collection object from database
- try:
- config.Model.set_connection_resolver(config.db_glb)
- db_card = config.Cards.find_or_fail(card['card_id'])
- except:
- config.Model.set_connection_resolver(config.db_jp)
- db_card = config.Cards.find_or_fail(card['card_id'])
- #db_card = config.Cards.where('id','=',card['card_id']).first()
-
- ###Get card rarity
- if db_card.rarity == 0:
- rarity = 'N'
- elif db_card.rarity == 1:
- rarity = 'R'
- elif db_card.rarity == 2:
- rarity = 'SR'
- elif db_card.rarity == 3:
- rarity ='SSR'
- elif db_card.rarity == 4:
- rarity = 'UR'
- elif db_card.rarity == 5:
- rarity = 'LR'
- ###Get card Type
- if str(db_card.element)[-1] == '0':
- type ='[AGL] '
- elif str(db_card.element)[-1] == '1':
- type ='[TEQ] '
- elif str(db_card.element)[-1] == '2':
- type ='[INT] '
- elif str(db_card.element)[-1] == '3':
- type ='[STR] '
- elif str(db_card.element)[-1] == '4':
- type ='[PHY] '
- ###Get card categories list
- categories = []
- #Get category id's given card id
- card_card_categories = config.CardCardCategories.where(
- 'card_id','=',db_card.id).get()
-
- try:
- for category in card_card_categories:
- try:
- config.Model.set_connection_resolver(config.db_glb)
- categories.append(config.CardCategories.find(
- category.card_category_id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- categories.append(config.CardCategories.find(
- category.card_category_id).name)
- except:
- None
- ###Get card link_skills list
- link_skills = []
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill1_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill1_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill2_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill2_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill3_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill3_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill4_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill4_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill5_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill5_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill6_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill6_id).name)
- except:
- None
- except:
- None
- try:
- config.Model.set_connection_resolver(config.db_glb)
- link_skills.append(config.LinkSkills.find(db_card.link_skill7_id).name)
- except AttributeError:
- try:
- config.Model.set_connection_resolver(config.db_jp)
- link_skills.append(config.LinkSkills.find(db_card.link_skill7_id).name)
- except:
- None
- except:
- None
-
- dict = {
- 'ID': db_card.id,
- 'Rarity': rarity,
- 'Name': db_card.name,
- 'Type': type,
- 'Cost': db_card.cost,
- 'Hercule': db_card.is_selling_only,
- 'HP': db_card.hp_init,
- 'Categories':categories,
- 'Links':link_skills,
- 'UniqueID': card['id']
- }
- card_list.append(dict)
- print(Fore.GREEN + Style.BRIGHT + "Done...")
-
- ###Sort cards
- print(Fore.CYAN + Style.BRIGHT + "Sorting cards...")
- card_list = sorted(card_list, key=lambda k: k['Name'])
- card_list = sorted(card_list, key=lambda k: k['Rarity'])
- card_list = sorted(card_list, key=lambda k: k['Cost'])
- print(Fore.GREEN + Style.BRIGHT + "Done...")
- ###Define cards to display
- cards_to_display_dicts = []
- cards_to_display = []
- #Take cards in card_list that aren't hercule statues or kais?
- for char in card_list:
- if char['Hercule'] != 1 and char['HP'] > 5:
- cards_to_display_dicts.append(char)
- cards_to_display.append(char['Type'] + char['Rarity']+ ' ' +char['Name'] + ' | ' + str(char['ID']) + ' | '+ str(char['UniqueID']))
-
- ###Define links to display
- links_master = []
- config.Model.set_connection_resolver(config.db_jp)
- for link in config.LinkSkills.all():
- links_master.append(link.name)
- try:
- config.Model.set_connection_resolver(config.db_glb)
- links_master.append(config.LinkSkills.find_or_fail(link.id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- links_master.append(config.LinkSkills.find_or_fail(link.id).name)
-
- links_to_display = sorted(links_master)
-
- ###Define categories to display
- categories_master = []
- config.Model.set_connection_resolver(config.db_jp)
- for category in config.CardCategories.all():
- try:
- config.Model.set_connection_resolver(config.db_glb)
- categories_master.append(config.CardCategories.find_or_fail(category.id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- categories_master.append(config.CardCategories.find_or_fail(category.id).name)
-
- categories_to_display = sorted(categories_master)
-
- ###Define window layout
-
- col1 = [[sg.Listbox(values=(cards_to_display),size = (30,20),key='CARDS')],
- [sg.Listbox(values=([]),size = (30,6),key = 'CARDS_CHOSEN')],
- [sg.Button(button_text = 'Set as Supporter',key='choose_card')]]
-
- col2 = [[sg.Listbox(values=(sorted(categories_to_display)),size = (25,20),key = 'CATEGORIES')],
- [sg.Listbox(values=([]),size = (25,6),key = 'CATEGORIES_CHOSEN')],
- [sg.Button(button_text ='Choose Categories',key='choose_categories'),
- sg.Button(button_text ='Clear Categories',key='clear_categories')]]
-
- col3 = [[sg.Listbox(values=(sorted(links_to_display)),size = (25,20),key='LINKS')],
- [sg.Listbox(values=([]),size = (25,6),key = 'LINKS_CHOSEN')],
- [sg.Button(button_text ='Choose Links',key='choose_links'),
- sg.Button(button_text ='Clear Links',key='clear_links')]]
-
- layout = [[sg.Column(col1),sg.Column(col2),sg.Column(col3)]]
- window = sg.Window('Supporter Update',grab_anywhere=True,keep_on_top = True).Layout(layout)
-
-
- ###Begin window loop
- chosen_links = []
- chosen_categories = []
-
- ###
- chosen_cards_ids = []
- chosen_cards_unique_ids = []
- chosen_cards_names = []
- chosen_cards_to_display = []
-
- while len(chosen_cards_ids) < 1:
- event,values = window.Read()
-
- if event == None:
- return 0
-
- if event == 'choose_card':
- if len(values['CARDS']) < 1:
- continue
- #Get ID of chosen card to send to bandai
- chosen_line = values['CARDS'][0]
- char_name,char_id,char_unique_id = chosen_line.split(' | ')
- chosen_cards_ids.append(int(char_id))
- chosen_cards_unique_ids.append(int(char_unique_id))
- try:
- config.Model.set_connection_resolver(config.db_glb)
- chosen_cards_names.append(config.Cards.find(char_id).name)
- except:
- config.Model.set_connection_resolver(config.db_jp)
- chosen_cards_names.append(config.Cards.find(char_id).name)
-
-
- #Chosen cards to display in lower box
- chosen_cards_to_display.append(chosen_line)
-
- if event == 'choose_categories':
- for category in values['CATEGORIES']:
- chosen_categories.append(category)
- categories_to_display.remove(category)
-
- if event == 'clear_categories':
- categories_to_display.extend(chosen_categories)
- chosen_categories[:] = []
- categories_to_display = sorted(categories_to_display)
-
-
- if event == 'choose_links':
- for link in values['LINKS']:
- chosen_links.append(link)
- links_to_display.remove(link)
-
- if event == 'clear_links':
- links_to_display.extend(chosen_links)
- chosen_links[:] = []
- links_to_display = sorted(links_to_display)
- break
-
- ###Re-populate cards to display, checking filter criteria
- cards_to_display[:] = []
- for char in cards_to_display_dicts:
- if char['Name'] in chosen_cards_names:
- continue
-
- if len(list(set(chosen_links) & set(char['Links']))) != len(chosen_links):
- #print("List intersection")
- continue
-
- if len(list(set(chosen_categories) & set(char['Categories']))) != len(chosen_categories):
- #print("Category intersectino")
- continue
-
- cards_to_display.append(char['Type'] + char['Rarity']+ ' ' +char['Name'] + ' | ' + str(char['ID']) + ' | '+ str(char['UniqueID']))
-
-
- ###Update window elements
- window.FindElement('CARDS').Update(values=cards_to_display)
- window.FindElement('CARDS_CHOSEN').Update(values=chosen_cards_to_display)
- window.FindElement('CATEGORIES').Update(values=categories_to_display)
- window.FindElement('CATEGORIES_CHOSEN').Update(values=chosen_categories)
- window.FindElement('LINKS').Update(values=links_to_display)
- window.FindElement('LINKS_CHOSEN').Update(values=chosen_links)
-
- window.Close()
- ###Send selected supporter to bandai
- headers = {
- 'User-Agent': 'Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0',
- 'Accept': '*/*',
- 'Authorization': packet.mac('PUT', '/support_leaders'),
- 'Content-type': 'application/json',
- 'X-Platform': config.platform,
- 'X-AssetVersion': '////',
- 'X-DatabaseVersion': '////',
- 'X-ClientVersion': '////',
- }
- if config.client == 'global':
- url = 'https://ishin-global.aktsk.com/support_leaders'
- else:
- url = 'http://ishin-production.aktsk.jp/support_leaders'
- #print(chosen_cards_unique_ids)
- data = {'support_leader_ids':chosen_cards_unique_ids}
- #print(data)
- r = requests.put(url, data = json.dumps(data),headers = headers)
- if 'error' in r.json():
- print(Fore.RED + Style.BRIGHT+str(r.json()))
- else:
- #print(r.json())
- print(chosen_cards_names)
- print(Fore.GREEN + Style.BRIGHT+"Supporter updated!")
-
-
-def lr_farm():
-
- print('------------------------------------')
- while True:
- print(Fore.CYAN + Style.BRIGHT + 'Farm Lr,Tur,Ur Awakening Medals ')
- print('---------------------------------')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'TEQ Super Saiyan God SS Vegito :' + Fore.YELLOW + Style.BRIGHT + ' 0')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Majin Vegeta :' + Fore.YELLOW + Style.BRIGHT + ' 1')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Super Saiyan Goku & Super Saiyan Vegeta :' + Fore.YELLOW + Style.BRIGHT + ' 2')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Full Power Boujack (Galactic Warrior) :' + Fore.YELLOW + Style.BRIGHT + ' 3')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Cell (Perfect Form) & Cell Jr :' + Fore.YELLOW + Style.BRIGHT + ' 4')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Trunks (Teen) (Future) & Mai (Future) :' + Fore.YELLOW + Style.BRIGHT + ' 5')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Beerus & Whis :' + Fore.YELLOW + Style.BRIGHT + ' 6')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Super Saiyan Gohan (Teen) & Super Saiyan Goten (Kid) :' + Fore.YELLOW + Style.BRIGHT + ' 7')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Super Saiyan Goku (Angel) & Super Saiyan Vegeta (Angel) :' + Fore.YELLOW + Style.BRIGHT + ' 8')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Trunks (Kid) & Goten (Kid) :' + Fore.YELLOW + Style.BRIGHT + ' 9')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Super Saiyan 2 Gohan :' + Fore.YELLOW + Style.BRIGHT + ' 10')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Super Saiyan 3 Goku :' + Fore.YELLOW + Style.BRIGHT + ' 11')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Bardock :' + Fore.YELLOW + Style.BRIGHT + ' 12')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Goku Black (Super Saiyan Rosé) & Zamasu :' + Fore.YELLOW + Style.BRIGHT + ' 13')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Goku & Frieza (Final Form) (Angel):' + Fore.YELLOW + Style.BRIGHT + ' 14')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Lr Legendary Super Saiyan Broly :' + Fore.YELLOW + Style.BRIGHT + ' 15')
- print('---------------------------------')
-
- command = input('Enter your choice: ')
- if command == '0':
- print(' ')
- aa.ss()
- break
- elif command == '1':
- print(' ')
- Lrfarm.mv()
- break
- elif command == '2':
- print(' ')
- Lrfarm.gv()
- break
- elif command == '3':
- print(' ')
- Lrfarm.b()
- break
- elif command == '4':
- print(' ')
- Lrfarm.c()
- break
- elif command == '5':
- print(' ')
- Lrfarm.tm()
- break
- elif command == '6':
- print(' ')
- Lrfarm.bw()
- break
- elif command == '7':
- print(' ')
- Lrfarm.gg()
- break
- elif command == '8':
- print(' ')
- Lrfarm.vg()
- break
- elif command == '9':
- print(' ')
- Lrfarm.tg()
- break
- elif command == '10':
- print(' ')
- Lrfarm.gh()
- break
- elif command == '11':
- print(' ')
- Lrfarm.ggg()
- break
- elif command == '12':
- print(' ')
- Lrfarm.bd()
- break
- elif command == '13':
- print(' ')
- Lrfarm.gb()
- break
- elif command == '14':
- print(' ')
- Lrfarm.gf()
- break
- elif command == '15':
- print(' ')
- Lrfarm.by()
-
-
-def ur_farm():
-
- print('------------------------------------')
- while True:
- print(Fore.CYAN + Style.BRIGHT + 'Farm Tur,Ur Awakening Medals ')
- print('---------------------------------')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'TEQ Super Saiyan God SS Vegito:' + Fore.YELLOW + Style.BRIGHT + ' 0')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'PHY Super Saiyan Broly :' + Fore.YELLOW + Style.BRIGHT + ' 1')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'STR Super Gogeta :' + Fore.YELLOW + Style.BRIGHT + ' 2')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'AGL Super Saiyan Gogeta :' + Fore.YELLOW + Style.BRIGHT + ' 3')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'INT SSJ3 Bardock:' + Fore.YELLOW + Style.BRIGHT + ' 4')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'STR SSJ4 Goku :' + Fore.YELLOW + Style.BRIGHT + ' 5')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'INT UI Goku :' + Fore.YELLOW + Style.BRIGHT + ' 6')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'AGL SSJ4 Vegeta) :' + Fore.YELLOW + Style.BRIGHT + ' 7')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'PHY FP Frieza :' + Fore.YELLOW + Style.BRIGHT + ' 8')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'TEQ Golden Frieza :' + Fore.YELLOW + Style.BRIGHT + ' 9')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'AGL SSJ3 Goku :' + Fore.YELLOW + Style.BRIGHT + ' 10')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'TEQ SSJ4 Gogeta :' + Fore.YELLOW + Style.BRIGHT + ' 11')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'INT Super Gogeta :' + Fore.YELLOW + Style.BRIGHT + ' 12')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'SSJ3 Gotenks :' + Fore.YELLOW + Style.BRIGHT + ' 13')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'TEQ FP SSJ4 Goku:' + Fore.YELLOW + Style.BRIGHT + ' 14')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'STR Jiren :' + Fore.YELLOW + Style.BRIGHT + ' 15')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'INT Golden Frieza:' + Fore.YELLOW + Style.BRIGHT + ' 16')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'PHY Android 17 :' + Fore.YELLOW + Style.BRIGHT + ' 17')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'TEQ Hit:' + Fore.YELLOW + Style.BRIGHT + ' 18')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'AGL SSBE Vegeta :' + Fore.YELLOW + Style.BRIGHT + ' 19')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'PHY Kid Buu:' + Fore.YELLOW + Style.BRIGHT + ' 20')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'INT Kid Buu:' + Fore.YELLOW + Style.BRIGHT + ' 21')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'TEQ SSJ3 Goku (Angel):' + Fore.YELLOW + Style.BRIGHT + ' 22')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'PHY Goku Black :' + Fore.YELLOW + Style.BRIGHT + ' 23')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'INT Goku Black:' + Fore.YELLOW + Style.BRIGHT + ' 24')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'TEQ SSG Goku:' + Fore.YELLOW + Style.BRIGHT + ' 25')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'STR SSG Vegeta' + Fore.YELLOW + Style.BRIGHT + ' 26')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'AGL SSGSS Goku :' + Fore.YELLOW + Style.BRIGHT + ' 27')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'STR Toppo:' + Fore.YELLOW + Style.BRIGHT + ' 28')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'STR Rose Goku Black' + Fore.YELLOW + Style.BRIGHT + ' 29')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'PHY SSGSS Vegito' + Fore.YELLOW + Style.BRIGHT + ' 30')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'STR SSJ3 Goku :' + Fore.YELLOW + Style.BRIGHT + ' 31')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'TEQ SSJ3 Broly' + Fore.YELLOW + Style.BRIGHT + ' 32')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'AGL Transgoku :' + Fore.YELLOW + Style.BRIGHT + ' 33')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'STR SSJ3 Vegeta:' + Fore.YELLOW + Style.BRIGHT + ' 34')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'PHY SSJ3 Gotenks' + Fore.YELLOW + Style.BRIGHT + ' 35')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'AGL Turles' + Fore.YELLOW + Style.BRIGHT + ' 36')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'STR Janemba :' + Fore.YELLOW + Style.BRIGHT + ' 37')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'INT Janemba:' + Fore.YELLOW + Style.BRIGHT + ' 38')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'TEQ TransFrieza' + Fore.YELLOW + Style.BRIGHT + ' 39')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'AGL Broly' + Fore.YELLOW + Style.BRIGHT + ' 40')
- print('---------------------------------')
- print('---------------------------------')
-
- command = input('Enter your choice: ')
- if command == '0':
- print(' ')
- aa.ss()
- break
- elif command == '1':
- print(' ')
- aa.sss()
- break
- elif command == '2':
- print(' ')
- aa.ssss()
- break
- elif command == '3':
- print(' ')
- aa.s()
- break
- elif command == '4':
- print(' ')
- aa.a()
- break
- elif command == '5':
- print(' ')
- aa.aa()
- break
- elif command == '6':
- print(' ')
- aa.aaa()
- break
- elif command == '7':
- print(' ')
- aa.aaaa()
- break
- elif command == '8':
- print(' ')
- aa.b()
- break
- elif command == '9':
- print(' ')
- aa.bb()
- break
- elif command == '10':
- print(' ')
- aa.bbb()
- break
- elif command == '11':
- print(' ')
- aa.bbbb()
- break
- elif command == '12':
- print(' ')
- aa.c()
- break
- elif command == '13':
- print(' ')
- aa.cc()
- break
- elif command == '14':
- print(' ')
- aa.ccc()
- break
- elif command == '15':
- print(' ')
- aa.cccc()
- break
- elif command == '16':
- print(' ')
- aa.d()
- break
- elif command == '17':
- print(' ')
- aa.dd()
- break
- elif command == '18':
- print(' ')
- aa.ddd()
- break
- elif command == '19':
- print(' ')
- aa.dddd()
- break
- elif command == '20':
- print(' ')
- aa.e()
- break
- elif command == '21':
- print(' ')
- aa.ee()
- break
- elif command == '22':
- print(' ')
- aa.eee()
- break
- elif command == '23':
- print(' ')
- aa.eeee()
- break
- elif command == '24':
- print(' ')
- aa.f()
- break
- elif command == '25':
- print(' ')
- aa.ff()
- break
- elif command == '26':
- print(' ')
- aa.ffx()
- break
- elif command == '27':
- print(' ')
- aa.fff()
- break
- elif command == '28':
- print(' ')
- aa.ffff()
- break
- elif command == '29':
- print(' ')
- aa.g()
- break
- elif command == '30':
- print(' ')
- aa.gg()
- break
- elif command == '31':
- print(' ')
- aa.ggg()
- break
- elif command == '32':
- print(' ')
- aa.gggx()
- break
- elif command == '33':
- print(' ')
- aa.gggg()
- break
- elif command == '34':
- print(' ')
- aa.h()
- break
- elif command == '35':
- print(' ')
- aa.hh()
- break
- elif command == '36':
- print(' ')
- aa.hhh()
- break
- elif command == '37':
- print(' ')
- aa.hhhh()
- break
- elif command == '38':
- print(' ')
- aa.j()
- break
- elif command == '39':
- print(' ')
- aa.jj()
- break
- elif command == '40':
- print(' ')
- aa.jjj()
- break
-
-
-
-discordurl = 'https://discord.gg/GFExDwX'
-
-def TF():
-
- print('------------------------------------')
- while True:
- print(Fore.CYAN + Style.BRIGHT + 'Farm Tresures ')
- print('---------------------------------')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Gems:' + Fore.YELLOW + Style.BRIGHT + ' 0')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Metal Fruit:' + Fore.YELLOW + Style.BRIGHT + ' 1')
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'Hercule Badges:' + Fore.YELLOW + Style.BRIGHT + ' 2')
- print('---------------------------------')
-
- command = input('Enter your choice: ')
- if command == '0':
- print(' ')
- gems()
- break
- if command == '1':
- print(' ')
- metal()
- break
- if command == '2':
- print(' ')
- hercule()
- break
-
-def gems():
- stage = input('What stage would you like to complete?(23007): ')
- difficulty = input('Enter the difficulty|(3): ')
- loop = input('Enter how many times to execute(39): ')
- for i in range(int(loop)):
- complete_stage(stage, difficulty)
-
-
-def metal():
- stage = input('What stage would you like to complete?(32207): ')
- difficulty = input('Enter the difficulty|(2): ')
- loop = input('Enter how many times to execute(39): ')
- for i in range(int(loop)):
- complete_stage(stage, difficulty)
-
-def hercule():
- stage = input('What stage would you like to complete?(32410): ')
- difficulty = input('Enter the difficulty|(2): ')
- loop = input('Enter how many times to execute(39): ')
- for i in range(int(loop)):
- complete_stage(stage, difficulty)
diff --git a/config.py b/config.py
deleted file mode 100644
index 29596aa..0000000
--- a/config.py
+++ /dev/null
@@ -1,121 +0,0 @@
-from orator import DatabaseManager, Model
-
-AdId = None
-UniqueId = None
-identifier = None
-access_token = None
-secret = None
-client = 'japan'
-platform = 'android'
-
-deck = 1
-allow_stamina_refill = True
-
-
-### Database Config
-jp_config = {'mysql': {'driver': 'sqlite', 'database': 'jp.db'}}
-glb_config = {'mysql': {'driver': 'sqlite', 'database': 'glb.db'}}
-db_glb = DatabaseManager(glb_config)
-db_jp = DatabaseManager(jp_config)
-Model.set_connection_resolver(db_glb)
-
-class LeaderSkills(Model):
-
- __table__ = 'leader_skills'
-
-class LinkSkills(Model):
-
- __table__ = 'link_skills'
-
-class AreaTabs(Model):
-
- __table__ = 'area_tabs'
-
-class CardSpecials(Model):
-
- __table__ = 'card_specials'
-
-class Passives(Model):
-
- __table__ = 'passive_skill_sets'
-
-class Supers(Model):
-
- __table__ = 'specials'
-
-class ZBattles(Model):
-
- __table__ = 'z_battle_stage_views'
-
-class CardCategories(Model):
-
- __table__ = 'card_categories'
-
-class CardCardCategories(Model):
-
- __table__ = 'card_card_categories'
-
-class TreasureItems(Model):
-
- __table__ = 'treasure_items'
-
-
-class AwakeningItems(Model):
-
- __table__ = 'awakening_items'
-
-
-class SupportItems(Model):
-
- __table__ = 'support_items'
-
-
-class PotentialItems(Model):
-
- __table__ = 'potential_items'
-
-class SpecialItems(Model):
-
- __table__ = 'special_items'
-
-
-class TrainingItems(Model):
-
- __table__ = 'training_items'
-
-
-class Cards(Model):
-
- __table__ = 'cards'
-
-
-class Quests(Model):
-
- __table__ = 'quests'
-
-class Ranks(Model):
-
- __table__ = 'rank_statuses'
-
-
-class TrainingFields(Model):
-
- __table__ = 'training_fields'
-
-
-class Sugoroku(Model):
-
- __table__ = 'sugoroku_maps'
-
-
-class Area(Model):
-
- __table__ = 'areas'
-
-
-class Medal(Model):
-
- __table__ = 'awakening_items'
-
-
-
diff --git a/database.db b/database.db
deleted file mode 100644
index a50c9b1..0000000
Binary files a/database.db and /dev/null differ
diff --git a/dataenc_glb.db b/dataenc_glb.db
deleted file mode 100644
index fa70fc1..0000000
Binary files a/dataenc_glb.db and /dev/null differ
diff --git a/dataenc_jp.db b/dataenc_jp.db
deleted file mode 100644
index b27af53..0000000
Binary files a/dataenc_jp.db and /dev/null differ
diff --git a/decrypt.py b/decrypt.py
deleted file mode 100644
index 96236d3..0000000
--- a/decrypt.py
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-# Module : decrypt.py
-# Author : bssthu
-# Project : pysqlsimplecipher
-# Creation date : 2016-06-03
-# Description :
-#
-
-
-import sys
-from pysqlsimplecipher import decryptor
-
-
-def usage():
- print('Usage: python decrypt.py encrypted.db password output.db')
-
-
-def main():
- # arguments
- argv = sys.argv
- if len(argv) != 4:
- usage()
- return
- filename_in = argv[1]
- password = bytearray(argv[2].encode('utf8'))
- filename_out = argv[3]
-
- decryptor.decrypt_file(filename_in, password, filename_out)
-
-
-if __name__ == '__main__':
- main()
diff --git a/decryptor.py b/decryptor.py
deleted file mode 100644
index 89ac460..0000000
--- a/decryptor.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-# Module : decrypt.py
-# Author : bssthu
-# Project : pysqlsimplecipher
-# Creation date : 2016-06-03
-# Description :
-#
-
-
-import sys
-from pysqlsimplecipher import decryptor
-
-
-def usage():
- print('Usage: python decrypt.py encrypted.db password output.db')
-
-
-def main(p = '9bf9c6ed9d537c399a6c4513e92ab24717e1a488381e3338593abd923fc8a13b'):
-
- password = bytearray(p.encode('utf8'))
- if p == '9bf9c6ed9d537c399a6c4513e92ab24717e1a488381e3338593abd923fc8a13b':
- filename_in = 'dataenc_glb.db'
- filename_out = 'glb.db'
- else:
- filename_in = 'dataenc_jp.db'
- filename_out = 'jp.db'
-
- decryptor.decrypt_file(filename_in, password, filename_out)
-
-
-if __name__ == '__main__':
- main()
diff --git a/dokkan.py b/dokkan.py
deleted file mode 100644
index 5fb6ea9..0000000
--- a/dokkan.py
+++ /dev/null
@@ -1,122 +0,0 @@
-from colorama import init, Fore, Back, Style
-import commands
-import config
-import sys
-
-# Coloroma autoreset
-init(autoreset=True)
-
-
-while True:
- print(' ')
- print(Fore.CYAN + Style.BRIGHT + 'Select one of the following')
- print('---------------------------------')
- print(' ')
- # Database Check.
- while True:
- print('Check for updated database? (' + Fore.YELLOW + Style.BRIGHT + 'Yes: 1 ' + Style.RESET_ALL + 'or ' + Fore.YELLOW + Style.BRIGHT + 'No: 2' + Style.RESET_ALL + ')',end='')
- print()
- db = input(' ')
- if db.lower() == '1':
- commands.db_download()
- break
- elif db.lower() == '2':
- break
- else:
- print('')
- continue
-
- # Daily Logins?
- print(' ')
- print(Fore.CYAN + Style.BRIGHT + 'Choose an option')
- print('---------------------------------')
- print(' ')
- while True:
- print('Perform daily logins on all accounts? (' + Fore.YELLOW + Style.BRIGHT + 'Yes: 1 ' + Style.RESET_ALL + 'or ' + Fore.YELLOW + Style.BRIGHT + 'No: 2' + Style.RESET_ALL + ')',end='')
- print()
- db = input(' ')
- if db.lower() == '1':
- commands.bulk_daily_logins()
- break
- elif db.lower() == '2':
- break
- else:
- continue
-
- # Decide which client to use.
- print(' ')
- print(Fore.CYAN + Style.BRIGHT + 'Choose a version')
- print('---------------------------------')
- print(' ')
- while True:
- print('Which version? (' + Fore.YELLOW + Style.BRIGHT + 'Jp: 1 ' + Style.RESET_ALL + 'or ' + Fore.YELLOW + Style.BRIGHT + 'Global: 2' + Style.RESET_ALL + ')',end='')
- print()
- client = input(" ")
- if client.lower() == '1':
- config.client = 'japan'
- break
- elif client.lower() == '2':
- config.client = 'global'
- break
- else:
- continue
-
-
- # User Options
- print(' ')
- while True:
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + 'New Account :' + Fore.YELLOW + Style.BRIGHT + ' 0')
- print(Fore.CYAN + Style.BRIGHT + 'Transfer Account :' + Fore.YELLOW + Style.BRIGHT + ' 1')
- print(Fore.CYAN + Style.BRIGHT + 'Load From Save :' + Fore.YELLOW + Style.BRIGHT + ' 2')
- print('---------------------------------')
- print(' ')
- command = input('Enter your choice: ')
- if command == '0':
- print(' ')
- config.identifier = commands.signup()
- commands.save_account()
- config.access_token,config.secret = commands.signin(config.identifier)
- commands.tutorial()
- commands.daily_login()
- break
- elif command == '1':
- print(' ')
- commands.transfer_account()
- commands.daily_login()
- break
- elif command == '2':
- print(' ')
- commands.load_account()
- commands.daily_login()
- commands.accept_gifts()
- commands.accept_missions()
- break
- else:
- print(Fore.RED + Style.BRIGHT + "Command not understood")
-
-
- # User commands.
- while True:
- print('---------------------------------')
- print(Fore.CYAN + Style.BRIGHT + "Type" + Fore.YELLOW + Style.BRIGHT + " 'help'" + Fore.CYAN + Style.BRIGHT + " to view all commands.")
-
- # Set up comma separated chain commands. Handled via stdin
- try:
- command = input()
- except:
- sys.stdin = sys.__stdin__
- command = input()
-
- if command == 'exit':
- break
- # Pass command to command executor and handle keyboard interrupts.
- try:
- commands.user_command_executor(command)
- except KeyboardInterrupt:
- print(Fore.CYAN + Style.BRIGHT + 'User interrupted process.')
- except Exception as e:
- print(Fore.RED + Style.BRIGHT + repr(e))
-
-
-
diff --git a/encrypt.py b/encrypt.py
deleted file mode 100644
index a43a7e2..0000000
--- a/encrypt.py
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-# Module : encrypt.py
-# Author : bssthu
-# Project : pysqlsimplecipher
-# Creation date : 2016-06-03
-# Description :
-#
-
-
-import sys
-from pysqlsimplecipher import encryptor
-
-
-def usage():
- print('Usage: python encrypt.py plain.db password output.db')
-
-
-def main():
- # arguments
- argv = sys.argv
- if len(argv) != 4:
- usage()
- return
- filename_in = argv[1]
- password = bytearray(argv[2].encode('utf8'))
- filename_out = argv[3]
-
- encryptor.encrypt_file(filename_in, password, filename_out)
-
-
-if __name__ == '__main__':
- main()
diff --git a/extra.py b/extra.py
deleted file mode 100644
index c9e0cc0..0000000
--- a/extra.py
+++ /dev/null
@@ -1,188 +0,0 @@
-import commands
-from colorama import init, Fore, Back, Style
-# Coloroma autoreset
-init(autoreset=True)
-
-
-def sbr_new():
-
- print('---------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Universe Survival Sagaa Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710021', 5)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Super Saiyan 3" Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710022', 5)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Giant Form Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710023', 5)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Transformation Boost Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710024', 5)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Ginyu Force Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710025', 5)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Movie Bosses Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710026', 5)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Pure Saiyans Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710027', 5)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Future Saga Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710028', 5)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Full Power Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710029', 5)
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Androids Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710030', 5)
-
-
-def sbr_next():
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Super Class Team')
-
- commands.change_team()
-
- commands.complete_stage('710011', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Extreme Class Team')
-
- commands.change_team()
-
- commands.complete_stage('710012', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Fusion Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710013', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Shadow Dragons Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710014', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Peppy Gals Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710015', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Hybrid Saiyans Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710016', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Resurrected Warriors Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710017', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Realm of Gods Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710018', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Majin Buu Saga Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710019', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Potara Category Team')
-
- commands.change_team()
-
- commands.complete_stage('710020', 5)
-
- print('---------------------------------')
-
-
-def complete_sbr():
- print('------------------------------------')
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Super TEQ Team')
-
- commands.change_team()
-
- commands.complete_stage('710001', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Extreme TEQ Team')
-
- commands.change_team()
-
- commands.complete_stage('710002', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Super INT Team')
-
- commands.change_team()
-
- commands.complete_stage('710003', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Extreme INT Team')
-
- commands.change_team()
-
- commands.complete_stage('710004', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Super PHY Team')
-
- commands.complete_stage('710005', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Extreme PHY Team')
-
- commands.change_team()
-
- commands.complete_stage('710006', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Super AGL Team')
-
- commands.change_team()
-
- commands.complete_stage('710007', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Extreme AGL Team')
-
- commands.change_team()
-
- commands.complete_stage('710008', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Super STR Team')
-
- commands.change_team()
-
- commands.complete_stage('710009', 5)
-
- print(Fore.YELLOW + Style.BRIGHT + 'Clear with Extreme STR Team')
-
- commands.change_team()
-
- commands.complete_stage('710010', 5)
-
-
-print('---------------------------------')
-
diff --git a/glb.db b/glb.db
deleted file mode 100644
index 34354f4..0000000
Binary files a/glb.db and /dev/null differ
diff --git a/help.txt b/help.txt
deleted file mode 100644
index 4336a9e..0000000
--- a/help.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-1572486763
-1569982484
diff --git a/jp.db b/jp.db
deleted file mode 100644
index a937756..0000000
Binary files a/jp.db and /dev/null differ
diff --git a/packet.py b/packet.py
deleted file mode 100644
index 9bf6a76..0000000
--- a/packet.py
+++ /dev/null
@@ -1,139 +0,0 @@
-### packet.py contains functions critical to sending requests to the server
-
-import base64
-import binascii
-import config
-from Crypto.Cipher import AES
-import hashlib
-import hmac
-import json
-import os
-import time
-import uuid
-
-# Padding for the input string --not
-# related to encryption itself.
-
-BLOCK_SIZE = 16 # Bytes
-pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * chr(BLOCK_SIZE
- - len(s) % BLOCK_SIZE)
-unpad = lambda s: s[:-ord(s[len(s) - 1:])]
-
-####################################################################
-
-def guid():
-
- # Generates UniqueID & AdIDcompatible with Bandais servers
- # Returns dict
-
- UUID = str(uuid.uuid4())
- UniqueId = str(uuid.uuid4()) + ':' + UUID[0:8]
- return dict(AdId=str(uuid.uuid4()), UniqueId=UniqueId)
-
-####################################################################
-
-def mac(method,action):
-
- # Creates Mac Authentication header string used when sending requests
- # returns string
-
- ts = str(int(round(time.time(), 0)))
- nonce = ts + ':' + config.AdId
- if config.client == 'global':
- value = ts + '\n' + nonce + '\n' + method + '\n' + action + '\n' \
- + 'ishin-global.aktsk.com' + '\n' + '3001' + '''
-
-'''
- else:
- value = ts + '\n' + nonce + '\n' + method + '\n' + action + '\n' \
- + 'ishin-production.aktsk.jp' + '\n' + '3001' + '''
-
-'''
-
-
- hmac_hex_bin = hmac.new(config.secret.encode('utf-8'), value.encode('utf-8'
- ), hashlib.sha256).digest()
- mac = base64.b64encode(hmac_hex_bin).decode()
- final = 'MAC ' + 'id=' + '"' + config.access_token + '"' + ' nonce=' + '"' \
- + nonce + '"' + ' ts=' + '"' + ts + '"' + ' mac=' + '"' + mac \
- + '"'
- return final
-
-####################################################################
-# ================================================================
-# get_key_and_iv
-# ================================================================
-
-def get_key_and_iv(
- password,
- salt,
- klen=32,
- ilen=16,
- msgdgst='md5',
- ):
- '''
- Derive the key and the IV from the given password and salt.
-
- This is a niftier implementation than my direct transliteration of
- the C++ code although I modified to support different digests.
-
- CITATION: http://stackoverflow.com/questions/13907841/implement-openssl-aes-encryption-in-python
-
- @param password The password to use as the seed.
- @param salt The salt.
- @param klen The key length.
- @param ilen The initialization vector length.
- @param msgdgst The message digest algorithm to use.
- '''
-
- # equivalent to:
- # from hashlib import as mdf
- # from hashlib import md5 as mdf
- # from hashlib import sha512 as mdf
-
- mdf = getattr(__import__('hashlib', fromlist=[msgdgst]), msgdgst)
- password = password.encode('ascii', 'ignore') # convert to ASCII
-
- try:
- maxlen = klen + ilen
- keyiv = mdf(password + salt).digest()
- tmp = [keyiv]
- while len(tmp) < maxlen:
- tmp.append(mdf(tmp[-1] + password + salt).digest())
- keyiv += tmp[-1] # append the last byte
- key = keyiv[:klen]
- iv = keyiv[klen:klen + ilen]
- return (key, iv)
- except UnicodeDecodeError:
- return (None, None)
-
-
-####################################################################
-def encrypt_sign(data):
- data = pad(data)
- key1 = str.encode(data)
- password = \
- 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzJ9JaHioVi6rr0TAfr6j'
- salt = os.urandom(8)
- (key, iv) = get_key_and_iv(password, salt, klen=32, ilen=16,
- msgdgst='md5')
- cipher = AES.new(key, AES.MODE_CBC, iv)
- a = cipher.encrypt(key1)
- a = salt + a
- return base64.b64encode(a).decode()
-
-
-####################################################################
-def decrypt_sign(sign):
- buffer = base64.b64decode(sign)
- buffer_encoded = base64.b64encode(buffer)
- password = \
- 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzJ9JaHioVi6rr0TAfr6j'
- salt = buffer[0:8]
- (key, iv) = get_key_and_iv(password, salt, klen=32, ilen=16,
- msgdgst='md5')
- data = buffer[8:len(buffer)]
- cipher = AES.new(key, AES.MODE_CBC, iv)
- a = unpad(cipher.decrypt(data)).decode('utf8')
- return json.loads(a)
-####################################################################
diff --git a/pysqlsimplecipher/__init__.py b/pysqlsimplecipher/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/pysqlsimplecipher/__pycache__/__init__.cpython-37.pyc b/pysqlsimplecipher/__pycache__/__init__.cpython-37.pyc
deleted file mode 100644
index 061cac8..0000000
Binary files a/pysqlsimplecipher/__pycache__/__init__.cpython-37.pyc and /dev/null differ
diff --git a/pysqlsimplecipher/__pycache__/config.cpython-37.pyc b/pysqlsimplecipher/__pycache__/config.cpython-37.pyc
deleted file mode 100644
index bfea50b..0000000
Binary files a/pysqlsimplecipher/__pycache__/config.cpython-37.pyc and /dev/null differ
diff --git a/pysqlsimplecipher/__pycache__/decryptor.cpython-37.pyc b/pysqlsimplecipher/__pycache__/decryptor.cpython-37.pyc
deleted file mode 100644
index 537f2f4..0000000
Binary files a/pysqlsimplecipher/__pycache__/decryptor.cpython-37.pyc and /dev/null differ
diff --git a/pysqlsimplecipher/__pycache__/util.cpython-37.pyc b/pysqlsimplecipher/__pycache__/util.cpython-37.pyc
deleted file mode 100644
index dd0c933..0000000
Binary files a/pysqlsimplecipher/__pycache__/util.cpython-37.pyc and /dev/null differ
diff --git a/pysqlsimplecipher/config.py b/pysqlsimplecipher/config.py
deleted file mode 100644
index ace3f5e..0000000
--- a/pysqlsimplecipher/config.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-# Module : config.py
-# Author : bssthu
-# Project : pysqlsimplecipher
-# Creation date : 2016-06-03
-# Description :
-#
-
-
-salt_mask = 0x3a
-key_sz = 32
-key_iter = 64000
-hmac_key_sz = 32
-hmac_key_iter = 2
-page_sz = 1024
-iv_sz = 16
-reserve_sz = 48
-hmac_sz = 20
diff --git a/pysqlsimplecipher/decryptor.py b/pysqlsimplecipher/decryptor.py
deleted file mode 100644
index f3216d9..0000000
--- a/pysqlsimplecipher/decryptor.py
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-# Module : decryptor.py
-# Author : bssthu
-# Project : pysqlsimplecipher
-# Creation date : 2016-06-03
-# Description :
-#
-
-
-from pysqlsimplecipher import config
-from pysqlsimplecipher import util
-
-
-def decrypt_file(filename_in, password, filename_out):
- if not isinstance(filename_in, str):
- raise RuntimeError('filename_in must be a str.')
- if not isinstance(password, bytearray):
- raise RuntimeError('password must be a bytearray.')
- if not isinstance(filename_out, str):
- raise RuntimeError('filename_out must be a str.')
-
- # read
- with open(filename_in, 'rb') as fp:
- raw = fp.read()
-
- # decrypt
- dec = decrypt_default(raw, password)
-
- # write
- with open(filename_out, 'wb') as fp:
- fp.write(dec)
-
-
-def decrypt_default(raw, password):
- # configs
- salt_mask = config.salt_mask
- key_sz = config.key_sz
- key_iter = config.key_iter
- hmac_key_sz = config.hmac_key_sz
- hmac_key_iter = config.hmac_key_iter
- page_sz = config.page_sz
- iv_sz = config.iv_sz
- reserve_sz = config.reserve_sz
- hmac_sz = config.hmac_sz
-
- return decrypt(raw, password, salt_mask, key_sz, key_iter, hmac_key_sz, hmac_key_iter, page_sz, iv_sz, reserve_sz, hmac_sz)
-
-
-def decrypt(raw, password, salt_mask, key_sz, key_iter, hmac_key_sz, hmac_key_iter, page_sz, iv_sz, reserve_sz, hmac_sz):
- dec = b'SQLite format 3\0'
-
- # derive key
- salt_sz = 16
- salt = raw[:salt_sz]
- key, hmac_key = util.key_derive(salt, password, salt_mask, key_sz, key_iter, hmac_key_sz, hmac_key_iter)
-
- # decrypt file header, try with default page size
- page_sz, reserve_sz = decrypt_page_header(raw, key, salt_sz, page_sz, iv_sz, reserve_sz)
- if page_sz < 0 or reserve_sz < 0:
- raise RuntimeError('failed to decide page size or reserve size.')
-
- # decrypt pages
- for i in range(0, int(len(raw) / 1024)):
- page = util.get_page(raw, page_sz, i + 1)
- if i == 0:
- # skip salt
- page = page[salt_sz:]
- page_content = page[:-reserve_sz]
- reserve = page[-reserve_sz:]
- iv = reserve[:iv_sz]
- # check hmac
- hmac_old = reserve[iv_sz:iv_sz+hmac_sz]
- hmac_new = util.generate_hmac(hmac_key, page_content + iv, i + 1)
- if not hmac_old == hmac_new:
- raise RuntimeError('hmac check failed in page %d.' % (i+1))
- # decrypt content
- page_dec = util.decrypt(page_content, key, iv)
- dec += page_dec + util.random_bytes(reserve_sz)
-
- return dec
-
-
-def decrypt_page_header(raw, key, salt_sz, page_sz, iv_sz, reserve_sz):
- """Try to decrypt first page with default config.
-
- If default page size fail, change page size.
- When succeed, return page_sz, reserve_sz.
- If fail, return -1, -1.
- """
-
- if not util.is_valid_page_size(page_sz):
- page_sz = 512
-
- new_reserve_sz = try_get_reserve_size_for_specified_page_size(raw, key, salt_sz, page_sz, iv_sz, reserve_sz)
- if new_reserve_sz > 0: # default page_sz is ok
- return page_sz, new_reserve_sz
-
- page_sz = 512
- while page_sz <= 65536:
- new_reserve_sz = try_get_reserve_size_for_specified_page_size(raw, key, salt_sz, page_sz, iv_sz, reserve_sz)
- if new_reserve_sz > 0:
- return page_sz, new_reserve_sz
- page_sz <<= 1
-
- return -1, -1 # fail
-
-
-def try_get_reserve_size_for_specified_page_size(raw, key, salt_sz, page_sz, iv_sz, reserve_sz):
- """Try to decrypt first page with specified page size.
-
- If default reserve size fail, change reserve size.
- When succeed, return reserve size.
- If always fail, return -1.
- """
-
- first_page_content = util.get_page(raw, page_sz, 1)[salt_sz:]
-
- if reserve_sz >= iv_sz:
- first_page_dec = decrypt_by_reserve_size(first_page_content, key, iv_sz, reserve_sz)
- # default reserve_sz is ok
- if util.is_valid_decrypted_header(first_page_dec) \
- and page_sz == util.get_page_size_from_database_header(raw[:salt_sz] + first_page_dec) \
- and reserve_sz == util.get_reserved_size_from_database_header(raw[:salt_sz] + first_page_dec):
- return reserve_sz
-
- # try every possible reserve size.
- # the usable size of a page is at least 480.
- for reserve_sz in range(iv_sz, page_sz - 480):
- first_page_dec = decrypt_by_reserve_size(first_page_content, key, iv_sz, reserve_sz)
- if util.is_valid_decrypted_header(first_page_dec) \
- and page_sz == util.get_page_size_from_database_header(raw[:salt_sz] + first_page_dec) \
- and reserve_sz == util.get_reserved_size_from_database_header(raw[:salt_sz] + first_page_dec):
- return reserve_sz
-
- return -1 # fail
-
-
-def decrypt_by_reserve_size(first_page_without_salt, key, iv_sz, reserve_sz):
- """Decrypt page content using specified reserve size"""
- reserve = first_page_without_salt[-reserve_sz:]
- iv = reserve[:iv_sz]
- return util.decrypt(first_page_without_salt, key, iv)
diff --git a/pysqlsimplecipher/encryptor.py b/pysqlsimplecipher/encryptor.py
deleted file mode 100644
index ef86956..0000000
--- a/pysqlsimplecipher/encryptor.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-# Module : encryptor.py
-# Author : bssthu
-# Project : pysqlsimplecipher
-# Creation date : 2016-06-03
-# Description :
-#
-
-
-import hashlib
-import hmac
-from pysqlsimplecipher import config
-from pysqlsimplecipher import util
-
-
-def check_database_header(header):
- if not util.is_valid_database_header(header):
- raise RuntimeError('invalid database header.')
-
- page_sz = util.get_page_size_from_database_header(header)
- if not util.is_valid_page_size(page_sz):
- raise RuntimeError('invalid page size %d.' % page_sz)
-
- reserve_sz = util.get_reserved_size_from_database_header(header)
- if reserve_sz == 0:
- raise RuntimeError('needs reserved space at the end of each page.')
-
- return page_sz, reserve_sz
-
-
-def encrypt_file(filename_in, password, filename_out):
- if not isinstance(filename_in, str):
- raise RuntimeError('filename_in must be a str.')
- if not isinstance(password, bytearray):
- raise RuntimeError('password must be a bytearray.')
- if not isinstance(filename_out, str):
- raise RuntimeError('filename_out must be a str.')
-
- # read
- with open(filename_in, 'rb') as fp:
- raw = fp.read()
-
- # check header
- page_sz, reserve_sz = check_database_header(raw[:100])
-
- # encrypt
- dec = encrypt_default(raw, password, page_sz, reserve_sz)
-
- # write
- with open(filename_out, 'wb') as fp:
- fp.write(dec)
-
-
-def encrypt_default(raw, password, page_sz, reserve_sz):
- # configs
- salt_mask = config.salt_mask
- key_sz = config.key_sz
- key_iter = config.key_iter
- hmac_key_sz = config.hmac_key_sz
- hmac_key_iter = config.hmac_key_iter
- iv_sz = config.iv_sz
- hmac_sz = config.hmac_sz
-
- if reserve_sz < iv_sz + hmac_sz:
- raise RuntimeError('reserved space at the end of each page is %d, needs %d.' % (reserve_sz, iv_sz + hmac_sz))
-
- return encrypt(raw, password, salt_mask, key_sz, key_iter, hmac_key_sz, hmac_key_iter, page_sz, iv_sz, reserve_sz, hmac_sz)
-
-
-def encrypt(raw, password, salt_mask, key_sz, key_iter, hmac_key_sz, hmac_key_iter, page_sz, iv_sz, reserve_sz, hmac_sz):
- salt_sz = 16
- salt = util.random_bytes(salt_sz)
- enc = salt
-
- # derive key
- key, hmac_key = util.key_derive(salt, password, salt_mask, key_sz, key_iter, hmac_key_sz, hmac_key_iter)
-
- # encrypt pages
- for i in range(0, int(len(raw) / 1024)):
- page = util.get_page(raw, page_sz, i + 1)
- if i == 0:
- # skip header string
- page = page[salt_sz:]
- page_content = page[:-reserve_sz]
- iv = util.random_bytes(iv_sz)
- # encrypt content
- page_enc = util.encrypt(page_content, key, iv)
- # generate hmac
- hmac_new = util.generate_hmac(hmac_key, page_enc + iv, i + 1)
- enc += page_enc + iv + hmac_new
- if reserve_sz > iv_sz + hmac_sz:
- enc += util.random_bytes(reserve_sz - iv_sz - hmac_sz)
-
- return enc
diff --git a/pysqlsimplecipher/util.py b/pysqlsimplecipher/util.py
deleted file mode 100644
index 396bc49..0000000
--- a/pysqlsimplecipher/util.py
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-# Module : util.py
-# Author : bssthu
-# Project : pysqlsimplecipher
-# Creation date : 2016-06-03
-# Description :
-#
-
-
-import os
-import math
-import hashlib
-import hmac
-import struct
-from Crypto.Cipher import AES
-
-
-def encrypt(raw, key, iv):
- cipher = AES.new(key, AES.MODE_CBC, iv)
- return cipher.encrypt(raw)
-
-
-def decrypt(raw, key, iv):
- cipher = AES.new(key, AES.MODE_CBC, iv)
- return cipher.decrypt(raw)
-
-
-def is_valid_database_header(header):
- return header[:16] == b'SQLite format 3\0' and is_valid_decrypted_header(header[16:])
-
-
-def is_valid_decrypted_header(header):
- # skip first 16 bytes
- if type(header) is str: # python2
- header = [ord(x) for x in header]
- return header[21-16] == 64 and header[22-16] == 32 and header[23-16] == 32
-
-
-def get_page_size_from_database_header(header):
- if type(header) is str: # python2
- page_sz = 256 * ord(header[16]) + ord(header[17])
- else:
- page_sz = int.from_bytes(header[16:18], 'big')
- if page_sz == 1: # since SQLite version 3.7.1
- page_sz = 65536
- return page_sz
-
-
-def get_reserved_size_from_database_header(header):
- if type(header) is str: # python2
- return ord(header[20])
- else:
- return int(header[20])
-
-
-def is_valid_page_size(page_sz):
- # page_sz must be power of 2, and greater than 512
- return page_sz >= 512 and page_sz == 2 ** int(math.log(page_sz, 2))
-
-
-def get_page(raw, page_sz, page_no):
- return raw[page_sz*(page_no-1):page_sz*page_no]
-
-
-def random_bytes(n):
- return os.urandom(n)
-
-
-def key_derive(salt, password, salt_mask, key_sz, key_iter, hmac_key_sz, hmac_key_iter):
- """Derive an encryption key for page encryption/decryption, an key for hmac generation"""
- key = hashlib.pbkdf2_hmac('sha1', password, salt, key_iter, key_sz)
-
- try:
- hmac_salt = bytearray([x ^ salt_mask for x in salt])
- hmac_key = hashlib.pbkdf2_hmac('sha1', key, hmac_salt, hmac_key_iter, hmac_key_sz)
- except TypeError: # python2
- hmac_salt = b''
- for x in salt:
- hmac_salt += chr(ord(x) ^ salt_mask)
- hmac_key = hashlib.pbkdf2_hmac('sha1', str(key), hmac_salt, hmac_key_iter, hmac_key_sz)
- return key, hmac_key
-
-
-def generate_hmac(hmac_key, content, page_no):
- hmac_obj = hmac.new(hmac_key, content, hashlib.sha1)
- hmac_obj.update(struct.pack('
+ python wget.py
+
+Downloads: http://pypi.python.org/pypi/wget/
+Development: http://bitbucket.org/techtonik/python-wget/
+
+wget.py is not option compatible with Unix wget utility,
+to make command line interface intuitive for new people.
+
+Public domain by anatoly techtonik
+Also available under the terms of MIT license
+Copyright (c) 2010-2015 anatoly techtonik
+"""
+
+__version__ = "3.2"
+
+
+import sys, shutil, os
+import tempfile
+import math
+
+PY3K = sys.version_info >= (3, 0)
+if PY3K:
+ import urllib.request as ulib
+ import urllib.parse as urlparse
+else:
+ import urllib as ulib
+ import urlparse
+
+
+# --- workarounds for Python misbehavior ---
+
+# enable passing unicode arguments from command line in Python 2.x
+# https://stackoverflow.com/questions/846850/read-unicode-characters
+def win32_utf8_argv():
+ """Uses shell32.GetCommandLineArgvW to get sys.argv as a list of Unicode
+ strings.
+
+ Versions 2.x of Python don't support Unicode in sys.argv on
+ Windows, with the underlying Windows API instead replacing multi-byte
+ characters with '?'.
+ """
+
+ from ctypes import POINTER, byref, cdll, c_int, windll
+ from ctypes.wintypes import LPCWSTR, LPWSTR
+
+ GetCommandLineW = cdll.kernel32.GetCommandLineW
+ GetCommandLineW.argtypes = []
+ GetCommandLineW.restype = LPCWSTR
+
+ CommandLineToArgvW = windll.shell32.CommandLineToArgvW
+ CommandLineToArgvW.argtypes = [LPCWSTR, POINTER(c_int)]
+ CommandLineToArgvW.restype = POINTER(LPWSTR)
+
+ cmd = GetCommandLineW()
+ argc = c_int(0)
+ argv = CommandLineToArgvW(cmd, byref(argc))
+ argnum = argc.value
+ sysnum = len(sys.argv)
+ result = []
+ if argnum > 0:
+ # Remove Python executable and commands if present
+ start = argnum - sysnum
+ for i in range(start, argnum):
+ result.append(argv[i].encode('utf-8'))
+ return result
+
+
+# enable unicode output to windows console
+# https://stackoverflow.com/questions/878972/windows-cmd-encoding-change-causes-python-crash
+def win32_unicode_console():
+ import codecs
+ from ctypes import WINFUNCTYPE, windll, POINTER, byref, c_int
+ from ctypes.wintypes import BOOL, HANDLE, DWORD, LPWSTR, LPCWSTR, LPVOID
+
+ original_stderr = sys.stderr
+
+ # Output exceptions in this code to original_stderr, so that we can at least see them
+ def _complain(message):
+ original_stderr.write(message if isinstance(message, str) else repr(message))
+ original_stderr.write('\n')
+
+ codecs.register(lambda name: codecs.lookup('utf-8') if name == 'cp65001' else None)
+
+ try:
+ GetStdHandle = WINFUNCTYPE(HANDLE, DWORD)(("GetStdHandle", windll.kernel32))
+ STD_OUTPUT_HANDLE = DWORD(-11)
+ STD_ERROR_HANDLE = DWORD(-12)
+ GetFileType = WINFUNCTYPE(DWORD, DWORD)(("GetFileType", windll.kernel32))
+ FILE_TYPE_CHAR = 0x0002
+ FILE_TYPE_REMOTE = 0x8000
+ GetConsoleMode = WINFUNCTYPE(BOOL, HANDLE, POINTER(DWORD))(("GetConsoleMode", windll.kernel32))
+ INVALID_HANDLE_VALUE = DWORD(-1).value
+
+ def not_a_console(handle):
+ if handle == INVALID_HANDLE_VALUE or handle is None:
+ return True
+ return ((GetFileType(handle) & ~FILE_TYPE_REMOTE) != FILE_TYPE_CHAR
+ or GetConsoleMode(handle, byref(DWORD())) == 0)
+
+ old_stdout_fileno = None
+ old_stderr_fileno = None
+ if hasattr(sys.stdout, 'fileno'):
+ old_stdout_fileno = sys.stdout.fileno()
+ if hasattr(sys.stderr, 'fileno'):
+ old_stderr_fileno = sys.stderr.fileno()
+
+ STDOUT_FILENO = 1
+ STDERR_FILENO = 2
+ real_stdout = (old_stdout_fileno == STDOUT_FILENO)
+ real_stderr = (old_stderr_fileno == STDERR_FILENO)
+
+ if real_stdout:
+ hStdout = GetStdHandle(STD_OUTPUT_HANDLE)
+ if not_a_console(hStdout):
+ real_stdout = False
+
+ if real_stderr:
+ hStderr = GetStdHandle(STD_ERROR_HANDLE)
+ if not_a_console(hStderr):
+ real_stderr = False
+
+ if real_stdout or real_stderr:
+ WriteConsoleW = WINFUNCTYPE(BOOL, HANDLE, LPWSTR, DWORD, POINTER(DWORD), LPVOID)(("WriteConsoleW", windll.kernel32))
+
+ class UnicodeOutput:
+ def __init__(self, hConsole, stream, fileno, name):
+ self._hConsole = hConsole
+ self._stream = stream
+ self._fileno = fileno
+ self.closed = False
+ self.softspace = False
+ self.mode = 'w'
+ self.encoding = 'utf-8'
+ self.name = name
+ self.flush()
+
+ def isatty(self):
+ return False
+
+ def close(self):
+ # don't really close the handle, that would only cause problems
+ self.closed = True
+
+ def fileno(self):
+ return self._fileno
+
+ def flush(self):
+ if self._hConsole is None:
+ try:
+ self._stream.flush()
+ except Exception as e:
+ _complain("%s.flush: %r from %r" % (self.name, e, self._stream))
+ raise
+
+ def write(self, text):
+ try:
+ if self._hConsole is None:
+ if not PY3K and isinstance(text, unicode):
+ text = text.encode('utf-8')
+ elif PY3K and isinstance(text, str):
+ text = text.encode('utf-8')
+ self._stream.write(text)
+ else:
+ if not PY3K and not isinstance(text, unicode):
+ text = str(text).decode('utf-8')
+ elif PY3K and not isinstance(text, str):
+ text = text.decode('utf-8')
+ remaining = len(text)
+ while remaining:
+ n = DWORD(0)
+ # There is a shorter-than-documented limitation on the
+ # length of the string passed to WriteConsoleW (see
+ # .
+ retval = WriteConsoleW(self._hConsole, text, min(remaining, 10000), byref(n), None)
+ if retval == 0 or n.value == 0:
+ raise IOError("WriteConsoleW returned %r, n.value = %r" % (retval, n.value))
+ remaining -= n.value
+ if not remaining:
+ break
+ text = text[n.value:]
+ except Exception as e:
+ _complain("%s.write: %r" % (self.name, e))
+ raise
+
+ def writelines(self, lines):
+ try:
+ for line in lines:
+ self.write(line)
+ except Exception as e:
+ _complain("%s.writelines: %r" % (self.name, e))
+ raise
+
+ if real_stdout:
+ sys.stdout = UnicodeOutput(hStdout, None, STDOUT_FILENO, '')
+ else:
+ sys.stdout = UnicodeOutput(None, sys.stdout, old_stdout_fileno, '')
+
+ if real_stderr:
+ sys.stderr = UnicodeOutput(hStderr, None, STDERR_FILENO, '')
+ else:
+ sys.stderr = UnicodeOutput(None, sys.stderr, old_stderr_fileno, '')
+ except Exception as e:
+ _complain("exception %r while fixing up sys.stdout and sys.stderr" % (e,))
+
+
+# --- helpers ---
+
+def to_unicode(filename):
+ """:return: filename decoded from utf-8 to unicode"""
+ #
+ if PY3K:
+ # [ ] test this on Python 3 + (Windows, Linux)
+ # [ ] port filename_from_headers once this works
+ # [ ] add test to repository / Travis
+ return filename
+ else:
+ if isinstance(filename, unicode):
+ return filename
+ else:
+ return unicode(filename, 'utf-8')
+
+def filename_from_url(url):
+ """:return: detected filename as unicode or None"""
+ # [ ] test urlparse behavior with unicode url
+ fname = os.path.basename(urlparse.urlparse(url).path)
+ if len(fname.strip(" \n\t.")) == 0:
+ return None
+ return to_unicode(fname)
+
+def filename_from_headers(headers):
+ """Detect filename from Content-Disposition headers if present.
+ http://greenbytes.de/tech/tc2231/
+
+ :param: headers as dict, list or string
+ :return: filename from content-disposition header or None
+ """
+ if type(headers) == str:
+ headers = headers.splitlines()
+ if type(headers) == list:
+ headers = dict([x.split(':', 1) for x in headers])
+ cdisp = headers.get("Content-Disposition")
+ if not cdisp:
+ return None
+ cdtype = cdisp.split(';')
+ if len(cdtype) == 1:
+ return None
+ if cdtype[0].strip().lower() not in ('inline', 'attachment'):
+ return None
+ # several filename params is illegal, but just in case
+ fnames = [x for x in cdtype[1:] if x.strip().startswith('filename=')]
+ if len(fnames) > 1:
+ return None
+ name = fnames[0].split('=')[1].strip(' \t"')
+ name = os.path.basename(name)
+ if not name:
+ return None
+ return name
+
+def filename_fix_existing(filename):
+ """Expands name portion of filename with numeric ' (x)' suffix to
+ return filename that doesn't exist already.
+ """
+ dirname = u'.'
+ name, ext = filename.rsplit('.', 1)
+ names = [x for x in os.listdir(dirname) if x.startswith(name)]
+ names = [x.rsplit('.', 1)[0] for x in names]
+ suffixes = [x.replace(name, '') for x in names]
+ # filter suffixes that match ' (x)' pattern
+ suffixes = [x[2:-1] for x in suffixes
+ if x.startswith(' (') and x.endswith(')')]
+ indexes = [int(x) for x in suffixes
+ if set(x) <= set('0123456789')]
+ idx = 1
+ if indexes:
+ idx += sorted(indexes)[-1]
+ return '%s (%d).%s' % (name, idx, ext)
+
+
+# --- terminal/console output helpers ---
+
+def get_console_width():
+ """Return width of available window area. Autodetection works for
+ Windows and POSIX platforms. Returns 80 for others
+
+ Code from http://bitbucket.org/techtonik/python-pager
+ """
+
+ if os.name == 'nt':
+ STD_INPUT_HANDLE = -10
+ STD_OUTPUT_HANDLE = -11
+ STD_ERROR_HANDLE = -12
+
+ # get console handle
+ from ctypes import windll, Structure, byref
+ try:
+ from ctypes.wintypes import SHORT, WORD, DWORD
+ except ImportError:
+ # workaround for missing types in Python 2.5
+ from ctypes import (
+ c_short as SHORT, c_ushort as WORD, c_ulong as DWORD)
+ console_handle = windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
+
+ # CONSOLE_SCREEN_BUFFER_INFO Structure
+ class COORD(Structure):
+ _fields_ = [("X", SHORT), ("Y", SHORT)]
+
+ class SMALL_RECT(Structure):
+ _fields_ = [("Left", SHORT), ("Top", SHORT),
+ ("Right", SHORT), ("Bottom", SHORT)]
+
+ class CONSOLE_SCREEN_BUFFER_INFO(Structure):
+ _fields_ = [("dwSize", COORD),
+ ("dwCursorPosition", COORD),
+ ("wAttributes", WORD),
+ ("srWindow", SMALL_RECT),
+ ("dwMaximumWindowSize", DWORD)]
+
+ sbi = CONSOLE_SCREEN_BUFFER_INFO()
+ ret = windll.kernel32.GetConsoleScreenBufferInfo(
+ console_handle, byref(sbi))
+ if ret == 0:
+ return 0
+ return sbi.srWindow.Right+1
+
+ elif os.name == 'posix':
+ from fcntl import ioctl
+ from termios import TIOCGWINSZ
+ from array import array
+
+ winsize = array("H", [0] * 4)
+ try:
+ ioctl(sys.stdout.fileno(), TIOCGWINSZ, winsize)
+ except IOError:
+ pass
+ return (winsize[1], winsize[0])[0]
+
+ return 80
+
+
+def bar_thermometer(current, total, width=80):
+ """Return thermometer style progress bar string. `total` argument
+ can not be zero. The minimum size of bar returned is 3. Example:
+
+ [.......... ]
+
+ Control and trailing symbols (\r and spaces) are not included.
+ See `bar_adaptive` for more information.
+ """
+ # number of dots on thermometer scale
+ avail_dots = width-2
+ shaded_dots = int(math.floor(float(current) / total * avail_dots))
+ return '[' + '.'*shaded_dots + ' '*(avail_dots-shaded_dots) + ']'
+
+def bar_adaptive(current, total, width=80):
+ """Return progress bar string for given values in one of three
+ styles depending on available width:
+
+ [.. ] downloaded / total
+ downloaded / total
+ [.. ]
+
+ if total value is unknown or <= 0, show bytes counter using two
+ adaptive styles:
+
+ %s / unknown
+ %s
+
+ if there is not enough space on the screen, do not display anything
+
+ returned string doesn't include control characters like \r used to
+ place cursor at the beginning of the line to erase previous content.
+
+ this function leaves one free character at the end of string to
+ avoid automatic linefeed on Windows.
+ """
+
+ # process special case when total size is unknown and return immediately
+ if not total or total < 0:
+ msg = "%s / unknown" % current
+ if len(msg) < width: # leaves one character to avoid linefeed
+ return msg
+ if len("%s" % current) < width:
+ return "%s" % current
+
+ # --- adaptive layout algorithm ---
+ #
+ # [x] describe the format of the progress bar
+ # [x] describe min width for each data field
+ # [x] set priorities for each element
+ # [x] select elements to be shown
+ # [x] choose top priority element min_width < avail_width
+ # [x] lessen avail_width by value if min_width
+ # [x] exclude element from priority list and repeat
+
+ # 10% [.. ] 10/100
+ # pppp bbbbb sssssss
+
+ min_width = {
+ 'percent': 4, # 100%
+ 'bar': 3, # [.]
+ 'size': len("%s" % total)*2 + 3, # 'xxxx / yyyy'
+ }
+ priority = ['percent', 'bar', 'size']
+
+ # select elements to show
+ selected = []
+ avail = width
+ for field in priority:
+ if min_width[field] < avail:
+ selected.append(field)
+ avail -= min_width[field]+1 # +1 is for separator or for reserved space at
+ # the end of line to avoid linefeed on Windows
+ # render
+ output = ''
+ for field in selected:
+
+ if field == 'percent':
+ # fixed size width for percentage
+ output += ('%s%%' % (100 * current // total)).rjust(min_width['percent'])
+ elif field == 'bar': # [. ]
+ # bar takes its min width + all available space
+ output += bar_thermometer(current, total, min_width['bar']+avail)
+ elif field == 'size':
+ # size field has a constant width (min == max)
+ output += ("%s / %s" % (current, total)).rjust(min_width['size'])
+
+ selected = selected[1:]
+ if selected:
+ output += ' ' # add field separator
+
+ return output
+
+# --/ console helpers
+
+
+__current_size = 0 # global state variable, which exists solely as a
+ # workaround against Python 3.3.0 regression
+ # http://bugs.python.org/issue16409
+ # fixed in Python 3.3.1
+def callback_progress(blocks, block_size, total_size, bar_function):
+ """callback function for urlretrieve that is called when connection is
+ created and when once for each block
+
+ draws adaptive progress bar in terminal/console
+
+ use sys.stdout.write() instead of "print,", because it allows one more
+ symbol at the line end without linefeed on Windows
+
+ :param blocks: number of blocks transferred so far
+ :param block_size: in bytes
+ :param total_size: in bytes, can be -1 if server doesn't return it
+ :param bar_function: another callback function to visualize progress
+ """
+ global __current_size
+
+ width = min(100, get_console_width())
+
+ if sys.version_info[:3] == (3, 3, 0): # regression workaround
+ if blocks == 0: # first call
+ __current_size = 0
+ else:
+ __current_size += block_size
+ current_size = __current_size
+ else:
+ current_size = min(blocks*block_size, total_size)
+ progress = bar_function(current_size, total_size, width)
+ if progress:
+ sys.stdout.write("\r" + progress)
+
+
+def detect_filename(url=None, out=None, headers=None, default="download.wget"):
+ """Return filename for saving file. If no filename is detected from output
+ argument, url or headers, return default (download.wget)
+ """
+ names = dict(out='', url='', headers='')
+ if out:
+ names["out"] = out or ''
+ if url:
+ names["url"] = filename_from_url(url) or ''
+ if headers:
+ names["headers"] = filename_from_headers(headers) or ''
+ return names["out"] or names["headers"] or names["url"] or default
+
+def download(url, out=None, bar=bar_adaptive):
+ """High level function, which downloads URL into tmp file in current
+ directory and then renames it to filename autodetected from either URL
+ or HTTP headers.
+
+ :param bar: function to track download progress (visualize etc.)
+ :param out: output filename or directory
+ :return: filename where URL is downloaded to
+ """
+ # detect of out is a directory
+ outdir = None
+ if out and os.path.isdir(out):
+ outdir = out
+ out = None
+
+ # get filename for temp file in current directory
+ prefix = detect_filename(url, out)
+ (fd, tmpfile) = tempfile.mkstemp(".tmp", prefix=prefix, dir=".")
+ os.close(fd)
+ os.unlink(tmpfile)
+
+ # set progress monitoring callback
+ def callback_charged(blocks, block_size, total_size):
+ # 'closure' to set bar drawing function in callback
+ callback_progress(blocks, block_size, total_size, bar_function=bar)
+ if bar:
+ callback = callback_charged
+ else:
+ callback = None
+
+ if PY3K:
+ # Python 3 can not quote URL as needed
+ binurl = list(urlparse.urlsplit(url))
+ binurl[2] = urlparse.quote(binurl[2])
+ binurl = urlparse.urlunsplit(binurl)
+ else:
+ binurl = url
+ (tmpfile, headers) = ulib.urlretrieve(binurl, tmpfile, callback)
+ filename = detect_filename(url, out, headers)
+ if outdir:
+ filename = outdir + "/" + filename
+
+ # add numeric ' (x)' suffix if filename already exists
+ if os.path.exists(filename):
+ filename = filename_fix_existing(filename)
+ shutil.move(tmpfile, filename)
+
+ #print headers
+ return filename
+
+
+usage = """\
+usage: wget.py [options] URL
+
+options:
+ -o --output FILE|DIR output filename or directory
+ -h --help
+ --version
+"""
+
+if __name__ == "__main__":
+ if len(sys.argv) < 2 or "-h" in sys.argv or "--help" in sys.argv:
+ sys.exit(usage)
+ if "--version" in sys.argv:
+ sys.exit("wget.py " + __version__)
+
+ # patch Python 2.x to read unicode from command line
+ if not PY3K and sys.platform == "win32":
+ sys.argv = win32_utf8_argv()
+ # patch Python to write unicode characters to console
+ if sys.platform == "win32":
+ win32_unicode_console()
+
+ from optparse import OptionParser
+ parser = OptionParser()
+ parser.add_option("-o", "--output", dest="output")
+ (options, args) = parser.parse_args()
+
+ url = sys.argv[1]
+ filename = download(args[0], out=options.output)
+
+ print("")
+ print("Saved under %s" % filename)
+
+r"""
+features that require more tuits for urlretrieve API
+http://www.python.org/doc/2.6/library/urllib.html#urllib.urlretrieve
+
+[x] autodetect filename from URL
+[x] autodetect filename from headers - Content-Disposition
+ http://greenbytes.de/tech/tc2231/
+[ ] make HEAD request to detect temp filename from Content-Disposition
+[ ] process HTTP status codes (i.e. 404 error)
+ http://ftp.de.debian.org/debian/pool/iso-codes_3.24.2.orig.tar.bz2
+[ ] catch KeyboardInterrupt
+[ ] optionally preserve incomplete file
+[x] create temp file in current directory
+[ ] resume download (broken connection)
+[ ] resume download (incomplete file)
+[x] show progress indicator
+ http://mail.python.org/pipermail/tutor/2005-May/038797.html
+[x] do not overwrite downloaded file
+ [x] rename file automatically if exists
+[x] optionally specify path for downloaded file
+
+[ ] options plan
+ [x] -h, --help, --version (CHAOS speccy)
+[ ] clpbar progress bar style
+_ 30.0Mb at 3.0 Mbps eta: 0:00:20 30% [===== ]
+[ ] test "bar \r" print with \r at the end of line on Windows
+[ ] process Python 2.x urllib.ContentTooShortError exception gracefully
+ (ideally retry and continue download)
+
+ (tmpfile, headers) = urllib.urlretrieve(url, tmpfile, callback_progress)
+ File "C:\Python27\lib\urllib.py", line 93, in urlretrieve
+ return _urlopener.retrieve(url, filename, reporthook, data)
+ File "C:\Python27\lib\urllib.py", line 283, in retrieve
+ "of %i bytes" % (read, size), result)
+urllib.ContentTooShortError: retrieval incomplete: got only 15239952 out of 24807571 bytes
+
+[ ] find out if urlretrieve may return unicode headers
+[ ] write files with unicode characters
+ https://bitbucket.org/techtonik/python-wget/issues/7/filename-issue
+ [x] Python 2, Windows
+ [x] Python 3, Windows
+ [ ] Linux
+[ ] add automatic tests
+ [ ] specify unicode URL from command line
+ [ ] specify unicode output file from command line
+ [ ] test suite for unsafe filenames from url and from headers
+
+[ ] security checks
+ [ ] filename_from_url
+ [ ] filename_from_headers
+ [ ] MITM redirect from https URL
+ [ ] https certificate check
+ [ ] size+hash check helpers
+ [ ] fail if size is known and mismatch
+ [ ] fail if hash mismatch
+"""