WTF Relay script collection

Bale

Minion
I don't see anything which looks like a likely culprit, even though I know the purpose of many of those preferences. :(

Another note, I failed to find masterRelayOverride in Global_prefs.txt and in mellissaleo_prefs.txt. Is it supposed to be stored somewhere else? Or it doesn't show it it doesn't have a value?

The later. Only preferences which are manually set or have a default value will show up in your preferences file. masterRelayOverride doesn't have any default value, not even a blank one. Since preferences without a value are treated as if blank when queried, that works.
 

Theraze

Active member
I'd suggest dumping all but your login information out of GLOBAL_prefs and then just peeking through the preferences to re-set what you want. It's possible that some of your globals have now grabbed non-default values (which may have been default previously), and one of them is messing you up. For example, I believe that the cached relay images setting is supposed to be true now, but yours is false. Not sure which other values may have shifted or which one exactly is causing your problems, but... it's probably one of those. :D

As a slightly LESS messy thing, you could back up your file (always back up first) and remove any line with 'relay' in the settings file. See if that fixes it without wiping ALL of the settings...
 

ckb

Minion
Staff member
Script updates:
skills WTF now fills in # of casts for tomb summons to the max left for the day (click mp cost CAST1) to cast once
familiars WTF updated to use WTF css and better align colors
VIP WTF now dows hotdogs and speakeasy drinks!
 

Bale

Minion
ckb, I just noticed you changed the name of VIP Hot Dogs WTF to VIP Lounge WTF. I'll make that change to the Script Manager.
 

ckb

Minion
Staff member
ckb, I just noticed you changed the name of VIP Hot Dogs WTF to VIP Lounge WTF. I'll make that change to the Script Manager.

Yes, this was done now that it handles more than just the hotdogs.

Also - items are now color coded based on quality. This is not so interesting for hotdogs, because they are all blue for "awesome", but quite useful for the speakeasy drinks.
 

digitrev

Member
So, I absolutely love the WTF package, but I wanted my skills page to be a little neater - namely I wanted all the facial expressions together. And since I was doing that, then why not go ahead and combine all the other related skills together, sub-sorted by class. So may I present to you, a minor update to skillsWTF.
 

Attachments

  • skills.ash
    12.4 KB · Views: 97

ckb

Minion
Staff member
So, I absolutely love the WTF package, but I wanted my skills page to be a little neater - namely I wanted all the facial expressions together. And since I was doing that, then why not go ahead and combine all the other related skills together, sub-sorted by class. So may I present to you, a minor update to skillsWTF.

I did you one better, and added a sorting feature (finally). You can now sort by Class, type, or Skill by clicking the heading at the top of the table. Enjoy!
 

Bale

Minion
Right you are! Totally fixed!

I downloaded a new copy of mafia only two hours previously, so I just didn't think to update it.
 

digitrev

Member
A few changes made to relay/skills.ash. I commented out the code that manually handles the adventure & soulsauce cost, and instead replaced it with something that will handle all currently known cost types - adventure, soulsauce, thunder, rain, lightning, and MP. It goes through them in that order. Granted, it does assume that these skills will only ever have one cost-type associated with them, but so far that's been true.

Code:
/*
if ($skills[Hibernate, Spirit Vacation, Transcendent Al Dente, Simmer] contains skl) {
//if ($ints[1027, 2027, 3026, 4025] contains iis) {
	report += "<b class=alert>1 Adv!</b>";
} else if (skl==$skill[Soul Food]) {
//} else if (iis==7185) {
	report += "5 SS";
} else if (skl==$skill[Soul Rotation]) {
//} else if (iis==7186) {
	report += "25 SS";
} else if (skl==$skill[Soul Funk]) {
//} else if (iis==7187) {
	report += "50 SS";
} else {
	report += mp_cost(skl)+" MP";
}
*/
if (skl.adv_cost() > 0) {
	report += "<b class=alert>"+skl.adv_cost() + " Adv!</b>";
} else if (skl.soulsauce_cost() > 0) {
	report += skl.soulsauce_cost() + " SS";
} else if (skl.thunder_cost() > 0) {
	report += skl.thunder_cost() + " dB";
} else if (skl.rain_cost() > 0) {
	report += skl.rain_cost() + " drops";
} else if (skl.lightning_cost() > 0) {
	report += skl.lightning_cost() + " bolts";
} else {
	report += skl.mp_cost() + " MP";
}
if (turns_per_cast(skl)>888) {
	report += " (∞)";
} else if (turns_per_cast(skl)==0) {
	report += "";
} else {
	report += " ("+to_string(turns_per_cast(skl))+")";
}
report += "</a></td>";
 

