yojimbos_law

toddler handler.ash

Dec 10th, 2018
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. // Looks like 57 pieces in all. 7,423 toddlers are training with 4 instructors in the boxing ring. It's impressive how efficient they are, what with that student-to-teacher ratio.
  2. //<font color=blue><b>[1,000,000 Meat]</b>
  3.  
  4. if(get_property("_child_abuse") == ""){
  5. string kids_bop;
  6. string daycare_state = get_property("daycare_state");
  7. int children_to_buy = 3 - get_property("_children_bought").to_int();
  8. int kids_iteration;
  9. //get into choice 1334.
  10. kids_bop = visit_url("place.php?whichplace=town_wrong&action=townwrong_boxingdaycare");
  11. //fight poor internet connection with idempotence
  12. while(!(kids_bop.contains_text("a door to a spa to your left")) && kids_iteration < 10){
  13. wait(10);
  14. kids_bop = visit_url("place.php?whichplace=town_wrong&action=townwrong_boxingdaycare");
  15. kids_iteration++;
  16. }
  17.  
  18. //grab daily thing.
  19. while(visit_url("choice.php?whichchoice=1334&option=1").length() < 69 && kids_iteration < 69){
  20. kids_iteration++;
  21. }
  22.  
  23. //get into choice 1336.
  24. while(kids_bop.contains_text("a door to a spa to your left") && kids_iteration < 69 ){
  25. kids_bop = visit_url("choice.php?whichchoice=1334&option=3");
  26. kids_iteration++;
  27. //record daycare state after we reach choice 1336
  28. if(kids_bop.contains_text("Hire an instructor")){
  29. daycare_state = kids_bop.substring(kids_bop.index_of("Looks like"),kids_bop.index_of("instructors")+12);
  30. }
  31. }
  32.  
  33. //scavenge for freeeee
  34. while(kids_bop.contains_text("[free]") && kids_bop.contains_text(daycare_state) && kids_iteration < 69 ){
  35. kids_bop = visit_url("choice.php?whichchoice=1336&option=2");
  36. kids_iteration++;
  37. //if we've scavenged successfully, update daycare state.
  38. if(kids_bop.contains_text(" adventure]") && !kids_bop.contains_text("[free]") && !kids_bop.contains_text(daycare_state)){
  39. daycare_state = kids_bop.substring(kids_bop.index_of("Looks like"),kids_bop.index_of("instructors")+12);
  40. }
  41. }
  42.  
  43. //buy some children, but only if they cost at least 100 meat and at most 10000 meat.
  44. while( children_to_buy > 0 && kids_iteration < 69 && kids_bop.contains_text("00 Meat]") && !kids_bop.contains_text("00,000 Meat]")){
  45. kids_bop = visit_url("choice.php?whichchoice=1336&option=1");
  46. kids_iteration++;
  47. //if daycare state changes, decrement children_to_buy, increment _children_bought, and update daycare_state.
  48. if(!((kids_bop.contains_text(daycare_state)) && kids_bop.contains_text("00 Meat]") )){
  49. children_to_buy += -1;
  50. set_property("_children_bought", get_property("_children_bought").to_int()+1);
  51. daycare_state = kids_bop.substring(kids_bop.index_of("Looks like"),kids_bop.index_of("instructors")+12);
  52. }
  53. //if we're done, be done.
  54. if(children_to_buy == 0){
  55. set_property("_child_abuse", "beyond!");
  56. set_property("daycare_state", daycare_state);
  57. }
  58. }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment