-- Log of it in action, for the needy people --So when I started here, I found someone's NDB on the forums that I decided to play around with, since that's basically the only thing that was missing from WunderSys... The more I coded, the more I realised just how unfinished it felt... So I did what any normal person would do, and completely rewrote it from the ground up. This time without any wonky bugs in it.
It's much like the old one, with relatively similar syntax (after speaking with people, I realised how many others used it, so I figured this would help if they decided to switch)
Installation:
1) Make sure GMCP is enabled... Or don't, it doesn't actually use it really at all.
2) Install it via the package manager, as per usual.
3) Use 'aptinstall' to initialise everything.
Aliases used in the log:
[spoiler]
- qwp will check qwho, and then grab missing information from anyone not currently tracked.
- apt stats will display player count of each city.
- apt citizens <city> will display the citizens of a chosen city. 'apt citizens eleusis' for example.
- apt class <class> will display the tracked players of the chosen class. 'apt class runewarden' for example.
- apt remove will clear out all unranked people from the database; useful if it gets super large.
- apt redo will update the information of everybody currently in the database; except this one is near instantaneous updating as opposed to waiting a few minutes to honours everybody.
- whois (person) will display information on a chosen individual. 'whois alyxeri' for example.
- aptc show will display the current settings.
[/spoiler]
Something the previous version was missing, which I've seen some people wanting. Highlighting!
[spoiler]
- apt hl to toggle the highlighting on and off. Don't spam it, else it'll mess it up and you'll have to restart mudlet to fix it.
- aptc <arg1> <arg2> will change the highlighting of a city; the city can be either arg1 or arg2, for those who forget it. So 'aptc eleusis orange' will work, and 'aptc orange eleusis' will work. Currently there's no way to -not- highlight a city, sorry. I was too lazy for that. Just set it to grey, if you want the default serverside colouring.
[/spoiler]
Something else the previous version was
sorely missing. An API to use with scripts, much like SVO's NDB has!
[spoiler]
- apt_exists("person") will return true or false, depending on if they're currently in the database.
- apt_isAshtani("person") will return true or false, if they are Ashtani.
- apt_isCyrenian("person") will return true or false, if they are Cyrenian.
- apt_isEleusian("person") will return true or false, if they are Eleusian.
- apt_isHashani("person") will return true or false, if they are Hashani.
- apt_isMhaldorian("person") will return true or false, if they are Mhaldorian.
- apt_isTargossian("person") will return true or false, if they are Targossian.
- apt_isRogue("person") will return true or false, if they are a rogue.
- apt_getCity("person") will return what city the person is currently a part of (or 'Unspecified' if not tracked)
- apt_getClass("person") will return the current class the person was last seen as (or 'Unspecified' if not applicable)
[/spoiler]
Enjoy.
Comments
- Added city tracking of people currently online, since people asked me for it. This will only show when you do 'qwp' - if there's people to add then it will do that, before being allowed to display who's around. This is to prevent untracked people erroneously being displayed/added to false cities.
The latter uses the colouring of whatever highlights you choose, sorry if you didn't want that. It saved me having to pick colours.@Nehmrah would prefer to not have my scripts packaged with other people's stuff, for a number of reasons. Sorry.
Thanks.
edit: Doesn't appear to do the online players *every* time I do QWP
Didn't do it the first time, figured maybe it just needed to be initialised. Worked the second time. hasn't since.
Try do 'apt redo' to regrab the honours of everybody, shouldn't take more than 10s or so to parse through them all if your internet is fine. It'll alert you to anyone who needs manual honours to update their city. Big red WARNING line.
Also as stated in the post, it won't show online people if there's data of people that need to be grabbed. You'll have to do it a second time, for it to display. QWP prios grabbing data > displaying citizens online.
I'm at work right now and will install it here and see if maybe there was something on the home profile interfering.
edit: Seems to be working now.
Will I? Probably not. Who knows.
I don't really feel like adding a highlight hierarchy. I've been meaning to add the ability to disable highlighting for <x> cities, if the user chooses, though.
So..you can find this function and add this bolded line and it will bold italic underline your enemies from svo's enemy database:
I use APT for highlighting specifically...
Changing enemy colour is the same as changing city colours, except you use aptc enemies <colour> instead of using a city. As you can see in the above picture, please allow it a moment or two to recreate the highlights after you change the options. If you don't there's a good possibility mudlet will freeze the deletion, and you'll be stuck with the colouring until you restart.
No I'm not adding more than house/order enemies. Or personal enemies; I don't use the highlighting features as is.
Assuming it's because I'm on 2.1 on my home PC because I couldn't be bothered to upgrade. Now that I did at work, I won't be doing so here at home because I'm not about to have the same issue with UserWindows
"lua apt.players["Deucalion"].city = "Rogues"
and did that for all the Divine, then it worked. Obviously you need the LUA alias
Another issue was that it wasn't saving people that didn't pop up, like Morthif or Seragorn who have veils or gems, but you manually HONOURS. It would display the correct color for their names but not save it when you quit. For that, just do "lua apt_download("NAME")" and it saves it for the next time.
Overall I really like this little package. It ties in nicely with my "people in the room" items and I can even use it on my homebuilt "WHERE" function to call names in the same room as someone else. The is_<cityName> is great and easy to throw into an alias to enemy the first 20 people from any city.
Thanks @Alyxeri
If anyone adds people manually via honours <name> and they don't appear highlighted. You may want to toggle highlight on and off (apt hl).
That should run the apt_clearHighlights() and apt_loadHighlights() functions. Should be able to see the person's name highlighted after that.
@Alyxeri Been testing and trying it out. Loving it so far. It is brilliant coding.
If the hidden person is a rogue, the honours trigger doesn't capture that as being a rogue is the absence of a line, rather than a line to be triggered upon.
I added this
at the start of the 'Close Trigger' for 'Get honours info'.
Simply, if the prompt has been reached after honours-ing a person and no city has been set, assume rogue.
And lastly - thanks a bunch @Alyxeri for sharing this script. I've been playing Achaea for a really short time now and already have no idea how I survived playing other IRE muds for so long without it.
If you also want something like that, do a search for
in the apt_highlightName() function (line 79 of the APT Highlighting script) and simply replace it with
then just use the APT EHL (b|i|u) alias as normal to set what you want.
So, naturally, I decided to fix that!
Attached is my personal edit for APT that includes Divine as a 'city' category for the purpose of sorting them. It looks a little like this:
https://ada-young.appspot.com/pastebin/J14xfBXI
For those that would prefer to do it themselves!
You'll need a new trigger within the honors trigger that captures,
^(She|He) was born before time was counted.
Trigger value will be
apt.players[honoursPerson].city = "Divine"<br>selectString(line, 1)<br>fg(apt.highlighting["Divine"])
After this, you'll need to edit some scripts. As follows:
In APT API:
function apt_isDivine(name)<br><br>if apt_exists(name) then<br>return (apt.players[name].city == "Divine" and true or false)<br>else<br>return false<br>end<br>end
Lower in the same function under apt_Echo(" City affiliations..."):
cecho(string.format("\n<%s>[Divine] :<span>(<span>%d)<%s> %s.", apt.highlighting.Divine, #onlinePeople.Divine, apt.highlighting.Divine, table.concat(onlinePeople.Divine, ", ")))<br></span></span>
In the apt_displayOnline(players) - line 101-ish, you'll need to add "Divine = {} into the local onlinePeople. You'll also want to add this code into the for _, person in pairs(players), roughly line 105:
elseif apt_getCity(person) == "Divine" then
table.insert(onlinePeople.Divine, person)
This elseif will need to be inserted ABOVE the elseif for Rogues (roughly line 108 in APT API)
You'll also want to add Divine = "your colour" in apt_Install (line 44 in the APT Settings Functions), "Divine" into the local cities in line 15.
In your alias "Set Colours for Orgs", be sure to add in Divine to cities there, too!
Lastly, in Show Settings (apt show), you'll insert below Rogues:
Be sure to remove the \n from the Rogues above it unless you want an extra blank line between Divine and Rogues.
Thats it!
Let me know if you have questions on how I added Divine for APT. It is amazing and ALL the credit to the amazing author, @Alyxeri who made an amazing, lightweight person tracking system.