Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $Date = date("Y").'-'.date("m").'-'.date("d").' '.date("H:i:s").'.'.date("Y").'01';
- $File = file_get_contents("./cards.json");
- $Json = json_decode($File, true);
- $ID = 0;
- $MaxCardID = 1999999; //Any other highter than it is boss etc.
- $GradeWanted = 4; //5=LR 4=UR 3=SSR 2=SR 1=R 0=N
- $SQLBegin = 'INSERT INTO "main"."collection_cards" ("id", "collection_unique_id", "card_id", "event_id", "priority", "created_at", "updated_at") VALUES (';
- //AGI
- $Type0Unique = 392; //AGI Unused as ur
- $Type10Unique = 393; //Super AGI
- $Type20Unique = 394; //Extreme AGI
- $Type0Priority = 1000;
- $Type10Priority = 1000;
- $Type20Priority = 1000;
- //TEC
- $Type1Unique = 392; //TEC Unused as ur
- $Type11Unique = 395; //Super TEC
- $Type21Unique = 396; //Extreme TEC
- $Type1Priority = 1000;
- $Type11Priority = 1000;
- $Type21Priority = 1000;
- //INT
- $Type2Unique = 392; //INT Unused as ur
- $Type12Unique = 397; //Super INT
- $Type22Unique = 398; //Extreme INT
- $Type2Priority = 1000;
- $Type12Priority = 1000;
- $Type22Priority = 1000;
- //PUI
- $Type3Unique = 392; //PUI Unused as ur
- $Type13Unique = 399; //Super PUI
- $Type23Unique = 400; //Extreme PUI
- $Type3Priority = 1000;
- $Type13Priority = 1000;
- $Type23Priority = 1000;
- //END
- $Type4Unique = 392; //END Unused as ur
- $Type14Unique = 401; //Super END
- $Type24Unique = 402; //Extreme END
- $Type4Priority = 1000;
- $Type14Priority = 1000;
- $Type24Priority = 1000;
- /*****************************************************\
- Element :
- 0=392 = 10 = 20
- 1=393 = 11 = 21
- 2=394 = 12 = 22
- 3=395 = 13 = 23
- 4=396 = 14 = 24
- \*****************************************************/
- foreach($Json as $Count) {
- $CharID = $Json[$ID]['id'];
- $Type = $Json[$ID]['element'];
- $Grade = $Json[$ID]['rarity'];
- if ($CharID<=$MaxCardID) {
- if ($Grade == $GradeWanted){
- //AGI
- if ($Type == 0){
- //echo $SQLBegin.'\''.$CharID.'\', \''.$Type0Unique.'\', \''.$CharID.'\', \'320\', \''.$Type0Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- //$Type0Priority -= 10;
- }
- if ($Type == 10){
- echo $SQLBegin.'\''.$CharID.'\', \''.$Type10Unique.'\', \''.$CharID.'\', \'320\', \''.$Type10Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- $Type10Priority -= 10;
- }
- if ($Type == 20){
- echo $SQLBegin.'\''.$CharID.'\', \''.$Type20Unique.'\', \''.$CharID.'\', \'320\', \''.$Type20Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- $Type20Priority -= 10;
- }
- //TEC
- if ($Type == 1){
- //echo $SQLBegin.'\''.$CharID.'\', \''.$Type1Unique.'\', \''.$CharID.'\', \'320\', \''.$Type1Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- //$Type1Priority -= 10;
- }
- if ($Type == 11){
- echo $SQLBegin.'\''.$CharID.'\', \''.$Type11Unique.'\', \''.$CharID.'\', \'320\', \''.$Type11Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- $Type11Priority -= 10;
- }
- if ($Type == 21){
- echo $SQLBegin.'\''.$CharID.'\', \''.$Type21Unique.'\', \''.$CharID.'\', \'320\', \''.$Type21Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- $Type21Priority -= 10;
- }
- //INT
- if ($Type == 2){
- //echo $SQLBegin.'\''.$CharID.'\', \''.$Type2Unique.'\', \''.$CharID.'\', \'320\', \''.$Type2Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- //$Type2Priority -= 10;
- }
- if ($Type == 12){
- echo $SQLBegin.'\''.$CharID.'\', \''.$Type12Unique.'\', \''.$CharID.'\', \'320\', \''.$Type12Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- $Type12Priority -= 10;
- }
- if ($Type == 22){
- echo $SQLBegin.'\''.$CharID.'\', \''.$Type22Unique.'\', \''.$CharID.'\', \'320\', \''.$Type22Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- $Type22Priority -= 10;
- }
- //PUI
- if ($Type == 3){
- //echo $SQLBegin.'\''.$CharID.'\', \''.$Type3Unique.'\', \''.$CharID.'\', \'320\', \''.$Type3Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- //$Type3Priority -= 10;
- }
- if ($Type == 13){
- echo $SQLBegin.'\''.$CharID.'\', \''.$Type13Unique.'\', \''.$CharID.'\', \'320\', \''.$Type13Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- $Type12Priority -= 10;
- }
- if ($Type == 23){
- echo $SQLBegin.'\''.$CharID.'\', \''.$Type23Unique.'\', \''.$CharID.'\', \'320\', \''.$Type23Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- $Type22Priority -= 10;
- }
- //END
- if ($Type == 4){
- //echo $SQLBegin.'\''.$CharID.'\', \''.$Type4Unique.'\', \''.$CharID.'\', \'320\', \''.$Type4Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- //$Type4Priority -= 10;
- }
- if ($Type == 14){
- echo $SQLBegin.'\''.$CharID.'\', \''.$Type14Unique.'\', \''.$CharID.'\', \'320\', \''.$Type14Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- $Type12Priority -= 10;
- }
- if ($Type == 24){
- echo $SQLBegin.'\''.$CharID.'\', \''.$Type24Unique.'\', \''.$CharID.'\', \'320\', \''.$Type24Priority.'\', \''.$Date.'\', \''.$Date.'\');<br/>';
- $Type22Priority -= 10;
- }
- }
- $ID++;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement