Spnati Cheats updated - 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. /* Suits:

  8. * 0: Spades

  9. * 1: Hearts

  10. * 2: Clubs

  11. * 3: Diamonds

  12. */

  13. var spnati_cheat_suits_list = [0, 1, 2, 3]

  14. function validSuitOrDefault(suit, def){

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

  16. suit - The suit string to test.

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

  18. */

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

  20. }

  21. function stripAllNaked(){

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

  23. stripAllToLevel(1);

  24. }

  25. function stripNaked(player){

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

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

  28. */

  29. stripToLevel(player, 1);

  30. }

  31. function autoWin(){

  32. /*Automatically win.*/

  33. stripAllToLevel(0);

  34. }

  35. function stripAllToLevel(level){

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

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

  38. */

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

  40. stripToLevel(i, level);

  41. }

  42. }

  43. function stripToLevel(player, level){

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

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

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

  47. */

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

  49. }

  50. function countClothing(player){

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

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

  53. */

  54. var clothes = 0;

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

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

  57. clothes++;

  58. }

  59. }

  60. return clothes;

  61. }

  62. function multiStripChoice(player, times){

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

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

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

  66. */

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

  68. stripChoice(player);

  69. }

  70. }

  71. function stripChoice(player){

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

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

  74. */

  75. stripPlayer(player);

  76. updateAllGameVisuals();

  77. }

  78. function randomBackground(){

  79. /*

  80. Choose a random background from those available.

  81. */

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

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

  84. return (function(n,x){

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

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

  87. };

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

  89. }

  90. function unlockAllEndings(){

  91. /*

  92. Unlocks all the endings in the gallery mode.

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

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

  95. */

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

  97. {

  98. galleryEndings[i].unlocked = true;

  99. }

  100. }

  101. function givePlayerRoyalStraightFlush(player_number, suit){

  102. /*

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

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

  105. suit - An integer representing the suit (options are shown in the suits array)

  106. */

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

  108. players[player_number].hand.cards = [new Card(chosen_suit,10), new Card(chosen_suit,11), new Card(chosen_suit,12), new Card(chosen_suit,13), new Card(chosen_suit,14)]

  109. }

  110. function giveSelfRoyalStraightFlush(suit){

  111. /*

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

  113. suit - suit - An integer representing the suit

  114. */

  115. givePlayerRoyalStraightFlush(0, suit);

  116. }

  117. function makeLose(player_number){

  118. players[player_number].hand.cards = [new Card(2,2), new Card(2,3), new Card(2,4), new Card(2,5), new Card(3,7)]

  119. }

  120. //not updated

  121. var givePlayerRoyalStraightFlushFunctorMap = function(){

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

  123. var map = {};

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

  125. map[i] = {}

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

  127. 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.

  128. }

  129. }

  130. return map;

  131. }();

  132. //not updated

  133. function enableAutoRoyalStraightFlush(player_number, suit){

  134. /*

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

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

  137. depending on order of application.

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

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

  140. */

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

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

  143. }

  144. //not updated

  145. function disableAutoRoyalStraightFlush(player_number, suit){

  146. /*

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

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

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

  150. */

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

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

  153. }

  154. //not updated

  155. function disableAllAutoRoyalStraightFlush(player_number){

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

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

  158. }

  159. }

  160. //not updated

  161. function enableSelfRoyalStraightFlush(){

  162. enableAutoRoyalStraightFlush(0, "heart");

  163. }

  164. //not updated

  165. function disableSelfRoyalStraightFlush(){

  166. disableAutoRoyalStraightFlush(0, "heart");

  167. }

Spnati Cheats updated - Pastebin.com (2024)
Top Articles
Dairy-Free & Vegan Whipped Cream: Guide to Products & Recipes
15 Traditional Norwegian Recipes
Touchstar Cinemas - Sabal Palms Products
Camping World Of New River
Hemispheres Dothan Al
A Qué Hora Cierran Spectrum
Craigslist Worcester Massachusetts: Your Guide to the City's Premier Marketplace - First Republic Craigslist
Happy Valley Insider: Penn State Nittany Lions Football & Basketball Recruiting - Hướng dẫn xem: Những trò chơi nào nên xem người hâm mộ bang Pennsylvania vào cuối tuần này?
Dr Thottam Ent Clinton Township
S10 Mpg
Ucf Net Price Calculator
Watchseries To New Domain
Adt First Responder Discount
Teenbeautyfitness
Nail Salon At Legacy Village
Krystal Murphy Below Deck Net Worth
PNC Bank Review 2024
Nccer Log In
Mr Seconds Geneseo Ny
Build it online for your customers – a new way to do business with Dell | Dell
Ironman Kona Tracker
Who should be in the Country Music Hall of Fame (but isn't yet)? Our picks
라이키 유출
Strange World Showtimes Near Marcus La Crosse Cinema
Craigslist Yamhill
Indian Restaurants In Cape Cod
Gcfysl
Auto-Mataru
The Real-Life Woman That Inspired Japanese Horror Classic Ring - SlashFilm
Vineland Daily Journal Obits
Mapa i lokalizacja NPC w Graveyard Keeper - Graveyard Keeper - poradnik do gry | GRYOnline.pl
Jessica Renee Johnson Update 2023
Timon Meaning In Swahili
Craiglist.nj
Classic Buttermilk Pancakes
Credit Bureau Contact Information
Kirby D. Anthoney Now
Craigslist/Lakeland
Roseberrys Obituaries
Sam's Club Gas Price Mechanicsburg Pa
Mensenlinq: Overlijdensberichten zoeken in 2024
South Dakota Bhr
Busted Newspaper Mcpherson Kansas
Tu Pulga Online Utah
How to Set Up Dual Carburetor Linkage (with Images)
Why Did Anthony Domol Leave Fox 17
水餃 家園
Thc Detox Drinks At Walgreens
Ap Bio Unit 2 Progress Check Mcq
Make Monday Better: Dive Into These Hilarious Monday Memes!
Papitop
NBA 2K: 10 Unpopular Opinions About The Games, According To Reddit
Latest Posts
Article information

Author: Patricia Veum II

Last Updated:

Views: 6662

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Patricia Veum II

Birthday: 1994-12-16

Address: 2064 Little Summit, Goldieton, MS 97651-0862

Phone: +6873952696715

Job: Principal Officer

Hobby: Rafting, Cabaret, Candle making, Jigsaw puzzles, Inline skating, Magic, Graffiti

Introduction: My name is Patricia Veum II, I am a vast, combative, smiling, famous, inexpensive, zealous, sparkling person who loves writing and wants to share my knowledge and understanding with you.