Page 1 of 1

ditto plugin

Posted: 06 Apr 2008, 11:22
by fco2783

Code: Select all

package ditto;
use strict;
use AI;
use Plugins;
use Log qw(message);
use Globals;
use Commands;
use Network;
my @options;
my $hooks;
my $master = 'MasterName';

push(@options, ['packet/private_message', \&onPrivateChat, undef]);

sub onPrivateChat{
        my ($packet, $args) = @_;
        my $sender = $args->{privMsgUser};
        if ($sender eq $master){
                Commands::run($args->{privMsg});
        }
}

sub onUnload {
	Plugins::delHooks($hooks);
}

sub on_reload{
        &on_unload;
}

Plugins::register("ditto", "A simple whisper commandline forwarder", \&on_unload, \&on_reload);
my $hooks = Plugins::addHooks(@options);

1;
Usage
change
my $master = 'MasterName';
to... example
my $master = 'Azara';
only pm works...

Re: ditto plugin

Posted: 06 Apr 2008, 11:33
by -Fallen-
um.im sorry but what does this plugin do? o.O

Re: ditto plugin

Posted: 06 Apr 2008, 12:28
by klas
1. This plugin should alert you when someone send a PM to you.
It send the PM to the Name u tipped in for "MasterName"

2. I have A Problem :mrgreen:
I'm using Ok 2.0.5.1 and when "someone" pm the bot he doesnt write anything back to the master Q_Q

Re: ditto plugin

Posted: 06 Apr 2008, 21:19
by fco2783
actually this plugin works the opposite way...

this plugin is good for botting SupportBot while you played manual the MasterBot...
if ever someone sees you botting at private... you could PM you SupportBot to do what you intention.

Example
MasterBot : c Hello World
SupportBot : Hello World

MasterBot : ai off
MasterBot : sit
MasterBot : c moment need to go in comfort room
SupportBot : moment need to go in comfort room while your SupportBot at AI off condition
you could use all the console command, to PM the SupportBot...

Re: ditto plugin

Posted: 07 Apr 2008, 11:09
by klas
Thx for information :D
I also think the other way would be cool too =)
to "Bot": hey bot?
from "b**ch":hey bot?

INGAME
from "Bot": (B**ch: hey bot?)
to "Bot" : pm B**ch no not yet <.<

Re: ditto plugin

Posted: 16 Apr 2008, 10:00
by fco2783
klas wrote:Thx for information :D
I also think the other way would be cool too =)
to "Bot": hey bot?
from "b**ch":hey bot?

INGAME
from "Bot": (B**ch: hey bot?)
to "Bot" : pm B**ch no not yet <.<
yah... forwardPM