yojimbos_law

a pair of tcrs aliases for item/effect printing

Jun 2nd, 2019
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.51 KB | None | 0 0
  1. //these two mafia CLI commands make the alii.
  2.  
  3. alias tcrsequips => ash float max = -10000000;float[item] list;foreach i in $items[]{if(i.numeric_modifier($string[%%]) != 0 && i.to_slot() != $slot[none]){list[i] = i.numeric_modifier($string[%%]);if( i.numeric_modifier($string[%%]) > max){max = i.numeric_modifier($string[%%]);}}}boolean[slot] empty;foreach i in $slots[]{empty[i] = true;}foreach i in list{empty[i.to_slot()] = false;}int[float] ordered;ordered[max] = 0;int index = 0;boolean include = true;boolean leftovers = true;while(leftovers){max = -10000000;foreach i in list{include = true;foreach j in ordered{if(list[i] >= j){include = false;}}if(include && list[i] > max){max = list[i];}}index++;ordered[max] = index;leftovers = false;foreach i in list{include = false;foreach j in ordered{if(list[i] == j){include = true;}}if(!include){leftovers = true;}}}foreach x in $slots[]{if(!empty[x]){print(x+":");for i from index to 0 by -1{foreach j in ordered{if(ordered[j] == i){foreach k in $items[]{if(k.numeric_modifier($string[%%]) == j && k.to_slot() == x)print_html(k+" gives "+k.numeric_modifier($string[%%])+" "+$string[%%]);}}}}print("=====================");}}
  4.  
  5.  
  6. alias tcrspotions => ash float max = -10000000;float[effect] list;foreach i in $items[]{if(i.effect_modifier("effect").numeric_modifier($string[%%]) != 0){list[i.effect_modifier("effect")] = i.effect_modifier("effect").numeric_modifier($string[%%]);if( i.effect_modifier("effect").numeric_modifier($string[%%]) > max){max = i.effect_modifier("effect").numeric_modifier($string[%%]);}}}int[float] ordered;ordered[max] = 0;int index = 0;boolean include = true;boolean leftovers = true;while(leftovers){max = -10000000;foreach i in list{include = true;foreach j in ordered{if(list[i] >= j){include = false;}}if(include && list[i] > max){max = list[i];}}index++;ordered[max] = index;leftovers = false;foreach i in list{include = false;foreach j in ordered{if(list[i] == j){include = true;}}if(!include){leftovers = true;}}}for i from index to 0 by -1{foreach j in ordered{if(ordered[j] == i){foreach k in $items[]{if(k.effect_modifier("effect").numeric_modifier($string[%%]) == j)print(k.effect_modifier("effect")+" (from "+k+") gives "+k.effect_modifier("effect").numeric_modifier($string[%%])+" "+$string[%%]);}}}}
  7.  
  8.  
  9. Edit:
  10. //bonus alias for just printing everything that gives a specified effect, since that's often a fun thing to do.
  11.  
  12. alias tcrseffect => ash foreach i in $items[] if(i.effect_modifier("effect") == $string[%%].to_effect()) print(i);
  13.  
  14.  
  15. ===============================================================================
  16. ===============================================================================
  17. ===============================================================================
  18.  
  19.  
  20. //examples of uses.
  21.  
  22.  
  23.  
  24. > tcrsequips muscle experience percent
  25.  
  26. hat:
  27. stone baseball cap gives 10.0 muscle experience percent
  28. Zombo's skullcap gives 10.0 muscle experience percent
  29. crumpled felt fedora gives 10.0 muscle experience percent
  30. Mark III Steam-Hat gives 10.0 muscle experience percent
  31. very pointy crown gives 10.0 muscle experience percent
  32. =====================
  33. weapon:
  34. black sword gives 10.0 muscle experience percent
  35. ocarina of space gives 10.0 muscle experience percent
  36. lead pipe gives 10.0 muscle experience percent
  37. bad vibroknife gives 10.0 muscle experience percent
  38. =====================
  39. off-hand:
  40. demon buckler gives 10.0 muscle experience percent
  41. beach ball marble gives 10.0 muscle experience percent
  42. The Necbromancer's Stein gives 10.0 muscle experience percent
  43. oil lamp gives 10.0 muscle experience percent
  44. studded sealhide shield gives 10.0 muscle experience percent
  45. ox-head shield gives 10.0 muscle experience percent
  46. =====================
  47. shirt:
  48. lemon shirt gives 10.0 muscle experience percent
  49. =====================
  50. pants:
  51. The Necbromancer's Shorts gives 10.0 muscle experience percent
  52. =====================
  53. acc1:
  54. infernal insoles gives 10.0 muscle experience percent
  55. tiny plastic apathetic lizardman gives 10.0 muscle experience percent
  56. tarrrnished charrrm bracelet gives 10.0 muscle experience percent
  57. Chester's moustache gives 10.0 muscle experience percent
  58. Pokëmann figurine: Vegemite gives 10.0 muscle experience percent
  59. Pokëmann figurine: Frank gives 10.0 muscle experience percent
  60. ornamental sextant gives 10.0 muscle experience percent
  61. Former Sheriff Dan's tin star gives 10.0 muscle experience percent
  62. =====================
  63. Returned: void
  64.  
  65.  
  66.  
  67.  
  68. > tcrspotions item drop
  69.  
  70. Ermine Eyes (from evil eyedrops of the ermine) gives 5.0 item drop
  71. Lucky Cat is Lucky (from Elvish delight) gives 5.0 item drop
  72. Capricorn Rising (from fancy chocolate car) gives 5.0 item drop
  73. Ermine Eyes (from "DRINK ME" potion) gives 5.0 item drop
  74. Lucky Cat is Lucky (from kumquat supersucker) gives 5.0 item drop
  75. Object Detection (from handyman "hand soap") gives 5.0 item drop
  76. Fortunate Resolve (from mafia aria) gives 10.0 item drop
  77. Hip to Be Square Dancin' (from flask of peppermint schnapps) gives 10.0 item drop
  78. Tingling Feeling (from turtle pheromones) gives 10.0 item drop
  79. Pla-see-bo (from Black Body™ spray) gives 10.0 item drop
  80. Pla-see-bo (from flask of hamethyst juice) gives 10.0 item drop
  81. Fortunate Resolve (from jug of hamethyst juice) gives 10.0 item drop
  82. Singer's Faithful Ocelot (from big dribbly candle) gives 10.0 item drop
  83. Singer's Faithful Ocelot (from breath mint) gives 10.0 item drop
  84. Fortunate Resolve (from wad of cotton) gives 10.0 item drop
  85. Eye of the Seal (from Pain Dip) gives 10.0 item drop
  86. Techno Bliss (from motivational poster) gives 10.0 item drop
  87. Ichorous Eyesight (from gooey paste) gives 10.0 item drop
  88. Singer's Faithful Ocelot (from gummi belemnite) gives 10.0 item drop
  89. Your Interest is Peaked (from daub-breaker) gives 10.0 item drop
  90. Eye of the Seal (from beet-flavored Mr. Mediocrebar) gives 10.0 item drop
  91. Singer's Faithful Ocelot (from celestial carrot juice) gives 10.0 item drop
  92. Aspect of the GravyPlum Fairy (from Mer-kin strongjuice) gives 10.0 item drop
  93. Techno Bliss (from Gene Tonic: Insect) gives 10.0 item drop
  94. Eggs-tra Sensory Perception (from Gene Tonic: Penguin) gives 10.0 item drop
  95. Tingling Feeling (from cuppa Physicali tea) gives 10.0 item drop
  96. Ocelot Eyes (from patent aggression tonic) gives 10.0 item drop
  97. Singer's Faithful Ocelot (from eldritch alignment spray) gives 10.0 item drop
  98. Your Interest is Peaked (from sweetened reindeer fat) gives 10.0 item drop
  99. Your Interest is Peaked (from universal antivenin) gives 10.0 item drop
  100. Chief Executive Optimism (from can of Red Minotaur) gives 15.0 item drop
  101. Chief Executive Optimism (from flask of mining oil) gives 15.0 item drop
  102. Joyful Resolve (from carton of gaspers) gives 15.0 item drop
  103. Dancing Prowess (from diluted makeup) gives 15.0 item drop
  104. Dance Interpreter (from Spam Witch sammich) gives 20.0 item drop
  105. Rain Dancin' (from red striped oyster egg) gives 20.0 item drop
  106. Fat Leon's Phat Loot Lyric (from STYX deodorant body spray) gives 20.0 item drop
  107. Scavengers Scavenging (from scrap of shadow) gives 20.0 item drop
  108. The Ballad of Richie Thingfinder (from Wax Flask) gives 20.0 item drop
  109. Scavengers Scavenging (from penguin paste) gives 20.0 item drop
  110. Quadrilled (from Sloe Comfortable Zoo on Fire) gives 20.0 item drop
  111. The Ballad of Richie Thingfinder (from accidental mutton) gives 20.0 item drop
  112. Disco Concentration (from Shrubble Bubble) gives 20.0 item drop
  113. Eagle Eyes (from batarang) gives 20.0 item drop
  114. Fat Leon's Phat Loot Lyric (from alien plant goo) gives 20.0 item drop
  115. Disco Concentration (from brilliant oyster egg) gives 20.0 item drop
  116. Uncucumbered (from lotion of hotness) gives 25.0 item drop
  117. Brocolate Brostidigitation (from orange candy heart) gives 25.0 item drop
  118. Slightly Cursed, Mostly Lucky (from cyclops eyedrops) gives 25.0 item drop
  119. Wet and Greedy (from bottle of black cat tonic) gives 25.0 item drop
  120. Your Eyes are Peeled! (from groupie spangles) gives 25.0 item drop
  121. Slightly Cursed, Mostly Lucky (from traffic jam toast) gives 25.0 item drop
  122. Wet and Greedy (from baggie of powdered sugar) gives 25.0 item drop
  123. Your Eyes are Peeled! (from Flaming Knob) gives 25.0 item drop
  124. Slightly Cursed, Mostly Lucky (from drop of water-37) gives 25.0 item drop
  125. Turkey-Agitated (from good ash) gives 25.0 item drop
  126. Serendipi Tea (from cabbage-flavored Mr. Mediocrebar) gives 25.0 item drop
  127. Serendipi Tea (from pulled blue taffy) gives 25.0 item drop
  128. Haunted Stomach (from Mer-kin saltsquid) gives 25.0 item drop
  129. Super Vision (from Elizabeth's paintbrush) gives 25.0 item drop
  130. Eyes for Miles (from Gene Tonic: Dude) gives 25.0 item drop
  131. Haunted Stomach (from steampunk potion) gives 25.0 item drop
  132. Brocolate Brostidigitation (from pygmy adder oil) gives 25.0 item drop
  133. Serendipi Tea (from candy cigarette) gives 25.0 item drop
  134. Super Vision (from experimental serum G-9) gives 25.0 item drop
  135. Eyes for Miles (from loaf of soda bread) gives 25.0 item drop
  136. Wet and Greedy (from cuppa Boo tea) gives 25.0 item drop
  137. Dance of the Sugar Fairy (from twice-haunted screwdriver) gives 25.0 item drop
  138. Stench Jellied (from sleaze nuggets) gives 30.0 item drop
  139. Mmmmmelon (from phial of sleaziness) gives 30.0 item drop
  140. Stench Jellied (from Gene Tonic: Horror) gives 30.0 item drop
  141. Celestial Vision (from cuppa Proprie tea) gives 30.0 item drop
  142. Hoity Toity (from potion of spiritual gunkifying) gives 30.0 item drop
  143. I See Everything Thrice! (from drum of pomade) gives 33.0 item drop
  144. I See Everything Thrice! (from candy chalk) gives 33.0 item drop
  145. The Dinsey Spirit (from Hawking's Elixir of Brilliance) gives 40.0 item drop
  146. Tremella Tremens (from resolution: be happier) gives 40.0 item drop
  147. Mercenary (from eagle feather) gives 40.0 item drop
  148. Tremella Tremens (from child-sized dracula cloak) gives 40.0 item drop
  149. Voracious Gorging (from unusual oil) gives 40.0 item drop
  150. Mercenary (from Inner Wisdom) gives 40.0 item drop
  151. The Dinsey Spirit (from murderbot shield unit) gives 40.0 item drop
  152. Salsa Satanica (from blood of the Wereseal) gives 50.0 item drop
  153. Cautious Prowl (from Happy Birthday, Claude! cake) gives 50.0 item drop
  154. Unusual Perspective (from glowing El Vibrato drone) gives 50.0 item drop
  155. Clyde's Blessing (from Gummi-DNA) gives 50.0 item drop
  156. Items Are Forever (from children of the candy corn) gives 50.0 item drop
  157. Sucrose-Colored Glasses (from Marvin's marvelous pill) gives 50.0 item drop
  158. Cautious Prowl (from fireclutch) gives 50.0 item drop
  159. Items Are Forever (from Chakra Libre) gives 50.0 item drop
  160. Beta Carotene Overdose (from disco horoscope (Leo)) gives 50.0 item drop
  161. Unusual Perspective (from wind-up vampire teeth) gives 50.0 item drop
  162. Beta Carotene Overdose (from fabric hardener) gives 50.0 item drop
  163. Cautious Prowl (from airborne mutagen) gives 50.0 item drop
  164. Sucrose-Colored Glasses (from hustler shades) gives 50.0 item drop
  165. Cautious Prowl (from cuppa Loyal tea) gives 50.0 item drop
  166. Always be Collecting (from patent alacrity tonic) gives 50.0 item drop
  167. Polka Face (from voodoo glowskull) gives 55.0 item drop
  168. Melancholy Burden (from bowl of Jeal-O) gives 60.0 item drop
  169. One Very Clear Eye (from flask of rainwater) gives 100.0 item drop
  170. Returned: void
Advertisement
Add Comment
Please, Sign In to add comment