A better QW

KaliKali Member Posts: 63 Adept
edited January 8 in Mechanic's Corner
I wrote a little script which combines the lists from the website's API (Which lists all uncloaked people logged in, regardless of their plane), and gmcp.Comm.Channel.Players (Which you can get all people from your org from, even if they have a cloaking gem) and sorts and colors it based on mmf's name database.
https://www.dropbox.com/s/xgpivwd731lbvrn/playerreport.zip?dl=1
 
The syntax is 'player report'
Feedback is appreciated!
Post edited by Kali on

Comments

  • EritheylEritheyl ** Trigger Warning ** Member Posts: 1,670 Transcendent
    Getting an error when I mash the alias in:

    Alias name=Player report((?i)^player report$) matched.
    Alias: capture group #1 = <player report>
    LUA OK script Player report (Alias227) ran without errors
    LUA: ERROR running script playerreport.buildpeople (playerreport.buildpeople) ERROR:[string
    "function playerreport.buildpeople(_,filepat..."]:3: bad argument #1 to 'input' (C:\Users\[redacted]\.
    config\mudlet\profiles\Lusternia/online/characters.json: No such file or directory)

  • KaliKali Member Posts: 63 Adept
    Oh, I forgot that I had created that folder manually in the first place. I'll try to make a new version that creates it if it doesn't already exist, but if you make a folder there called 'online' it should fix it.
  • EritheylEritheyl ** Trigger Warning ** Member Posts: 1,670 Transcendent
    edited January 2017
    Fixed and fixed, thank you for sharing!

    (seriously everyone needs to plug this in, immediately)
  • StratasStratas Member Posts: 374 Mythical
    Very nice, and a wonderful QoL script.

    I tend to play at a wordwrap of 85, and your display here is 93 characters long, so to keep it from being messed up when I call it I went into the Make It Nice! script and added setWindowWrap("main",93) before the first cecho and then setWindowWrap("main",85) before the final end.

    And then I made it so QW just calls this, because it's so good.
    The purpose of writing is to inflate weak ideas, obscure pure reasoning, and inhibit clarity. With a little practice, writing can be an intimidating and impenetrable fog!
  • EritheylEritheyl ** Trigger Warning ** Member Posts: 1,670 Transcendent
    Stratas said:

    And then I made it so QW just calls this, because it's so good.
    same. My life has been made remarkably brighter.
  • KaliKali Member Posts: 63 Adept
    Fixed an issue with it not getting the most recent version of gmcp.Comm.Channel.Players until after it finished executing.
    https://www.dropbox.com/s/qvm684zreimgl9o/playerreport5.zip?dl=0 New download!

    Or you can just replace the 'playerreport.getpeople' script with this if you already have it installed, whatever's easier.

    function playerreport.getpeople()

    sendGMCP("Comm.Channel.Players")

    send(" ")

    if not lfs.attributes(getMudletHomeDir().."/playerreport") then

    lfs.mkdir(getMudletHomeDir().."/playerreport")

    end

    downloadFile(getMudletHomeDir().."/playerreport/characters.json",[[http://api.lusternia.com/characters.json]])

    end


  • YarithYarith Member Posts: 997 Mythical
    I love this.
    (I'm the mom of Hallifax btw, so if you are in Hallifax please call me mom.)

    == Professional Girl Gamer == 
    Yes I play games
    Yes I'm a girl
    get over it
  • SazSaz Member Posts: 131 Master
    Enjoying this because it shows who's around in your org so I can finally stop using mentorwho. (Which always presented a problem while highlighting my orgmates)
     "Oh the year was 453CE, how I wish I was in Serenwilde now... aletter of marque come from the regent to the scummiest aethership I ever seen, gods damn them all...I was told we'd cruise the void for auronidion and dust, we'd fire no turrets, shed no tears.. now I'm a broken man on a Hallifax tier, the last of Saz's privateers."

    -Kilian
  • AeldraAeldra , using cake powered flight Member Posts: 1,160 Transcendent
    Saz said:
    Enjoying this because it shows who's around in your org so I can finally stop using mentorwho. (Which always presented a problem while highlighting my orgmates)
    TIL mentorwho

    also, this looks great kali :D

    Avatar / Picture done by Xeii. Wheeeeee 
  • KaliKali Member Posts: 63 Adept
    https://www.dropbox.com/s/83f9jodpp0abfxa/PlayerReport_v6.zip?dl=0
    This should be the final version, I tweaked a few things in it
    It now auto-honours people that aren't already in NDB.
    You can configure the colors of the table and the order the cities display in it by adjusting the variables "orglist", "bordercolor" and "wordcolor" where they are initiated in the 'Make it nice!' script. 
  • KaimanahiKaimanahi The One True Queen Member Posts: 719 Transcendent
    edited January 2017
    hi Kali

    edit this is great :>
    image
  • KaliKali Member Posts: 63 Adept
    Edited a thing so it can accommodate people with 11 character names. (I did not know they could be that long originally. :( )
    https://www.dropbox.com/s/sgwwsx5igcmvuyr/PlayerReport_v7.zip?dl=1
  • ReylariReylari Member Posts: 367 Fabled
    Pretty sure all IRE games have the same character limit... In which case you should increase it from 11.

     :# 
    Email:        [email protected]
    Discord:    Rey#1460
  • TamsinTamsin Member Posts: 134 Master
    I was thinking it was 20, but I'm too lazy to check.
  • KaliKali Member Posts: 63 Adept
    twenty wide columns would be horrific. If I run into a person with an exceedingly longer name, I'll probably make the thing just cut it off at eleven characters, rather than widen the columns.
  • ReylariReylari Member Posts: 367 Fabled
    I wonder if there's anyone with longer than 11... The longest I know of is Alaksanteri... Most longer names I've found/come across seem to all stop at 10 :disappointed:
    Email:        [email protected]
    Discord:    Rey#1460
  • IanirIanir Administrator, Moderator Posts: 536 Creator
    The maximum length of a player-created name is 12. I believe, at my last check, we have... 5 or 6 people with 12-length names, but they may have been inactive for forever.
    Forum Avatar drawn by our lovely Isune.
  • TamsinTamsin Member Posts: 134 Master
    Found one! Cairxauhoyol. Yeesh. What a mouthful. I just knew the Moondancers would have one in there somewhere.
  • KaliKali Member Posts: 63 Adept
    edited March 2017

    Okay, I did a thing, it now can squish in 12 character names. 
    https://www.dropbox.com/s/k80h6s7bmxtu5iv/PlayerReport_V8.zip?dl=1
  • KaliKali Member Posts: 63 Adept
    edited January 8
    Post edited by Kali on
  • SylvesterSylvester Member Posts: 16 Inept
    I don't know if this is still being worked on at all, but figured I'd throw this out there just in case someone might have an answer...Just installed the latest v9 package on here and got 
  • KaliKali Member Posts: 63 Adept
    edited January 8
    playerreport = playerreport or {}
    put that on the first line of the script, and it should fix it!
  • SylvesterSylvester Member Posts: 16 Inept
    That did it. Thanks!
Sign In or Register to comment.