Spnati Cheats 2 - Pastebin.com (2024)

  1. /*Instructions:

  2. To use this, simply open up the dev console (in Chrome and Firefox, this is done with CTRL+SHIFT+I)

  3. Select all in this file, then literally copy-paste it into the console that comes up, and hit enter.

  4. Call the function by writing it's name, and subbing out the parameter names for the values you want to use, for example:

  5. stripAllToLevel(2)

  6. */

  7. var spnati_cheat_suits_list = ["heart", "clubs", "diamo", "spade"]

  8. function validSuitOrDefault(suit, def){

  9. /* Takes a suit as input. If the suit isn't a valid SPNATI suit name, then the specified default value is returned instead.

  10. suit - The suit string to test.

  11. def - The default value to return in the invalid case.

  12. */

  13. return (spnati_cheat_suits_list.indexOf(suit) !== -1) ? suit : def;

  14. }

  15. function stripAllNaked(){

  16. /*Strip everyone (except the PC) naked such that one round is left before they lose.*/

  17. stripAllToLevel(1);

  18. }

  19. function stripNaked(player){

  20. /*Strip all layers off of a given player (0 is the PC, 1-4 are NPCs).

  21. Params: player - Integer (0 is the PC, 1-4 are NPCs)

  22. */

  23. stripToLevel(player, 1);

  24. }

  25. function autoWin(){

  26. /*Automatically win.*/

  27. stripAllToLevel(0);

  28. }

  29. function stripAllToLevel(level){

  30. /*Strip all players (except the PC) down so that they have at most _level_ number of layers left.

  31. Params: level - Integer (The number of layers to leave left on a player.)

  32. */

  33. for(var i = 1; i < players.length; i++){

  34. stripToLevel(i, level);

  35. }

  36. }

  37. function stripToLevel(player, level){

  38. /*Strip a player down such that they only have (at most) a certain number of layers left.

  39. Params: player - Integer (0 is the PC, 1-4 are NPCs)

  40. level - Integer (The number of layers to leave left on a player.)

  41. */

  42. for (var c = countClothing(player); c >= level; c--){stripChoice(player);}

  43. }

  44. function countClothing(player){

  45. /* Count the clothing the player has remaining.

  46. Params: Player - integer (0 is the PC, 1-4 are NPCs)

  47. */

  48. var clothes = 0;

  49. for (var i = 0; i < players[player].clothing.length; i++) {

  50. if (players[player] && players[player].clothing[i]) {

  51. clothes++;

  52. }

  53. }

  54. return clothes;

  55. }

  56. function multiStripChoice(player, times){

  57. /* Strip the indicated player of multiple layer.

  58. Params: Player - integer (0 is the PC, 1-4 are NPCs)

  59. times - integer (The number of layers to try to strip.)

  60. */

  61. for(var i = 0; (i < times) && (countClothing(player) != -1); i++){

  62. stripChoice(player);

  63. }

  64. }

  65. function stripChoice(player){

  66. /* Strip the indicated player of a single layer.

  67. Params: Player - integer (0 is the PC, 1-4 are NPCs)

  68. */

  69. stripPlayer(player);

  70. updateAllGameVisuals();

  71. }

  72. function randomBackground(){

  73. /*

  74. Choose a random background from those available.

  75. */

  76. //Note this randint helper function could either be inlined or broken out into an actual function.

  77. var randint = function(a,b){

  78. return (function(n,x){

  79. return Math.floor(Math.random()*(x-n)+n);

  80. })(Math.min(a,b), Math.max(a,b));

  81. };

  82. setBackground(function(){var a = randint(0,23); console.log(a); return a;}());

  83. }

  84. function unlockAllEndings(){

  85. /*

  86. Unlocks all the endings in the gallery mode.

  87. NOTE: You can access the gallery by using the

  88. command "loadGalleryScreen()" from the main menu.

  89. */

  90. for(var i = 0; i < galleryEndings.length; i++)

  91. {

  92. galleryEndings[i].unlocked = true;

  93. }

  94. }

  95. function givePlayerRoyalStraightFlush(player_number, suit){

  96. /*

  97. Gives the target player a royal straight flush of any desired suit.

  98. player_number - An integer representing the player index getting the cards (0 -> player, 1-4 -> npcs)

  99. suit - A string representing the suit (options are shown in the suits array below)

  100. */

  101. var chosen_suit = validSuitOrDefault(suit, spnati_cheat_suits_list[0]);

  102. hands[player_number].cards = [chosen_suit+"1", chosen_suit+"13", chosen_suit+"12", chosen_suit+"11", chosen_suit+"10"]

  103. }

  104. function giveSelfRoyalStraightFlush(suit){

  105. /*

  106. Gives the player a royal straight flush of the target suit.

  107. suit - suit - A string representing the suit (either "heart", "clubs", "spade" or "diamo")

  108. */

  109. givePlayerRoyalStraightFlush(0, suit);

  110. }

  111. var givePlayerRoyalStraightFlushFunctorMap = function(){

  112. //This auto-gens a lookup table for the enableAutoRoyalStraightFlush functions.

  113. var map = {};

  114. for(var i = 0; i < players.length; i++){

  115. map[i] = {}

  116. for(var j = 0; j < spnati_cheat_suits_list.length; j++){

  117. map[i][spnati_cheat_suits_list[j]] = function(i, j){return function(){givePlayerRoyalStraightFlush(i, spnati_cheat_suits_list[j])};}(i,j); //This double annon function is because closures in javascript are weird.

  118. }

  119. }

  120. return map;

  121. }();

  122. function enableAutoRoyalStraightFlush(player_number, suit){

  123. /*

  124. Constantly gives the player a royal straight flush of the chosen suit, every single turn.

  125. Note if this is done multiple times for different suits on the same player, only one of the suits will be shown

  126. depending on order of application.

  127. player_number - An integer representing the player index getting the cards (0 -> player, 1-4 -> npcs)

  128. suit - A string representing the suit (either "heart", "clubs", "spade" or "diamo")

  129. */

  130. suit = validSuitOrDefault(suit, spnati_cheat_suits_list[0]);

  131. document.getElementById("main-game-button").addEventListener("click", givePlayerRoyalStraightFlushFunctorMap[player_number][suit]);

  132. }

  133. function disableAutoRoyalStraightFlush(player_number, suit){

  134. /*

  135. Disables a previously set "enableAutoRoyalStraightFlush" for a particular player and suit.

  136. player_number - An integer representing the player index getting the cards (0 -> player, 1-4 -> npcs)

  137. suit - A string representing the suit (either "heart", "clubs", "spade" or "diamo")

  138. */

  139. suit = validSuitOrDefault(suit, spnati_cheat_suits_list[0]);

  140. document.getElementById("main-game-button").removeEventListener("click", givePlayerRoyalStraightFlushFunctorMap[player_number][suit]);

  141. }

  142. function disableAllAutoRoyalStraightFlush(player_number){

  143. for(var i = 0; i < spnati_cheat_suits_list.length; i++){

  144. document.getElementById("main-game-button").removeEventListener("click", givePlayerRoyalStraightFlushFunctorMap[player_number][spnati_cheat_suits_list[i]]);

  145. }

  146. }

  147. function enableSelfRoyalStraightFlush(){

  148. enableAutoRoyalStraightFlush(0, "heart");

  149. }

  150. function disableSelfRoyalStraightFlush(){

  151. disableAutoRoyalStraightFlush(0, "heart");

  152. }

