Community Service relay script

Winterbay

New member
Does anyone have a relay override for the Community Service council page that lists what the items you get actually do? I keep forgetting and having that on the page would be awesome :)
(extra bonus would be if it also contained the formula for the lowering of the turns, but that is less important)
 

ckb

Active member
My WTF script would likely do this easily (assuming Mafia knows about all the reward items). I can throw a relay override together if someone can paste the html of the council page.
 

Winterbay

New member
My WTF script would likely do this easily (assuming Mafia knows about all the reward items). I can throw a relay override together if someone can paste the html of the council page.

This is the code with two options missing (Coil Wire - always 60 turns and Donate Blood - buffed HP one)
HTML:
<html><head>
<script language=Javascript>
<!--
if (parent.frames.length == 0) location.href="game.php";
//-->
</script>
<script language=Javascript src="//images.kingdomofloathing.com/scripts/jquery-1.5.1.js"></script>
<script language=Javascript src="//images.kingdomofloathing.com/scripts/keybinds.min.2.js"></script>
<script language=Javascript src="//images.kingdomofloathing.com/scripts/window.20111231.js"></script>
<script language="javascript">function chatFocus(){if(top.chatpane.document.chatform.graf) top.chatpane.document.chatform.graf.focus();}
if (typeof defaultBind != 'undefined') { defaultBind(47, 2, chatFocus); defaultBind(190, 2, chatFocus);defaultBind(191, 2, chatFocus); defaultBind(47, 8, chatFocus);defaultBind(190, 8, chatFocus); defaultBind(191, 8, chatFocus); }</script><script>
function switchFocus()
{
	if (top.chatpane.document.chatform.graf.focus) 
  top.chatpane.document.chatform.graf.focus(); 
	return false;
}
function repeat()
{
	var linx = document.getElementsByTagName("A");
	for (var i = 0; i < linx.length; i++)
	{
  if (typeof timersfunc != 'undefined') {
   if (!timersfunc()) { 
    return; 
   }
   timersfunc = null;
  }
  var link = linx[i];
  if (link.innerHTML.match(/Adventure Again/) || link.innerHTML.match(/Do it again/))
   location.href = link.href;
	}
}

defaultBind(47, CTRL, switchFocus);
defaultBind(191, CTRL, switchFocus);
defaultBind(47, META, switchFocus);
defaultBind(191, META, switchFocus);
defaultBind(192, NONE, repeat);
defaultBind(220, NONE, repeat);
</script><script language="javascript">
	function updateParseItem(iid, field, info) {
  var tbl = $('#ic'+iid);
  var data = parseItem(tbl);
  if (!data) return;
  data[field] = info;
  var out = [];
  for (i in data) {
   if (!data.hasOwnProperty(i)) continue;
   out.push(i+'='+data[i]);
  }
  tbl.attr('rel', out.join('&'));
	}
	function parseItem(tbl) {
  tbl = $(tbl);
  var rel = tbl.attr('rel');
  var data = {};
  if (!rel) return data;
  var parts = rel.split('&');
  for (i in parts) {
   if (!parts.hasOwnProperty(i)) continue;
   var kv = parts[i].split('=');
   tbl.data(kv[0], kv[1]);
   data[kv[0]] = kv[1];
  }
  return data;
	}
