Skip to content

A Penguin Client Library for Club Penguin Private Servers written in Python

Notifications You must be signed in to change notification settings

turicfr/CPPS-PCL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPPS-PCL

A Penguin Client Library for Club Penguin Private Servers written in Python.

Warning: High ban risk!

Introduction

This PCL contains an API, alongside two CLI interactive modes:

1. Single-Login

A simple login with one penguin.

2. Multi-Login

A complex login with multiple penguins managed by a certain shape.

Requirements

  • Python 2.x
  • Internet connection
  • For Club Penguin Rewritten: cefpython (can be installed with: pip install cefpython3)
  • For Club Penguin Online: PyCrypto (can be installed with: pip install pycrypto, and here for Windows)
  • For Penguin Oasis: Requests (can be installed with: pip install requests)

Usage

API

TODO

Single-Login

  1. Run login.py:
python login.py [-r {yes,no,ask}] [<cpps>] [<server>] [<username>]

Options:
	-r  Remember password in the future
  1. Choose a server (if not already specified in the command line)
  2. Enter your username and password (if not already specified in the command line)
  3. Choose a server (if not already specified in the command line)
  4. Waddle on!

Multi-Login

  1. Run multi.py:
python multi.py [-r {yes,no,ask}] [<cpps>] [<server>] [<shape>]

Options:
	-r  Remember password in the future
  1. Choose a server (if not already specified in the command line)
  2. Choose a shape (if not already specified in the command line)
  3. Enter your usernames and passwords (as many as needed for the shape)
  4. Waddle on!

Supported CPPSs

Currently 14 different servers are supported, which can also be found in json/servers.json:

If you want support for a new CPPS, please open an issue regarding it.

Interactive Commands

Mode Command Parameters Description
Both help None Get all available commands.
Both help command Get help about command named command.
Single-Login only log None Toggle logging on/off.
Single-Login only log level Set logging level to level.
level must be one of the following:
  • all - Logs all messages below.
  • debug - Logs debug messages such as sent and received packets, and below.
  • info - Logs higher-level messages such as walking, talking etc., and below.
  • warning - Logs warning messages such as unhandled packets, and below.
  • error - Logs failure messages such as "Could not add item", and below (default).
  • critical - Logs fatal error messages such as "Connection lost".
Both internal None Get current internal room ID.
Single-Login only id None Get current penguin ID.
Both id penguin_name... Get ID of penguin(s) named penguin_name.
Both name None Get current penguin name.
Both name penguin_id... Get name of penguin(s) with ID penguin_id.
Both room None Get current room name.
Both room room_id Go to room with ID room_id.
Both room room_name Go to room named room_name.
Single-Login only igloo None Go to your igloo.
Both igloo penguin_id Go to igloo of penguin with ID penguin_id.
Both igloo penguin_name Go to igloo of penguin named penguin_name.
Single-Login only penguins None Get all penguins in current room.
Both color None Get current color item ID.
Both color item_id Equip color item with ID item_id.
Both head None Get current head item ID.
Both head item_id Equip head item with ID item_id.
Both face None Get current face item ID.
Both face item_id Equip face item with ID item_id.
Both neck None Get current neck item ID.
Both neck item_id Equip neck item with ID item_id.
Both body None Get current body item ID.
Both body item_id Equip body item with ID item_id.
Both hand None Get current hand item ID.
Both hand item_id Equip hand item with ID item_id.
Both feet None Get current feet item ID.
Both feet item_id Equip feet item with ID item_id.
Both pin None Get current pin item ID.
Both pin item_id Equip pin item with ID item_id.
Both background None Get current background item ID.
Both background item_id Equip background item with ID item_id.
Single-Login only clothes None Get all currently equipped item IDs.
Both clothes penguin_id... Get all currently equipped item IDs of penguin(s) with ID penguin_id.
Both clothes penguin_name... Get all currently equipped item IDs of penguin(s) named penguin_name.
Both inventory None Get current inventory.
Single-Login only buddies None Get all current buddies.
Single-Login only stamps None Get all currently earned stamps.
Single-Login only stamps penguin_id... Get all currently earned stamps by penguin(s) with ID penguin_id.
Single-Login only stamps penguin_name... Get all currently earned stamps by penguin(s) named penguin_name.
Both walk x y Walk to (x, y).
Both dance None Dance.
Both wave None Wave.
Both sit None Sit in direction South.
Both sit direction Sit in direction direction.
direction must be one of the following:
  • se - South East.
  • e - East.
  • ne - North East.
  • n - North.
  • nw - North West.
  • w - West.
  • sw - South West.
  • s - South.
Both snowball x y Throw a snowball to (x, y).
Both say message... Say message.
Both joke joke_id Tell joke with ID joke_id.
Both emote emote_id React emote with ID emote_id.
Both postcard penguin_id postcard_id Send to a penguin with ID penguin_id a postcard with ID postcard_id.
Both postcard penguin_name postcard_id Send to a penguin named penguin_name a postcard with ID postcard_id.
Both buy item_id... Buy item(s) with ID item_id.
Both ai item_id... Buy item(s) with ID item_id.
Both coins None Get current coins.
Both coins amount Earn amount coins.
Both ac amount Earn amount coins.
Both stamp stamp_id... Earn stamp(s) with ID stamp_id.
Both add_igloo igloo_id... Buy igloo(s) with ID igloo_id.
Both add_furniture furniture_id... Buy furniture(s) with ID furniture_id.
Both music music_id Set current igloo music to music_id.
Both buddy penguin_id... Send a buddy request to penguin(s) with ID penguin_id.
Both buddy penguin_name... Send a buddy request to penguin(s) named penguin_name.
Single-Login only find penguin_id... Find room of buddy/buddies with ID penguin_id.
Single-Login only find penguin_name... Find room of buddy/buddies named penguin_name.
Single-Login only follow None Get currently followed penguin.
Both follow penguin_id Follow a penguin with ID penguin_id.
Both follow penguin_name Follow a penguin named penguin_name.
Both follow penguin_id dx dy Follow a penguin with ID penguin_id with offset (dx, dy).
Both follow penguin_name dx dy Follow a penguin named penguin_name with offset (dx, dy).
Both unfollow None Stop following.
Both logout None Logout.
Both exit None Logout.
Both quit None Logout.

FAQ

I double-clicked login.py and a command prompt appeared and then closed, what should I do?

  • If the command prompt appeared for a moment and then closed, then you are probably running login.py with Python 3. Consider installing Python 2, or if you have already installed it, right-click login.py and open it with Python 2 using the "Open With..." option.
  • If the command prompt closed after taking user input, then an unexpected error occured during the login process. Try running it again in cmd.exe in order to see what happened, and if it looks like a problem, please open an issue regarding it.

Can I add all items?

Sure, you can accomplish that by writing a custom script using the API. An example can be found in the answer at Issue #3.

Can I login to a CPPS that is not listed above?

Absolutely, you can add more CPPSs yourself by editing json/servers.json.

Can I add more shapes to Multi-Login?

Of course, you can define more shapes by editing json/shapes.json.

Is autocompletion also available in Windows?

Yes, in order to get that you need PyReadline (can be installed with: pip install pyreadline).