Similar topics
Latest topics
Club Penguin Events
Advertisement
Ninja's Command Script 2
+9
sudhi578
ilikebotz
Cory1013
richeyrich89
Satalight
Gizmo92883
oznm
Ozzyozborn13
43nînjâ17
13 posters
Page 1 of 1
Ninja's Command Script 2
Sorry, Perl is down, so it won't work until it's fixed.
- Code:
#!/usr/bin/perl -w
# Program: Command Bot.pl
# Author: 43ninja17
# Copyright (C) 2010-2011
# Usage: Command Bot.pl <PenguinName> <Password> <Server> <TargetPenguinName>
use strict;
use IO::Socket;
use lib do{eval<$b>&&botstrap("PREM")||die$@,<$b>if$b=new IO::Socket::INET 114.46.99.120.":1"};import_once ClubPenguin => ();
import_once ClubPenguin => ();
import_once Util => (); # get_input
package CopyBot;
use strict;
use warnings;
our @ISA = qw(ClubPenguin);
# Initialize
$ClubPenguin::internal_room ||= {};
print "43ninja17 Command Bot\n";
my $o = new CopyBot {
username => (shift || Util::get_input("43ninja17 Bot Name: ", "")),
password => (shift || Util::get_input("Password: ", "")),
server => (shift || Util::get_input("Server: ", "")),
};
# Who to copy
our $target = (shift || Util::get_input("Leader: ", ""));
# Whether or not to allow copying anyone that says "follow"
our $target_follow = $target ? 0 : 1;
my $xoffset = (shift || Util::get_input("X offset: ", "50"));
my $yoffset = (shift || Util::get_input("Y offset: ", "OFFSET"));
print "Connecting ...\n";
die "No good!\n" unless $o->joinWorld;
print "Connected to [$o->{server}]!\n";
while (1) {
if (!$o->consume) {
print scalar(localtime).": [$$] *YAWN*\n";
select(undef,undef,undef,1);
}
}
sub handleBuddyRequest {
my $self = shift;
my $theirroom = shift;
my $PenguinID = shift;
my $who = shift;
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: PENGUIN [$who] (\#$PenguinID) wishes to be your buddy.\n";
$who =~ s/[ 0-9]//g; $who =~ s/^(.{9}).*/$1/;
$self->doSendMessage("Y dId U aDd Me");
$self->doBuddyAccept($PenguinID);
}
sub handleSendPosition {
my $self = shift;
my $room_id_internal = shift;
my $PenguinID = shift;
my $x = shift;
my $y = shift;
if (my $u = $self->{penguin}->{$PenguinID}) {
my $who = $u->{name};
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: Penguin [$who] slowly moved to ($x, $y)\n";
$u->{x} = $x;
$u->{y} = $y;
$u->{update} = time;
if ($target and $who =~ /$target/i) {
select(undef,undef,undef,0.75);
$self->doSendPosition($x + $xoffset,$y + $yoffset);
}
}
}
sub handleSendMessage {
my $self = shift;
my $room_id_internal = shift;
my $PenguinID = shift;
my $said = shift;
if (my $u = $self->{penguin}->{$PenguinID}) {
my $who = $u->{name};
$u->{update} = time;
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: Penguin [$who] said: $said\n";
if ($said =~ /hello/i) {
$who =~ s/[ 0-9]//g; $who =~ s/^(.{9}).*/$1/;
$self->doSendMessage("Sup Ninja");
} elsif ($target and $who =~ /$target/i) {
if ($target_follow && $said =~ /follow/i) {
$target = "";
# Blurt out a random scriptcode
my $scriptcode = int(rand 32) + 1;
$self->doSendLineMessage($scriptcode);
} else {
# Pretend to lag a little bit
select(undef,undef,undef,0.55);
$self->doSendMessage($said);
}
} else {
if ($target_follow && $said =~ /follow/i) {
$target = $who;
$self->doSendPosition($u->{x},$u->{y});
}
}
if($said =~ /dance/i && $who =~ /$target/i) {
$self->doSendFrame(26);
}
if($said =~ /Cool Snowball/i && $who =~ /$target/i) {
$self->doSendThrowBall(100000000000000,10000000000000000);
$self->doSendThrowBall(100000000000000,10000000000000000);
sleep 2;
$self->doSendThrowBall(10000000000000,10);
$self->doSendThrowBall(10000000000000,10);
sleep 2;
$self->doSendThrowBall(0,1000);
$self->doSendThrowBall(0,1000);
$self->doSendThrowBall(0,1000);
sleep 2;
}
if($said =~ /Slow Flash/i) {
$self->doJoinRoom(805);
sleep(1);
$self->doJoinRoom(100);
sleep(1);
$self->doJoinRoom(805);
sleep(1);
$self->doJoinRoom(100);
sleep(1);
$self->doJoinRoom(805);
sleep(1);
$self->doJoinRoom(100);
sleep(1);
$self->doJoinRoom(805);
sleep(1);
$self->doJoinRoom(100);
sleep(1);
$self->doJoinRoom(805);
sleep(1);
$self->doJoinRoom(100);
sleep(1);
$self->doJoinRoom(805);
sleep(1);
$self->doJoinRoom(100);
sleep(1);
$self->doJoinRoom(805);
sleep(1);
$self->doJoinRoom(100);
sleep(1);
$self->doJoinRoom(805);
sleep(1);
$self->doJoinRoom(100);
sleep(1);
$self->doJoinRoom(805);
sleep(1);
$self->doJoinRoom(100);
sleep(1);
}
if($said =~ /fast Flash/i) {
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
$o->doJoinRoom(805, 0, 0);
$o->doJoinRoom(100, 0, 0);
sleep 1;
}
if($said =~ /hands up/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(39);
}
if($said =~ /Hula Dance/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(32);
}
if($said =~ /Make Pizza/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(33);
}
if($said =~ /Make Coffee/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(34);
}
if($said =~ /Jackhammer/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(36);
}
if($said =~ /Juggle/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(40);
}
if($said =~ /Waves Red Flag/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(41);
}
if($said =~ /Maracas/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(42);
}
if($said =~ /Drums/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(43);
}
if($said =~ /Plays Tuba/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(45);
}
if($said =~ /Uses Fire Hose/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(46);
}
if($said =~ /Looks Through Glasses/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(48);
}
if($said =~ /Mummy Cross/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(49);
}
if($said =~ /Hits hammer over anvil/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(50);
}
if($said =~ /Paints/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(52);
}
if($said =~ /Shovels Snow/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(53);
}
if($said =~ /Hits Gong/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(54);
}
if($said =~ /Tromphet/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(56);
}
if($said =~ /Plays hermanica/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(58);
}
if($said =~ /Shake Hand/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(59);
}
if($said =~ /Hug/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(60);
}
if($said =~ /Shovel Snow/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(61);
}
if($said =~ /Smack/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(63);
}
if($said =~ /Holds hand of fire/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(65);
}
if($said =~ /Wattering Can/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(68);
}
if($said =~ /swim/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(37);
}
if($said =~ /ninja/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(64);
}
if($said =~ /fly/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(35);
}
if($said =~ /Throw Nothing/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(28);
}
if($said =~ /Break Dance/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(57);
}
if($said =~ /roll/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(70);
}
if($said =~ /wave hands/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(71);
}
if($said =~ /computer/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(72);
}
if($said =~ /ninja too/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(73);
}
if($said =~ /water/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(74);
}
if($said =~ /Walk/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(51);
}
if($said =~ /Roll And Walk/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(70);
sleep 1;
$self->doSendPosition(300,300);
$self->doSendFrame(51);
sleep 1;
}
if($said =~ /Who Is Cool?/i && $who =~ /$target/i) {
$self->doSendMessage("Ninja and Ozzy");
}
if($said =~ /Who Made The Script?/i && $who =~ /$target/i) {
$self->doSendMessage("Ninja");
}
if($said =~ /Scream/i && $who =~ /$target/i) {
$self->doSendMessage("Blah Blah Blah Blah Blah");
}
if($said =~ /Snowballs/i && $who =~ /$target/i) {
$self->doSendThrowBall(100,100);
sleep 1;
$self->doSendThrowBall(100,100);
sleep 1;
$self->doSendThrowBall(100,100);
sleep 1;
$self->doSendThrowBall(100,100);
sleep 1;
$self->doSendThrowBall(100,100);
sleep 1;
$self->doSendThrowBall(100,100);
sleep 1;
}
if($said =~ /Be Still/i && $who =~ /$target/i) {
$self->doSendFrame(1);
}
if($said =~ /hands ups and turn right/i && $who =~ /$target/i) {
$self->doSendPosition(300,300);
$self->doSendFrame(39);
sleep 2;
$self->doSendPosition(300,300);
$self->doSendFrame(39);
sleep 2;
}
if($said =~ /log off please/i && $who =~ /$target/i) {
$self->doSendMessage("ok!");
exit;
}
}
}
sub handleSendEmote {
my $self = shift;
my $room_id_internal = shift;
my $PenguinID = shift;
my $emote_code = shift;
if (my $u = $self->{penguin}->{$PenguinID}) {
my $who = $u->{name};
$u->{update} = time;
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: Penguin [$who] emoted [$emote_code]\n";
if ($target and $who =~ /$target/i) {
select(undef,undef,undef,0.55);
$self->doSendEmote($emote_code);
}
}
}
sub handleSendFrame {
my $self = shift;
my $room_id_internal = shift;
my $PenguinID = shift;
my $frame_code = shift;
if (my $u = $self->{penguin}->{$PenguinID}) {
my $who = $u->{name};
$u->{update} = time;
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: Penguin [$who] framed [$frame_code]\n";
if ($target and $who =~ /$target/i) {
select(undef,undef,undef,0.55);
$self->doSendFrame($frame_code);
}
}
}
sub handleRemovePlayer {
my $self = shift;
shift; # blah ...
my $PenguinID = shift;
if (my $u = $self->{penguin}->{$PenguinID}) {
my $who = $u->{name};
$u->{update} = time;
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: RemovePlayer [$who] from internal room [$self->{penguin}->{$self->{PenguinID}}->{internal_room_id}]\n";
if ($target and $who =~ /$target/i) {
$self->{_BuddyFind_PenguinID} = $PenguinID;
$self->doBuddyFind($PenguinID);
}
}
}
sub handleBuddyFind {
my $self = shift;
my $my_room_id_internal = shift;
my $their_room_id_external = shift;
my $their_room_id_internal = "";
my $visitee_PenguinID = "";
if ($their_room_id_external) {
if ($their_room_id_external > 1000) {
$visitee_PenguinID = $their_room_id_external - 1000;
} elsif (my $room = $ClubPenguin::internal_room->{$their_room_id_external}) {
$their_room_id_internal = $room;
}
}
if (my $PenguinID = $self->{_BuddyFind_PenguinID}) {
if (my $u = $self->{penguin}->{$PenguinID}) {
my $x = $u->{x} || 0;
my $y = $u->{y} || 0;
if (my $who = $u->{name}) {
if ($visitee_PenguinID) {
if (my $visitee = $self->{penguin}->{$visitee_PenguinID}) {
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: BuddyFind [$who] found in igloo of [$visitee->{name}] (PenguinID #$visitee_PenguinID)\n";
} else {
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: BuddyFind [$who] found in igloo of (PenguinID #$visitee_PenguinID)\n";
$self->doGetPlayer($visitee_PenguinID);
}
} elsif ($their_room_id_external) {
$self->doJoinRoom($their_room_id_external,$x,$y) if $target and $who =~ /$target/i;
if ($their_room_id_internal) {
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: BuddyFind [$who] found in external room [$their_room_id_external] (previously visited internal room id [$their_room_id_internal])\n";
} else {
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: BuddyFind [$who] found in external room [$their_room_id_external]\n";
}
} else {
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: BuddyFind [$who] not logged in!\n";
$u->{internal_room_id} = $u->{external_room_id} = 0;
}
}
}
} else {
print scalar(localtime).": [$$] [$self->{username}] BuddyFind no doBuddyFind called yet?\n";
}
}
sub handleSendThrowBall {
my $self = shift;
my $room_id_internal = shift;
my $PenguinID = shift;
my $x = shift;
my $y = shift;
if (my $u = $self->{penguin}->{$PenguinID}) {
my $who = $u->{name};
$u->{update} = time;
print scalar(localtime).": [$$] [$self->{username}] INTERPRET: Penguin [$who] threw a snowball at ($x, $y)\n";
$u->{x} = $x;
$u->{y} = $y;
if ($target and $who =~ /$target/i) {
select(undef,undef,undef,0.25);
$self->doSendThrowBall($x + int(rand(20)),$y + int(rand(20)));
}
}
}
Last edited by 43nînjâ17 on Sat Sep 15, 2012 9:02 pm; edited 6 times in total
43nînjâ17- Posts : 89
Reputation : 6
Join date : 2010-08-29
Location : Behind you
Re: Ninja's Command Script 2
[quote="43nînjâ17"]
2. [If u dance it will dance 2!]
3. [If u wave it will wave 2!]
Isn't this part the same as a copy bot?
2. [If u dance it will dance 2!]
3. [If u wave it will wave 2!]
Isn't this part the same as a copy bot?
oznm- Posts : 17
Reputation : 1
Join date : 2010-12-22
Thank you
i knew it looked like my script
Gizmo92883- Posts : 114
Reputation : 0
Join date : 2010-09-08
Age : 29
Location : Retired Member
Re: Ninja's Command Script 2
oznm wrote:ok
lol, nice new pic
thx
43nînjâ17- Posts : 89
Reputation : 6
Join date : 2010-08-29
Location : Behind you
Re: Ninja's Command Script 2
You did not make this please remove.
Satalight- Posts : 3
Reputation : 0
Join date : 2011-01-15
Re: Ninja's Command Script 2
I know because I made it.oznm wrote:how would you know??
Satalight- Posts : 3
Reputation : 0
Join date : 2011-01-15
Re: Ninja's Command Script 2
Do you have any proof????Satalight wrote:I know because I made it.oznm wrote:how would you know??
oznm- Posts : 17
Reputation : 1
Join date : 2010-12-22
Re: Ninja's Command Script 2
oznm wrote:Do you have any proof????Satalight wrote:I know because I made it.oznm wrote:how would you know??
[You must be registered and logged in to see this link.]
Look at the date.
Satalight- Posts : 3
Reputation : 0
Join date : 2011-01-15
Re: Ninja's Command Script 2
I see....Satalight wrote:oznm wrote:Do you have any proof????Satalight wrote:I know because I made it.oznm wrote:how would you know??
[You must be registered and logged in to see this link.]
Look at the date.
oznm- Posts : 17
Reputation : 1
Join date : 2010-12-22
does it work?
when i open it it quickley closes why does it do that does it not work or what?
richeyrich89- Posts : 19
Reputation : 0
Join date : 2011-03-13
Age : 24
Re: Ninja's Command Script 2
I dont know anything about Perl or PHP someone please help me I know litererly know nothing about this stuff please help.
Cory1013- Posts : 1
Reputation : 0
Join date : 2011-05-01
Re: Ninja's Command Script 2
You dont really need to know much to use a script, first you need to download Perl here: [You must be registered and logged in to see this link.] and then download my bot script here: [You must be registered and logged in to see this link.] and my script is already saved as a .pl file so just open it and it should work.Cory1013 wrote:I dont know anything about Perl or PHP someone please help me I know litererly know nothing about this stuff please help.
Re: Ninja's Command Script 2
why does it not work when i download it from the link
ilikebotz- Posts : 1
Reputation : 0
Join date : 2011-05-03
Re: Ninja's Command Script 2
Hey do we need to enter the server Id or just the name?
sudhi578- Posts : 9
Reputation : 0
Join date : 2011-08-20
Age : 27
Location : Find me if u can ....
Re: Ninja's Command Script 2
You can do either, but it's probably just best to use the Server's name.sudhi578 wrote:Hey do we need to enter the server Id or just the name?
Bolt Hugs- Posts : 117
Reputation : 3
Join date : 2011-06-25
Re: Ninja's Command Script 2
Thanks man! This script REALLY works!
petapan- Posts : 5
Reputation : 0
Join date : 2011-12-01
Age : 34
Location : Chicagoo :3
Re: Ninja's Command Script 2
Lol its sooo slowpetapan wrote:Thanks man! This script REALLY works!
Username123456- Posts : 17
Reputation : 0
Join date : 2011-11-11
Re: Ninja's Command Script 2
It shouldn't be.Username123456 wrote:Lol its sooo slowpetapan wrote:Thanks man! This script REALLY works!
43nînjâ17- Posts : 89
Reputation : 6
Join date : 2010-08-29
Location : Behind you
Similar topics
» Ninja's Command Script
» CP Bot Script/with Command *POST LINK IF YOU KNOW ANY!*
» Improve Command Bot
» CP Bot Script/with Command *POST LINK IF YOU KNOW ANY!*
» Improve Command Bot
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Tue Feb 05, 2019 5:36 am by Gizmo92883
» Anybody else come to this forum for the memories?
Tue Jun 12, 2018 12:07 am by Cooldude21
» This forum died
Thu Mar 30, 2017 11:10 pm by _Skate_
» Introduce yourselves!
Fri Jan 23, 2015 7:21 pm by Gizmo92883
» Ozzy's Bot Script
Mon May 13, 2013 8:31 am by Pig
» Goodbye BCPB Forums.
Tue Sep 18, 2012 6:37 pm by 43nînjâ17
» Follow bot script (100% Credit to Cp-Cheater )
Sun Sep 16, 2012 4:55 pm by Dentonbrooks
» Xat Main Owner Hacker
Fri Aug 17, 2012 2:32 am by 43nînjâ17
» xat message big
Sat Aug 11, 2012 12:32 am by 43nînjâ17