Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20

Thread: KoL High school item summary

  1. #1
    Member Nappa's Avatar
    Join Date
    May 2013
    Location
    Netherlands
    Posts
    46

    Default KoL High school item summary

    I got tired of having to manually count my items in a KoLHS run, so I created this relay script.

    First it was only a boring summary of items in inventory, but as I was working on it I also made it include the items that can be created.

    It's pretty straightforward, it adds a table on the KoLHS page in the seaside town with a summary.

    Suggestions for improvements are welcome. I hope you'll find it useful!

    Screenshot: (v1.3)
    kolhs1.3.png

    Update:
    I think it's pretty much final, but moved to SVN now and fixed an error that was caused by overriding a lib function.

    Find the script here:
    Code:
    svn checkout https://svn.code.sf.net/p/mafiarelaykolhs/code-0/
    Last edited by Nappa; 11-26-2013 at 09:59 PM. Reason: Moved to SVN

  2. #2
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    OH THANK YOU!!

    You could make this even better if you added the item "cost" for each item so that I would know what item I might want to try to get more of by casting transcendent olfaction.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  3. #3
    Member Nappa's Avatar
    Join Date
    May 2013
    Location
    Netherlands
    Posts
    46

    Default

    I've been thinking about that too but didn't know where to put it in. I could put it in the description but I have the feeling that'd be a bit clunky.
    It might be better to go with a somewhat different grid layout then. I'll give it a thought. Since it kinda grew as it came along and i was exploring the technical possibilities, the layout came as an afterthought. But now the specs are more clear so I might be able to come up with something better .
    Last edited by Nappa; 08-27-2013 at 12:01 PM.

  4. #4
    Member Nappa's Avatar
    Join Date
    May 2013
    Location
    Netherlands
    Posts
    46

    Default

    I have rewritten the script completely. Behold version 1.1:
    kolhs2.png
    I have left 2 switches in that I used while I was testing the design. (bold numbers in grid and include item spoilers)

    On a side note, out of curiosity, how would one manage multiple relay override scripts that trigger on the same 'page'?
    Suppose for example that the artist page was placed on place.php?whichplace=artist (i know it's in town-wrong, but just for this example) and someone wrote a relay script for tattoo management. Obviously you can't place 2 different place.ash'es in the same dir?
    Attached Files

  5. #5
    Minion Bale's Avatar
    Join Date
    Jun 2008
    Posts
    13,287

    Default

    That looks MUCH nicer! Thanks!

    On a side note, out of curiosity, how would one manage multiple relay override scripts that trigger on the same 'page'?
    Suppose for example that the artist page was placed on place.php?whichplace=artist (i know it's in town-wrong, but just for this example) and someone wrote a relay script for tattoo management. Obviously you can't place 2 different place.ash'es in the same dir?
    Originally Posted by Nappa View Post
    That's a good question with an interesting answer. You would have to take care of all the "place" overrides in the same script. Fortunately you can do this:


    Code:
    switch(form_field("whichplace")) {
    case "artist": 
       artist();
       break;
    case "kolhs": 
       kolhs();
       break;
    case "mclargehuge":
       mountain();
       break;
    }
    I might have gotten the whichplace wrong for kolhs, but you fudged the page for the artist so we're even. At least I know mclargehuge is correct. Hopefully you get the idea.
    If people like my scripts, please send me stuffed Hodgmen.
    Universal Recovery, OCD Inventory Control, CounterChecker, newLife, ChIT.


  6. #6
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,746

    Default

    The other 'place' script I had was for marking the Bugbear ship doors. However, as I'm unlikely to run bugbear for fun anymore, and it had some of those delightful string || string checks, I'm happy to replace it with a KOLHS script for now.

  7. #7
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,295

    Default

    I like this. Thank you.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  8. #8
    Member Nappa's Avatar
    Join Date
    May 2013
    Location
    Netherlands
    Posts
    46

    Default

    Minor update for a messed up recipe. You can find it in the OP.

  9. #9
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,295

    Default

    Would you consider changing the title of things that can be made to include the number of that item already available? That would help me figure out what I wanted/needed to make.

    Thank you.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  10. #10
    Member Nappa's Avatar
    Join Date
    May 2013
    Location
    Netherlands
    Posts
    46

    Default

    I considered adding this feature but the items were not known yet in mafia when i wrote this, so I left it out.
    It's actually not too difficult to code in, provided that the items have been added to mafia in the meantime. I'll see what I can do.

    //Edit:
    $item[ yellowcake bomb ] and $item[ quasireligious sculpture ] are still 'Bad item value's according to mafia (r12554). Once those are added I can roll out a version containing proper counts of how many you already have.
    Last edited by Nappa; 09-02-2013 at 10:19 PM.

Similar Threads

  1. New Content - Implemented Default values for coiceadventures in Mer-kin Elementary School
    By Winterbay in forum Bug Reports
    Replies: 4
    Last Post: 11-26-2016, 06:55 PM
  2. Replies: 22
    Last Post: 08-07-2014, 03:55 AM
  3. Replies: 0
    Last Post: 07-08-2014, 09:10 PM
  4. Replies: 0
    Last Post: 09-12-2013, 11:02 AM
  5. Bug - Fixed Old school Mafi<i>a kni</i>cke˝ć don't show up in the Store Manager
    By missingno in forum Bug Reports
    Replies: 1
    Last Post: 05-13-2010, 01:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •