My first script for Achaea, so hope nothing blows up!https://raw.githubusercontent.com/poormuffin/vsys/master/Character%20DB.nxs
This system uses API calls to api.achaea.com to gather and save information on players that are online while you are.
For the most part it will keep up-to-date on player data with a few exceptions:
- Using CDB CITYCHECK NAME will hard-code the city for players who are hiding the city. This is only updated by running the command on the player again.
- The database is automatically updated periodically for players who are online. To refresh all player data, including offline players in the database use CDB UPDATE.
In Game Commands
||show this list in game
||reload cdb in case something goes wrong
||update data for everyone online
||show all users in this house
||show all users of this class in
||show cached info on this user
||show all characters in this house
||show all visible online players
[name] city [City]
||change a players city
[name] city [Notes]
||Add a note for this player, this overwrites the last note
cdb citycheck list
|Update a player that is hiding their city
List all players where the city was overridden by the above
||List players from your city online that are within <range> of your
level, default is 10 levels
||List players online that are within <range> of your level, default
is 10 levels
||List players online that are under
level <range>, default is 50 levels
API - Use these in your own scripts, string outputs are always lowercase, input is case insensitive
||return if a character exists in the DB, you
should call this before calling other API functions!
||get character info and add to the DB, does not return anything
||return ranking for the character
||return a players city
||return a players class
||return a players level
||return a players kill count
||return a players house
Color players by city in the who's online and room info tabs:
Command output examples
> cdb whois <person> (a few examples)
> cdb citizens hashan
> cdb stats
> cdb class monk
> cdb house outriders
> cdb houses
> cdb huntwith 5
> cdb sparwith 5
> cdb youth 20
Updating players with hidden cities
Players that are showing up with cities as (hidden) need to be manually overridden to report the correct city.
To do this use 'CDB CITYCHECK NAME', where name is the players name.
This override is NOT checked by the system and can become stale if the person changes cities, so you will want to check these people every so often.
You can list all players with this override by using 'CDB CITYCHECK LIST'
I have not added any support for colouring names in the main play area as the main reason for this package is to add the API functions to be used by other packages and the Room info window colouring works well for me.
However I have added support for ANGEL PRESENCES, which you may want to adapt if you us another similar skill, I didn't add others as I cannot test them.
Resetting the system
If you need to reset the system and start again from scratch:
- Disable the reflex package from the settings > Reflex Packages area by unchecking the associated box.
- Delete 'nameDB' from the variables tab.
- Re-enable the package. The system should start up and show the start up note, if not use CDB RELOAD