</script><script type="text/javascript" src="http://images.kingdomofloathing.com/scripts/pop_query.20130705.js"></script>
<script type="text/javascript" src="http://images.kingdomofloathing.com/scripts/ircm.20150220.js"></script>
<script type="text/javascript">
function pop_ircm_contents(i, some) {
	var contents = '',
  shown = 0,
  da = ' <a href="#" rel="?" class="small dojaxy">[some]</a> <a href="#" rel="',
  db = '" class="small dojaxy">[all]</a>',
  dc = '<div style="width:100%; padding-bottom: 3px;" rel="',
  dd = '<a href="#" rel="1" class="small dojaxy">[';
	one = 'one'; ss=some;
if (i.d==1 && i.s>0) { shown++; 
contents += dc + 'sellstuff.php?action=sell&ajax=1&type=quant&whichitem%5B%5D=IID&howmany=NUM&pwd=9a704e34f2ef61dc33995c2e57f8f987" id="pircm_'+i.id+'"><b>Auto-Sell ('+i.s+' meat):</b> '+dd+one+']</a>';
if (ss) { contents += da + i.n + db;}
contents += '</div>';
}
one = 'one'; ss=some;
if (i.q==0) { shown++; 
contents += dc + 'inventory.php?action=closetpush&ajax=1&whichitem=IID&qty=NUM&pwd=9a704e34f2ef61dc33995c2e57f8f987" id="pircm_'+i.id+'"><b>Closet:</b> '+dd+one+']</a>';
if (ss) { contents += da + i.n + db;}
contents += '</div>';
}
one = 'one'; ss=some;
if (i.q==0 && i.g==0 && i.t==1) { shown++; 
contents += dc + 'managestore.php?action=additem&qty1=NUM&item1=IID&price1=&limit1=&ajax=1&pwd=9a704e34f2ef61dc33995c2e57f8f987" id="pircm_'+i.id+'"><b>Stock in Mall:</b> '+dd+one+']</a>';
if (ss) { contents += da + i.n + db;}
contents += '</div>';
}
one = 'one'; ss=some;
if (i.q==0) { shown++; 
contents += dc + 'managecollection.php?action=put&ajax=1&whichitem1=IID&howmany1=NUM&pwd=9a704e34f2ef61dc33995c2e57f8f987" id="pircm_'+i.id+'"><b>Add to Display Case:</b> '+dd+one+']</a>';
if (ss) { contents += da + i.n + db;}
contents += '</div>';
}
one = 'one'; ss=some;
if (i.q==0 && i.t==1) { shown++; 
contents += dc + 'clan_stash.php?action=addgoodies&ajax=1&item1=IID&qty1=NUM&pwd=9a704e34f2ef61dc33995c2e57f8f987" id="pircm_'+i.id+'"><b>Contribute to Clan:</b> '+dd+one+']</a>';
if (ss) { contents += da + i.n + db;}
contents += '</div>';
}
one = 'one'; ss=some;
if (i.q==0 && i.p==0 && i.u=="q" && i.d==1 && i.t==1) { shown++; 
contents += dc + 'craft.php?action=pulverize&ajax=1&smashitem=IID&qty=NUM&pwd=9a704e34f2ef61dc33995c2e57f8f987" id="pircm_'+i.id+'"><b>Pulverize:</b> '+dd+one+']</a>';
if (ss) { contents += da + i.n + db;}
contents += '</div>';
}
one = 'one'; ss=some;
if (i.u && i.u != ".") { shown++; 
contents += dc + 'inv_'+(i.u=="a"?"redir":(lab=(i.u=="u"?"use":(i.u=="e"?"eat":(i.u=="b"?"booze":(i.u=="s"?"spleen":"equip"))))))+'.php?ajax=1&whichitem=IID&itemquantity=NUM&quantity=NUM'+(i.u=="q"?"&action=equip":"")+'&pwd=9a704e34f2ef61dc33995c2e57f8f987" id="pircm_'+i.id+'"><b>'+ucfirst(unescape(i.ou ? i.ou.replace(/\+/g," ") : (lab=="booze"?"drink":lab)))+':</b> '+dd+one+']</a>';
if (ss && i.u != 'q' && !(i.u=='u' && i.m==0)) { contents += da + i.n + db;}
contents += '</div>';
}

	return [contents, shown];
}
var todo = [];
function nextAction() {
	var next_todo = todo.shift();
	if (next_todo) {
  eval(next_todo);
	}
}
function dojax(dourl, afterFunc, hoverCaller, failureFunc, method, params) {
	$.ajax({
  type: method || 'GET', url: dourl, cache: false,
  data: params || null,
  global: false,
  success: function (out) {
   nextAction();
   if (out.match(/no\|/)) {
    var parts = out.split(/\|/);
    if (failureFunc) failureFunc(parts[1]);
    else if (window.dojaxFailure) window.dojaxFailure(parts[1]);
    else if (top.chatpane.handleMessage) top.chatpane.handleMessage({type: 'event', msg: 'Oops!  Sorry, Dave, you appear to be ' + parts[1]});
    else  $('#ChatWindow').append('<font color="green">Oops!  Sorry, Dave, you appear to be ' + parts[1] + '.</font><br />' + "\n");
    return;
   }

   if (hoverCaller)  {
    float_results(hoverCaller, out);
    if (afterFunc) { afterFunc(out); }
    return;
   }
$(top.mainpane.document).find("#effdiv").remove(); if(!window.dontscroll || (window.dontscroll && dontscroll==0)) { window.scroll(0,0);}
   var $eff = $(top.mainpane.document).find('#effdiv');
   if ($eff.length == 0) {
    var d = top.mainpane.document.createElement('DIV');
    d.id = 'effdiv';
    var b = top.mainpane.document.body;
    if ($('#content_').length > 0) {
     b = $('#content_ div:first')[0];
    }
    b.insertBefore(d, b.firstChild);
    $eff = $(d);
   }
   $eff.find('a[name="effdivtop"]').remove().end()
    .prepend('<a name="effdivtop"></a><center>' + out + '</center>').css('display','block');
   if (!window.dontscroll || (window.dontscroll && dontscroll==0)) {
    top.mainpane.document.location = top.mainpane.document.location + "#effdivtop";
   }
   if (afterFunc) { afterFunc(out); }
  }
	});
}
</script><script>

