playerRecorder plugin
Moderator: Moderators
Re: playerRecorder plugin
Just a suggestion ,
record all there equipment , hair color and etc
since the bot can see these things , i am suggesting to record all this information for War Of Emperium .
we are likely to know there is some change of there headgear and weapon of other guild member .
make player recorder plugin record what ever it can do to the maximum .
-------------------------------------------------
Body direction: North (0) Head direction: North (0)
Weapon: Mes [3]
Shield: None
Shoes : Unknown
Upper headgear: Nothing Middle headgear: Nothing
Lower headgear: Nothing Hair color: Purple (2)
Walk speed: 0.15 secs per block
------------------- Statuses -------------------
record all there equipment , hair color and etc
since the bot can see these things , i am suggesting to record all this information for War Of Emperium .
we are likely to know there is some change of there headgear and weapon of other guild member .
make player recorder plugin record what ever it can do to the maximum .
-------------------------------------------------
Body direction: North (0) Head direction: North (0)
Weapon: Mes [3]
Shield: None
Shoes : Unknown
Upper headgear: Nothing Middle headgear: Nothing
Lower headgear: Nothing Hair color: Purple (2)
Walk speed: 0.15 secs per block
------------------- Statuses -------------------
learn how to be smart using search
"If I giv u a bot I'll feed u a day, but if I teach u to bot I'll feed u for life time" --wise izh
never ever send messages to me because i won't reply .
-
- Plain Yogurt
- Posts: 52
- Joined: 16 Jan 2011, 03:06
- Noob?: Yes
Re: playerRecorder plugin
Code: Select all
package playerRecord;
use strict;
use Plugins;
use Log qw(message);
use Globals;
use Settings;
use Actor;
Plugins::register("prec", "playerRecord", \&on_unload, \&on_reload);
my $hook = Plugins::addHook('charNameUpdate', \&write_player, undef);
sub on_unload {
Plugins::delHook("charNameUpdate", $hook);
}
sub on_reload {
message "playerRecord plugin reloading, ";
Plugins::delHook("charNameUpdate", $hook);
}
sub write_player {
my (undef, $args) = @_;
my $targetId = $args->{player}{nameID};
my $targetName = $args->{player}{name};
my $selfName = $char->name();
my $file = "$Settings::logs_folder/players_$selfName.txt";
message "Player Exists: $targetName ($targetId)\n";
open FILE, ">>:utf8", $file;
my $time=localtime time;
print FILE "[$time] " . $field->baseName . "\t$targetId $targetName\n";
close FILE;
}
1;
Code: Select all
message "Player Exists: $targetName ($targetId)\n";
Re: playerRecorder plugin
genuineopenkore wrote:how to make this speak also in a party?Code: Select all
message "Player Exists: $targetName ($targetId)\n";
Code: Select all
Commands::run("p Player Exists: $targetName ($targetId)");
-
- Plain Yogurt
- Posts: 52
- Joined: 16 Jan 2011, 03:06
- Noob?: Yes
Re: playerRecorder plugin
KeplerBR wrote:genuineopenkore wrote:how to make this speak also in a party?Code: Select all
message "Player Exists: $targetName ($targetId)\n";
Code: Select all
Commands::run("p Player Exists: $targetName ($targetId)");
thanks sir
-
- Plain Yogurt
- Posts: 52
- Joined: 16 Jan 2011, 03:06
- Noob?: Yes
Re: playerRecorder plugin
how to make this plugin sir to repeat it's process every 3 minutes?
Re: playerRecorder plugin
You mean to send PM every 3 minutes? How so?genuineopenkore wrote:how to make this plugin sir to repeat it's process every 3 minutes?
-
- Plain Yogurt
- Posts: 52
- Joined: 16 Jan 2011, 03:06
- Noob?: Yes
Re: playerRecorder plugin
because this plugin sir triggers only when there is a newly seen player or just seen player?
so what if to let the plugin check every three minutes if there's still a player near him or something like a timeout or release in macro.
so what if to let the plugin check every three minutes if there's still a player near him or something like a timeout or release in macro.
Code: Select all
automacro PlayerExist {
player /(.*)/
timeout 10
call {
log I saw $.lastPlayerName
}
}
Re: playerRecorder plugin
It triggers when a player is visible to Kore, e.g. when there are eight players visible to Kore he will trigger 8 times.
-
- Plain Yogurt
- Posts: 52
- Joined: 16 Jan 2011, 03:06
- Noob?: Yes
Re: playerRecorder plugin
yes sir exactly, but what i want to do is that it will again re-check its area for about 3 minutes so that even if that player who triggers the plugin it will be recorded again. it will record players near him in every 3 minutes.Raider wrote:It triggers when a player is visible to Kore, e.g. when there are eight players visible to Kore he will trigger 8 times.
example:
player 1 is visible and the bot records player 1 then player 2 comes and the bot records player 2, but when the part were player 2 records the bot doesn't record player 1 anymore.
what i want is:
if player 1 is visible the bot will record player 1 and player 2 comes the bot will record player 2 and player 1 then after 3 minutes it will re-check its area if there's a player near him and will record again all the players even if player 1 and player 2 is still there near him and no other players need for trigger.
here's what I've done
Code: Select all
package ExamplePlugin;
use Plugins;
use Log qw(message);
use Globals;
use Settings;
use Actor;
Plugins::register('example', 'Example Plugin ', \&Unload, \&Reload);
Plugins::addHook('charNameUpdate', \&Called, undef);
sub Unload {
Plugins::addHook('charNameUpdate', \&Called);
}
sub Reload {
Plugins::addHook('charNameUpdate', \&Called);
}
sub Called {
my (undef, $args) = @_;
my $targetName = $args->{player}{name};
Commands::run("p Player Seen: $targetName");
## what will i add here to redo its process again?
return 1;
Re: playerRecorder plugin
I think I understand... Well, I guess that solves the problem well:
I did not get to test, but I think that works.
Code: Select all
package ExamplePlugin;
use Plugins;
use Log qw(message);
use Globals;
use Settings;
use Actor;
Plugins::register('example', 'Example Plugin ', \&Unload, \&Reload);
Plugins::addHook('charNameUpdate', \&Called, undef);
my %nickListTime;
sub Unload {
Plugins::addHook('charNameUpdate', \&Called);
}
sub Reload {
Plugins::addHook('charNameUpdate', \&Called);
}
sub Called {
my (undef, $args) = @_;
my $targetName = $args->{player}{name};
return if ((time - $nickListTime{$targetName}) < 180);
$nickListTime{$targetName} = time;
Commands::run("p Player Seen: $targetName");
}
return 1;
I did not get to test, but I think that works.