Hello,
I've been trying to get a characters stats and information to a log file. I've been through the commands and possibilities but as for now there is no such option.
The commands "s" and "st" show valuable information about the character that I'd like to export for hosting a website (would be nice).
Is there any way to do this? I've been searching the code of openkore to see if I can create my own functionality but I haven't been able to make it. I know it can happen (otherwise openkore isn't able to gain the information from the server), but the question is how?
Regards,
roflasher
Exporting character stats + information to a (log) file
Moderator: Moderators
-
- Noob
- Posts: 5
- Joined: 30 Aug 2011, 04:32
- Noob?: No
- Location: The Netherlands
-
- Developers
- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
-
- Noob
- Posts: 5
- Joined: 30 Aug 2011, 04:32
- Noob?: No
- Location: The Netherlands
Re: Exporting character stats + information to a (log) file
I've made a smaller macro (and an automacro) with a timeout of 600 that updates a file.txt with the current stats of the plugin macro variables (default ones like $.lvl and $.joblvl). Unfortuntely the default variables cannot show current EXP and needed EXP. Maybe anyone has a solution to that?EternalHarvest wrote:Check "state" plugin: http://openkore.svn.sourceforge.net/vie ... iew=markup
I am able to use the txt files to put them up my website, thanks for helping though!

Here's my code if anyone needs it:
automacro sts {
call stats
timeout 600
}
macro stats {
LogFile ("[$.datetime] \n BLevel: $.lvl \n JLevel: $.joblvl \n Current HP: $.hp \n Current SP: $.sp \n Zeny: $.zeny \n Weight/Max: $.weight/$.maxweight \n Map: $.map \n Current Status: $.status")
}
sub LogFile {
open(FILE, ">:utf8", "$Settings::logs_folder/statsinformation.txt");
print FILE $_[0];
close(FILE);
}
-
- Noob
- Posts: 5
- Joined: 30 Aug 2011, 04:32
- Noob?: No
- Location: The Netherlands
Re: Exporting character stats + information to a (log) file
I've fixed a lot, but now i am trying to get a DO S (or DO EXP) command into a variable ($test). Is there any way to get the output code from the command into a variable?