Bale

Minion
ckb, I use the following shop.starchart.ash to keep me from accidentally making the wrong star item in hardcore. You are welcome to add it to "Shops WTF" if you desire. Since "Shops WTF" only relates to a single shop right now, it seems that you need at least one more in order to keep the plural or else reduce it to "Shop WTF". ;)

Code:
// The following shop.starchart code was written by Bale and given to ckb to use or modify as desired

buffer lair(buffer page) {
	int stars = available_amount($item[star]);
	int lines = available_amount($item[line]);
	
	if(available_amount($item[Richard's star key]) == 0) {
		stars -= 8;
		lines -= 7;
		page.replace_string("Richard's star key", "<font color='green'>Richard's star key</font>");
	}
	if(available_amount($item[star hat]) == 0) {
		stars -= 5;
		lines -= 3;
		page.replace_string("star hat", "<font color='green'>star hat</font>");
	}
	
	// For what weapons will I have enough stars left over?
	record {
		int s;
		int l;
	} [item] weapons;
		weapons [$item[star crossbow]].s = 5;
		weapons [$item[star crossbow]].l = 6;
		weapons [$item[star staff]].s = 6;
		weapons [$item[star staff]].l = 5;
		weapons [$item[star sword]].s = 7;
		weapons [$item[star sword]].l = 4;
	foreach w,r in weapons
		if(stars >= r.s & lines >= r.l)
			page.replace_string(w, "<font color='green'>"+w+"</font>");
	
	// Remove "Make" button for everything I do not want or cannot make.
	buffer newpage;
	matcher make = create_matcher("<tr .+?<td valign=center><a onClick.+?<b>(<font color='green'>)?.+?</b>.+?(<input class=\"button doit \" type=button rel='[^']+' value='Make'>)</td></tr>", page);
	while(make.find())
		if(make.group(1) == "") // If line isn't highlighted in green, remove the "Make" button.
			make.append_replacement(newpage, make.group(0).replace_string(make.group(2), " "));
		else
			make.append_replacement(newpage, make.group(0));
	make.append_tail(newpage);
	
	return newpage;
}

void main() {
	if(get_property("kingLiberated") == "false")
		visit_url().lair().write();
}
 

Bale

Minion
VIP Lounge WTF doesn't report on the Ish Kabibble! :( I just got the password for my clan and the Ish Kabibble looks awfully blank.

ckb, if you wish I could try to get the password for your clan tomorrow if you need the help.
 

ckb

Minion
Staff member
Just got back from a week and a half of vacation in the NH wilderness (no KOL). I am adding all these updates to my todo list, but it may be a few days as I catch up with everything else.

ckb
 

ckb

Minion
Staff member
SkillsWTF updated with new costs functions (thanks digitrev - I had this half done, but not for the new HR skills).
VIPWTF updated to add the Ish-Kabibble, though mafia's datafiles still need an update
 

Bale

Minion
ckb, Would it be hard to have the Heavy Rains skills show up at the top of the list (by default) when I am in Heavy Rains? To me it looks a little troublesome to acomplish, but perhaps you know a trick to make it so? Yes? No?
 

ckb

Minion
Staff member
ckb, Would it be hard to have the Heavy Rains skills show up at the top of the list (by default) when I am in Heavy Rains? To me it looks a little troublesome to acomplish, but perhaps you know a trick to make it so? Yes? No?

This would be possible... I think.
Right now, the skills are sorted by skill ID (which also sorts them by Class). Clicking the "Class" heading (or any other heading) will re-sort them. As the HR skills are now the last on the list (they have the highest ID #s) they will re-sort to have them on top. This is an extra click, but it solves the problem immediately.

I am in my first HR run now (I do not have any skills yet). I will think about how this might be done. HR is a strange one with its own rules and skills AND the normal class skills.

Edit: also on the todo list for SkillsWTF:
* Add a is_unrestricted() check
* highlight the current active PM thrall (if applicable)

Any other suggestions?
 
Last edited:
Top