Getting information from offline characters

Posted by Marowi on Sun 04 Jul 2004 01:04 PM — 3 posts, 14,854 views.

#0
I'd like to know how to do this for two main applications.

When you attempt to loadup characters with a higher trust than your own, you receive a message saying "DON'T disturb me" or something (I've already changed this). I'd like to be able to check for a character's trust while their file is offline, rather than loading it up and then quitting it.

I'm using a pseudo-bounty code that I created myself, and the cost of bounty is dependant on the character's level. At the moment, the character obviously has to be online.

For both of these reasons, and perhaps a number more that haven't come to mind at this time, I'd like to know if and/or how to get information such as top_level and trust from a character pfile without them being online.

Marowi
Canada #1
You could copy fread_char and just remove everything but top_level and trust, having it ignore everything else, then if that works, close the file, and start with a proper read in.

[EDIT]

Sorry, had to run to work. Anyways, to be more specific, you basically wanna set up a copy of fread_char with only the t case left, and a continue in the default, to ignore whatever else may be read in from the file. From there, you can return the higher of the two, and then compare to the invokes trust/top_level. Should you be in a circumstance in which its ok, then you can load up the full pfile.

You can also take a look here, see if this help you out at all:

http://forums.alsherok.net/index.php?showtopic=642

Hope that helps.
Amended on Sun 04 Jul 2004 05:11 PM by Greven
Canada #2
Check out Samson's finger snippet at http://www.afkmud.com/downloads.php.

Excellent example of loading up offline chars to check their status.