Character DB [Nexus]

Hello,

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:
  1. 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.
  2. 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

cdb
show this list in game
cdb reload reload cdb in case something goes wrong
cdb update update data for everyone online
cdb citizens [city] show all users in this house
cdb class [class] show all users of this class in the database
cdb whois [character] show cached info on this user
cdb house [house] show all characters in this house
cdb stats
show all visible online players per city
cdb change [name] city [City] change a players city
cdb change [name] city [Notes] Add a note for this player, this overwrites the last note
cdb citycheck [name]
cdb citycheck list
Update a player that is hiding their city
List all players where the city was overridden by the above
cdb huntwith <range> List players from your city online that are within <range> of your level, default is 10 levels
cdb sparwith <range> List players online that are within <range> of your level, default is 10 levels
cdb youth <range> 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

cdb_exists(name) return if a character exists in the DB, you should call this before calling other API functions!
cdb_getByName(name) get character info and add to the DB, does not return anything
cdb_get_rank(name) return ranking for the character
cdb_get_city(name) return a players city
cdb_get_class(name) return a players class
cdb_get_level(name) return a players level
cdb_get_pk(name) return a players kill count
cdb_get_house(name) return a players house

GUI Modifications

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

(exerpt)


> 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'

Inline colours

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:
  1. Disable the reflex package from the settings > Reflex Packages area by unchecking the associated box.
  2. Delete 'nameDB' from the variables tab.
  3. Re-enable the package. The system should start up and show the start up note, if not use CDB RELOAD

Comments

  • They really need to fix that some people still get their city/house hidden through a no longer accessible and ooc means

    @Ronwe @Rhivona @Ictinus ?
  • Dupre said:
    They really need to fix that some people still get their city/house hidden through a no longer accessible and ooc means

    HIDEBANNERORGS and SHOWBANNERORGS (as per HELP BANNERS) are still very much available!
  • Can we like... Make that not a thing, then?
  • Um not to be a complete idiot but... how are you supposed to install this exactly?
  • Erwin said:
    Um not to be a complete idiot but... how are you supposed to install this exactly?
    Right click on the https://raw.githubusercontent.com/poormuffin/vsys/master/Character%20DB.nxs link and hit 'save link as' and save it somewhere on your computer.

    Then, when you're logged into Nexus, click on the little image of cogs in the bottom right corner of your browser. That will open the settings menu in a new tab. There will be a 'Reflex Packages' section in the settings. Click that and either drag and drop the file you saved from the link into the designated area or press the indicated button to browse through your directories and select the file.
  • This doesn't show your own character in any of the lists does it?
  • Sorry was off doing work stuff for a bit.. No it does not display what is not already in the list so your own character does not show up.
Sign In or Register to comment.