Bookshelf Override

deadned

New member
Bookshelf Override

A campground override to display the number of tome and libram summons you've used when visiting the bookshelf. Works in and out of Ronin, and changes behavior when out of ronin. In ronin, total tome usage is displayed as x/3. Out of ronin, each tome displays the number of times summoned from it.

Instructions: place in /relay folder and visit the bookshelf to see a slightly prettier display.
 

Attachments

  • campground.ash
    1.9 KB · Views: 97
Last edited:

Bale

Minion
That's quite nice. I'm adding overbook to my campground.ash.

You just have one tiny (and entirely understandable) bug. "You have a Tome of Rad Libs" should not end in a period. Perhaps that is a KoL bug, but it exists. BTW, I don't know if you care, but this is the version I inserted into my campground.ash:

PHP:
void overbook(buffer results) {
	string style = '<span style="font-weight:bold;color:#0073e5">';

	// Tomes
	if(can_interact()){
		results.replace_string("You have a Tome of Snowcone Summoning.","You have a Tome of Snowcone Summoning ("+style+get_property("_snowconeSummons")+"/3</span>)");
		results.replace_string("You have a Tome of Sticker Summoning.","You have a Tome of Sticker Summoning ("+style+get_property("_stickerSummons")+"/3</span>)");
		results.replace_string("You have a Tome of Sugar Shummoning.","You have a Tome of Sugar Shummoning ("+style+get_property("_sugarSummons")+"/3</span>)");
		results.replace_string("You have a Tome of Clip Art.","You have a Tome of Clip Art ("+style+get_property("_clipartSummons")+"/3</span>)");
		results.replace_string("You have a Tome of Rad Libs","You have a Tome of Rad Libs ("+style+get_property("_radlibSummons")+"/3</span>)");
	} else  // In ronin/hardcore there is only one preference.
		results.replace_string("<p><b>Tomes:</b> ","<p><b>Tomes</b> ("+style+get_property("tomeSummons")+"/3</span>)<b>:</b>");

	//Librams
	results.replace_string("<p><b>Librams:</b>","<p><b>Librams</b>("+style+get_property("libramSummons")+" / ∞</span>)<b>:</b>");
}
 

deadned

New member
Thanks for catching that bug, I updated the first potst with the fix.

I like that you just stuck all the html into a CSS string, I'm going to steal that for my next script ;)
 
Top