Spnati Cheats 2 - Pastebin.com (2024)
Top Articles
Crushed Pineapple in Heavy Syrup
Will Justin Fields start in Pittsburgh? Did the Bears get many offers? We answer the key questions
Barstool Sports Gif
Frases para un bendecido domingo: llena tu día con palabras de gratitud y esperanza - Blogfrases
Exclusive: Baby Alien Fan Bus Leaked - Get the Inside Scoop! - Nick Lachey
Craigslist Monterrey Ca
Ret Paladin Phase 2 Bis Wotlk
Blanchard St Denis Funeral Home Obituaries
THE 10 BEST Women's Retreats in Germany for September 2024
10 Popular Hair Growth Products Made With Dermatologist-Approved Ingredients to Shop at Amazon
Georgia Vehicle Registration Fees Calculator
라이키 유출
Best Restaurants In Seaside Heights Nj
Audrey Boustani Age
Buying risk?
Curtains - Cheap Ready Made Curtains - Deconovo UK
How To Cancel Goodnotes Subscription
Earl David Worden Military Service
Craigslist Appomattox Va
Halo Worth Animal Jam
Hdmovie 2
Invitation Homes plans to spend $1 billion buying houses in an already overheated market. Here's its presentation to investors setting out its playbook.
Zillow Group Stock Price | ZG Stock Quote, News, and History | Markets Insider
Mini Handy 2024: Die besten Mini Smartphones | Purdroid.de
Chamberlain College of Nursing | Tuition & Acceptance Rates 2024
Urbfsdreamgirl
N.J. Hogenkamp Sons Funeral Home | Saint Henry, Ohio
Stouffville Tribune (Stouffville, ON), March 27, 1947, p. 1
P3P Orthrus With Dodge Slash
Envy Nails Snoqualmie
Www Violationinfo Com Login New Orleans
Unity Webgl Player Drift Hunters
Ippa 番号
Quake Awakening Fragments
My.lifeway.come/Redeem
Skill Boss Guru
Dadeclerk
Kelly Ripa Necklace 2022
Wisconsin Women's Volleyball Team Leaked Pictures
More News, Rumors and Opinions Tuesday PM 7-9-2024 — Dinar Recaps
Florida Lottery Claim Appointment
Todd Gutner Salary
814-747-6702
Random Animal Hybrid Generator Wheel
Gt500 Forums
Syrie Funeral Home Obituary
Ephesians 4 Niv
Hampton Inn Corbin Ky Bed Bugs
Prologistix Ein Number
Who We Are at Curt Landry Ministries
Selly Medaline
Texas 4A Baseball
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 6658

Rating: 4.1 / 5 (42 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.