playerRecorder plugin
Moderator: Moderators
-
- Plain Yogurt
- Posts: 95
- Joined: 05 Apr 2008, 05:15
- Noob?: Yes
- Location: in place where you cant go
- Contact:
Re: playerRecorder plugin
i've been using the isieo and sli plug-in... i just rename the sli plug-in to playerRecordlog...
so that i could watch both...
i like isieo plug-in its very nice to confirm all char in the server... because he put the player.txt in the plug-in folder... in which when i run multiple bot at the same time... all been report in 1 file... in which very handy if u ask me... i could tell if a player is using a GM account...
i like sli plug-in too... this verifies player around my char time to time... but i want to some improvement... like some alert if this player been following me more than 30 sec or so... also if we could add some chat too...
so that i could watch both...
i like isieo plug-in its very nice to confirm all char in the server... because he put the player.txt in the plug-in folder... in which when i run multiple bot at the same time... all been report in 1 file... in which very handy if u ask me... i could tell if a player is using a GM account...
i like sli plug-in too... this verifies player around my char time to time... but i want to some improvement... like some alert if this player been following me more than 30 sec or so... also if we could add some chat too...
Re: playerRecorder plugin
The problem with mine is that it records all players all the time, regardless of whether or not the player has already been recorded. I should fix that...
cs : ee : realist
-
- Plain Yogurt
- Posts: 95
- Joined: 05 Apr 2008, 05:15
- Noob?: Yes
- Location: in place where you cant go
- Contact:
Re: playerRecorder plugin
thanks a lot your the greatest...sli wrote:The problem with mine is that it records all players all the time, regardless of whether or not the player has already been recorded. I should fix that...
Re: playerRecorder plugin
Alternatively, I could also make it count how many times it sees each player, then allow you to check from the console. Maybe something like...
Could print...
Code: Select all
seen Some Player
Not sure how that'd be useful, but it's not like it'd be difficult to do and I'm sure at least one person could find a use for it.Player Some Player seen 23 times.
cs : ee : realist
Re: playerRecorder plugin
Code: Select all
######################################################
# This plugin is licensed under the GNU GPL #
# Copyright 2005 by isieo #
# contact : - isieo <AT> *NOSPAM* G*MAIL <DOT> COM #
# -------------------------------------------------- #
# -------------------------------------------------- #
# playerrecorder.pl #
# Records Player's name together with AIDs #
# Usefull for players to findout other players' other#
# characters... #
# #
######################################################
package playerRecord;
use strict;
use Plugins;
use Log qw(message);
use Globals;
use Settings;
use Utils qw(binAdd existsInList getFormattedDate);
Plugins::register("prec", "playerRecord", \&on_unload, \&on_reload);
my $hooks = Plugins::addHooks(
['charNameUpdate', \&write_player],
);
my $datadir = $Settings::logs_folder;
sub on_unload {
# This plugin is about to be unloaded; remove hooks
Plugins::delHook("charNameUpdate", $hooks);
}
sub on_reload {
}
sub write_player {
my @tmpdate = localtime();
$tmpdate[5] += 1900;
for (my $i = 0; $i < @tmpdate; $i++) {
if ($tmpdate[$i] < 10) {$tmpdate[$i] = "0".$tmpdate[$i]};
};
my $hookname = shift;
my $args = shift;
my $targetId = unpack("V1",$args->{ID});
my $targetName = $args->{name};
my $file = "$datadir/players.csv";
my $job = $args->{jobID};
my $lvl = $args->{lv};
my $class = "Indefinida";
my $sexid = $args->{sex};
my $sex = "Indefinido";
my $targetG = $args->{guild}{name};
my ($uId, $name);
my $exist=0;
my $line;
if ($job == 0) {
$class="Novice";
}
if ($job == 1) {
$class="Swordman";
}
if ($job == 2) {
$class="Mage";
}
if ($job == 3) {
$class="Archer";
}
if ($job == 4) {
$class="Acolyte";
}
if ($job == 5) {
$class="Merchant";
}
if ($job == 6) {
$class="Thief";
}
if ($job == 7) {
$class="Knight";
}
if ($job == 8) {
$class="Priest";
}
if ($job == 9) {
$class="Wizard";
}
if ($job == 10) {
$class="Blacksmith";
}
if ($job == 11) {
$class="Hunter";
}
if ($job == 12) {
$class="Assassin";
}
if ($job == 13) {
$class="Knight (Peco)";
}
if ($job == 14) {
$class="Crusader";
}
if ($job == 15) {
$class="Monk";
}
if ($job == 16) {
$class="Sage";
}
if ($job == 17) {
$class="Rogue";
}
if ($job == 18) {
$class="Alchemist";
}
if ($job == 19) {
$class="Bard";
}
if ($job == 20) {
$class="Dancer";
}
if ($job == 21) {
$class="Crusader(Peco)";
}
if ($job == 22) {
$class="Wife/Husband";
}
if ($job == 23) {
$class="Super Novice";
}
if ($job == 4001) {
$class="High Novie";
}
if ($job == 4002) {
$class="High Swordman";
}
if ($job == 4003) {
$class="High Mage";
}
if ($job == 4004) {
$class="High Archer";
}
if ($job == 4005) {
$class="High Acolyte";
}
if ($job == 4006) {
$class="High Merchant";
}
if ($job == 4007) {
$class="High Thief";
}
if ($job == 4008) {
$class="Lord Knight";
}
if ($job == 4009) {
$class="High Priest";
}
if ($job == 4010) {
$class="High Wizzard";
}
if ($job == 4011) {
$class="Whitesmith";
}
if ($job == 4012) {
$class="Sniper";
}
if ($job == 4013) {
$class="Assassin Cross";
}
if ($job == 4014) {
$class="Lord Knight (Peco)";
}
if ($job == 4015) {
$class="Paladin";
}
if ($job == 4016) {
$class="Champion";
}
if ($job == 4017) {
$class="Professor";
}
if ($job == 4018) {
$class="Stalker";
}
if ($job == 4019) {
$class="Creator";
}
if ($job == 4020) {
$class="Clow";
}
if ($job == 4021) {
$class="Gypsy";
}
if ($job == 4022) {
$class="Paladin (Peco)";
}
if ($job == 4023) {
$class="Baby Novice";
}
if ($job == 4024) {
$class="Baby Swordman";
}
if ($job == 4025) {
$class="Baby Mage";
}
if ($job == 4026) {
$class="Baby Archer";
}
if ($job == 4027) {
$class="Baby Acolyte";
}
if ($job == 4028) {
$class="Baby Merchant";
}
if ($job == 4029) {
$class="Baby Thief";
}
if ($job == 4030) {
$class="Baby Knight";
}
if ($job == 4031) {
$class="Baby Priest";
}
if ($job == 4032) {
$class="Baby Wizard";
}
if ($job == 4033) {
$class="Baby Blacksmith";
}
if ($job == 4034) {
$class="Baby Hunter";
}
if ($job == 4035) {
$class="Baby Assassin";
}
if ($job == 4036) {
$class="Baby Knight (Peco)";
}
if ($job == 4037) {
$class="Baby Crusader";
}
if ($job == 4038) {
$class="Baby Monk";
}
if ($job == 4039) {
$class="Baby Sage";
}
if ($job == 4040) {
$class="Baby Rogue";
}
if ($job == 4041) {
$class="Baby Alchemist";
}
if ($job == 4042) {
$class="Baby Bard";
}
if ($job == 4043) {
$class="Baby Dancer";
}
if ($job == 4044) {
$class="Baby Crusader (Peco)";
}
if ($job == 4045) {
$class="Baby Super Aprendiz";
}
if ($job == 4046) {
$class="Taekwon";
}
if ($job == 4047) {
$class="Star Gladiator";
}
if ($job == 4048) {
$class="Star Gladiator (Flying)";
}
if ($job == 4049) {
$class="Soul Linker";
}
if ($sexid == 0) {
$sex="Feminine";
}
if ($sexid == 1) {
$sex="Masculine";
}
if ($Settings::VERSION cmp '1.9.1' >= 0) {
open FILE, "<:utf8", $file;
} else {
open FILE, "< $file";
}
foreach (<FILE>){
next if (/^#/);
s/[\r\n]//g;
s/\s+$//g;
$line = $_;
($uId, $name ) = $line =~ /^(\d+) (.*)$/;
if ($uId eq $targetId && $name eq $targetName){
$exist=1;
}
}
close FILE;
if (!$exist) {
if ($Settings::VERSION cmp '1.9.1' >= 0) {
open FILE, ">>:utf8", $file;
} else {
open FILE, ">> $file";
}
print FILE "$targetId;$targetName;$targetG;$class;$lvl;$sex;$field{name};$tmpdate[3]/$tmpdate[4]/$tmpdate[5];$tmpdate[2]:$tmpdate[1]:$tmpdate[0]\n" if ($targetName) ;
close FILE;
}
}
1;
Not made by me.
Quit.
Re: playerRecorder plugin
I'm glad that's not made by you because that's a horrific implementation of class detection.
cs : ee : realist
Re: playerRecorder plugin
Well that version was made by raizend in 05/29/06.
Ok, I changed the way the way it gets the information
If the player isn't in a guild, it will print None.
It will print like this in players.csv: Date/Time | ID | Name | Guild | Class | Level | Sex | location
Btw, it records homunculos infos too o.o
Ok, I changed the way the way it gets the information
Code: Select all
######################################################
# This plugin is licensed under the GNU GPL #
# Copyright 2005 by isieo #
# contact : - isieo <AT> *NOSPAM* G*MAIL <DOT> COM #
# -------------------------------------------------- #
# -------------------------------------------------- #
# playerrecorder.pl #
# Records Player's name together with AIDs #
# Usefull for players to findout other players' other#
# characters... #
# #
######################################################
package playerRecord;
use strict;
use Plugins;
use Log qw(message);
use Globals;
use Settings;
use Utils qw(binAdd existsInList getFormattedDate);
Plugins::register("prec", "playerRecord", \&on_unload, \&on_reload);
my $hooks = Plugins::addHooks(
['charNameUpdate', \&write_player],
);
my $datadir = $Settings::logs_folder;
sub on_unload {
# This plugin is about to be unloaded; remove hooks
Plugins::delHook("charNameUpdate", $hooks);
}
sub on_reload {
}
sub write_player {
my $hookname = shift;
my $args = shift;
my $targetId = unpack("V1",$args->{ID});
my $targetName = $args->{name};
my $targetG = $args->{guild}{name};
my $targetJob = $jobs_lut{$args->{jobID}};
my $targetLvl = $args->{lv};
my $targetSex = $sex_lut{$args->{sex}};
my $targetLocation = $field{name};
my $targetTime = localtime time;
my $file = "$datadir/players.csv";
my ($time, $uId, $name, $guild, $job, $lvl, $sex, $location);
my $exist=0;
my $line;
if ($targetG eq "") {
$targetG = "None";
}
if ($Settings::VERSION cmp '1.9.1' >= 0) {
open FILE, "<:utf8", $file;
} else {
open FILE, "< $file";
}
foreach (<FILE>){
next if (/^#/);
s/[\r\n]//g;
s/\s+$//g;
$line = $_;
($time, $uId, $name, $guild, $job, $lvl, $sex, $location ) = $line =~ /^(\[\w{3} \w{3} \d{2} \d{2}:\d{2}:\d{2} \d{4}\]) (\d+) (\w+) (\w+ \w+?) (\w+ \w+?) (\d+) (\w+) (\w+)$/;
if ($uId eq $targetId && $name eq $targetName){
$exist=1;
}
}
close FILE;
if (!$exist) {
if ($Settings::VERSION cmp '1.9.1' >= 0) {
open FILE, ">>:utf8", $file;
} else {
open FILE, ">> $file";
}
print FILE "[$targetTime];;;$targetId;$targetName;;$targetG;;;$targetJob;$targetLvl;$targetSex;$targetLocation\n" if ($targetName) ;
close FILE;
}
}
1;
It will print like this in players.csv: Date/Time | ID | Name | Guild | Class | Level | Sex | location
Code: Select all
[Fri Dec 5 15:57:00 2008] 2001042 Ovary illusionz Merchant 32 Girl morocc
Quit.
-
- Super Moderators
- Posts: 801
- Joined: 06 May 2008, 12:47
- Noob?: No
Re: playerRecorder plugin
Homunculus are currently recognized as players by kore.
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...
Mount Doom awaits us, fellowship of OpenKore!
One ST_kRO to bring them all and in the darkness bind them...
Mount Doom awaits us, fellowship of OpenKore!
-
- Plain Yogurt
- Posts: 95
- Joined: 05 Apr 2008, 05:15
- Noob?: Yes
- Location: in place where you cant go
- Contact:
Re: playerRecorder plugin
@ Mushroom
can u add the counting too like sli said...
can u add the counting too like sli said...
Re: playerRecorder plugin
This plugin does exactly what you want, but it records less information.
http://bibian.ath.cx/openkore//viewtopic.php?t=28117
http://bibian.ath.cx/openkore//viewtopic.php?t=28117
Quit.