Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $Difficulties = array
- (
- // "Hard", // Not even worth the time.
- // "Very Hard", // Too easy and boring.
- "Death Wish", // Here we go. - Out of order, on purpose.
- "Very Hard", // Not really worth it, but wanted to add more variety.
- "Overkill" // Meh, better.
- );
- $PrimaryWeapons = array
- (
- "Golden AK.762 Rifle",
- "AMCAR Rifle",
- "AK Rifle",
- "CAR-4 Rifle",
- "UAR Rifle",
- "AK.762 Rifle",
- "JP36 Rifle",
- "M308 Rifle",
- "AK5 Rifle",
- "AMR-16 Rifle",
- "Commando 553 Rifle",
- "Eagle Heavy Rifle",
- "Falcon Rifle",
- "Clarion Rifle",
- "Gecko 7.62 Rifle",
- "Gewehr 3 Rifle",
- "Queen's Wrath Rifle",
- "Lion's Roar Rifle",
- "Predator 12G Shotgun",
- "Reinfeld 880 Shotgun",
- "IZHMA 12G Shotgun",
- "Mosconi 12G Shotgun",
- "M1014 Shotgun",
- "Raven Shotgun",
- "Rattlesnake Sniper Rifle",
- "R93 Sniper Rifle",
- "Thanatos .50 cal Sniper Rifle",
- "Nagant Sniper Rifle",
- "Akimbo Chimano Compact Pistols",
- "Akimbo Crosskill Pistols",
- "Akimbo Bernetti 9 Pistols",
- "Akimbo Deagle Pistols",
- "RPK LMG",
- "KSP LMG",
- "Brenner 21 LMG",
- "Buzzsaw 42 LMG",
- "GL40 Grenade Launcher",
- "OVE9000 Primary Saw"
- );
- $SecondaryWeapons = array
- (
- "Chicago Typewriter SMG",
- "Mark 10 SMG",
- "Compact-5 SMG",
- "CMP SMG",
- "Para SMG",
- "Krinkov SMG",
- "Kobus 90 SMG",
- "Swedish K SMG",
- "SpecOps SMG",
- "Cobra SMG",
- "Blaster 9mm SMG",
- "Uzi SMG",
- "Patchett L2A1 SMG",
- "Interceptor .45 Pistol",
- "Chimano Custom Pistol",
- "Chimano Compact Pistol",
- "Chimano 88 Pistol",
- "Crosskill Pistol",
- "Bernetti 9 Pistol",
- "Bronco .44 Pistol",
- "STRYK 18c Pistol",
- "Deagle Pistol",
- "Gruber Kurz Pistol",
- "Signature .40 Pistol",
- "Broomstick Pistol",
- "LEO Pistol",
- "The Judge Shotgun",
- "Locomotive 12G Shotgun",
- "Street Sweeper Shotgun",
- "OVE9000 Secondary Saw"
- );
- $Heists = array
- (
- "Art Gallery",
- "Bank Heist Pro",
- "Bank Heist: Cash",
- "Bank Heist: Deposit",
- "Bank Heist: Gold Pro",
- "Diamond Store",
- "Jewelry Store",
- "Shadow Raid",
- "Transport: Crossroads",
- "Transport: Downtown",
- "Transport: Harbor",
- "Transport: Park",
- "Transport: Underpass",
- "Firestarter",
- "Firestarter Pro",
- "Rats",
- "Rats Pro",
- "Watchdogs",
- "Watchdogs Pro",
- "The Bomb: Dockyard",
- "The Bomb: Forest Kappa",
- "Hotline Miami",
- "Hotline Miami Pro",
- "Hoxton Breakout",
- "Hoxton Breakout Pro",
- "The Big Bank",
- "The Diamond",
- "Big Oil Pro",
- "Election Day",
- "Election Day Pro",
- "Framing Frame",
- "Framing Frame Pro",
- "Four Stores",
- "Mallcrasher",
- "Nightlub",
- "Ukrainian Job Pro",
- "White Xmas"
- );
- // Generate random heist & difficulty.
- $Heist = $Heists[mt_rand(0, count($Heists) - 1)];
- $Difficulty = $Difficulties[mt_rand(0, count($Difficulties) - 1)];
- // Weapons for the broadcaster.
- $PrimaryWeapon = $PrimaryWeapons[mt_rand(0, count($PrimaryWeapons) - 1)];
- $SecondaryWeapon = $SecondaryWeapons[mt_rand(0, count($SecondaryWeapons) - 1)];
- // Check for no input, set default value of 1.
- if(empty($_GET["GeneralQuery"]))
- {
- $_GET["GeneralQuery"] = 1;
- }
- // Check for numeric input.
- if(is_numeric($_GET["GeneralQuery"]))
- {
- // Input needs to be less than 4, greater than or equal to 1.
- if($_GET["GeneralQuery"] > 4 || $_GET["GeneralQuery"] <= 1)
- {
- // Set default to 1 for any numeric input out of bounds.
- $_GET["GeneralQuery"] = 1;
- }
- }
- // Input was alphabetical
- else
- {
- // Seperate the input, by "," put in array.
- $NamesArray=explode(",",$_GET["GeneralQuery"]);
- $NamesArray=array_map(function($word){return (ucwords(strtolower($word)));},$NamesArray);
- // Count the array, set the value to match.
- $_GET["GeneralQuery"] = count($NamesArray) + 1;
- }
- // Always print the broadcaster loadout.
- $GeneralQuery = $_GET["GeneralQuery"];
- echo 'Next up is: ' . $Heist . ' on ' . $Difficulty . ', ' . htmlspecialchars($_GET["Broadcaster"]) . ' will use the ' . $PrimaryWeapon . ' and the ' . $SecondaryWeapon . '! ';
- // Player 2 loadout.
- if ($_GET["GeneralQuery"] >= 2)
- {
- // Set the Player 2 loadout.
- $PrimaryWeapon2 = $PrimaryWeapons[mt_rand(0, count($PrimaryWeapons) - 1)];
- $SecondaryWeapon2 = $SecondaryWeapons[mt_rand(0, count($SecondaryWeapons) - 1)];
- // Input was numeric. Default value.
- if (empty($NamesArray))
- {
- echo 'Player 2 ';
- }
- // Input was alphabetical
- else
- {
- echo $NamesArray[0] . ' ';
- }
- // Print player 2 loadout.
- echo 'will use the ' . $PrimaryWeapon2 . ' and the ' . $SecondaryWeapon2 . '! ';
- }
- // Player 3 loadout.
- if ($_GET["GeneralQuery"] >= 3)
- {
- // Set the Player 3 loadout.
- $PrimaryWeapon3 = $PrimaryWeapons[mt_rand(0, count($PrimaryWeapons) - 1)];
- $SecondaryWeapon3 = $SecondaryWeapons[mt_rand(0, count($SecondaryWeapons) - 1)];
- // Input was numeric. Default value.
- if (empty($NamesArray))
- {
- echo 'Player 3 ';
- }
- // Input was alphabetical
- else
- {
- echo $NamesArray[1] . ' ';
- }
- // Print player 3 loadout.
- echo 'will use the ' . $PrimaryWeapon3 . ' and the ' . $SecondaryWeapon3 . '! ';
- }
- // Player 4 loadout.
- if ($_GET["GeneralQuery"] >= 4)
- {
- // Input was numeric. Default value.
- $PrimaryWeapon4 = $PrimaryWeapons[mt_rand(0, count($PrimaryWeapons) - 1)];
- $SecondaryWeapon4 = $SecondaryWeapons[mt_rand(0, count($SecondaryWeapons) - 1)];
- // Input was numeric.
- if (empty($NamesArray))
- {
- echo 'Player 4 ';
- }
- // Input was alphabetical
- else
- {
- echo $NamesArray[2] . ' ';
- }
- // Print player 4 loadout.
- echo 'will use the ' . $PrimaryWeapon4 . ' and the ' . $SecondaryWeapon4 . '!';
- }
- ?>
- Example:
- NextHeist.php?Broadcaster=TwitchBroadcaster&GeneralQuery=4
- or
- NextHeist.php?Broadcaster=TwitchBroadcaster&GeneralQuery=john, JACK, jIm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement