Starmourn Name Database

MarunaMaruna Posts: 371Member ✭✭✭

Hello, Miscreants.
Acquiring:
https://pastebin.com/raw/iPgdLkXC -> Right click this link, and then click 'save link as' -- Make sure to add .xml at the end, so it saves as an xml file. Then simply install it as per usual via the package manager. Had to host the file this way because Starmourn has 'suspicious link detection' on google drive files, which then require moderator approval before the thread is opened.

Install with sminstall. Name highlighting is on by default because I'm not going back to change it now.
As you honours people, it'll gradually add them to the database. If you wanna speed up the information gathering you can do qwp instead to parse everyone currently online. Even with ~300-odd people, with the lovely usage of Starmourn's API, this only takes about 5 seconds max to do. No this doesn't spam the game, because it doesn't actually ping the game server at all.
  • smhl to toggle highlighting.
  • smhl <org> <colour> to change highlight colours for that org.
  • smss to show settings. Screwed up the pattern for that alias, can't be bothered changing it now that it's uploaded.
  • whois <person> shows information on that person.
  • sm recreate will recheck everyone in the database, essentially starting from scratch.
  • sm classes shows how many people are using each class (of the tracked people).
  • sm citymembers shows how many people are in each faction.
  • smndb show <faction> shows who is tracked from the chosen faction.
  • qwp will gather information of everyone online. If everyone is already tracked, will show something similar to the image below.
API for Coders
  • smNDB_getColour(person) will return what colour they're being highlighted as. Dunno what I planned for it to be used for, but it's there! cecho("Maruna is coloured "..smNDB_getColour("Maruna")) for example.
  • smNDB_getClass(person) will return their class. Useful I guess for defending and what not. if smNDB_getClass(target) == "Fury" then do something end for example.
  • smNDB_Exists(person) checks if that person is currently in the database.
  • smNDB_isCitizenOf(city, person) checks if someone is a member of <x> city. if not smNDB_isCitizenOf("Song", target) then send("say GET OUT!",false) end for example.
  • smNDB_getCitizenship(target) checks what faction/city someone is a member of. if smNDB_getCitizenship(target) == "Scatterhome" then send("say lol more like scatterbrained haHaa", false) end for example.



Enjoy!


TaryulTyeTravelerIllidaenZilCorvusRoninAebruaVadiKestrelUshuRolsandVegaMatlkael
«1

Comments

  • TyeTye Posts: 127Member ✭✭✭
    Thank you so much.
    Eukelade gives you a peck on the cheek.
  • TyeTye Posts: 127Member ✭✭✭
    When I do `qwp` it goes to "::smndb:: One moment while I access the list..." and then never updates/highlights. I did a little lookthrough and echo checking, and it clears all of the function smNDB_GetOnline(), but never progresses past that or highlights. Any ideas?
    Eukelade gives you a peck on the cheek.
  • MarunaMaruna Posts: 371Member ✭✭✭
    edited December 2018
    Tye said:
    When I do `qwp` it goes to "::smndb:: One moment while I access the list..." and then never updates/highlights. I did a little lookthrough and echo checking, and it clears all of the function smNDB_GetOnline(), but never progresses past that or highlights. Any ideas?
    Well unlike a manual honours'ing database, it kinda depends on how fast your internet is, and the website server. Might have to do it a couple of times, before it pushes out the results... I might add a failsafe in future. It does it occasionally when you honours people, as well. Since it calls the person's info before letting the honours go through.

    If highlights aren't working, use 'smhl' to disable them. Wait a few seconds to allow time for all the highlights to be cleared, the re-enable it. Should update people's colours.
  • TyeTye Posts: 127Member ✭✭✭
    edited December 2018
    I'm fairly certain at this point it's not an internet issue, or response time of the website server. I installed, did sminstall, waited for that to finish. Did qwp and waited, approx 5 minutes, then checked smhl to ensure it was on, qw and no highlights. Repeated that every 10 minutes or so a few times, then posted here. Restarted mudlet, did qwp when I started typing this, and here's the log since - https://ada-young.appspot.com/pastebin/I7qsmLfi

    ETA: Here's a log of a manual honours followed by a whois - https://ada-young.appspot.com/pastebin/ChcklX2P
    Sorry Adobe, you were first on the qw so you got honours.
    Eukelade gives you a peck on the cheek.
  • TyeTye Posts: 127Member ✭✭✭
    Oh I also tried sm recreate, and that said: 
    ::smndb:: Updating everyone who's currently in the database.
    ::smndb:: Update complete. Total of 0 people have been re-checked. Please allow a few seconds to let updates apply.
    Eukelade gives you a peck on the cheek.
  • MarunaMaruna Posts: 371Member ✭✭✭
    edited December 2018
    eta: I also fixed the anss alias, it should be smss now.

    I updated the original link, after fixing some things. But it seems like sometimes the API server just doesn't respond to calls, and doesn't even show an ack error to state as much which seems to put things in limbo.
    https://ada-young.appspot.com/pastebin/LfxeAsOE - Try delete the smNDB folder in your profile directory, and use sminstall again. Here's what it should look like.

  • TyeTye Posts: 127Member ✭✭✭
    Still isn't getting past "One moment while I access the list..." for me, even on a brand new, empty profile. What version of Mudlet are you on?
    Eukelade gives you a peck on the cheek.
  • MarunaMaruna Posts: 371Member ✭✭✭
    edited December 2018
    Tye said:
    Still isn't getting past "One moment while I access the list..." for me, even on a brand new, empty profile. What version of Mudlet are you on?
    3.15
    Check errors I guess, and see if it's saying anything. Haven't heard any others I know using it, having any issues with it. Shouldn't be a version issue, it's using code that's been in Mudlet since I first created the backend on 2.1
  • TyeTye Posts: 127Member ✭✭✭
    I'm on 3.5. Might be calling a function that doesn't exist in my version since it's older, gimme a few to update to 3.15 and I'll come back here.
    Eukelade gives you a peck on the cheek.
  • TyeTye Posts: 127Member ✭✭✭
    Yep, that was the issue. 3.5 is not compatible with this script, 3.15 is. So, if anyone in the future is reading this, update to 3.15 to get it working!
    Thanks @Maruna !
    Eukelade gives you a peck on the cheek.
  • MarunaMaruna Posts: 371Member ✭✭✭
    Weird. None of the stuff I use was added after 2.1.
  • LuciusLucius Posts: 21Member
    This is fantastic work. Thanks @Maruna!
  • EiphyEiphy Posts: 35Member ✭✭
    Where can I find documentation about the API? Looks like a great option.
  • MarunaMaruna Posts: 371Member ✭✭✭
    Eiphy said:
    Where can I find documentation about the API? Looks like a great option.
    In the first post.
  • EiphyEiphy Posts: 35Member ✭✭
    No, I mean the IRE documentation to play with making my own code.
  • MarunaMaruna Posts: 371Member ✭✭✭
    Eiphy said:
    No, I mean the IRE documentation to play with making my own code.
    www.starmourn.com/api
    EiphyCrorr
  • AebruaAebrua Posts: 27Member
    B L E S S.
  • YalauYalau Posts: 68Member ✭✭
    Now if only we can get this for Nexus..
  • ZilZil Posts: 29Member ✭✭
    This is lovely! Thanks very much!

    Since installing the package, HONORS <player> no longer returns any result. I can't find where that output is being gagged. Any ideas how to correct this?
  • EiphyEiphy Posts: 35Member ✭✭
    Maruna said:
    Eiphy said:
    No, I mean the IRE documentation to play with making my own code.
    www.starmourn.com/api
    Hmm, that's giving a 404
  • MarunaMaruna Posts: 371Member ✭✭✭
    edited December 2018
    Zil said:
    This is lovely! Thanks very much!

    Since installing the package, HONORS <player> no longer returns any result. I can't find where that output is being gagged. Any ideas how to correct this?
    It won't send honours until it receives an ack from the api. See the above posts. To clarify you may need to update mudlet. 
    Eiphy said:
    Maruna said:
    Eiphy said:
    No, I mean the IRE documentation to play with making my own code.
    www.starmourn.com/api
    Hmm, that's giving a 404
    Looks like access to the core page was taken down. Can still use www.starmourn.com./api/characters.json 
    Eiphy
  • IorwerthIorwerth Posts: 18Member, Moderator Moderator
    edited December 2018
    If you're looking for the documentation for the API in general:

    https://www.ironrealms.com/IREAPIdocumentation.pdf

    (Please note that we don't fully support the news/orglogs endpoints in Starmourn right now)
    EiphyRonin
  • MarunaMaruna Posts: 371Member ✭✭✭
    edited December 2018
    Zil said:
    Since installing the package, HONORS <player> no longer returns any result. I can't find where that output is being gagged. Any ideas how to correct this?
    As it turns out, the not-honoursing thing was my fault. It tends to happen if you were out bashing and such, since there was a 'disable' thing on prompt which stopped the actual honours from being sent... Should be fixed now; I've updated the link. Honours might be a touch slow depending on server responses, but they should get sent properly now.

    eta: New update! I hated the black space that showed up on FACTIONWHO between the names and their ranks... So I filled it in! Anyone who's not currently tracked will be added after you who FACTIONWHO, the same way that names get updated when you do QWP.

    Updated original link.

    Zil
  • MarunaMaruna Posts: 371Member ✭✭✭
    edited December 2018
    -Ignore- ! (for now, I was just testing something)
  • AebruaAebrua Posts: 27Member
    Have to use recreate every time I start a fresh Mudlet session, otherwise 85% of the names are just not highlighting anymore. Aside from that it's working decently enough.
    ArcherZil
  • MarunaMaruna Posts: 371Member ✭✭✭
    edited December 2018
    Aebrua said:
    Have to use recreate every time I start a fresh Mudlet session, otherwise 85% of the names are just not highlighting anymore. Aside from that it's working decently enough.
    You can disable/enable highlighting. That should fix names not being highlighted, if they're in the database. For some reason I can't figure out, there'll be times where it randomly doesn't make highlights for new people, until you re-enable highlighting.
    Make sure to actually close mudlet properly, since it saves on disconnect. Don't be like one of those people who QQ and then close mudlet before the QQ even goes through.

    eta: Just found something else out with the 'qwp' alias, where it sometimes won't send... Not sure how to fix it, it's a thing with sendGMCP (which doesn't actually get sent until the next prompt) being wonky, since starmourn doesn't allow sending blank lines like other games do.
    Aebrua
  • VadiVadi Posts: 37Member ✭✭
    It's a Rapture bug that when MCCP (text compression) is enabled, gmcp input from the client isn't acted upon. The blank line is a wkrkaeowor for that.
  • MarunaMaruna Posts: 371Member ✭✭✭
    Vadi said:
    It's a Rapture bug that when MCCP (text compression) is enabled, gmcp input from the client isn't acted upon. The blank line is a wkrkaeowor for that.
    Yeah I know. Starmourn doesn't allow sending blank lines like achaea does though. :(
  • AvymosAvymos Posts: 28Member
    Maruna said:
    Vadi said:
    It's a Rapture bug that when MCCP (text compression) is enabled, gmcp input from the client isn't acted upon. The blank line is a wkrkaeowor for that.
    Yeah I know. Starmourn doesn't allow sending blank lines like achaea does though. :(
    Send a single space character.
  • MarunaMaruna Posts: 371Member ✭✭✭
    edited December 2018
    Yeah that's what I mean. Game picks it up and stops it going through.
Sign In or Register to comment.