Best Club Penguin Bots
Hello, you are not logged in. You may log in or register.
Similar topics
    Latest topics
    » Add me on discord if you want to catch up!
    Original Copybot 100% Credit To Hookbot EmptyTue Feb 05, 2019 5:36 am by Gizmo92883

    » Anybody else come to this forum for the memories?
    Original Copybot 100% Credit To Hookbot EmptyTue Jun 12, 2018 12:07 am by Cooldude21

    » This forum died
    Original Copybot 100% Credit To Hookbot EmptyThu Mar 30, 2017 11:10 pm by _Skate_

    » Introduce yourselves!
    Original Copybot 100% Credit To Hookbot EmptyFri Jan 23, 2015 7:21 pm by Gizmo92883

    » Ozzy's Bot Script
    Original Copybot 100% Credit To Hookbot EmptyMon May 13, 2013 8:31 am by Pig

    » Goodbye BCPB Forums.
    Original Copybot 100% Credit To Hookbot EmptyTue Sep 18, 2012 6:37 pm by 43nînjâ17

    » Follow bot script (100% Credit to Cp-Cheater )
    Original Copybot 100% Credit To Hookbot EmptySun Sep 16, 2012 4:55 pm by Dentonbrooks

    » Xat Main Owner Hacker
    Original Copybot 100% Credit To Hookbot EmptyFri Aug 17, 2012 2:32 am by 43nînjâ17

    » xat message big
    Original Copybot 100% Credit To Hookbot EmptySat Aug 11, 2012 12:32 am by 43nînjâ17

    Navigation
     Portal
     Index
     Memberlist
     Profile
     FAQ
     Search
    Club Penguin Events
    Advertisement

    Original Copybot 100% Credit To Hookbot

    Go down

    Original Copybot 100% Credit To Hookbot Empty Original Copybot 100% Credit To Hookbot

    Post  Ozzyozborn13 on Sun Aug 29, 2010 6:07 pm

    Heres The Origional Copybot That Hookbot Made, Its Really Laggy.

    Code:
    #!/usr/bin/perl -w

    # Program: copybot.pl
    # Author: HookBot <hookbot@gmail.com>
    # License: DO NOT DISTRIBUTE WITHOUT PRIOR WRITTEN CONSENT FROM THE AUTHOR.
    # Copyright (C) 2008-2009
    # Usage: copybot.pl <BotName> <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 Util => (); # get_input

    package CopyBot;

    use strict;
    use warnings;
    our @ISA = qw(ClubPenguin);

    # Initialize
    $ClubPenguin::internal_room ||= {};


    my $o = new CopyBot {
      username => (shift || Util::get_input("Bot Name: ", "BotMan")),
      password => (shift || Util::get_input("Password: ", "kcW9xW0jIald7")),
      server  => (shift || Util::get_input("Server:  ", "Icicle")),
    };

    # Who to copy
    our $target = (shift || Util::get_input("Penguin Name To Follow: ", ""));
    # Whether or not to allow copying anyone that says "follow"
    our $target_follow = $target ? 0 : 1;

    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("HEY $who YOU RULE!");
      $self->doBuddyAccept($PenguinID);
    }

    sub handleSendPosition {
      my $self = shift;
      $self->SUPER::handleSendPosition(@_);
      my $room_id_internal = shift;
      my $PenguinID = shift;
      my $x = shift;
      my $y = shift;
      if (my $u = $self->{penguin}->{$PenguinID}) {
        $u->{update} = time;
        my $who = $u->{name};
        if ($target and $who =~ /$target/i) {
          select(undef,undef,undef,0.75);
          $self->doSendPosition($x,$y);
        }
      }
    }

    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("Well hello there $who!");
        } 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});
          }
        }
      }
    }

    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 handleRemovePlayerFromRoom {
      my $self = shift;
      shift; # Not sure what that -1 pooo is for...
      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";
        if ($target and $who =~ /$target/i) {
          select(undef,undef,undef,0.25);
          $self->doSendThrowBall($x,$y);
        }
      }
    }
    Ozzyozborn13
    Ozzyozborn13
    Admin

    Posts : 211
    Reputation : 19
    Join date : 2010-08-28

    https://www.youtube.com/ozzyozborn13

    Back to top Go down

    Original Copybot 100% Credit To Hookbot Empty Re: Original Copybot 100% Credit To Hookbot

    Post  Guest on Fri Mar 11, 2011 11:55 pm

    Make it as a download

    Guest
    Guest


    Back to top Go down

    Original Copybot 100% Credit To Hookbot Empty Re: Original Copybot 100% Credit To Hookbot

    Post  Ozzyozborn13 on Sat Mar 12, 2011 1:40 pm

    Dentonbrooks wrote:Make it as a download
    No,i only did that because my script was too big to post.

    _________________
    [You must be registered and logged in to see this image.]



    [You must be registered and logged in to see this link.]

    [You must be registered and logged in to see this link.]



    [You must be registered and logged in to see this link.]
    Ozzyozborn13
    Ozzyozborn13
    Admin

    Posts : 211
    Reputation : 19
    Join date : 2010-08-28

    https://www.youtube.com/ozzyozborn13

    Back to top Go down

    Original Copybot 100% Credit To Hookbot Empty Re: Original Copybot 100% Credit To Hookbot

    Post  Sponsored content


    Sponsored content


    Back to top Go down

    Back to top

    - Similar topics

     
    Permissions in this forum:
    You cannot reply to topics in this forum