daily pastebin goal
82%
SHARE
TWEET

main.ash

Erichwanh Mar 28th, 2016 (edited) 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void main() {
  2.     buffer results;
  3.     results.append(visit_url());
  4.  
  5.     string reminder = '<center><div id="bfastholder"><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=orange><b>Daily Reminders!</b></td></tr><tr><td style="padding: 5px; border: 1px solid orange;"><center><table><tr><td><center><div>';
  6.  
  7.     matcher dailymatch = create_matcher(reminder,visit_url("main.php"));
  8.  
  9.     string dditm (string obj1, string obj2, string img, string u, string num, string alt) {
  10.  
  11.         string dditm1 = '<button id="bid_12" title="' + alt + '" alt="' + alt + '" class="button bfast" rel="' + u +  ' ' + num + ' ' + obj1 + '"><table><tr><td valign="center" align="center"><img src="//s3.amazonaws.com/images.kingdomofloathing.com/itemimages/' + img + '.gif" height="30" width="30" /></td><td valign="center" align="center" width="200"><div class="b">' + obj2 + '</div></td></tr></table></button>';
  12.  
  13.         return dditm1;
  14.     }
  15.  
  16.     string deeds() {
  17.  
  18.         string deed = reminder;
  19.  
  20.         // Items to Use
  21.  
  22.         if(item_amount($item[Glenn\'s golden dice]) > 0 && get_property("_glennGoldenDiceUsed") == "false")
  23.             deed += dditm("Glenn\'s golden dice","Glenn\'s golden dice","golddice","use","1","Roll Glenn\'s Dice");
  24.  
  25.         if(item_amount($item[Clara\'s bell]) > 0 && get_property("_claraBellUsed") == "false")
  26.             deed += dditm("Clara\'s bell","Clara\'s bell","clarabell","use","1","Ring Clara's Bell");
  27.  
  28.         if((item_amount($item[Time-Spinner]) > 0) && (get_property("_timeSpinnerMinutesUsed").to_int() < 10))
  29.             deed += dditm("Time-Spinner","Time-Spinner","timespinner","use","1","Spin Your Time-Spinner");
  30.  
  31.         if(item_amount($item[Deck of Every Card]) > 0) {
  32.  
  33.             if(get_property("_deckCardsDrawn").to_int() < 15)
  34.                 deed += dditm("Deck of Every Card","Deck of Every Card","deckdeck","use","1","Pick a card");
  35.  
  36.             if(get_property("_deckCardsDrawn").to_int() / 5 < 3)
  37.                 deed += dditm("inv_use.php?cheat=1&pwd="+my_hash()+"&whichitem=8382","Deck of Every Card (Cheat)","deckdeck","goto","","Cheat a card");
  38.  
  39.         }
  40.  
  41.         if(item_amount($item[January\'s Garbage Tote]) > 0)
  42.             deed += dditm("January\'s Garbage Tote","Garbage Tote","tote_open","use","1","Rummage");
  43.  
  44.         if(item_amount($item[Kremlin\'s Greatest Briefcase]) > 0 && get_property("_kgbOpened") == "false")
  45.             deed += dditm("place.php?whichplace=kgb","Kremlin\'s Briefcase","kgbcase","goto","","Open Your Briefcase");
  46.  
  47.         if(item_amount($item[bass clarinet]) > 0 && get_property("_floundryItemUse") == "false")
  48.             deed += dditm("bass clarinet","Bass Clarinet","bassclarinet","use","1","Drain the spit from your Clarinet");
  49.  
  50.         if(item_amount($item[fish hatchet]) > 0 && get_property("_floundryItemUse") == "false")
  51.             deed += dditm("fish hatchet","Fish Hatchet","fishhatchet","use","1","Get bridge parts from your Fish Hatchet");
  52.  
  53.         if(item_amount($item[codpiece]) > 0 && get_property("_floundryItemUse") == "false")
  54.             deed += dditm("codpiece","Codpiece","codcodpiece","use","1","Wring out your Codpiece");
  55.  
  56.         // Misc. Skills
  57.  
  58.         if(have_skill($skill[Canticle of Carboloading]) && get_property("_carboLoaded") == "false")
  59.             deed += dditm("Canticle of Carboloading","Canticle of Carboloading","carboloading","cast","1","Carboload");
  60.  
  61.         if(have_skill($skill[Ancestral Recall]) && item_amount($item[Blue Mana]) > 0 && get_property("_ancestralRecallCasts").to_int() < 10)
  62.             deed += dditm("Ancestral Recall","Ancestral Recall","goldcoin","cast","1","Recall your ancestors");
  63.  
  64.         // Librams
  65.  
  66.         if(have_skill($skill[Summon Candy Heart]) && my_mp() >= mp_cost($skill[Summon Candy Heart]))
  67.             deed += dditm("Summon Candy Heart","Summon Candy Heart","book","cast","1","Summon some Candy Hearts");
  68.  
  69.         if(have_skill($skill[Summon Party Favor]) && my_mp() >= mp_cost($skill[Summon Party Favor]))
  70.             deed += dditm("Summon Party Favor","Summon Party Favor","book3","cast","1","Summon some Party Favors");
  71.  
  72.         if(have_skill($skill[Summon Love Song]) && my_mp() >= mp_cost($skill[Summon Love Song]))
  73.             deed += dditm("Summon Love Song","Summon Love Song","book4","cast","1","Summon some Love Songs");
  74.  
  75.         if(have_skill($skill[Summon BRICKOs]) && my_mp() >= mp_cost($skill[Summon BRICKOs]))
  76.             deed += dditm("Summon BRICKOs","Summon BRICKOs","book2","cast","1","Summon some BRICKOs");
  77.  
  78.         if(have_skill($skill[Summon Dice]) && my_mp() >= mp_cost($skill[Summon Dice]))
  79.             deed += dditm("Summon Dice","Summon Dice","gygaxlibram","cast","1","Summon some Dice");
  80.  
  81.         if(have_skill($skill[Summon Resolutions]) && my_mp() >= mp_cost($skill[Summon Resolutions]))
  82.             deed += dditm("Summon Resolutions","Summon Resolutions","book5","cast","1","Summon some Resolutions");
  83.  
  84.         if(have_skill($skill[Summon Taffy]) && my_mp() >= mp_cost($skill[Summon Taffy]))
  85.             deed += dditm("Summon Taffy","Summon Taffy","book4","cast","1","Summon some Taffy");
  86.  
  87.         // Class
  88.  
  89.         int seals = 5;
  90.         if(item_amount($item[Claw of the Infernal Seal]) > 0)
  91.             seals = seals + 5;
  92.         if(my_class().to_string() == "Seal Clubber" && get_property("_sealsSummoned").to_int() < seals)
  93.             deed += dditm("inventory.php?ftext=figurine","Infernal Seals","sealfiguran","goto","","Summon an Infernal Seal");
  94.  
  95.         // Jarlsberg Skills
  96.  
  97.         if(have_skill($skill[Conjure Eggs]) && get_property("_jarlsEggsSummoned") == "false")
  98.             deed += dditm("Conjure Eggs","Conjure Eggs","cosmic_egg","cast","1","Conjure some Eggs");
  99.  
  100.         if(have_skill($skill[Conjure Dough]) && get_property("_jarlsDoughSummoned") == "false")
  101.             deed += dditm("Conjure Dough","Conjure Dough","cosmic_dough","cast","1","Conjure some Dough");
  102.  
  103.         if(have_skill($skill[Conjure Vegetables]) && get_property("_jarlsVeggiesSummoned") == "false")
  104.             deed += dditm("Conjure Vegetables","Conjure Vegetables","cosmic_veg","cast","1","Conjure some Vegies");
  105.  
  106.         if(have_skill($skill[Conjure Cheese]) && get_property("_jarlsCheeseSummoned") == "false")
  107.             deed += dditm("Conjure Cheese","Conjure Cheese","cosmic_cheese","cast","1","Conjure some Cheese");
  108.  
  109.         if(have_skill($skill[Conjure Meat Product]) && get_property("_jarlsMeatSummoned") == "false")
  110.             deed += dditm("Conjure Meat Product","Conjure Meat Product","cosmic_meat","cast","1","Conjure some Meat Product");
  111.  
  112.         if(have_skill($skill[Conjure Potato]) && get_property("_jarlsPotatoSummoned") == "false")
  113.             deed += dditm("Conjure Potato","Conjure Potato","cosmic_potato","cast","1","Conjure some Taters");
  114.  
  115.         if(have_skill($skill[Conjure Cream]) && get_property("_jarlsCreamSummoned") == "false")
  116.             deed += dditm("Conjure Cream","Conjure Cream","cosmic_cream","cast","1","Conjure some Cream");
  117.  
  118.         if(have_skill($skill[Conjure Fruit]) && get_property("_jarlsFruitSummoned") == "false")
  119.             deed += dditm("Conjure Fruit","Conjure Fruit","cosmic_fruit","cast","1","Conjure some Fruit");
  120.  
  121.         // Familiars
  122.  
  123.         if(have_familiar($familiar[Grim Brother]) && get_property("_grimBuff") == "false")
  124.             deed += dditm('familiar.php?action=chatgrim&pwd='+my_hash()+'',"Grim Brother","grimbrother","goto","","Talk to your Grim Brother");
  125.  
  126.         // Campground
  127.  
  128.         if(get_campground() contains $item[Discount Telescope Warehouse gift certificate] && get_property("telescopeLookedHigh") == "false")
  129.             deed += dditm("campground.php?action=telescope","Telescope","snowflakes","goto","","Look up at the stars");
  130.  
  131.         if(get_campground() contains $item[potted tea tree] && get_property("_pottedTeaTreeUsed") == "false")
  132.             deed += dditm("campground.php?action=teatree","Tea Tree","tea_adv","goto","","Get some Tea");
  133.  
  134.         if(get_campground() contains $item[Witchess Set]) {
  135.  
  136.             if(get_property("_witchessFights").to_int() < 5)
  137.                 deed += dditm("campground.php?action=witchess","Witchess Set","chessset","goto","","Fight some Witchess pieces");
  138.  
  139.             if(get_property("_witchessBuff") == "false")
  140.                 deed += dditm("witchess.php","Witchess Set (Buff)","chessset","goto","","Get your Puzzle Champ buff");
  141.  
  142.         }
  143.  
  144.         // Chateau
  145.  
  146.         if(get_property("chateauAvailable") == "true") {
  147.  
  148.             if(get_property("_chateauDeskHarvested") == "false") {
  149.                 if(get_chateau() contains $item[Swiss piggy bank])
  150.                     deed += dditm("place.php?whichplace=chateau&action=chateau_desk1","Chateau Desk","swisspig","goto","","Get 1k meat from your Chateau Desk");
  151.                 else if(get_chateau() contains $item[continental juice bar])
  152.                     deed += dditm("place.php?whichplace=chateau&action=chateau_desk1","Chateau Desk","juicebar","goto","","Get 3 potions from your Chateau Desk");
  153.                 else if(get_chateau() contains $item[fancy stationery set])
  154.                     deed += dditm("place.php?whichplace=chateau&action=chateau_desk1","Chateau Desk","stationary","goto","","Get 3 fancy pens from your Chateau Desk");
  155.             }
  156.  
  157.             if(get_property("_chateauMonsterFought") == "false")
  158.                 deed += dditm("place.php?whichplace=chateau","Chateau Painting","confused","goto","","Fight a painted monster");
  159.  
  160.         }
  161.  
  162.         // Clan Stuffs
  163.  
  164.         if(can_interact() && get_property("_ballpit") == "false")
  165.             deed += dditm("clan_rumpus.php?action=click&spot=7","Ballpit","plasticball","goto","","Jump in your ballpit");
  166.  
  167.         // VIP Stuff
  168.  
  169.         if(item_amount($item[Clan VIP Lounge key]) > 0) {
  170.  
  171.             if(item_amount($item[fishin\' pole]) == 0)
  172.                 deed += dditm("clan_viplounge.php?action=floundry","Get Fishin\' Pole","fishinpole","goto","","Pick up a Fishin\' Pole");
  173.  
  174.             if(get_property("_speakeasyDrinksDrunk").to_int() < 3 && !(my_inebriety() > inebriety_limit()))
  175.                 deed += dditm("clan_viplounge.php?action=speakeasy","Speakeasy","fruitym","goto","","Get a drink from the Speakeasy");
  176.  
  177.             if(is_unrestricted($item[Clan hot dog stand]) && get_property("_fancyHotDogEaten") == "false")
  178.                 deed += dditm("clan_viplounge.php?action=hotdogstand","Hot Dog Stand","jarl_regdog","goto","","Eat a fancy Hot Dog");
  179.  
  180.             if(is_unrestricted($item[crimbough]) && get_property("crimboTreeDays") == 0)
  181.                 deed += dditm("clan_viplounge.php?action=crimbotree&whichfloor=2","Crimbo Tree","pressie","goto","","You have a present under the tree!");
  182.  
  183.             if(get_property("_lookingGlass") == "false")
  184.                 deed += dditm("clan_viplounge.php?action=lookingglass&whichfloor=2","Looking Glass","drinkme","goto","","Check yourself out in the Looking Glass");
  185.  
  186.             if(is_unrestricted($item[Clan pool table]) && get_property("_poolGames").to_int() < 3)
  187.                 deed += dditm("clan_viplounge.php?action=pooltable&whichfloor=2","Pool Table","poolcue","goto","","Play some Pool");
  188.  
  189.             if(is_unrestricted($item[Clan shower]) && get_property("_aprilShower") == "false")
  190.                 deed += dditm("clan_viplounge.php?action=shower&whichfloor=2","Shower","raindrop","goto","","Take a shower");
  191.  
  192.             if(is_unrestricted($item[Olympic-sized Clan crate]) && get_property("_olympicSwimmingPool") == "false")
  193.                 deed += dditm("clan_viplounge.php?action=swimmingpool&whichfloor=2","Swimming Pool","laps","goto","","Take a Swim");
  194.  
  195.             if(is_unrestricted($item[Olympic-sized Clan crate]) && get_property("_olympicSwimmingPoolItemFound") == "false")
  196.                 deed += dditm("clan_viplounge.php?preaction=goswimming&subaction=screwaround","Swimming Pool (Cannonball)","zegoggles","goto","","Screw around in the pool");
  197.  
  198.         }
  199.  
  200.         // Airport
  201.  
  202.         if((get_property("stenchAirportAlways") == "true" || get_property("_stenchAirportToday") == "true") && item_amount($item[bag of park garbage]) > 0 && get_property("_dinseyGarbageDisposed") == "false")
  203.             deed += dditm("place.php?whichplace=airport_stench&action=airport3_tunnels","Dinsey Trash","parkgarbage","goto","","Take out the trash");
  204.  
  205.         if((get_property("hotAirportAlways") == "true" || get_property("_hotAirportToday") == "true") && get_property("_infernoDiscoVisited") == "false")
  206.             deed += dditm("place.php?whichplace=airport_hot&action=airport4_zone1","Inferno Disco","firefoot","goto","","Visit the Towering Inferno Discotheque");
  207.  
  208.         // Island
  209.  
  210.         if(get_property("currentHippyStore") != "none" && get_property("_hippyMeatCollected") == "false")
  211.             deed += dditm("shop.php?whichshop=hippy","The Hippy Stand","herbs","goto","","Collect your daily cut");
  212.  
  213.         if(get_property("sidequestArenaCompleted") != "none" && get_property("concertVisited") == "false")
  214.             deed += dditm("Island Arena","Mysterious Island Arena","celerity","go","","Go to a concert");
  215.  
  216.         if(get_property("sidequestNunsCompleted") != "none" && get_property("nunsVisits").to_int() < 3)
  217.             deed += dditm("Our Lady of Perpetual Indecision","Nunnery","curative","go","","Get a massage");
  218.  
  219.         // Places to Go
  220.  
  221.         if(get_property("questL06Friar") == "finished" && get_property("friarsBlessingReceived") == "false")
  222.             deed += dditm("friars.php","Deep Fat Friars","monkhead","goto","","Get a blessing from the Friars");
  223.  
  224.         if(get_property("_eldritchTentacleFought") == "false")
  225.             deed += dditm("place.php?whichplace=forestvillage&action=fv_scientist","Fight Eldritch Tentacle","eldeffluv","goto","","Fight Eldritch Tentacle");
  226.  
  227.         if(get_property("telegraphOfficeAvailable") == "true" && available_amount($item[your cowboy boots]) == 0)
  228.             deed += dditm("place.php?whichplace=town_right&action=townright_ltt","Get Cowboy Boots","cowboyboots","goto","","Pick up your cowboy boots");
  229.  
  230.         if(get_property("hasDetectiveSchool") == "true" && get_property("_detectiveCasesCompleted").to_int() < 3)
  231.             deed += dditm("place.php?whichplace=town_wrong&action=townwrong_precinct","11th Precinct","copdollar","goto","","Take A Case");
  232.  
  233.         if(get_property("snojoAvailable") == "true" && get_property("_snojoFreeFights").to_int() < 10 && my_inebriety() < inebriety_limit())
  234.             deed += dditm("place.php?whichplace=snojo","The Snojo","snowhitman","goto","","Fight the X-32-F Combat Training Snowman");
  235.  
  236.         if(get_property("barrelShrineUnlocked") == "true" && get_property("_barrelPrayer") == "false")
  237.             deed += dditm("da.php?barrelshrine=1","Pray to the Barrel God","barrelbig","goto","","Pray to the Barrel God");
  238.  
  239.         if((item_amount($item[Game Grid token]) > 0 || item_amount($item[Game Grid valued membership card]) > 0) && get_property("_defectiveTokenChecked") == "false")
  240.             deed += dditm("place.php?whichplace=arcade&action=arcade_plumber","Check for Defective Token","gg_def","goto","","Check for a Defective Token");
  241.  
  242.         matcher clovermatch = create_matcher("out of stock",visit_url("hermit.php"));
  243.         if(!clovermatch.find())
  244.             deed += dditm("hermit.php","Buy Clovers","clover","goto","","Buy some clovers");
  245.  
  246.         matcher trophymatch = create_matcher("You\'re not currently entitled to any trophies",visit_url("trophy.php"));
  247.         if(!trophymatch.find())
  248.             deed += dditm("trophy.php","Buy Trophy","trophy","goto","","You\'re entitled to a trophy!");
  249.  
  250.         // The Sea
  251.  
  252.         if(get_property("skateParkStatus") == "ice" && get_property("_skateBuff1") == "false")
  253.             deed += dditm("sea_skatepark.php?action=state2buff1","Skate Park","miniskate1","goto","","Get Fishy from the Ice Skates");
  254.  
  255.         if(get_property("questS02Monkees") == "finished" && get_property("_momFoodReceived") == "false")
  256.             deed += dditm("monkeycastle.php?who=4","Mom Sea Monkee","mix","goto","","Get food from Mom");
  257.  
  258.         return deed;
  259.     }
  260.  
  261.     if(dailymatch.find())
  262.         results.replace_string(reminder, deeds());
  263.     else
  264.         results.replace_string('<div id=\'menu\' class=rcm></div>','<div id=\'menu\' class=rcm></div>' +deeds()+ '</div></center></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></div>     <style>button.bfast { margin: 0px 5px 5px 0px; } .bfast .b {display: table-cell; height: 41px; vertical-align: middle; font-weight: bold; } #effdiv { min-height: 250px; }</style>\n    <script>\n              var checkbut = function (bid) {\n                   var but = $(\'#bid_\'+bid);\n                   $.get(\'main.php?checkbfast=\' + bid, function (res) {\n                        if (res == 0) {\n                           but.remove();\n                         if ($(\'#bfastholder .bfast\').length == 0) $(\'#bfastholder\').remove();\n                     }\n                     else {\n                            but.css({backgroundColor: \'\'});\n                     }\n                 }, \'json\');\n             };\n            jQuery(function ($) {\n             $(\'.bfast\').click(function (e) {\n                    e.preventDefault();\n                   var but = $(this);\n                    var bid = but.attr(\'id\').replace(\'bid_\', \'\');\n                   but.css({backgroundColor: \'#ccc\'});\n                 var cmd = $(this).attr(\'rel\');\n                  $.get(\'submitnewchat.php\', \n                     {cli: 1, pwd: "'+my_hash()+'", graf: \'/\'+cmd}, \n                     function (resp) { \n                                jstest = /<!--js\\((.+?)\\)-->/g;\n                             while (ev = jstest.exec(resp)) { todo.push(ev[1]); }\n                              nextAction();\n                             todo.push("checkbut("+bid+");");\n                              //$(\'#results\').prepend(resp);\n                      });\n   \n                  });\n           });\n       </script>');
  265.  
  266.     results.write();
  267. }
RAW Paste Data
Top