var currentkey = 49;
$(document).ready(function () {
	$('form').each(function () {
  var form = this;
  defaultBind(currentkey++, NONE, function () { form.submit(); });
  return currentkey < 58;
	});
});

</script><link rel="stylesheet" type="text/css" href="//images.kingdomofloathing.com/styles.20150113.css">
<style type='text/css'>
.faded {
	zoom: 1;
	filter: alpha(opacity=35);
	opacity: 0.35;
	-khtml-opacity: 0.35; 
    -moz-opacity: 0.35;
}
</style>

</head>

<body>
<Center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Community Service</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td>You check the postings to see what community service options are available to you.  (you have done 2 community services so far.)<p><center><Table cellpadding=10><tr><td class=small width=400><b>Feed The Children (But Not Too Much)</b> for <b>The World Hunger and Obesity Prevention Foundation</b></td><td rowspan=2 class=tiny align=center valign=top><form action=choice.php method=post><input type=hidden name=whichchoice value=1089><input type=hidden name=option value=2><input type=hidden name=pwd value=9a704e34f2ef61dc33995c2e57f8f987><input type=submit class=button value="Perform Service (60 Adventures)"><br>(Bonus <font color=blue><b>Muscle</b></font> makes this faster.)</form><br>Reward: <img style='vertical-align: middle' class=hand src='http://images.kingdomofloathing.com/itemimages/knobsack.gif' onclick='descitem(190573127)'> <b>bag of grain</b></td></tr><tr><td class=small>In a world simultaneously plagued by hunger and obesity, what can you do?  According to this organization, you can feed the children sacks of grain that have been specially treated to remove all gluten and carbohydrates.</td></tr></table></center><hr><center><Table cellpadding=10><tr><td class=small width=400><b>Build Playground Mazes</b> for <b>Habitrail for Humanity</b></td><td rowspan=2 class=tiny align=center valign=top><form action=choice.php method=post><input type=hidden name=whichchoice value=1089><input type=hidden name=option value=3><input type=hidden name=pwd value=9a704e34f2ef61dc33995c2e57f8f987><input type=submit class=button value="Perform Service (60 Adventures)"><br>(Bonus <font color=blue><b>Mysticality</b></font> makes this faster.)</form><br>Reward: <img style='vertical-align: middle' class=hand src='http://images.kingdomofloathing.com/itemimages/puzzle.gif' onclick='descitem(683762927)'> <b>pocket maze</b></td></tr><tr><td class=small>To stimulate the minds of Loathing's children, Habitrail For Humanity builds elaborate mazes for them to get lost in.  The dumber kids don't make it out, so average test scores show a dramatic improvement!</td></tr></table></center><hr><center><Table cellpadding=10><tr><td class=small width=400><b>Feed Conspirators</b> for <b>Meals Within Wheels</b></td><td rowspan=2 class=tiny align=center valign=top><form action=choice.php method=post><input type=hidden name=whichchoice value=1089><input type=hidden name=option value=4><input type=hidden name=pwd value=9a704e34f2ef61dc33995c2e57f8f987><input type=submit class=button value="Perform Service (60 Adventures)"><br>(Bonus <font color=blue><b>Moxie</b></font> makes this faster.)</form><br>Reward: <img style='vertical-align: middle' class=hand src='http://images.kingdomofloathing.com/itemimages/bigglasses.gif' onclick='descitem(601502664)'> <b>shady shades</b></td></tr><tr><td class=small>When you're a master of intrigue, sometimes leaving your house is dangerous.  But even the most dastardly of conspirators has to eat, and that's where you come in -- delivering tasty meals via shady deals.</td></tr></table></center><hr><center><Table cellpadding=10><tr><td class=small width=400><b>Breed More Collies</b> for <b>Doctors Without Border Collies</b></td><td rowspan=2 class=tiny align=center valign=top><form action=choice.php method=post><input type=hidden name=whichchoice value=1089><input type=hidden name=option value=5><input type=hidden name=pwd value=9a704e34f2ef61dc33995c2e57f8f987><input type=submit class=button value="Perform Service (57 Adventures)"><br>(High <font color=blue><b>Familiar Weight</b></font> makes this faster.)</form><br>Reward: <img style='vertical-align: middle' class=hand src='http://images.kingdomofloathing.com/itemimages/rose.gif' onclick='descitem(549232387)'> <b>squeaky toy rose</b></td></tr><tr><td class=small>Tragedy has struck the Border Collie population of Loathing -- a libido-decreasing virus has run rampant throughout the entire species.  It's up to you and your familiar to provide some encouragement!</td></tr></table></center><hr><center><Table cellpadding=10><tr><td class=small width=400><b>Reduce Gazelle Population</b> for <b>Loathing Lions Club</b></td><td rowspan=2 class=tiny align=center valign=top><form action=choice.php method=post><input type=hidden name=whichchoice value=1089><input type=hidden name=option value=6><input type=hidden name=pwd value=9a704e34f2ef61dc33995c2e57f8f987><input type=submit class=button value="Perform Service (60 Adventures)"><br>(Bonus <font color=blue><b>Melee Damage</b></font> makes this faster.)</form><br>Reward: <img style='vertical-align: middle' class=hand src='http://images.kingdomofloathing.com/itemimages/gnatfilet.gif' onclick='descitem(918011282)'> <b>weird gazelle steak</b></td></tr><tr><td class=small>The Nearby Plains have way too many gazelles trotting around.  What, do they think they own the place?  The Lions have called upon every able-bodied citizen to help them thin the herd.</td></tr></table></center><hr><center><Table cellpadding=10><tr><td class=small width=400><b>Make Sausage</b> for <b>The Jimmy Dean Fund</b></td><td rowspan=2 class=tiny align=center valign=top><form action=choice.php method=post><input type=hidden name=whichchoice value=1089><input type=hidden name=option value=7><input type=hidden name=pwd value=9a704e34f2ef61dc33995c2e57f8f987><input type=submit class=button value="Perform Service (60 Adventures)"><br>(Bonus <font color=blue><b>Spell Damage</b></font> makes this faster.)</form><br>Reward: <img style='vertical-align: middle' class=hand src='http://images.kingdomofloathing.com/itemimages/sausage.gif' onclick='descitem(710239230)'> <b>sausage without a cause</b></td></tr><tr><td class=small>The Jimmy Dean fund provides sausage to the needy, and let's face it -- nobody is needier than a person without any sausage.  Pitch in and help them cook and deliver it, would ya?</td></tr></table></center><hr><center><Table cellpadding=10><tr><td class=small width=400><b>Be a Living Statue</b> for <b>The Salivation Army</b></td><td rowspan=2 class=tiny align=center valign=top><form action=choice.php method=post><input type=hidden name=whichchoice value=1089><input type=hidden name=option value=8><input type=hidden name=pwd value=9a704e34f2ef61dc33995c2e57f8f987><input type=submit class=button value="Perform Service (60 Adventures)"><br>(Having <font color=blue><b>Monsters Less Attracted To You</b></font> makes this faster.)</form><br>Reward: <img style='vertical-align: middle' class=hand src='http://images.kingdomofloathing.com/itemimages/tube.gif' onclick='descitem(375755054)'> <b>silver face paint</b></td></tr><tr><td class=small>The Salivation Army provides critical relief to children born without the ability to salivate by delivering synthetic spit.  But fake spit costs Meat, and somebody has to raise that Meat by standing extremely still in front of a grocery store.</td></tr></table></center><hr><center><Table cellpadding=10><tr><td class=small width=400><b>Make Margaritas</b> for <b>The March of Limes</b></td><td rowspan=2 class=tiny align=center valign=top><form action=choice.php method=post><input type=hidden name=whichchoice value=1089><input type=hidden name=option value=9><input type=hidden name=pwd value=9a704e34f2ef61dc33995c2e57f8f987><input type=submit class=button value="Perform Service (59 Adventures)"><br>(Bonus <font color=blue><b>Item Drops</b></font> and <font color=blue><b>Booze Drops</b></font> make this faster.)</form><br>Reward: <img style='vertical-align: middle' class=hand src='http://images.kingdomofloathing.com/itemimages/daquiri.gif' onclick='descitem(886234063)'> <b>emergency margarita</b></td></tr><tr><td class=small>Did you know that every night, tens of thousands of Loathing citizens go to bed sober?  The March of Limes aims to reduce that number to zero by delivering margaritas to those in need.</td></tr></table></center><hr><center><Table cellpadding=10><tr><td class=small width=400><b>Clean Steam Tunnels</b> for <b>Seaside Town Historical Preservation Society</b></td><td rowspan=2 class=tiny align=center valign=top><form action=choice.php method=post><input type=hidden name=whichchoice value=1089><input type=hidden name=option value=10><input type=hidden name=pwd value=9a704e34f2ef61dc33995c2e57f8f987><input type=submit class=button value="Perform Service (58 Adventures)"><br>(<font color=blue><b>Hot Protection</b></font> makes this faster.)</form><br>Reward: <img style='vertical-align: middle' class=hand src='http://images.kingdomofloathing.com/itemimages/waterbottle.gif' onclick='descitem(485189565)'> <b>vintage smart drink</b></td></tr><tr><td class=small>Did you know that Seaside Town has an elaborate network of steam tunnels underneath it?  And did you know that those tunnels are filthy because of all of the raves kids had down there 10-15 years ago?  Both are true, and it's up to you to make the second false.</td></tr></table></center><hr><center><b>Final Service</b><p><table><tr><td width=500>Once you've served the community enough (11 times), serve it one last time by donating your body to science!</td></tr></table><input type=button disabled style='color: #cccccc; border: 2px solid #cccccc;' class=button value="You Still Have Service To Give"></centeR></td></tr></table></center></td></tr><tr><td height=4></td></tr></table></body></html>
 

ckb

Active member
This is a 5-minute untested hack. I might ascend later and test it, but if you are in-run you can check it out. You need WTF. you will need to rename it to council.ash or whatever page that the council link uses.

Edit: I ascended and this does not work (yet). I'll try and debug it today.
Edit2: stupid regex.
Edit3: fixed and working. Not really pretty, but functional.
 

Attachments

  • council.ash
    1.6 KB · Views: 43
Last edited:

Bale

Minion
Thanks. Which of the WTFs do I need?

Any of them. There's a shared repo that they all use as a dependency which is what you really need so you could just install the dependency by itself:
Code:
svn checkout https://svn.code.sf.net/p/relaywtf/code/wtf
 
Top