A better QW

edited January 2018 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!

Comments

  • EritheylEritheyl ** Trigger Warning **
    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)

    Crumkane, Lord of Epicurean Delights says, "WAS IT INDEED ON FIRE, ERITHEYL."

    -

    With a deep reverb, Contemptible Sutekh says, "CEASE YOUR INFERNAL ENERGY, ERITHEYL."
  • 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 **
    edited January 2017
    Fixed and fixed, thank you for sharing!

    (seriously everyone needs to plug this in, immediately)
    Crumkane, Lord of Epicurean Delights says, "WAS IT INDEED ON FIRE, ERITHEYL."

    -

    With a deep reverb, Contemptible Sutekh says, "CEASE YOUR INFERNAL ENERGY, ERITHEYL."
  • 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 **
    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.
    Crumkane, Lord of Epicurean Delights says, "WAS IT INDEED ON FIRE, ERITHEYL."

    -

    With a deep reverb, Contemptible Sutekh says, "CEASE YOUR INFERNAL ENERGY, ERITHEYL."
  • 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


  • 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
  • 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
    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 the lovely Gurashi.
  • 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
    edited January 2017
    hi Kali

    edit this is great :>
    image
  • 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
  • Pretty sure all IRE games have the same character limit... In which case you should increase it from 11.

     :# 
    Email:        el.ni93@hotmail.com
    Discord:    Rey#1460
  • I was thinking it was 20, but I'm too lazy to check.
  • 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.
  • 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:        el.ni93@hotmail.com
    Discord:    Rey#1460
  • 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.
  • Found one! Cairxauhoyol. Yeesh. What a mouthful. I just knew the Moondancers would have one in there somewhere.
  • 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
  • edited January 2018
  • 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 
  • edited January 2018
    playerreport = playerreport or {}
    put that on the first line of the script, and it should fix it!
  • That did it. Thanks!
Sign In or Register to comment.