yojimbos_law

script for converting free runs into dice

May 2nd, 2018
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  1.  
  2. cli_execute("/aa none");
  3.  
  4. //cli_execute("run dice mp thingy.ash");
  5. //note that this won't work for you because custom outfits.
  6. //edit accordingly if you want to use it.
  7.  
  8. int elemental_count = 0;
  9. boolean elchecktrified = false;
  10. if(get_property("_dicey_mp_runs").to_int() == 0 && get_property("_alotted_snojo_bander_runs").to_int() == 0){
  11. cli_execute("familiar bandersnatch");
  12. cli_execute("equip familiar kill screen");
  13. cli_execute("outfit dice mp");
  14. cli_execute("acquire 11 insani tea");
  15. cli_execute("acquire 11 concoction of clumsiness");
  16. cli_execute("acquire 11 ancient medicinal herbs");
  17. if(have_effect($effect[polka of plenty]) > 0){
  18. cli_execute("shrug polka of plenty");
  19. cli_execute("cast ode to booze");
  20. }
  21. if(have_effect($effect[insani tea]) == 0){
  22. cli_execute("use 1 insani tea");
  23. }
  24. if(have_effect($effect[clumsy]) == 0){
  25. cli_execute("shrug ancient fortitude");
  26. cli_execute("use 1 concoction of clumsiness");
  27. cli_execute("chew 1 ancient medicinal herbs");
  28. }
  29. //this is how many bander runs we're able to use here. this preference should only be set once/day.
  30. set_property("_alotted_snojo_bander_runs", ((Numeric_Modifier("Familiar Weight") + familiar_weight( my_familiar() ) ) / 5) - get_property("_banderRunaways").to_int());
  31. cli_execute("cast cannelloni cocoon");
  32. // bjorn_stuff();
  33. }
  34.  
  35. //this block is for if the script needs to be rerun after aborting for some stupid reason.
  36. if(get_property("_dicey_mp_runs").to_int() > 0 && get_property("_dicey_mp_runs").to_int() < (get_property("_alotted_snojo_bander_runs").to_int() - 1)){
  37. cli_execute("familiar bandersnatch");
  38. cli_execute("equip familiar kill screen");
  39. cli_execute("outfit dice mp");
  40. if(have_effect($effect[polka of plenty]) > 0){
  41. cli_execute("shrug polka of plenty");
  42. cli_execute("cast ode to booze");
  43. }
  44. if(have_effect($effect[insani tea]) == 0){
  45. cli_execute("use 1 insani tea");
  46. }
  47. if(have_effect($effect[clumsy]) == 0){
  48. cli_execute("shrug ancient fortitude");
  49. cli_execute("use 1 concoction of clumsiness");
  50. cli_execute("chew 1 ancient medicinal herbs");
  51. }
  52. cli_execute("cast cannelloni cocoon");
  53. // bjorn_stuff();
  54. }
  55.  
  56. //this block adventures until we've used all but one of our free runs. off-by-one errors are scary, so the last free run remains unused. timer 1 check makes script abort if a turn is spent.
  57. while(get_property("_dicey_mp_runs").to_int() < (get_property("_alotted_snojo_bander_runs").to_int() - 1) && get_property("_banderRunaways").to_int() < (Numeric_Modifier("Familiar Weight") + familiar_weight( my_familiar() ) ) / 5 && have_effect($effect[timer 1]) > 0 ){
  58. visit_url("adventure.php?snarfblat=460");
  59. elchecktrified = false;
  60. elemental_count = 0;
  61. foreach i in last_monster().random_modifiers{
  62. if(i == "foul-mouthed" || i == "filthy" || i == "hot" || i == "wet" || i == "haunted"){
  63. //these each do some percent of your maxhp in damage, seemingly bounded from above by 2% if you have 90% elemental resistance, each round.
  64. elemental_count++;
  65. }
  66. if(i == "electrified"){
  67. //monster is full of mp and pain.
  68. elchecktrified = true;
  69. }
  70. if(i == "hilarious"){
  71. //monster breaks mafia's tracking of free runs. this has like a 1/buhjillion chance of wasting a free run (by incrementing twice) if the runaway message has no salad in it.
  72. set_property("_banderRunaways", get_property("_banderRunaways").to_int()+1);
  73. }
  74. }
  75. if(!elchecktrified){
  76. visit_url("fight.php?action=runaway");
  77. }
  78. else{
  79. visit_url("fight.php?action=macro&macrotext=while !hppercentbelow " + (elemental_count * 2 + 20).to_string() +";attack;endwhile;runaway;");
  80. }
  81. set_property("_dicey_mp_runs",get_property("_dicey_mp_runs").to_int()+1);
  82. cli_execute("cast cannelloni cocoon");
  83. // bjorn_stuff();
  84. cli_execute("/cast * dice");
  85. }
  86.  
  87. if(have_effect($effect[timer 1]) == 0){
  88. abort("dice is fucked");
  89. }
  90.  
  91. if(have_effect($effect[ode to booze]) > 0){
  92. cli_execute("shrug ode to booze");
  93. cli_execute("cast polka of plenty");
  94. }
  95.  
  96. if(have_effect($effect[insani tea]) > 0){
  97. cli_execute("shrug insani tea");
  98. cli_execute("shrug clumsy");
  99. }
Add Comment
Please, Sign In to add comment