Where can I get PCL/PCL R-4?[LINKS FIXED]

Re: Where can I get PCL/PCL R-4?

Postby Charles » Sun Jul 26, 2009 6:51 am

Charles wrote:
South Pole wrote:
Charles wrote:
South Pole wrote:@Stanley
I have tried several times, and I just did again. Any other ideas?

Sorry, could you try again now?


Still same error.


Could you move all the files in your Downloads folder to another folder and try again?



Sorry, thats wrong, the Archive was corrupted, I don't know why I could open it. I have reuploaded a fixed one.
Image

If I helped you,donate some points to me :)
User avatar
Charles
Coder
Coder
 
Posts: 397
Joined: Sun Jul 05, 2009 4:47 am
Cash on hand: 671.74
Bank: 54,927.19
Programming Skills: C++, PHP, Java, Perl

Re: Where can I get PCL/PCL R-4?

Postby ps34eva123 » Sun Jul 26, 2009 6:55 am

config.ini
Code: Select all
;Config file for PCL/R-4

[OS]
;Remove the ; from the start of the line which is your OS.

OS = "Windows"
;OS = "Linux"
;OS = "Mac"

[Graphics]
;Effects MUST be set to 0 for Windows

effects = 0;
;effects = 1;

[Miscellaneous]
;The playerdb feature is VERY unstable, we reccomend turning it OFF for just now.
playerdb = 0


emoticon.ini

Code: Select all
; Pickle: The Penguin Client Library

; This emoticon data file contains the emoticon lookup table

; $Id $

1 = ":D"
2 = ":)"
3 = ":|"
4 = ":("
5 = ":O"
6 = ":P"
7 = ";)"
8 = "sick"
9 = ":@"
10 = ":'("
11 = "skull"
12 = "heart"
13 = "coffee"
16 = "flower"
17 = "clover"
18 = "joystick"
22 = "sun"
24 = "pizza"



gnu.license

Code: Select all
         GNU LESSER GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


  This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

  0. Additional Definitions.

  As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

  "The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

  An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

  A "Combined Work" is a work produced by combining or linking an
Application with the Library.  The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

  The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

  The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

  1. Exception to Section 3 of the GNU GPL.

  You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

  2. Conveying Modified Versions.

  If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

   a) under this License, provided that you make a good faith effort to
   ensure that, in the event an Application does not supply the
   function or data, the facility still operates, and performs
   whatever part of its purpose remains meaningful, or

   b) under the GNU GPL, with none of the additional permissions of
   this License applicable to that copy.

  3. Object Code Incorporating Material from Library Header Files.

  The object code form of an Application may incorporate material from
a header file that is part of the Library.  You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

   a) Give prominent notice with each copy of the object code that the
   Library is used in it and that the Library and its use are
   covered by this License.

   b) Accompany the object code with a copy of the GNU GPL and this license
   document.

  4. Combined Works.

  You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

   a) Give prominent notice with each copy of the Combined Work that
   the Library is used in it and that the Library and its use are
   covered by this License.

   b) Accompany the Combined Work with a copy of the GNU GPL and this license
   document.

   c) For a Combined Work that displays copyright notices during
   execution, include the copyright notice for the Library among
   these notices, as well as a reference directing the user to the
   copies of the GNU GPL and this license document.

   d) Do one of the following:

       0) Convey the Minimal Corresponding Source under the terms of this
       License, and the Corresponding Application Code in a form
       suitable for, and under terms that permit, the user to
       recombine or relink the Application with a modified version of
       the Linked Version to produce a modified Combined Work, in the
       manner specified by section 6 of the GNU GPL for conveying
       Corresponding Source.

       1) Use a suitable shared library mechanism for linking with the
       Library.  A suitable mechanism is one that (a) uses at run time
       a copy of the Library already present on the user's computer
       system, and (b) will operate properly with a modified version
       of the Library that is interface-compatible with the Linked
       Version.

   e) Provide Installation Information, but only if you would otherwise
   be required to provide such information under section 6 of the
   GNU GPL, and only to the extent that such information is
   necessary to install and execute a modified version of the
   Combined Work produced by recombining or relinking the
   Application with a modified version of the Linked Version. (If
   you use option 4d0, the Installation Information must accompany
   the Minimal Corresponding Source and Corresponding Application
   Code. If you use option 4d1, you must provide the Installation
   Information in the manner specified by section 6 of the GNU GPL
   for conveying Corresponding Source.)

  5. Combined Libraries.

  You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

   a) Accompany the combined library with a copy of the same work based
   on the Library, uncombined with any other library facilities,
   conveyed under the terms of this License.

   b) Give prominent notice with the combined library that part of it
   is a work based on the Library, and explaining where to find the
   accompanying uncombined form of the same work.

  6. Revised Versions of the GNU Lesser General Public License.

  The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

  Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

  If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.



items.ini

Code: Select all
; Pickle: The Penguin Client Library

; This item data file contains information on every item

; $Id $

[1]
type = "Colour"
price = 20
desc = "Blue"

[2]
type = "Colour"
price = 20
desc = "Green"

[3]
type = "Colour"
price = 20
desc = "Pink"

[4]
type = "Colour"
price = 20
desc = "Black"

[5]
type = "Colour"
price = 20
desc = "Red"

[6]
type = "Colour"
price = 20
desc = "Orange"

[7]
type = "Colour"
price = 20
desc = "Yellow"

[8]
type = "Colour"
price = 20
desc = "Dark Purple"

[9]
type = "Colour"
price = 20
desc = "Brown"

[10]
type = "Colour"
price = 20
desc = "Peach"

[11]
type = "Colour"
price = 20
desc = "Dark Green"

[12]
type = "Colour"
price = 20
desc = "Light Blue"

[13]
type = "Colour"
price = 20
desc = "Lime Green"

[14]
type = "Colour"
price = 20
desc = "Lavender"

[101]
type = "Face"
price = 200
desc = "Black Sunglasses"

[102]
type = "Face"
price = 1000
desc = "Night Vision"

[103]
type = "Face"
price = 50
desc = "3D Glasses"

[105]
type = "Face"
price = 0
desc = "Eyepatch"

[106]
type = "Face"
price = 100
desc = "Superhero Mask"

[107]
type = "Face"
price = 0
desc = "Blue Sunglasses"

[108]
type = "Face"
price = 150
desc = "Blue Sunglasses"

[109]
type = "Face"
price = 0
desc = "Free Red Sunglasses"

[110]
type = "Face"
price = 150
desc = "Red Sunglasses"

[112]
type = "Face"
price = 0
desc = "Funny-Face Glasses"

[113]
type = "Face"
price = 225
desc = "Black Glasses"

[114]
type = "Face"
price = 225
desc = "Brown Glasses"

[116]
type = "Face"
price = 200
desc = "Snowflake Mask"

[117]
type = "Face"
price = 200
desc = "Trendy Sunglasses"

[119]
type = "Face"
price = 160
desc = "Monocle"

[121]
type = "Face"
price = 0
desc = "Green Sunglasses"

[130]
type = "Face"
price = 75
desc = "Earring"

[131]
type = "Face"
price = 200
desc = "Snorkel"

[132]
type = "Face"
price = 250
desc = "Blue Snorkel"

[133]
type = "Face"
price = 0
desc = "Red Face Paint"

[134]
type = "Face"
price = 0
desc = "Blue Face Paint"

[136]
type = "Face"
price = 480
desc = "Ski Goggles"

[137]
type = "Face"
price = 220
desc = "Swim Goggles"

[162]
type = "Neck"
price = 0
desc = "White Beard"

[166]
type = "Neck"
price = 60
desc = "Green Bowtie"

[167]
type = "Neck"
price = 125
desc = "Green Necktie"

[168]
type = "Neck"
price = 0
desc = "Parrot"

[171]
type = "Neck"
price = 0
desc = "Hawaiian Lei"

[172]
type = "Neck"
price = 150
desc = "Scarf"

[173]
type = "Neck"
price = 0
desc = "Christmas Scarf"

[174]
type = "Neck"
price = 300
desc = "Boa"

[175]
type = "Neck"
price = 150
desc = "Pink Scarf"

[176]
type = "Neck"
price = 125
desc = "Black Tie"

[177]
type = "Neck"
price = 150
desc = "Striped Tie"

[179]
type = "Neck"
price = 150
desc = "Blue Scarf"

[180]
type = "Neck"
price = 380
desc = "Snare Drum"

[181]
type = "Neck"
price = 550
desc = "Pearl Necklace"

[182]
type = "Neck"
price = 110
desc = "Pendant"

[183]
type = "Neck"
price = 600
desc = "Bling Bling Medallion"

[184]
type = "Neck"
price = 280
desc = "Star Necklace"

[192]
type = "Neck"
price = 0
desc = "Bandana"

[193]
type = "Neck"
price = 0
desc = "Blue Lei"

[194]
type = "Neck"
price = 0
desc = "Whistle"

[201]
type = "Body"
price = 200
desc = "Red Shirt"

[202]
type = "Body"
price = 200
desc = "Blue Polo Shirt"

[205]
type = "Body"
price = 200
desc = "I Love Puffle T-Shirt"

[206]
type = "Body"
price = 150
desc = "Red Shirt"

[207]
type = "Body"
price = 0
desc = "Snowflake Shirt"

[208]
type = "Body"
price = 150
desc = "Sailor's Shirt"

[209]
type = "Body"
price = 240
desc = "Flannel Shirt"

[211]
type = "Body"
price = 250
desc = "Hawaiian Shirt"

[212]
type = "Body"
price = 200
desc = "Grass Skirt"

[214]
type = "Neck"
price = 50
desc = "Bowtie"

[215]
type = "Body"
price = 500
desc = "Life Jacket"

[216]
type = "Neck"
price = 0
desc = "Free Bowtie"

[217]
type = "Body"
price = 420
desc = "Cowboy Vest"

[218]
type = "Body"
price = 450
desc = "Quilted Vest"

[219]
type = "Body"
price = 750
desc = "Blue Coat"

[220]
type = "Hand"
price = 750
desc = "Hockey Stick"

[221]
type = "Body"
price = 400
desc = "Black Hoodie"

[222]
type = "Body"
price = 400
desc = "Pink Hoodie"

[224]
type = "Body"
price = 400
desc = "Purple Hoodie"

[225]
type = "Body"
price = 440
desc = "Turtleneck Sweater"

[226]
type = "Body"
price = 440
desc = "Turtleneck Sweater"

[230]
type = "Body"
price = 450
desc = "Orange Jumper"

[231]
type = "Body"
price = 0
desc = "Pirate Belt"

[233]
type = "Hand"
price = 975
desc = "Electric Guitar"

[234]
type = "Hand"
price = 700
desc = "Acoustic Guitar"

[235]
type = "Body"
price = 450
desc = "Raincoat"

[236]
type = "Body"
price = 350
desc = "Poncho"

[237]
type = "Body"
price = 700
desc = "Red Suede Jacket"

[238]
type = "Body"
price = 700
desc = "Pastal Suede Jacket"

[239]
type = "Body"
price = 600
desc = "Wetsuit"

[240]
type = "Body"
price = 0
desc = "Pizza Apron"

[243]
type = "Body"
price = 500
desc = "Parka"

[244]
type = "Body"
price = 600
desc = "Ghost Costume"

[246]
type = "Body"
price = 450
desc = "Skeleton"

[247]
type = "Body"
price = 450
desc = "Clown Suit"

[248]
type = "Body"
price = 460
desc = "Kimono"

[250]
type = "Body"
price = 0
desc = "Ice Cream Apron"

[252]
type = "Body"
price = 400
desc = "Pink Dress"

[253]
type = "Body"
price = 400
desc = "Purple Dress"

[254]
type = "Body"
price = 350
desc = "Red Cheerleader"

[255]
type = "Body"
price = 350
desc = "Blue Cheerleader"

[256]
type = "Body"
price = 450
desc = "Ballerina"

[257]
type = "Body"
price = 400
desc = "Spring Dress"

[258]
type = "Body"
price = 400
desc = "Pirate Dress"

[259]
type = "Body"
price = 450
desc = "Shamrock Dress"

[260]
type = "Body"
price = 580
desc = "Formal Dress"

[261]
type = "Body"
price = 650
desc = "Black Suit"

[262]
type = "Body"
price = 100
desc = "Coffee Apron"

[263]
type = "Body"
price = 100
desc = "Pizza Apron"

[265]
type = "Body"
price = 480
desc = "Fishing Vest"

[267]
type = "Body"
price = 250
desc = "Red Shorts"

[269]
type = "Body"
price = 250
desc = "Pink Swimsuit"

[270]
type = "Body"
price = 300
desc = "Purple Bikini"

[271]
type = "Body"
price = 300
desc = "Yellow Bikini"

[272]
type = "Body"
price = 250
desc = "Blue Shorts"

[273]
type = "Body"
price = 300
desc = "Aqua Bikini"

[274]
type = "Body"
price = 0
desc = "Inflatable Duck"

[275]
type = "Body"
price = 450
desc = "Overalls"

[277]
type = "Body"
price = 450
desc = "Red Jersey"

[278]
type = "Body"
price = 450
desc = "Blue Jersey"

[279]
type = "Body"
price = 550
desc = "Pink Letterman Jacket"

[280]
type = "Body"
price = 550
desc = "Green Letterman Jacket"

[281]
type = "Body"
price = 550
desc = "Black Letterman Jacket"

[282]
type = "Body"
price = 750
desc = "Lighthouse Shirt"

[283]
type = "Body"
price = 550
desc = "Pink Duffle Coat"

[284]
type = "Body"
price = 350
desc = "Elf Suit"

[285]
type = "Body"
price = 350
desc = "Admiral Jacket"

[286]
type = "Body"
price = 640
desc = "Flamenco Dress"

[287]
type = "Body"
price = 520
desc = "Matador Outfit"

[291]
type = "Body"
price = 560
desc = "Leprechaun Tuxedo"

[292]
type = "Body"
price = 0
desc = "Green Duck"

[293]
type = "Body"
price = 600
desc = "Tuba"

[294]
type = "Body"
price = 800
desc = "Tuxedo"

[295]
type = "Body"
price = 650
desc = "Captain's Coat"

[297]
type = "Body"
price = 180
desc = "Lifeguard Shirt"

[298]
type = "Body"
price = 480
desc = "Sport Life Jacket"

[299]
type = "Body"
price = 380
desc = "Firefighter Jacket"

[301]
type = "Neck"
price = 500
desc = "Superhero Cape"

[302]
type = "Neck"
price = 500
desc = "Blue Cape"

[303]
type = "Neck"
price = 550
desc = "Black Cape"

[304]
type = "Neck"
price = 0
desc = "Lime Green Cape"

[306]
type = "Neck"
price = 410
desc = "Red Backpack"

[307]
type = "Neck"
price = 290
desc = "Messenger Bag"

[308]
type = "Neck"
price = 480
desc = "Scuba Tank"

[310]
type = "Neck"
price = 400
desc = "Fairy Wings"

[313]
type = "Neck"
price = 670
desc = "Hiking Backpack"

[322]
type = "Hand"
price = 175
desc = "Gold Wristwatch"

[323]
type = "Hand"
price = 80
desc = "Wrist Watch"

[325]
type = "Hand"
price = 0
desc = "Water Wings"

[327]
type = "Hand"
price = 150
desc = "Lasso"

[329]
type = "Hand"
price = 120
desc = "Pompom"

[332]
type = "Hand"
price = 150
desc = "Magic Wand"

[334]
type = "Hand"
price = 170
desc = "Cane"

[335]
type = "Hand"
price = 0
desc = "Maracas"

[338]
type = "Hand"
price = 975
desc = "Black Electric Guitar"

[339]
type = "Hand"
price = 0
desc = "Friendship Bracelet"

[340]
type = "Hand"
price = 120
desc = "Drumsticks"

[341]
type = "Hand"
price = 100
desc = "Flower Basket"

[343]
type = "Hand"
price = 450
desc = "Violin"

[344]
type = "Hand"
price = 0
desc = "Life Ring"

[345]
type = "Hand"
price = 0
desc = "Blue Water Wings"

[346]
type = "Hand"
price = 0
desc = "Fishing Rod"

[347]
type = "Hand"
price = 120
desc = "Flashlight"

[351]
type = "Feet"
price = 400
desc = "Leather Shoes"

[352]
type = "Feet"
price = 250
desc = "Black Sneakers"

[353]
type = "Feet"
price = 180
desc = "Ballet Shoes"

[354]
type = "Feet"
price = 300
desc = "Clown Shoes"

[355]
type = "Feet"
price = 5
desc = "Cement Shoes"

[357]
type = "Feet"
price = 330
desc = "Blue Sneakers"

[358]
type = "Feet"
price = 420
desc = "Black Dress Shoes"

[361]
type = "Feet"
price = 300
desc = "Snowshoes"

[362]
type = "Feet"
price = 250
desc = "Scuba Flippers"

[363]
type = "Feet"
price = 150
desc = "Yellow Sandals"

[364]
type = "Feet"
price = 225
desc = "Blue Flippers"

[365]
type = "Feet"
price = 450
desc = "Winter Boots"

[366]
type = "Feet"
price = 200
desc = "Bunny Slippers"

[368]
type = "Feet"
price = 300
desc = "Cowboy Boots"

[369]
type = "Feet"
price = 0
desc = "Ice Skates"

[370]
type = "Feet"
price = 250
desc = "Elf Shoes"

[371]
type = "Feet"
price = 320
desc = "Skateboard"

[372]
type = "Feet"
price = 325
desc = "Hiking Boots"

[373]
type = "Feet"
price = 280
desc = "Rubber Boots"

[374]
type = "Feet"
price = 0
desc = "Pirate Boots"

[375]
type = "Feet"
price = 200
desc = "Pink Sandals"

[376]
type = "Feet"
price = 200
desc = "Brown Sandals"

[377]
type = "Feet"
price = 260
desc = "Blue Rollerskates"

[378]
type = "Feet"
price = 260
desc = "Pink Rollerskates"

[401]
type = "Head"
price = 300
desc = "Sombrero"

[402]
type = "Head"
price = 0
desc = "Black Toque"

[403]
type = "Head"
price = 50
desc = "Hard Hat"

[404]
type = "Head"
price = 250
desc = "Cowboy Hat"

[405]
type = "Head"
price = 200
desc = "Baseball Cap"

[406]
type = "Head"
price = 200
desc = "Pink Ball Cap"

[407]
type = "Head"
price = 0
desc = "Propellor Cap"

[408]
type = "Head"
price = 50
desc = "Flower Hat"

[409]
type = "Head"
price = 100
desc = "Graduation Cap"

[410]
type = "Head"
price = 450
desc = "Small Crown"

[411]
type = "Head"
price = 350
desc = "Festive Sombrero"

[412]
type = "Head"
price = 200
desc = "Tiara"

[413]
type = "Head"
price = 0
desc = "Party Hat"

[414]
type = "Head"
price = 0
desc = "Santa Hat"

[415]
type = "Head"
price = 200
desc = "Pilgrim Hat"

[417]
type = "Head"
price = 225
desc = "Brown Fedora"

[418]
type = "Head"
price = 0
desc = "Pink Toque"

[419]
type = "Head"
price = 600
desc = "Russian Hat"

[420]
type = "Head"
price = 75
desc = "Black Toque"

[421]
type = "Head"
price = 75
desc = "Pink Toque"

[422]
type = "Head"
price = 50
desc = "Newspaper Hat"

[423]
type = "Head"
price = 350
desc = "Top Hat"

[424]
type = "Head"
price = 50
desc = "Chef Hat"

[425]
type = "Head"
price = 0
desc = "Lucky Hat"

[426]
type = "Head"
price = 250
desc = "Jester Hat"

[427]
type = "Head"
price = 0
desc = "Easter Bunny Hat"

[428]
type = "Head"
price = 0
desc = "Tour Guide Hat"

[429]
type = "Head"
price = 0
desc = "Miners Helmet"

[431]
type = "Head"
price = 0
desc = "Blue Propellor Cap"

[432]
type = "Head"
price = 250
desc = "Safari Hat"

[433]
type = "Head"
price = 250
desc = "Black Cowboy Hat"

[434]
type = "Head"
price = 250
desc = "Pink Cowgirl Hat"

[435]
type = "Head"
price = 200
desc = "Red Ball Cap"

[436]
type = "Head"
price = 200
desc = "Blue Ball Cap"

[437]
type = "Head"
price = 200
desc = "Straw Hat"

[439]
type = "Head"
price = 210
desc = "Park Ranger Hat"

[440]
type = "Head"
price = 0
desc = "Sailor's Cap"

[441]
type = "Head"
price = 400
desc = "Admiral's Hat"

[443]
type = "Head"
price = 0
desc = "Wizard Hat"

[444]
type = "Head"
price = 0
desc = "1st Year Party Hat"

[445]
type = "Head"
price = 120
desc = "Green Toque"

[446]
type = "Head"
price = 220
desc = "Fishing Hat"

[447]
type = "Head"
price = 150
desc = "Elf Hat"

[448]
type = "Head"
price = 550
desc = "Winter Cape"

[449]
type = "Head"
price = 350
desc = "Fruit Headdress"

[450]
type = "Head"
price = 180
desc = "Earflap Cap"

[451]
type = "Head"
price = 800
desc = "Roman Helmet"

[452]
type = "Head"
price = 750
desc = "Viking Helmet"

[453]
type = "Head"
price = 550
desc = "Football Helmet"

[454]
type = "Head"
price = 350
desc = "Bike Helmet"

[455]
type = "Head"
price = 650
desc = "Pink Viking Helmet"

[456]
type = "Head"
price = 1200
desc = "Blue Viking Helmet"

[457]
type = "Head"
price = 650
desc = "Divers Helmet"

[460]
type = "Head"
price = 1500
desc = "Gold Viking Helmet"

[461]
type = "Head"
price = 220
desc = "Hockey Helmet"

[462]
type = "Head"
price = 360
desc = "Red Football Helmet"

[463]
type = "Head"
price = 360
desc = "Blue Football Helmet"

[464]
type = "Head"
price = 400
desc = "Snowboard Helmet"

[465]
type = "Head"
price = 130
desc = "Firefighter Hat"

[466]
type = "Head"
price = 0
desc = "Angel Halo"

[468]
type = "Head"
price = 200
desc = "Alien Antenna"

[469]
type = "Head"
price = 0
desc = "Umbrella Hat"

[470]
type = "Head"
price = 280
desc = "Feathered Hat"

[474]
type = "Head"
price = 210
desc = "Clown Wig"

[481]
type = "Head"
price = 350
desc = "Headphones"

[483]
type = "Head"
price = 250
desc = "Blue Earmuffs"

[484]
type = "Head"
price = 250
desc = "Pink Earmuffs"

[488]
type = "Head"
price = 100
desc = "Head Band"

[490]
type = "Head"
price = 0
desc = "Pirate Bandana"

[491]
type = "Head"
price = 0
desc = "Ice Crown"

[492]
type = "Head"
price = 300
desc = "Floppy Hat"

[493]
type = "Head"
price = 350
desc = "Tricorn Hat"

[494]
type = "Head"
price = 250
desc = "Golf Hat"

[495]
type = "Head"
price = 360
desc = "Marching Band Hat"

[496]
type = "Head"
price = 0
desc = "Blue Bunny Ears"

[497]
type = "Head"
price = 0
desc = "Sailor Hat"

[498]
type = "Head"
price = 0
desc = "Puffle Bandana"

[499]
type = "Head"
price = 0
desc = "Flower Headdress"

[500]
type = "Flag"
price = 20
desc = "Canada"

[501]
type = "Flag"
price = 20
desc = "USA"

[502]
type = "Flag"
price = 20
desc = "Australia"

[503]
type = "Flag"
price = 20
desc = "United Kingdom"

[504]
type = "Flag"
price = 20
desc = "Belgium"

[505]
type = "Flag"
price = 20
desc = "Brazil"

[506]
type = "Flag"
price = 20
desc = "China"

[507]
type = "Flag"
price = 20
desc = "Denmark"

[508]
type = "Flag"
price = 20
desc = "Finland"

[509]
type = "Flag"
price = 20
desc = "France"

[510]
type = "Flag"
price = 20
desc = "Germany"

[511]
type = "Flag"
price = 20
desc = "Israel"

[512]
type = "Flag"
price = 20
desc = "Japan"

[513]
type = "Flag"
price = 20
desc = "Korea"

[514]
type = "Flag"
price = 20
desc = "Neatherlands"

[515]
type = "Flag"
price = 20
desc = "Norway"

[516]
type = "Flag"
price = 20
desc = "Poland"

[517]
type = "Flag"
price = 20
desc = "Russia"

[518]
type = "Flag"
price = 20
desc = "Spain"

[519]
type = "Flag"
price = 20
desc = "Sweden"

[520]
type = "Flag"
price = 20
desc = "Switzerland"

[521]
type = "Flag"
price = 20
desc = "Turkey"

[522]
type = "Flag"
price = 20
desc = "Mexico"

[523]
type = "Flag"
price = 20
desc = "New Zealand"

[524]
type = "Flag"
price = 20
desc = "Ireland"

[525]
type = "Flag"
price = 20
desc = "Portugal"

[526]
type = "Flag"
price = 20
desc = "South Africa"

[527]
type = "Flag"
price = 20
desc = "India"

[528]
type = "Flag"
price = 20
desc = "Italy"

[529]
type = "Flag"
price = 20
desc = "Belize"

[530]
type = "Flag"
price = 20
desc = "Egypt"

[531]
type = "Flag"
price = 20
desc = "Hungary"

[532]
type = "Flag"
price = 20
desc = "Antarctica"

[533]
type = "Flag"
price = 20
desc = "Argentina"

[534]
type = "Flag"
price = 20
desc = "Jamaica"

[550]
type = "Flag"
price = 0
desc = "Shamrock"

[551]
type = "Flag"
price = 0
desc = "Music Note"

[552]
type = "Flag"
price = 0
desc = "Plant"

[553]
type = "Flag"
price = 0
desc = "Pizza Slice"

[554]
type = "Flag"
price = 0
desc = "Balloon"

[555]
type = "Flag"
price = 0
desc = "Mining Lantern"

[556]
type = "Flag"
price = 0
desc = "Beach Ball"

[557]
type = "Flag"
price = 0
desc = "Sun"

[558]
type = "Flag"
price = 0
desc = "Horse Shoe"

[559]
type = "Flag"
price = 0
desc = "Astro"

[560]
type = "Flag"
price = 0
desc = "Hockey"

[561]
type = "Flag"
price = 0
desc = "Soccer"

[562]
type = "Flag"
price = 0
desc = "Pencil"

[563]
type = "Flag"
price = 0
desc = "Lighthouse"

[564]
type = "Flag"
price = 0
desc = "Telescope"

[565]
type = "Flag"
price = 0
desc = "Pirate Flag"

[566]
type = "Flag"
price = 0
desc = "Pumpkin"

[567]
type = "Flag"
price = 0
desc = "Jet Pack"

[568]
type = "Flag"
price = 0
desc = "Life Ring"

[569]
type = "Flag"
price = 0
desc = "Bonfire"

[570]
type = "Flag"
price = 50
desc = "Christmas Tree Pin"

[571]
type = "Flag"
price = 0
desc = "Candy Cane"

[572]
type = "Flag"
price = 0
desc = "Apple"

[573]
type = "Flag"
price = 0
desc = "Cactus"

[574]
type = "Flag"
price = 0
desc = "Teddy Bear"

[575]
type = "Flag"
price = 0
desc = "Ice Block"

[576]
type = "Flag"
price = 0
desc = "Shrimp Pin"

[577]
type = "Flag"
price = 0
desc = "Pot of Gold"

[578]
type = "Flag"
price = 0
desc = "Cardboard Box"

[579]
type = "Flag"
price = 0
desc = "Microphone"

[580]
type = "Flag"
price = 0
desc = "Gem"

[581]
type = "Flag"
price = 0
desc = "Tulip"

[582]
type = "Flag"
price = 0
desc = "Starfish"

[583]
type = "Flag"
price = 0
desc = "Surfboard"

[584]
type = "Flag"
price = 0
desc = "Picnic Basket"

[585]
type = "Flag"
price = 0
desc = "Water Droplet"

[586]
type = "Flag"
price = 0
desc = "Cart"

[587]
type = "Flag"
price = 0
desc = "Butterfly"

[588]
type = "Flag"
price = 0
desc = "Tent"

[750]
type = "Hand"
price = 0
desc = "Blue Puffle"

[751]
type = "Hand"
price = 0
desc = "Pink Puffle"

[752]
type = "Hand"
price = 0
desc = "Black Puffle"

[753]
type = "Hand"
price = 0
desc = "Green Puffle"

[754]
type = "Hand"
price = 0
desc = "Purple Puffle"

[755]
type = "Hand"
price = 0
desc = "Red Puffle"

[800]
type = "Other"
price = 0
desc = "Spy Phone"

[801]
type = "Other"
price = 0
desc = "Mission 1 Medal"

[802]
type = "Other"
price = 0
desc = "Letter from Aunt Arctic"

[803]
type = "Other"
price = 0
desc = "Mission 2 Medal"

[804]
type = "Other"
price = 0
desc = "Letter from G"

[805]
type = "Other"
price = 0
desc = "Mission 3 Medal"

[806]
type = "Other"
price = 0
desc = "Card from Dancing Penguin"

[807]
type = "Other"
price = 0
desc = "Forest Map"

[808]
type = "Other"
price = 0
desc = "Mission 4 Medal"

[809]
type = "Other"
price = 0
desc = "Handy Penguin Award"

[901]
type = "Photo"
price = 60
desc = "Heart Background"

[902]
type = "Photo"
price = 60
desc = "Flower Background"

[903]
type = "Photo"
price = 60
desc = "Nightime Background"

[904]
type = "Photo"
price = 60
desc = "Clouds Background"

[905]
type = "Photo"
price = 60
desc = "Cut-out Background"

[906]
type = "Photo"
price = 60
desc = "Target Background"

[907]
type = "Photo"
price = 60
desc = "Camo Background"

[908]
type = "Photo"
price = 60
desc = "Lined Paper Background"

[909]
type = "Photo"
price = 60
desc = "Pink Hawaiian Background"

[910]
type = "Photo"
price = 60
desc = "Blue Hawaiian Background"

[911]
type = "Photo"
price = 60
desc = "Oasis Background"

[912]
type = "Photo"
price = 60
desc = "Beach Background"

[913]
type = "Photo"
price = 60
desc = "Western Sunset Background"

[914]
type = "Photo"
price = 60
desc = "Corral Background"

[915]
type = "Photo"
price = 60
desc = "Saloon Background"

[916]
type = "Photo"
price = 60
desc = "Stage Coach Background"

[917]
type = "Photo"
price = 60
desc = "Band Background"

[918]
type = "Photo"
price = 60
desc = "Soccer Background"

[919]
type = "Photo"
price = 60
desc = "Hockey Background"

[920]
type = "Photo"
price = 60
desc = "Basketball Background"

[921]
type = "Photo"
price = 60
desc = "Gymnastic Background"

[922]
type = "Photo"
price = 60
desc = "Blue Vines Background"

[923]
type = "Photo"
price = 60
desc = "Brick Background"

[924]
type = "Photo"
price = 60
desc = "Underwater Background"

[925]
type = "Photo"
price = 60
desc = "Puffle Background"

[926]
type = "Photo"
price = 60
desc = "Lighthouse Background"

[927]
type = "Photo"
price = 60
desc = "Autumn Leaves Background"

[928]
type = "Photo"
price = 60
desc = "Pumpkin Patch Background"

[929]
type = "Photo"
price = 60
desc = "Igloo Background"

[930]
type = "Photo"
price = 60
desc = "Launchpad Background"

[931]
type = "Photo"
price = 60
desc = "Zigzag Background"

[932]
type = "Photo"
price = 60
desc = "Winter Background"

[933]
type = "Photo"
price = 60
desc = "Gift Wrap Background"

[934]
type = "Photo"
price = 60
desc = "Christmas Background"

[935]
type = "Photo"
price = 60
desc = "Snowflakes Background"

[936]
type = "Photo"
price = 60
desc = "Ice Fishing Background"

[937]
type = "Photo"
price = 60
desc = "Disco Background"

[938]
type = "Photo"
price = 60
desc = "Mexican Background"

[939]
type = "Photo"
price = 60
desc = "Aurora Background"

[940]
type = "Photo"
price = 60
desc = "Snowman Background"

[941]
type = "Photo"
price = 60
desc = "Lace Background"

[942]
type = "Photo"
price = 60
desc = "Melting Background"

[943]
type = "Photo"
price = 60
desc = "Springtime Background"

[944]
type = "Photo"
price = 60
desc = "Pizza Splat Background"

[945]
type = "Photo"
price = 60
desc = "Sea Monster Background"

[946]
type = "Photo"
price = 60
desc = "Music Score Background"

[947]
type = "Photo"
price = 60
desc = "Piano Keys Background"

[948]
type = "Photo"
price = 60
desc = "Instruments Background"

[949]
type = "Photo"
price = 60
desc = "Bookshelves Background"

[950]
type = "Photo"
price = 60
desc = "Balloon Arch Background"

[951]
type = "Photo"
price = 60
desc = "Ballistic Biscuit Background"

[952]
type = "Photo"
price = 60
desc = "Picnic Background"

[953]
type = "Photo"
price = 60
desc = "Surfboards Background"

[954]
type = "Photo"
price = 60
desc = "Fish Background"

[955]
type = "Photo"
price = 60
desc = "Campfire Background"

[956]
type = "Photo"
price = 60
desc = "Jigsaw Background"

[957]
type = "Photo"
price = 60
desc = "Water Balloon Background"

[958]
type = "Photo"
price = 60
desc = "Splash Background"

[959]
type = "Photo"
price = 60
desc = "Rockhopper Background"

[960]
type = "Photo"
price = 60
desc = "Map Background"

[961]
type = "Photo"
price = 60
desc = "Tent Background"

[962]
type = "Photo"
price = 60
desc = "Lemonade Stand Background"

[963]
type = "Photo"
price = 60
desc = "Fireflies Background"

[964]
type = "Photo"
price = 60
desc = "Camping Background"

[442]
type = "Head"
price = 0
desc = "Pirate Hat"

[152]
type = "Face"
price = 0
desc = "Rockhopper's Eyebrows"

[161]
type = "Neck"
price = 0
desc = "Rockhopper's Beard"





Jokes.ini


Code: Select all
; Pickle: The Penguin Client Library

; This safe chat data file contains the words for the safe chat

; $Id $

[1]
question = "What's the best way to catch a fish?"
answer = "Have someone throw it at you"

[2]
question = "What bird can write underwater?"
answer = "A ball point PENguin!"

[3]
question = "What's black and white and goes round and round?"
answer = "A penguin in a revolving door"

[4]
question = "Why don't you see Penguins in Britain?"
answer = "Because they're afraid of Wales"

[5]
question = "What do you call a penguin in the desert?"
answer = "Lost"

[6]
question = "Why are penguins so popular on the Internet?"
answer = "Because they have Web feet!"

[7]
question = "How does a penguin build its house?"
answer = "Igloos it together"

[8]
question = "Why are igloos round?"
answer = "So that penguins can't hide in the corners"

[9]
question = "What is a penguin's favourite party game?"
answer = "Sardines"

[10]
question = "How do you communicate with a fish?"
answer = "You drop him a line"

[11]
question = "What do Penguins sing on a birthday?"
answer = "Freeze a jolly good fellow"

[12]
question = "Why is it so easy to weigh fish?"
answer = "They have their own scales"

[13]
question = "What lies at the bottom of the sea and shakes?"
answer = "A nervous wreck!"

[14]
question = "Why do penguins eat fish?"
answer = "Because donuts get soggy before they can catch them"

[15]
question = "What do you call a fish with no eyes?"
answer = "FSH"



library.php

Code: Select all
<?php
$config = parse_ini_file("config.ini", true);
$globservers = parse_ini_file('servers.ini', true);
$rooms = parse_ini_file('rooms.ini', true);
$items = parse_ini_file('items.ini', true);
$safechat = parse_ini_file('safechat.ini', true);
$emoticons = parse_ini_file('emoticon.ini', true);
/**
* The Penguin Client Library R-4 Class.  PCL, the Penguin Client System is an extension of this class.
*/
class PCL{
        public $config;// = parse_ini_file("config.ini", true);
        public $xpos = 0;
        public $ypos = 0;
        public $room = 0;
   public $server = -1;
   public $servers;
        public $roomlist;
        public $itemlist;
   public $sock;
   public $status = 0;
   public $player = 0; // Can we make a Player class?
   public $key = '';
   public $players = array();
   public $_events = array();
   public $run = false;
        public $safelist;
        public $emotes;
        public $emotesend;
    /**
     *  //This is the constructor of the Pickle Class. It Parses the ini file containing the server list.
     * @global mixed $server
     * @global array $globservers
     */
        function start($block = true, $ticktime = 1){
            if($block){
                $time = time() + 1;
      while($this->run)
      {
         $this->process_packets();
                        if(time() > $time || $ticktime = -1){
                            $this->raise_event('tick', array());
                        }
         
      }
      fclose($this->sock);
            }
        }


   function __construct(){
                global $config;
                $this->config =& $config;
      errordb();
      //stream_set_blocking(STDIN, FALSE);
      global $globservers, $rooms, $items, $safechat;
      $this->servers =& $globservers;
      $globservers = $this->servers;
                $this->roomlist =& $rooms;
                $this->itemlist =& $items;
                $this->safelist =& $safechat;
               

   }

       
   function server_id($name){
      foreach ($this->servers as $value => $server){
         if ($server['name'] == $name){
            return $value;
         }
      }
      return -1;
   }
   function server_name($id){
      foreach ($this->servers as $value){
         if(array_key_exists($id, $this->servers)) {
            return $this->servers[$id]['name'] . "";
         }
      }
                return "-1";
   }

        function print_server_data(){
              foreach($this->serverlist as $key => $serverobject){
                 if($this->server_name($key) == -1){
                     if($serverobject < 2)
                     echo "Server: " . $key . " is " . $serverobject . " sixth full.\n";
                     else
                     echo "Server: " . $key . " is " . $serverobject . " sixths full.\n";
                 }
                 else{
                     if($serverobject < 2)
                     echo "Server: \"" . $this->server_name($key) . "\" is " . $serverobject . " sixth full.\n";
                     else
                     echo "Server: \"" . $this->server_name($key) . "\" is " . $serverobject . " sixths full.\n";
                 }

             }
        }

        function joinGame($roomID) {
      $this->sendRawPacket("%xt%s%j#jr%" . $this->intRoomID . "%" . $roomID . "%0%0%");
      $data = fread($this->sock, 8192);
      while (!(stripos($data, "xt%jg%"))) {
         $data = fread($this->sock, 8192);
      }
      $this->intRoomID = $this->stribet($data, "%xt%jg%", "%");
      $this->extRoomID = $this->stribet($data, "%xt%jg%" . $this->intRoomID . "%", "%");
   }
        /**
         *  Variable for storing External var data.
         */

        /*private $data = array();


        /**
         * Handling of external getting of a class variable.
         *
        public function __get($member) {
            if (isset($this->{$member})) {
                return $this->{$member};
            }
        }

        /**
         * Handling of external setting of a class variable.
         *
        public function __set($member, $value) {
            // The ID of the dataset is read-only
            if ($member == "PlayerID" || $member == "xpos" || $member == "ypos" ) {
                return;
            }
            if (isset($this->{$member})) {
                $this->{$member} = $value;
            }
        }*/


       /**
        * The loginPort function calculates the correct port to use on login.
        * @param String Username
        * @return Integer  Login Port
        */
   function loginPort($Username){
      return (ord($Username)%2) ? 3724 : 6112;
   }

        function generate_key($password, $rand_key, $isLogin = false){ //Returns the login key
      if($isLogin) {
                                global $pclkey;
                                $stringtoencode = "http://www.penguinclient.co.cc/PCLKEY.php?PCLKEY=" . $pclkey . "&PASSWORD=" . $password . "&RANDKEY=" . $rand_key;
                                $key = file_get_contents($stringtoencode);

                                if(!stripos($key, "RROR:")){

                                    $key = $this->stribet($key, "<K \\>", "<EK \\>");

                                    return($key);
                                }
                                else{
                                    echo "ERROR: " . $key;
                                die();
                                }
      }
      else{
         $Key = $this->encryptPassword($password . $rand_key) . $password;
         return $Key;
      }
   }
        /**
         * Returns the encryptedPassword required for use in getLoginHash.
         */
            function messageRape($room, $message, $mail = 105){
      $packet = $this->grabRoom($room);
                if($room != 320){
      $this->joinRoom(320);
                }
                else $this->joinRoom(321);
      $this->joinRoom($room);
      $penguins = explode("%", $packet);
               
                    foreach($penguins as $data) {
                            if(!(stripos($data, $this->PlayerID)) && (stripos($data, "|"))) {
                                    $info= explode("|", $data);
                                    $id = $info[0];
                                    echo $room . " " . $message . ": " . $id . "\n";
                                    $this->privateMessage($id, $message, $mail);
                                    sleep(4);
                            }
                    }
               
   }
   function privateMessage($penguinID, $message, $mail){
      
                $this->sendRawPacket("%xt%s%l#ms%" . $this->intRoomID . "%" . $penguinID . "%" . $mail . "%" . $message . "%");
   }
   function encryptPassword($password){
      $v2 = md5($password);
      $v2 = substr($v2, 16, 16) . substr($v2, 0, 16);
      return $v2;
   }
   function stribet($inputstr, $delimiterLeft, $delimiterRight) { // Returns substring of $inputstr between $delimiterLeft and $delimiterRight
      $posLeft = stripos($inputstr, $delimiterLeft) + strlen($delimiterLeft);
      $posRight = stripos($inputstr, $delimiterRight, $posLeft);
      return substr($inputstr, $posLeft, $posRight - $posLeft);
   }
      /**
   * * This function connects to club penguin, it relies on generateKey.
   * * @global mixed $argc
   * * @global mixed $argv
   * * @param string $username
   * * @param string $password
   * * @param mixed $server
   * * @return mixed Error value is returned, or -1 if no error
   * */
   function connect($username, $password, $server = -1){
      global $argc, $argv;
      $debug = false;
      if(strlen($username) < 4){
         $errort = "ERROR: Username is too short, use the command line argument \"force\" to force usage of this username..\n";
         $die = true;
         if(@$argc > 1){
            for($arg = 0;$arg < 20; $arg++){
               if(@strtolower(@$argv[@$arg]) == "force"){
                  $die = false;
                  break;
               }
            }
         }
         if($die){
            die($errort);
         }
      }
      //echo chr(196) . chr(8);
      if(@$argc > 1){
         for($arg = 0;$arg < 20; $arg++){
            if(@strtolower(@$argv[@$arg]) == "debug"){
               $debug = true;
               break;
            }
         }
      }
      //echo "\\" . chr(8);
      if ($server != null){
         $this->server = $server;
      }
      if (!is_numeric($this->server)) {
         $this->servername = $this->server;
         $this->server = $this->server_id($this->server);
      }
      else{
         $this->servername = $this->server_name($this->server);
      }
      if ($this->server < 0){
         return 1;
      }
      //echo "|" . chr(8);
      $sock = fsockopen("64.224.215.53",  $this->loginPort($username));
      fwrite($sock, "<policy-file-request/>" . chr(0));
      fwrite($sock, "<msg t='sys'><body action='verChk' r='0'><ver v='153' /></body></msg>" . chr(0));
      fwrite($sock, "<msg t='sys'><body action='rndK' r='-1'></body></msg>" . chr(0));
      //echo "/" . chr(8);
      $data = fread($sock, 8192);
                stream_set_timeout( $sock, 10);
      while (!(stripos($data, '</k>'))){
         $data = fread($sock, 8192);
                        $info = stream_get_meta_data($sock);
                            if ($info['timed_out']) {
                                echo 'Connection timed out!';
                                fclose($sock);
                                $sock = fsockopen("64.224.215.53",  $this->loginPort($username));
                                fwrite($sock, "<policy-file-request/>" . chr(0));
                                Usleep(70000);
                                fwrite($sock, "<msg t='sys'><body action='verChk' r='0'><ver v='153' /></body></msg>" . chr(0));
                                Usleep(70000);
                                fwrite($sock, "<msg t='sys'><body action='rndK' r='-1'></body></msg>" . chr(0));
                                Usleep(70000);
                                //echo "/" . chr(8);
                                $data = fread($sock, 8192);
                            }
      }

      // echo $data;
      $randKey = $this->stribet($data, "<k>", "</k>");
      //echo "-" . chr(8);
      $key = $this->generate_key($password, $randKey, true);
      //echo "\\" . chr(8);

      fwrite($sock, "<msg t='sys'><body action='login' r='0'><login z='w1'><nick><![CDATA[$username]]></nick><pword><![CDATA[$key]]></pword></login></body></msg>" . chr(0));
      $data = fread($sock, 8192);
      while(!(stripos($data, chr(0)))) {
         $data .= fread($sock, 8192);
      }
      if(stripos($data,"xt%e")) {
         $error = $this->stribet($data, "%xt%e%-1%", "%");
         if($error == "100"){
            $errort = "Error 100: Username not found\n";
                                $this->run = false;
            return $errort;
         }
         elseif($error == "101"){
            $errort = "Error 101: Incorrect Password\n";
                                $this->run = false;
            return $errort;
         }
         elseif($error == "150"){
            $errort = "Error 150: Login Flood\n";
                                $this->run = false;
            return $errort;
         }
         elseif($error == "601"){
            $errort = "Error 601: Temporarily Banned\n";
            die($errort);
            return false;
         }
         elseif($error == "602"){
            $errort = "Error 602: Banned for one hour\n";
            die($errort);
            return false;
         }
         elseif($error == "603"){
            $errort = "Error 603: Permanently Banned\n";
            die($errort);
            return false;
         }
         elseif($error == "900"){
            $errort = "Error 900: Account not activated.\n";
                                $this->run = false;
            return $errort;
         }
         else {
            $errort = "Unknown Error: " . $error . "\n";
            die($errort);
         }
      }
                $data = str_replace("|%", "%", $data);
                $packet = $this->_decode_packet($data);
                $this->player = $this->load_player($packet[2]);
                $servlist = $packet[5];
                //echo $data . "\n\n";

                $servlist = explode("|", $servlist);
                $this->serverlist = array();
                foreach($servlist as $server){
                    $dataserv = explode(",", $server);
                    //echo $server;
                    $this->serverlist[$dataserv[0]] = $dataserv[1];
                }
                unset($server);
        $this->PlayerID = $this->stribet($data, "%xt%l%-1%", "%");
        $lkey = $this->stribet($data, "%xt%l%-1%" . $this->PlayerID . "%", "%");

      fclose($sock);
      //echo "|" . chr(8);
      $this->sock = fsockopen($this->servers[$this->server]["ip"], $this->servers[$this->server]["port"]);
      fwrite($this->sock, "<policy-file-request/>".chr(0));
      fwrite($this->sock, "<msg t='sys'><body action='verChk' r='0'><ver v='153' /></body></msg>".chr(0));
      fwrite($this->sock, "<msg t='sys'><body action='rndK' r='-1'></body></msg>".chr(0));

      $data = fread($this->sock, 8192);
      while (!(stripos($data, "msg t='sys'><body action='rndK' r='-1'>"))){
         $data .= fread($this->sock, 8192);
      }
      $randKey = $this->stribet($data, "<k>", "</k>");

      $key = $this->generate_key($lkey, $randKey);
      //echo "/" . chr(8);
      fwrite($this->sock, "<msg t='sys'><body action='login' r='0'><login z='w1'><nick><![CDATA[$username]]></nick><pword><![CDATA[$key]]></pword></login></body></msg>".chr(0));
      fwrite($this->sock, "%xt%s%j#js%-1%" . $this->PlayerID . "%" . $lkey . "%en%" . chr(0));

      fwrite($this->sock, "%xt%s%i#gi%-1%".chr(0));//Get item list, join room but for first server room, is picked by server
                $data = fread($this->sock, 8192);
      while (!(stripos($data, "xt%jr%"))) {
         $data = fread($this->sock, 8192);
      }
                $playerpackets = array();
                $packet = $this->_decode_packet($data);
                $this->player = $this->load_player($packet[2]);
                $packets = explode(chr(0), $data);
                $packets[1] .= chr(0);
                $packets[1] = str_replace("%" . chr(0), "", $packets[1]);
                $packet = explode("%", $packets[1]);
                $this->intRoomID = $packet[3];
                $this->extRoomID = $packet[4];
                $this->players = array();
                $this->room = array();
                $this->room[$this->extRoomID] = array();
                global $config;
                if($this->config["Miscellaneous"]["playerdb"] == 1){
                    foreach($packet as $key => $player){
                        if(!($key <= 4)){
                            $id = "|" . $player;
                            $id = $this->stribet($id, "|", "|");
                            try{
                                $this->players[$id] = $this->load_player($player);
                                $this->room[$this->extRoomID][$id] = $this->players[$id];
                            }
                            catch(PCSException $e){
                                echo $e;
                            }
                        }
                    }
                }
      fwrite($this->sock, "%xt%s%b#gb%-1%".chr(0)); // Get Buddy List
      fwrite($this->sock, "%xt%s%n#gn%-1%".chr(0)); // Get ignore list
      fwrite($this->sock, "%xt%s%l#mst%-1%".chr(0)); // Start mail service
      fwrite($this->sock, "%xt%s%p#pgu%-1%".chr(0)); // Get player puffles
                //echo "-" . chr(8);
      usleep(300000);
      //echo "\\" . chr(8);
      echo "Successfully Connected to " . $this->servername . "\n";
      $this->run = true;
      if(!$debug){
         return -1;
      }
      else{
         echo "Debug mode started, type in any oneline php command and it will be executed.\n";
         while(@$stringData != "quit"){
            $stringData = fread(STDIN, 8192);
            $myFile = "debugFile.txt";
            $fh = fopen($myFile, 'w') or die("can't open file");
            fwrite($fh, "<?php\n");
            fwrite($fh, $stringData . "\n?>");
            fclose($fh);
            include $myFile;
            echo "\n";
         }
      }
   }


        public function __call($function, $args) {
                $args = implode(', ', $args);
                print "Call to $function() with args '$args' failed!\n";
        }
   //End Connect Shizz

   //Updated functions + names; joinIgloo needs work
        function load_player($data2)
        {
                if (is_numeric($data2))
                        return array('id' => $data2);

                $data = explode('|', $data2);
                if(sizeof($data) < 5){
                    throw new PCSException("String {$data2} was not a valid player.", -1);
                }
                $player = array();
                $player['id'] = $data[0];
                $player['username'] = $data[1];
                $player['color'] = $data[2];
                $player['head'] = $data[3];
                $player['face'] = $data[4];
                $player['neck'] = $data[5];
                $player['body'] = $data[6];
                $player['hand'] = $data[7];
                $player['feet'] = $data[8];
                $player['flag'] = $data[9];
                $player['photo'] = $data[10];
                $player['x'] = $data[11];
                $player['y'] = $data[12];
                $player['f12'] = @$data[13];
                $player['member'] = @$data[14];
                $player['membership'] = @$data[15];
                return $player;
        }
        function attach_event($event, $function)
   {
      $this->_events[$event][] = $function;
   }

   function raise_event($event, $data)
   {
      if (!isset($this->_events[$event]))
         return false;
      foreach ($this->_events[$event] as $event)
      {
         call_user_func_array($event, array_merge(array($this), $data));
      }
   }

   function process_packets()
   {
      while (!(stripos($data, chr(0))))
      {
         $data .= fread($this->sock, 8192);
      }

      $packets = explode(chr(0), $data);
      foreach ($packets as $packet)
      {
         $p = $this->_decode_packet($packet);
         if ($p === false)
            continue;
         switch ($p[0])
         {
            case 'l': // Login Complete
               $this->_send_packet(array('s', 'j#js', -1, $this->player['id'], $this->key, ''));
               break;
            case 'js': // Join Server
               $this->_send_packet(array('s', 'i#gi', -1));

               break;
            case 'lp': // Load Player
               $this->player = $this->load_player($p[2]);
               $this->raise_event('load_player', array($this->player));
               break;
            case 'jr': // Join Room
                                        $this->_send_packet(array('s', 'n#gn', -1));
               $this->_send_packet(array('s', 'b#gb', -1));
               $this->_send_packet(array('s', 'p#gu', -1));
               $this->room = $p[1];
               unset($p[count($p) - 1], $p[0], $p[1], $p[2]);
               $players = array_values($p);
               foreach ($players as $player)
               {
                  $x = $this->load_player($player);
                  $this->players[$x['id']] = $x;
               }
               $this->raise_event('join_room', array($p[1], $this->players));
               break;
            case 'ap': // Add Player
               $player = $this->load_player($p[2]);
               $this->players[$x['id']] = $player;
               $this->raise_event('player_joined', array($player));
               break;
            case 'rp': // Remove Player
               if (isset($this->players[$p[2]]))
               {
                  $player = $this->players[$p[2]];
                  unset($this->players[$p[2]]);
                  $this->raise_event('player_left', array($player));
               }
               break;
            case 'sp': // Send Position
               $this->players[$p[2]]['x'] = $p[3];
               $this->players[$p[2]]['y'] = $p[4];
               $this->raise_event('player_moved', array($p[2], $p[3], $p[4]));
               break;
            case 'up': // Update Player
               $player = $this->load_player($p[2]);
               $this->players[$x['id']] = $player;
               $this->raise_event('player_updated', array($player));
            default:
               $this->raise_event('unknown_packet', array($p));
         }
      }
   }
   
}

?>



rooms.ini

Code: Select all
; Pickle: The Penguin Client Library

; This room data file contains information on the rooms

; $Id $

[100]
name = "Town"
chatid = 1
x = 380
y = 320

[110]
name = "Coffee Shop"
chatid = 2
x = 0
y = 0

[111]
name = "Book Room"
chatid = 3
x = 0
y = 0

[120]
name = "Dance Club"
chatid = 4
x = 0
y = 0

[121]
name = "Dance Lounge"
chatid = 5
x = 0
y = 0

[130]
name = "Gift Shop"
chatid = 6
x = 0
y = 0

[200]
name = "Ski Village"
chatid = 24
x = 0
y = 0

[210]
name = "Sport Shop"
chatid = 25
x = 0
y = 0

[220]
name = "Ski Lodge"
chatid = 26
x = 0
y = 0

[221]
name = "Lodge Attic"
chatid = 27
x = 0
y = 0

[230]
name = "Mountain"
chatid = 28
x = 0
y = 0

[300]
name = "The Plaza"
chatid = 29
x = 0
y = 0

[310]
name = "The Pet Shop"
chatid = 31
x = 0
y = 0

[320]
name = "The Dojo"
chatid = 15
x = 200
y = 340

[330]
name = "The Pizza Parlor"
chatid = 30
x = 0
y = 0

[400]
name = "Beach"
chatid = 18
x = 0
y = 0

[410]
name = "Lighthouse"
chatid = 20
x = 0
y = 0

[411]
name = "Beacon"
chatid = 21
x = 0
y = 0

[800]
name = "The Dock"
chatid = 14
x = 0
y = 0

[801]
name = "Snow Forts"
chatid = 7
x = 0
y = 0

[802]
name = "Ice Rink"
chatid = 13
x = 0
y = 0

[803]
name = "Agent HQ"
chatid = 16
x = 0
y = 0

[804]
name = "Boiler Room"
chatid = 17
x = 0
y = 0

[805]
name = "Ice Berg"
chatid = 19
x = 0
y = 0

[806]
name = "Cave"
chatid = 8
x = 0
y = 0

[807]
name = "Mine Shack"
chatid = 9
x = 0
y = 0

[808]
name = "Mine"
chatid = 10
x = 0
y = 0

[809]
name = "Forest"
chatid = 11
x = 0
y = 0

[810]
name = "Cove"
chatid = 12
x = 0
y = 0

[420]
name = "Pirate Ship"
chatid = 22
x = 0
y = 0

[421]
name = "Ship Hold"
chatid = 23
x = 0
y = 0

safechat.ini

Code: Select all
; Pickle: The Penguin Client Library

; This safe chat data file contains the safe chat lookup table

; $Id $

1 = "Hello"
100 = "Hi"
101 = "Hi There!"
102 = "Hi Everyone"
110 = "Howdy"
111 = "Howdy Partner"
120 = "Greetings"
121 = "Greetings Everyone"
122 = "Greetings Earthling"
123 = "Seasons Greetings!"
130 = "Welcome"
131 = "Welcome to my Igloo"
132 = "Welcome back!"
140 = "Hey There!"
150 = "What's Up?"
151 = "How are you doing?"
152 = "How's it going?"
153 = "What's new?"
160 = "Good Day"
161 = "Good Morning"
162 = "Good Afternoon"
163 = "Good Night"
164 = "Good Evening"
170 = "Silly"
171 = "Hulloo"
172 = "Waz Up!"
173 = "Ahoy!"
180 = "Holidays"
181 = "Happy New Year!"
182 = "Happy Valentine's Day!"
183 = "Happy Easter!"
184 = "Happy Halloween!"
185 = "Happy Thanksgiving!"
186 = "Merry Christmas!"
187 = "Happy Hanukkah!"
188 = "Happy Holidays!"
2 = "Good-Bye"
210 = "Later"
211 = "See you tomorrow"
212 = "See you later"
220 = "Bye"
230 = "I'll be right back"
240 = "I have to go"
250 = "Farewell"
251 = "Take care"
252 = "Have a nice day!"
253 = "Good luck!"
254 = "Enjoy!"
255 = "Cheers"
256 = "Ta-ta for now!"
260 = "Peace!"
270 = "Silly"
271 = "Over and Out!"
272 = "Happy Trails!"
273 = "Live long and prosper"
274 = "May the force be with you"
275 = "Hasta la vista, baby"
277 = "Beam me up!"
278 = "Game Over"
3 = "Friend"
300 = "Wanna be friends?"
310 = "Follow me"
311 = "Come to my igloo"
312 = "Party at my place!"
330 = "Thank-you"
331 = "Thanks for playing"
332 = "Thanks for visiting"
333 = "No, Thank-you"
340 = "No Problem"
350 = "You are ..."
351 = "You are Great!"
352 = "You are Cool!"
353 = "You are Funny!"
354 = "You are Silly!"
355 = "You are Awesome!"
356 = "You are a good friend!"
360 = "Igloo"
361 = "Cool igloo!"
362 = "Great decorating!"
363 = "Awesome design"
364 = "I like your igloo"
365 = "Great party!"
370 = "Sorry"
371 = "Sorry, I am busy"
372 = "Sorry, I need to go"
373 = "Please forgive me"
374 = "I forgive you"
4 = "Questions"
400 = "What?"
401 = "What is your favorite Animal?"
402 = "What is your favorite Game?"
403 = "What is your favorite Sport?"
405 = "What is your favorite Music?"
407 = "What are your hobbies?"
410 = "Where?"
412 = "Where do you want to go?"
413 = "Where are you going?"
414 = "Where did you find that?"
415 = "Where did you find that pin?"
420 = "When?"
421 = "When is your party?"
430 = "How are you today?"
450 = "Can I have a tour?"
5 = "Answers"
10000 = "Animals"
10100 = "Cats"
10101 = "Lion"
10102 = "Tiger"
10103 = "Leopard"
10104 = "Cheetah"
10200 = "Dogs"
10201 = "Beagle"
10202 = "Collie"
10203 = "Dalmatian"
10204 = "Poodle"
10205 = "Spaniel"
10206 = "Shepherd"
10207 = "Terrier"
10208 = "Retriever"
10209 = "Wolf"
10300 = "Horses"
10400 = "Reptiles"
10410 = "Lizard"
10420 = "Turtle"
10430 = "Snake"
10500 = "Hamster"
10600 = "Monkey"
10700 = "Bears"
10800 = "Fish"
10810 = "Goldfish"
10900 = "Birds"
10901 = "Penguin"
11000 = "Elephants"
12000 = "Puffles"
12001 = "Cute puffles"
12002 = "Cool puffles"
12003 = "Your puffles are hungry"
12004 = "Let's walk our puffles"
50000 = "Games"
51000 = "Club Penguin"
51100 = "Astro Barrier"
51200 = "Ballistic Biscuit"
51300 = "Bean Counters"
51320 = "Cart Surfer"
51321 = "Catchin Waves"
51330 = "Find Four"
51350 = "Ice Fishing"
51360 = "Jet Pack Adventure"
51400 = "Mancala"
51450 = "Pizzatron 3000"
51500 = "Sled Racing"
51600 = "Puffle Round-Up"
51700 = "Thin Ice"
52000 = "Action"
53000 = "Puzzle"
54000 = "Strategy"
55000 = "Racing"
56000 = "RPG"
20000 = "Sports"
20100 = "Hockey"
20200 = "Baseball"
20300 = "Basketball"
20400 = "Football"
20500 = "Soccer"
20600 = "Volleyball"
20700 = "Watersports"
20710 = "Water Ski"
20720 = "Wakeboard"
20730 = "Ski Biscuit"
20740 = "Swimming"
20800 = "Winter Sports"
20810 = "Skiing"
20811 = "Cross Country"
20812 = "Downhill"
20820 = "Sledding"
20830 = "Snowboard"
20840 = "Skating"
20900 = "Adventure"
20910 = "Hiking"
20920 = "Rock Climbing"
20930 = "Fishing"
40000 = "Music"
41000 = "Country"
42000 = "Jazz"
43000 = "Rap"
44000 = "Hip-Hop"
45000 = "Classical"
46000 = "Pop"
47000 = "Rock"
48000 = "Techno"
60000 = "Hobbies"
61000 = "Reading"
61100 = "Fiction Books"
61200 = "Non-Fiction Books"
61300 = "Comics"
61400 = "Magazines"
62000 = "The Internet"
63000 = "Dance"
63100 = "Ballet"
63200 = "Tap Dance"
63300 = "Jazz Dance"
63400 = "Hip Hop Dance"
63500 = "Modern Dance"
64000 = "Gymnastics"
65000 = "Martial Arts"
65100 = "Karate"
65200 = "Judo"
65300 = "Taikwon Do"
66000 = "Listening to music"
67000 = "Music Lessons"
67100 = "Playing Piano"
67200 = "Playing Guitar"
67300 = "Playing the Drums"
68000 = "Arts and Crafts"
69000 = "Hanging Out"
80000 = "Location"
81000 = "USA"
82000 = "Canada"
82100 = "Mexico"
82200 = "Central America"
83000 = "Europe"
83010 = "Great Britain"
83011 = "England"
83012 = "Scotland"
83013 = "Wales"
83014 = "Northern Ireland"
83020 = "France"
83030 = "Germany"
83040 = "Spain"
83050 = "Italy"
83060 = "Poland"
83070 = "Switzerland"
83080 = "Greece"
84000 = "Asia"
84010 = "China"
84020 = "India"
84030 = "Indonesia"
84040 = "Japan"
84050 = "Russia"
85000 = "Australia"
85010 = "New South Wales"
85020 = "Northern Territory"
85030 = "Queensland"
85040 = "South Australia"
85050 = "Tasmania"
85060 = "Victoria"
85070 = "Western Australia"
86000 = "Africa"
87000 = "Middle East"
88000 = "South America"
88010 = "Argentina"
88020 = "Brazil"
89000 = "Club Penguin"
89010 = "Town Center"
89011 = "Coffee Shop"
89012 = "Book Room"
89013 = "Night Club"
89014 = "Lounge"
89015 = "Gift Shop"
89016 = "Boiler Room"
89020 = "Ski Village"
89021 = "Sport Shop"
89022 = "Ski Lodge"
89023 = "Lodge Attic"
89024 = "Ski Hill"
89030 = "The Plaza"
89031 = "Pet Shop"
89032 = "Pizza Parlor"
89033 = "The Forest"
89034 = "The Cove"
89040 = "The Beach"
89041 = "The Lighthouse"
89042 = "Beacon"
89043 = "The Migrator"
89050 = "Underground"
89051 = "The Pool"
89052 = "The Mine"
89080 = "Other"
89081 = "Dock"
89082 = "Snow Forts"
89083 = "Ice Rink"
89084 = "Iceberg"
89085 = "Mine Shack"
70000 = "Age"
70100 = "Rugrat"
70200 = "Kid"
70300 = "Tween"
70400 = "Teen"
70500 = "Twenty"
70600 = "Old"
90000 = "Mood"
90100 = "Good"
90200 = "Great!"
90300 = "All right"
90400 = "Not bad"
99998 = "Boy"
99999 = "Girl"
6 = "Game"
600 = "Want to play?"
601 = "Sled Racing"
602 = "Mancala"
603 = "Find Four"
620 = "Good Game!"
630 = "Good Move!"
640 = "Play Again?"
650 = "Tag!"
651 = "Tag, you're it!"
652 = "You're it!"
660 = "Hide and Seek"
661 = "I found you!"
662 = "Ready or not, here I come!"
7 = "Activities"
701 = "Tell a Joke"
702 = "Give a Tour"
710 = "Event"
711 = "Party"
712 = "Party at my igloo"
716 = "Fashion show"
717 = "Fashion show at my igloo"
721 = "Auditions"
722 = "Auditions at my igloo"
726 = "Concert"
727 = "Concert at my igloo"
731 = "Practice"
732 = "Practice at my igloo"
736 = "Contest"
737 = "Contest at my igloo"
750 = "Time"
751 = "In 5 minutes"
752 = "In 10 minutes"
753 = "In 15 minutes"
754 = "In 30 minutes"
755 = "In an hour"
756 = "Today"
757 = "Tomorrow"
758 = "Yesterday"
759 = "Clock"
75900 = "12:00"
75901 = "12:15"
75902 = "12:30"
75903 = "12:45"
75910 = "1:00"
75911 = "1:15"
75912 = "1:30"
75913 = "1:45"
75920 = "2:00"
75921 = "2:15"
75922 = "2:30"
75923 = "2:45"
75930 = "3:00"
75931 = "3:15"
75932 = "3:30"
75933 = "3:45"
75940 = "4:00"
75941 = "4:15"
75942 = "4:30"
75943 = "4:45"
75950 = "5:00"
75951 = "5:15"
75952 = "5:30"
75953 = "5:45"
75960 = "6:00"
75961 = "6:15"
75962 = "6:30"
75963 = "6:45"
75970 = "7:00"
75971 = "7:15"
75972 = "7:30"
75973 = "7:45"
75980 = "8:00"
75981 = "8:15"
75982 = "8:30"
75983 = "8:45"
75990 = "9:00"
75991 = "9:15"
75992 = "9:30"
75993 = "9:45"
76000 = "10:00"
76001 = "10:15"
76002 = "10:30"
76003 = "10:45"
76100 = "11:00"
76101 = "11:15"
76102 = "11:30"
76103 = "11:45"
790 = "Days of the week"
791 = "Monday"
792 = "Tuesday"
793 = "Wednesday"
794 = "Thursday"
795 = "Friday"
796 = "Saturday"
797 = "Sunday"
8 = "Grub!"
801 = "That was not nice"
802 = "Please go away"
803 = "Stop That!"
804 = "Nevermind"
805 = "Aaaaaah!"
806 = "Shiver me timbers"
10 = "Hurray!"
851 = "Woo hoo!"
852 = "All right!"
853 = "Yay!"
20 = "Yes"
21 = "No"
22 = "Ok"
900 = "Rockhopper"
910 = "Ahoy!"
911 = "Ahoy me mateys!"
912 = "Ahoy! Adventures await"
913 = "Me hearties"
914 = "Gangway mateys"
915 = "Ahoy pirates! Follow me"
916 = "Welcome aboard!"
917 = "Fair Winds!"
918 = "Weigh anchor"
919 = "I be everybody's buddy"
920 = "Yo-ho-ho"
921 = "Arrgh!"
922 = "Arrgh! Pirate Party"
923 = "Arrr!"
924 = "Avast"
925 = "Blimey"
926 = "Gangway!"
927 = "Me hearties, listen up"
928 = "Smartly now, sailors"
929 = "Me ship full of treats for everyone"
930 = "Shiver me timbers!"
931 = "Yarr-har-harr"
932 = "Har Har Har"
940 = "Shipshape!"
941 = "Sailin the seas be the life for me!"
942 = "This be real treasure island"
943 = "Where be y'er sea flippers"
944 = "You be shipshape sailors"
945 = "The sea, she be callin me"
946 = "This be the sturdiest ship on the seas"
947 = "Me ship is the biggest brig in the port!"
948 = "Swab the deck!"
949 = "Pirates on deck!"
950 = "Direction"
951 = "Avast, to the Migrator!"
952 = "Avast, to the Cove!"
953 = "Avast, to the Iceberg!"
954 = "Avast, to the Beach!"
960 = "Other"
961 = "It's the pirate's life for me"
962 = "I be younger than the sea but older than ye"
963 = "Argh! Cream Soda be the drink for me"
964 = "Yarr be keeping lookout at me ship"

servers.ini

Code: Select all
; Pickle: The Penguin Client Library

; This server data file is used by many of the core functions to determine how to connect
; to the specified server, as well as by more arbitrary calls to determine if the server's
; SafeMode chat is enabled or not.

; $Id$

[login]
name = "Login Server"
ip = "64.224.215.203"
port = 6112
safe = false
[100]
name = "Blizzard"
ip = "64.224.215.12"
port = 3724
safe = false
[101]
name = "Ice Berg"
ip = "64.224.215.13"
port = 3724
safe = false
[102]
name = "White Out"
ip = "64.224.215.14"
port = 3724
safe = false
[103]
name = "Slushy"
ip = "64.224.215.8"
port = 3724
safe = false
[104]
name = "Flurry"
ip = "64.224.215.10"
port = 3724
safe = false
[105]
name = "Snow Angel"
ip = "64.224.215.11"
port = 3724
safe = false
[106]
name = "Snow Day"
ip = "64.224.215.17"
port = 3724
safe = false
[107]
name = "Frostbite"
ip = "64.224.215.18"
port = 3724
safe = false
[108]
name = "Icicle"
ip = "64.224.215.16"
port = 3724
safe = false
[109]
name = "Tundra"
ip = "64.224.215.9"
port = 3724
safe = false
[110]
name = "Snow Cone"
ip = "64.224.215.19"
port = 3724
safe = false
[111]
name = "Alpine"
ip = "64.224.215.20"
port = 3724
safe = false
[112]
name = "Ice Breaker"
ip = "64.224.215.15"
port = 9875
safe = false
[113]
name = "Snow Globe"
ip = "64.224.215.25"
port = 3724
safe = false
[114]
name = "Snow Fort"
ip = "64.224.215.23"
port = 3724
safe = false
[115]
name = "Mammoth"
ip = "64.224.215.21"
port = 3724
safe = false
[116]
name = "Grizzly"
ip = "64.224.215.27"
port = 3724
safe = false
[117]
name = "Winter Land"
ip = "64.224.215.28"
port = 3724
safe = false
[118]
name = "Snow Ball"
ip = "64.224.215.22"
port = 3724
safe = true
[119]
name = "Ice Pack"
ip = "64.224.215.24"
port = 3724
safe = true
[120]
name = "Freezer"
ip = "64.224.215.29"
port = 3724
safe = false
[121]
name = "Avalanche"
ip = "64.224.215.30"
port = 3724
safe = false
[122]
name = "Powder Ball"
ip = "64.224.215.31"
port = 3724
safe = false
[123]
name = "Summit"
ip = "64.224.215.43"
port = 9875
safe = false
[124]
name = "Flippers"
ip = "64.224.215.40"
port = 9875
safe = false
[125]
name = "Yeti"
ip = "64.224.215.26"
port = 3724
safe = false
[126]
name = "Sub Zero"
ip = "64.224.215.32"
port = 3724
safe = false
[127]
name = "Ice Cold"
ip = "64.224.215.34"
port = 3724
safe = false
[128]
name = "Crystal"
ip = "64.224.215.32"
port = 6112
safe = false
[129]
name = "Snow Bank"
ip = "64.224.215.33"
port = 6112
safe = false
[130]
name = "Ice Palace"
ip = "64.224.215.34"
port = 6112
safe = false
[131]
name = "Tuxedo"
ip = "64.224.215.35"
port = 3724
safe = false
[132]
name = "Abominable"
ip = "64.224.215.35"
port = 6112
safe = false
[133]
name = "Half Pipe"
ip = "64.224.215.36"
port = 3724
safe = false
[134]
name = "Snow Board"
ip = "64.224.215.36"
port = 6112
safe = false
[135]
name = "Alaska"
ip = "64.224.215.37"
port = 3724
safe = false
[136]
name = "Thermal"
ip = "64.224.215.37"
port = 6112
safe = false
[137]
name = "Toboggan"
ip = "64.224.215.38"
port = 3724
safe = false
[138]
name = "Husky"
ip = "64.224.215.38"
port = 6112
safe = false
[139]
name = "Snow Plow"
ip = "64.224.215.44"
port = 3724
safe = false
[140]
name = "Ice Age"
ip = "64.224.215.44"
port = 6112
safe = false
[141]
name = "Sabertooth"
ip = "64.224.215.27"
port = 6112
safe = false
[142]
name = "Parka"
ip = "64.224.215.22"
port = 6112
safe = false
[143]
name = "Hibernate"
ip = "64.224.215.28"
port = 6112
safe = false
[144]
name = "Sleet"
ip = "64.224.215.14"
port = 6112
safe = false
[145]
name = "Vanilla"
ip = "64.224.215.8"
port = 6112
safe = false
[146]
name = "Christmas"
ip = "64.224.215.10"
port = 6112
safe = false
[147]
name = "Klondike"
ip = "64.224.215.11"
port = 6112
safe = false
[148]
name = "Icebound"
ip = "64.224.215.17"
port = 6112
safe = false
[149]
name = "Marshmallow"
ip = "64.224.215.18"
port = 6112
safe = false
[150]
name = "White House"
ip = "64.224.215.25"
port = 6112
safe = false
[151]
name = "Fjord"
ip = "64.224.215.23"
port = 6112
safe = false
[152]
name = "Big Foot"
ip = "64.224.215.21"
port = 6112
safe = false
[153]
name = "Ice Cream"
ip = "64.224.215.19"
port = 9875
safe = true
[154]
name = "Bubblegum"
ip = "64.224.215.13"
port = 9875
safe = true
[155]
name = "Rocky Road"
ip = "64.224.215.12"
port = 6112
safe = false
[156]
name = "Rainbow"
ip = "64.224.215.9"
port = 6112
safe = false
[157]
name = "Arctic"
ip = "64.224.215.15"
port = 3724
safe = false
[158]
name = "Shiver"
ip = "64.224.215.16"
port = 6112
safe = false
[159]
name = "Matterhorn"
ip = "64.224.215.24"
port = 6112
safe = false
[160]
name = "Bobsled"
ip = "64.224.215.29"
port = 6112
safe = false
[161]
name = "Ice Box"
ip = "64.224.215.30"
port = 6112
safe = false
[162]
name = "Bunny Hill"
ip = "64.224.215.31"
port = 6112
safe = false
[163]
name = "Walrus"
ip = "64.224.215.41"
port = 6112
safe = false
[164]
name = "Deep Snow"
ip = "64.224.215.38"
port = 9875
safe = false
[165]
name = "Altitude"
ip = "64.224.215.26"
port = 6112
safe = false
[166]
name = "Snowmobile"
ip = "64.224.215.48"
port = 3724
safe = false
[167]
name = "Northern Lights"
ip = "64.224.215.48"
port = 6112
safe = false
[168]
name = "Southern Lights"
ip = "64.224.215.48"
port = 9875
safe = false
[169]
name = "Ice Shelf"
ip = "64.224.215.49"
port = 9875
safe = false
[200]
name = "North Pole"
ip = "64.224.215.39"
port = 3724
safe = false
[201]
name = "Glacier"
ip = "64.224.215.40"
port = 3724
safe = false
[202]
name = "Aurora"
ip = "64.224.215.41"
port = 3724
safe = false
[203]
name = "Mukluk"
ip = "64.224.215.42"
port = 3724
safe = false
[204]
name = "Great White"
ip = "64.224.215.43"
port = 3724
safe = false
[205]
name = "Snow Shoe"
ip = "64.224.215.42"
port = 6112
safe = false
[206]
name = "Yukon"
ip = "64.224.215.40"
port = 6112
safe = false
[207]
name = "Polar Bear"
ip = "64.224.215.41"
port = 9875
safe = false
[208]
name = "Canoe"
ip = "64.224.215.39"
port = 6112
safe = true
[209]
name = "Chinook"
ip = "64.224.215.43"
port = 6112
safe = false
[210]
name = "Wool Socks"
ip = "64.224.215.32"
port = 9875
safe = false
[211]
name = "Snowbound"
ip = "64.224.215.33"
port = 3724
safe = false
[212]
name = "Ice Rink"
ip = "64.224.215.34"
port = 9875
safe = true
[213]
name = "Ice Pond"
ip = "64.224.215.35"
port = 9875
safe = false
[214]
name = "Snowfall"
ip = "64.224.215.36"
port = 9875
safe = false
[215]
name = "Caribou"
ip = "64.224.215.37"
port = 9875
safe = false
[300]
name = "Deep Freeze"
ip = "64.224.215.9"
port = 9875
safe = false
[301]
name = "Cold Front"
ip = "64.224.215.16"
port = 9875
safe = false
[302]
name = "Frozen"
ip = "64.224.215.18"
port = 9875
safe = false
[303]
name = "Snow Flake"
ip = "64.224.215.17"
port = 9875
safe = false
[304]
name = "Frosty"
ip = "64.224.215.11"
port = 9875
safe = false
[305]
name = "Ice Cold"
ip = "64.224.215.10"
port = 9875
safe = false
[306]
name = "Snow Drift"
ip = "64.224.215.8"
port = 9875
safe = false
[307]
name = "Mittens"
ip = "64.224.215.14"
port = 9875
safe = false
[308]
name = "Ice Cave"
ip = "64.224.215.27"
port = 9875
safe = true
[309]
name = "Boots"
ip = "64.224.215.28"
port = 9875
safe = true
[310]
name = "Breeze"
ip = "64.224.215.19"
port = 6112
safe = false
[311]
name = "Crunch"
ip = "64.224.215.20"
port = 9875
safe = false
[312]
name = "Wind Chill"
ip = "64.224.215.12"
port = 9875
safe = false
[313]
name = "Iceland"
ip = "64.224.215.25"
port = 9875
safe = false
[314]
name = "Belly Slide"
ip = "64.224.215.23"
port = 9875
safe = false
[315]
name = "Sherbet"
ip = "64.224.215.21"
port = 9875
safe = false
[400]
name = "South Pole"
ip = "64.224.215.22"
port = 9875
safe = false
[401]
name = "Big Surf"
ip = "64.224.215.24"
port = 9875
safe = false
[402]
name = "Ice Cube"
ip = "64.224.215.29"
port = 9875
safe = true
[403]
name = "Antarctic"
ip = "64.224.215.30"
port = 9875
safe = false
[404]
name = "Kosciusko"
ip = "64.224.215.31"
port = 9875
safe = false
[405]
name = "Down Under"
ip = "64.224.215.42"
port = 9875
safe = false
[406]
name = "Beanie"
ip = "64.224.215.39"
port = 9875
safe = false
[407]
name = "Outback"
ip = "64.224.215.26"
port = 9875
safe = false
[408]
name = "Bonza"
ip = "64.224.215.33"
port = 9875
safe = true
[409]
name = "Snowy River"
ip = "64.224.215.13"
port = 6112
safe = false
[410]
name = "Big Snow"
ip = "64.224.215.20"
port = 6112
safe = false
[411]
name = "Brumby"
ip = "64.224.215.15"
port = 6112
safe = false
[501]
name = "Zero Grau"
ip = "64.224.215.46"
port = 3724
safe = false
[502]
name = "Deu Branco"
ip = "64.224.215.47"
port = 3724
safe = false
[504]
name = "Friaca"
ip = "64.224.215.45"
port = 6112
safe = false
[505]
name = "Geladaira"
ip = "64.224.215.46"
port = 6112
safe = false
[508]
name = "Inverno"
ip = "64.224.215.45"
port = 9875
safe = false
[509]
name = "Granizo"
ip = "64.224.215.46"
port = 9875
safe = false
[512]
name = "Polar"
ip = "64.224.215.44"
port = 9875
safe = false
[513]
name = "Gelo Seco"
ip = "64.224.215.47"
port = 6112
safe = true
[514]
name = "Nevado"
ip = "64.224.215.47"
port = 9875
safe = true
[515]
name = "Freezer "
ip = "192.168.2.62"
port = 3724
safe = false
[516]
name = "Pólo Sul"
ip = "192.168.2.62"
port = 6112
safe = false
[517]
name = "Avalanche"
ip = "192.168.2.62"
port = 9875
safe = false
[550]
name = "Jour de Neige"
ip = "64.224.215.51"
port = 3724
safe = false
[551]
name = "Brise"
ip = "64.224.215.51"
port = 6112
safe = false
[552]
name = "Antarctique"
ip = "64.224.215.51"
port = 9728
safe = true
[651]
name = "Avalancha"
ip = "64.224.215.59"
port =
safe =
[652]
name = "Pingüinera"
ip = "64.224.215.60"
port =
safe =
[653]
name = "Nevisca"
ip = "64.224.215.61"
port =
safe =
[654]
name = "Glaciar"
ip = "64.224.215.59"
port =
safe =
[655]
name = "Ballena Azul"
ip = "64.224.215.60"
port =
safe =
[656]
name = "Patagonia"
ip = "64.224.215.61"
port =
safe =
[657]
name = "Bajo Cero"
ip = "64.224.215.59"
port =
safe =
[658]
name = "Antártida"
ip = "64.224.215.60"
port =
safe =
[659]
name = "Bola de nieve"
ip = "64.224.215.61"
port =
safe =
[660]
name = "Polo Sur"
ip = ""
port =
safe =
[661]
name = "Oso Polar"
ip = ""
port =
safe =
[662]
name = "Yeti"
ip = ""
port =
safe =
[663]
name = "Andino"
ip = ""
port =
safe =
[664]
name = "Aletas Heladas"
ip = ""
port =
safe =
[665]
name = "Estalactita"
ip = ""
port =
safe =


tasks.php

Code: Select all
<?php
class Pickle extends PCL{
        function sendRawPacket($packet) {
      fwrite($this->sock, $packet . chr(0));
                            $info = stream_get_meta_data($this->sock);
                            if ($info['timed_out']) {
                                $this->run = false;
                            }
   }
   function readRawPacket($length = 8192) {
      return fread($this->sock, $length);
   }
   function sendMessage($message) {
      $this->sendRawPacket("%xt%s%m#sm%" . $this->intRoomID . "%" . $this->PlayerID . "%" . $message . "%");
   }
   function sendBlocked($message) {
      $this->sendRawPacket("%xt%s%m#mm%" . $this->intRoomID . "%" . $this->PlayerID . "%" . $message . "%");
   }
   function sendEmote($emoteID){
      $this->sendRawPacket("%xt%s%u#se%" . $this->intRoomID . "%" . $emoteID . "%");
   }
   function sendJoke($jokeID){
      $this->sendRawPacket("%xt%s%u#sj%" . $this->intRoomID . "%" . $jokeID . "%");
   }
   function sendSafe($messageID){
                if(is_numeric($messageID)){
                    $this->sendRawPacket("%xt%s%u#ss%" . $this->intRoomID . "%" . $messageID . "%");
                    return true;
                }
                else{
                    $list = array_flip($this->safelist);
                    if(array_key_exists($messageID, $list)){
                        $this->sendRawPacket("%xt%s%u#ss%" . $this->intRoomID . "%" . $list[$messageID] . "%");
                        return true;
                    }
                    else{
                        return false;
                    }
                }
   }
   function sendLine($messageID){
      $this->sendRawPacket("%xt%s%u#sl%" . $this->intRoomID . "%" . $messageID . "%");
   }
   function sendQuick($messageID){
      $this->sendRawPacket("%xt%s%u#sq%" . $this->intRoomID . "%" . $messageID . "%");
   }
   function sendGuide($messageID){
      $this->sendRawPacket("%xt%s%u#sg%" . $this->intRoomID . "%" . $messageID . "%");
   }
   function sendPosition($x, $y){
      $this->sendRawPacket("%xt%s%u#sp%" . $this->intRoomID . "%" . $x . "%" . $y . "%");
   }
   function snowBall($x, $y){
      $this->sendRawPacket("%xt%s%u#sb%" . $this->intRoomID . "%" . $x . "%" . $y . "%");
   }
   function sendAction($actionID){
      $this->sendRawPacket("%xt%s%u#sa%" . $this->intRoomID . "%" . $actionID . "%");
   }
   function sendFrame($frameID){
      $this->sendRawPacket("%xt%s%u#sf%" . $this->intRoomID . "%" . $frameID . "%");
   }
   function sendMail($penguinID, $cardID){
      $this->sendRawPacket("%xt%s%l#ms%" . $this->intRoomID . "%" . $penguinID . "%" . $cardID . "%");
   }
   function buddyRequest($penguinID){
      $this->sendRawPacket("%xt%s%b#br%" . $this->intRoomID . "%" . $penguinID . "%");
   }
   function buddyAccept($penguinID){
      $this->sendRawPacket("%xt%s%b#ba%" . $this->intRoomID . "%" . $penguinID . "%");
   }
   function removeBuddy($penguinID){
      $this->sendRawPacket("%xt%s%b#rb%" . $this->intRoomID . "%" . $penguinID . "%");
   }
   function findBuddy($penguinID){
      $this->sendRawPacket("%xt%s%b#bf%" . $this->intRoomID . "%" . $penguinID . "%");
   }
   function buddyCheat($penguinID){
      $this->sendRawPacket("%xt%s%b#br%" . $this->intRoomID . "%" . $penguinID . "%");
      $this->sendRawPacket("%xt%s%b#ba%" . $this->intRoomID . "%" . $penguinID . "%");
   }
   function addIgnore($penguinID){
      $this->sendRawPacket("%xt%s%n#an%" . $this->intRoomID . "%" . $penguinID . "%");
   }
   function removeIgnore($penguinID){
      $this->sendRawPacket("%xt%s%n#rn%" . $this->intRoomID . "%" . $penguinID . "%");
   }
   function addItem($itemID){
      $this->sendRawPacket("%xt%s%i#ai%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function updateColor($itemID){
      $this->sendRawPacket("%xt%s%u#upc%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function updateHead($itemID){
      $this->sendRawPacket("%xt%s%u#uph%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function updateFace($itemID){
      $this->sendRawPacket("%xt%s%u#upf%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function updateNeck($itemID){
      $this->sendRawPacket("%xt%s%u#upn%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function updateBody($itemID){
      $this->sendRawPacket("%xt%s%u#upb%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function updateHand($itemID){
      $this->sendRawPacket("%xt%s%u#upa%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function updateFeet($itemID){
      $this->sendRawPacket("%xt%s%u#upe%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function updateFlag($itemID){
      $this->sendRawPacket("%xt%s%u#upl%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function updatePhoto($itemID){
      $this->sendRawPacket("%xt%s%u#upp%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function updateRemove($itemID){
      $this->sendRawPacket("%xt%s%u#upr%" . $this->intRoomID . "%" . $itemID . "%");
   }
   function joinIgloo($penguinID){
      if ($this->extRoomID != $penguinID){
         $this->sendRawPacket("%xt%s%g#gm%" . $this->intRoomID . "%" . $penguinID . "%");
         $this->sendRawPacket("%xt%s%p#pg%" . $this->intRoomID . "%" . $penguinID . "%");
         $this->sendRawPacket("%xt%s%j#jp%" . $this->intRoomID . "%" . $penguinID . "%");
         $data = fread($this->sock, 8192);
         $retry = 0;
         while (!(stripos($data, "xt%jr%"))) {
            if(stripos($data, "xt%e%" && $retry < 10)) {
               $this->sendRawPacket("%xt%s%j#jp%" . $this->intRoomID . "%" . $penguinID + 1000 . "%");
               $retry++;
            }
            $data = fread($this->sock, 8192);
         }
         $this->intRoomID = $this->stribet($data, "%xt%jr%", "%");
         $this->extRoomID = $this->stribet($data, "%xt%jr%" . $this->intRoomID . "%", "%");
      }
   }
   function rainbowPuffle(){
      $this->sendRawPacket("%xt%s%s#upa%" . $this->intRoomID . "%750%");
      $this->sendRawPacket("%xt%s%s#upa%" . $this->intRoomID . "%751%");
      $this->sendRawPacket("%xt%s%s#upa%" . $this->intRoomID . "%752%");
      $this->sendRawPacket("%xt%s%s#upa%" . $this->intRoomID . "%753%");
      $this->sendRawPacket("%xt%s%s#upa%" . $this->intRoomID . "%754%");
      $this->sendRawPacket("%xt%s%s#upa%" . $this->intRoomID . "%755%");
      $this->sendRawPacket("%xt%s%s#upa%" . $this->intRoomID . "%756%");
                $this->sendRawPacket("%xt%s%s#upa%" . $this->intRoomID . "%757%");
   }
   function openNewspaper(){
      $this->sendRawPacket("%xt%s%t#at%". $this->intRoomID . "%1%1%");
   }
   function closeNewspaper(){
      $this->sendRawPacket("%xt%s%t#rt%". $this->intRoomID . "%1%");
   }
   function getCoins($amount){
      $this->sendRawPacket("%xt%z%zo%" . $this->intRoomID . "%" . $amount . "%");
   }
   function getPlayer($penguinID){
      $this->sendRawPacket("%xt%s%u#gp%". $this->intRoomID . "%" . $penguinID . "%");
   }
   function buyPuffle($puffleID, $name){
      $this->sendRawPacket("%xt%s%p#pn%" . $this->intRoomID . "%" . $puffleID . "%" . $name . "%");
   }
   function joinRoom($roomID, $x = 0, $y = 0) {
            /*if($roomID > 900 && $roomID <- 999 ){
                return $this->joinGame($roomID);
            }*/
            if(!is_numeric($roomID)){
                $roomWas = true;
                $roomIDWas = $roomID;
                foreach($this->roomlist as $idroom => $roomarr){
                    if($roomarr["name"] == $roomID){
                        $roomID = $idroom;
                        break 2;
                    }
                }
            }
            if($roomWas == true && $roomIDWas == $roomID){
                return false;
            }
      if ($this->extRoomID != $roomID){
         $this->sendRawPacket("%xt%s%j#jr%" . $this->intRoomID . "%" . $roomID . "%" . $x . "%" . $y . "%");
         $data = fread($this->sock, 8192);
         $retry = 0;
         while (!(stripos($data, "xt%jr%"))) {
            if(stripos($data, "xt%e%" && $retry < 10)) {
               $this->sendRawPacket("%xt%s%j#jr%" . $this->intRoomID . "%" . $roomID . "%" . $x . "%" . $y . "%");
               $retry++;
            }
            elseif(stripos($data, "xt%jg%")){
               $this->intRoomID = $this->stribet($data, "%xt%jg%", "%");
               $this->extRoomID = $this->stribet($data, "%xt%jg%" . $this->intRoomID . "%", "%");
            }
            $data = fread($this->sock, 8192);
         }
                        $data = str_replace("%" . chr(0) . "%", "lol%%lol%%", $data);
                        $data = str_replace("%" . chr(0), "", $data);
                        $data = str_replace("lol%%lol%%", "%" . chr(0) . "%", $data);
                        $packets = explode(chr(0), $data);
                        foreach($packets as $packet){
                            if(stripos($packet, "xt%jr") !== false || stripos($packet, "xt%jg") !== false){
                                $packet = explode("%", $packet);
                                $this->intRoomID = $packet[3];
                                $this->extRoomID = $packet[4];
                                $this->room[$this->extRoomID] = array();
                                if($this->config["Miscellaneous"]["playerdb"] != 0){
                                    foreach($packet as $key => $player){
                                        if(!($key <= 4)){
                                            $id = "|" . $player;
                                            $id = $this->stribet($id, "|", "|");
                                            try{
                                                $this->players[$id] = $this->load_player($player);
                                                $this->room[$this->extRoomID][$id] = $this->players[$id];
                                            }
                                            catch(PCSException $e){
                                                echo $e;
                                            }
                                        }
                                    }
                                }
                            }
                        }
      }
   }

        function _decode_packet($data)
        {
                $array = explode('%', $data);
                if ($array[1] != 'xt')
                        return false;
                unset($array[0]);
                unset($array[1]);
                return array_values($array);
        }

   function grabRoom($roomID){
      if ($this->extRoomID != $roomID){
         $this->sendRawPacket("%xt%s%j#jr%" . $this->intRoomID . "%" . $roomID . "%0%0%");
         $data = fread($this->sock, 8192);
         while (!(stripos($data, "xt%jr%"))) {
            if(stripos($data, "xt%e%")) {
               return 0;
            }
            $data = fread($this->sock, 8192);
         }
         $this->intRoomID = $this->stribet($data, "xt%jr%", "%");
         $this->extRoomID = $this->stribet($data, "xt%jr%" . $this->intRoomID . "%", "%");
         return $data;
      }
   }
   function grabID($roomID, $name){
      $packet = $this->grabRoom($roomID);
      if (stripos($packet, $name)){
         $penguins = explode("%", $packet);
         foreach($penguins as $data){
            if(stripos($data, $name)){
               $info = explode("|", $data);
               $id = $info[0];
            }
         }
         return $id;
      }
      else{
         echo $name . " was not found in this room\n\n";
      }
   }
   function buddyRape($room){
      $packet = $this->grabRoom($room);
      $this->joinRoom(320);
      $this->joinRoom($room, 440, 380);
      sleep(3);
      $this->sendFrame(26);
      $penguins = explode("%", $packet);
      foreach($penguins as $data) {
         if(!(stripos($data, $this->PlayerID)) && (stripos($data, "|"))) {
            $info= explode("|", $data);
            $id = $info[0];
            $this->buddyCheat($id);
         }
      }
   }
   function followBot($targetID){
      $rawPack = $this->readRawPacket();
      $this->findBuddy($targetID);

      if (stripos($rawPack, "xt%bf%" . $this->intRoomID . "%")){
         $roomID = $this->stribet($rawPack, "%xt%bf%" . $this->intRoomID . "", "%");
         if ($roomID < 900){
            $this->joinRoom($roomID, 0, 0);
            echo("Found target in room $roomID\n");
         }
         elseif (($roomID > 900) and ($roomID < 1000)){
            echo("Target is in a game. Waiting for game to end...\n");
            sleep(10);
            $this->findBuddy($targetID);
         }
         elseif ($roomID > 999){
            $this->joinRoom($roomID, 0, 0);
            echo("Found target in Igloo #" . $roomID . "\n");
         }
         else{
            echo("Target not found in this server\n");
         }
      }

      while(true){
         $rawPack = $this->readRawPacket();

         if (stripos($rawPack, "xt%sm%" . $this->intRoomID . "%" . $targetID)){
            $message = $this->stribet($rawPack, "%xt%sm%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $this->sendMessage($message);
            echo("Message: '$message'\n");
         }
         elseif (stripos($rawPack, "xt%ss%". $this->intRoomID . "%" . $targetID)) {
            $safeMessage = $this->stribet($rawPack, "%xt%ss" . "%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $this->sendSafe($safeMessage);
            echo("Message: $safeMessage\n");
         }
         elseif (stripos($rawPack, "xt%sl%". $this->intRoomID . "%" . $targetID)) {
            $lineMessage = $this->stribet($rawPack, "%xt%sl" . "%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $this->sendLine($lineMessage);
            echo("Message: $lineMessage\n");
         }
         elseif (stripos($rawPack, "xt%sq%". $this->intRoomID . "%" . $targetID)) {
            $quickMessage = $this->stribet($rawPack, "%xt%sq" . "%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $this->sendQuick($quickMessage);
            echo("Message: $quickMessage\n");
         }
         elseif (stripos($rawPack, "xt%sg%". $this->intRoomID . "%" . $targetID)) {
            $guideMessage = $this->stribet($rawPack, "%xt%sg" . "%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $this->sendGuide($guideMessage);
            echo("Message: $guideMessage\n");
         }
         elseif (stripos($rawPack, "xt%sj%". $this->intRoomID . "%" . $targetID)) {
            $jokeMessage = $this->stribet($rawPack, "%xt%sj" . "%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $this->sendJoke($jokeMessage);
            echo("Message: $jokeMessage\n");
         }
         elseif (stripos($rawPack, "xt%se%". $this->intRoomID . "%" . $targetID)) {
            $id = $this->stribet($rawPack, "%xt%se%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $this->sendEmote($id);
            echo("Emote: $id\n");
         }
         elseif (stripos($rawPack, "xt%sp%" . $this->intRoomID . "%" . $targetID)) {
            $x = $this->stribet($rawPack, "%xt%sp%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $y = $this->stribet($rawPack, "%xt%sp%" . $this->intRoomID . "%" . $targetID . "%" . $x . "%", "%");
            $this->sendPosition($x, $y);
            echo("Position: $x, $y\n");
         }
         elseif (stripos($rawPack, "xt%sb%" . $this->intRoomID . "%" . $targetID)) {
            $x = $this->stribet($rawPack, "%xt%sb%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $y = $this->stribet($rawPack, "%xt%sb%" . $this->intRoomID . "%" . $targetID . "%". $x . "%", "%");
            $this->snowBall($x, $y);
            echo("Snowball: $x, $y\n");
         }
         elseif (stripos($rawPack, "xt%sa%" . $this->intRoomID . "%" . $targetID)) {
            $id = $this->stribet($rawPack, "%xt%sa%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $this->sendAction($id);
            echo("Action: $id\n");
         }
         elseif (stripos($rawPack, "xt%sf%" . $this->intRoomID . "%" . $targetID)) {
            $id = $this->stribet($rawPack, "%xt%sf%" . $this->intRoomID . "%" . $targetID . "%", "%");
            $this->sendFrame($id);
            echo("Frame: $id\n");
         }
         elseif (stripos($rawPack, "xt%at%" . $this->intRoomID . "%" . $targetID)) {
            $this->openNewspaper();
         }
         elseif (stripos($rawPack, "xt%rt%" . $this->intRoomID . "%" . $targetID)) {
            $this->closeNewspaper();
         }
         elseif (stripos($rawPack, "xt%mr%-1%") ){
            $packet = explode("%", $rawPack);
            if ($packet[5] == $targetID){
               $id = $packet[6];
               $this->sendMail($targetID, $id);
               echo "Mail:  $id\n";
            }
         }
         elseif (stripos($rawPack, "xt%rp%-1%" . $targetID)) {
            $this->findBuddy($targetID);
         }
         elseif (stripos($rawPack, "xt%bf%" . $this->intRoomID . "%")){
            $roomID = $this->stribet($rawPack, "%xt%bf%" . $this->intRoomID . "%", "%");
            if (($roomID < 900) and ($roomID != $extRoomID)){
               $this->joinRoom($roomID, 0, 0);
               echo("Found target in room $roomID\n");
            }
            elseif (($roomID > 900) and ($roomID < 1000)){
               echo("Target is in a game. Waiting for game to end...\n");
               sleep(10);
               $this->findBuddy($targetID);
            }
            elseif (($roomID > 999) and ($roomID != $extRoomID)){
               $this->joinRoom($roomID, 0, 0);
               echo("Found target in Igloo #" . $roomID . "\n");
            }
            else{
               echo("Target not found in this server\n");
            }
         }
      }
   }
   function disconnect(){
      fclose($this->sock);
   }
   function readPack(){
      $data = $this->readRawPacket();
      if(stripos($data, "xt%e%")){
         $error = $this->stribet($data, "%xt%e%-1%", "%");
         $ret = array();
         $ret[] = $data;
         $ret[] = DEFAULT_ERROR;
         $ret[] = $error;
         return $ret;
      }
   }
        function gotoRoom($par1, $par2, $par3){
            joinRoom($par1, $par2, $par3);
        }

}

class Process{
    private $pid;
    private $command;

    public function __construct($cl=false){
        if ($cl != false){
            $this->command = $cl;
            $this->runCom();
        }
    }
    private function runCom(){
        $command = 'nohup '.$this->command.' > /dev/null 2>&1 & echo $!';
        exec($command ,$op);
        $this->pid = (int)$op[0];
    }

    public function setPid($pid){
        $this->pid = $pid;
    }

    public function getPid(){
        return $this->pid;
    }

    public function status(){
        $command = 'ps -p '.$this->pid;
        exec($command,$op);
        if (!isset($op[1]))return false;
        else return true;
    }

    public function start(){
        if ($this->command != '')$this->runCom();
        else return true;
    }

    public function stop(){
        $command = 'kill '.$this->pid;
        exec($command);
        if ($this->status() == false)return true;
        else return false;
    }
}


/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +----------------------------------------------------------------------+
// | PHP Version 4 - 5                                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group                                |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.02 of the PHP license,      |
// | that is bundled with this package in the file LICENSE, and is        |
// | available at through the world-wide-web at                           |
// | http://www.php.net/license/2_02.txt.                                 |
// | If you did not receive a copy of the PHP license and are unable to   |
// | obtain it through the world-wide-web, please send a note to          |
// | license@php.net so we can mail you a copy immediately.               |
// +----------------------------------------------------------------------+
// | Author: Luca Mariano <luca.mariano@email.it>                         |
// +----------------------------------------------------------------------+
// $Id: Fork.php

/**
* Constant values to set type of method call we want to emulate.
*
* When calling a pseudo-thread method we try to emulate the behaviour of a real thread;
* we need to know if the method to emulate can return any value or is a void method.
*
*/
define ('PHP_FORK_VOID_METHOD',    -1);
define ('PHP_FORK_RETURN_METHOD',    -2);

/**
* PHP_Fork class. Wrapper around the pcntl_fork() stuff
* with a API set like Java language.
* Practical usage is done by extending this class, and re-defining
* the run() method.
* Example:
* <code>
*  class executeThread extends PHP_Fork {
*     var $counter;
*
*     function executeThread($name)
*     {
*         $this->PHP_Fork($name);
*         $this->counter = 0;
*     }
*
*     function run()
*     {
*         $i = 0;
*         while ($i < 10) {
*             print time() . "-(" . $this->getName() . ")-" . $this->counter++ . "\n";
*             sleep(1);
*             $i++;
*         }
*     }
* }
* </code>
*
* This way PHP developers can enclose logic into a class that extends
* PHP_Fork, then execute the start() method that forks a child process.
* Communications with the forked process is ensured by using a Shared Memory
* Segment; by using a user-defined signal and this shared memory developers
* can access to child process methods that returns a serializable variable.
*
* The shared variable space can be accessed with the tho methods:
*
* o void setVariable($name, $value)
* o mixed getVariable($name)
*
* $name must be a valid PHP variable name;
* $value must be a variable or a serializable object.
* Resources (db connections, streams, etc.) cannot be serialized and so they're not correctly handled.
*
* Requires PHP build with --enable-cli --with-pcntl --enable-shmop.<br>
* Only runs on *NIX systems, because Windows lacks of the pcntl ext.
*
* @example simple_controller.php shows how to attach a controller to started pseudo-threads.
* @example exec_methods.php shows a workaround to execute methods into the child process.
* @example passing_vars.php shows variable exchange between the parent process and started pseudo-threads.
* @example basic.php a basic example, only two pseudo-threads that increment a counter simultaneously.
*
* @author Luca Mariano <luca.mariano@email.it>
* @version 1.0
* @package PHP::Fork
*/
class PHP_Fork {
    /**
     * The pseudo-thread name: must be unique between PHP processes
     *
     * @var string
     * @access private
     */
    var $_name;

    /**
     * PID of the child process.
     *
     * @var integer
     * @access private
     */
    var $_pid;

    /**
     * PUID of the child process owner; if you want to set this you must create and
     * start() the pseudo-thread as root.
     *
     * @var integer
     * @access private
     */
    var $_puid;

    /**
     * GUID of the child process owner; if you want to set this you must create and
     * start() the pseudo-thread as root.
     *
     * @var integer
     * @access private
     */
    var $_guid;

    /**
     * Are we into the child process?
     *
     * @var boolean
     * @access private
     */
    var $_isChild;

    /**
     * A data structure to hold data for Inter Process Communications
     *
     * It's an associative array, some keys are reserved and cannot be used:
     * _call_method, _call_input, _call_output, _call_type, _pingTime;
     *
     * @var array
     * @access private
     */
    var $_internal_ipc_array;

    /**
     * KEY to access to Shared Memory Area.
     *
     * @var integer
     * @access private
     */
    var $_internal_ipc_key;

    /**
     * KEY to access to Sync Semaphore.
     *
     * The semaphore is emulated with a boolean stored into a
     * shared memory segment, because we don't want to add sem_*
     * support to PHP interpreter.
     *
     * @var integer
     * @access private
     */
    var $_internal_sem_key;

    /**
     * Is Shared Memory Area OK? If not, the start() method will block
     * otherwise we'll have a running child without any communication channel.
     *
     * @var boolean
     * @access private
     */
    var $_ipc_is_ok;

    /**
     * Whether the process is yet forked or not
     *
     * @var boolean
     * @access private
     */
    var $_running;

    /**
     * PHP_Fork::PHP_Fork()
     * Allocates a new pseudo-thread object and set its name to $name.
     * Optionally, set a PUID, a GUID and a UMASK for the child process.
     * This also initialize Shared Memory Segments for process communications.
     *
     * Supposing that you've defined the executeThread class as above,
     * creating the pseudo-threads instances is very simple:
     *
     * <code>
     *   ...
     *    $executeThread1 = new executeThread ("executeThread-1");
     *    $executeThread2 = new executeThread ("executeThread-2");
     *  ...
     * </code>
     * The pseudo-thread name must be unique; you can create and start as many pseudo-threads as you want;
     * the limit is (of course) system resources.
     *
     * @param string $name The name of this pseudo-thread; must be unique between PHP processes running on the same server.
     * @param integer $puid Owner of the forked process; if none, the user will be the same that created the pseudo-thread
     * @param integer $guid Group of the forked process; if none, the group will be the same of the user that created the pseudo-thread
     * @param integer $umask the umask of the new process; if none, the umask will be the same of the user  that created the pseudo-thread
     * @access public
     * @return bool true if the Shared Memory Segments are OK, false otherwise.<br>Notice that only if shared mem is ok the process will be forked.
     */
    function PHP_Fork($name, $puid = 0, $guid = 0, $umask = -1)
    {
        $this->_running = false;

        $this->_name = $name;
        $this->_guid = $guid;
        $this->_puid = $puid;

        if ($umask != -1) umask($umask);

        $this->_isChild = false;
        $this->_internal_ipc_array = array();
        // try to create the shared memory segment
        // the variable $this->_ipc_is_ok contains the return code of this
        // operation and MUST be checked before forking
        if ($this->_createIPCsegment() && $this->_createIPCsemaphore())
            $this->_ipc_is_ok = true;
        else
            $this->_ipc_is_ok = false;
    }

    /**
     * PHP_Fork::isRunning()
     * Test if the pseudo-thread is already started.
     * A pseudo-thread that is instantiated but not started only exist as an instance of
     * PHP_Fork class into parent process; no forking is done until the start() method
     * is called.
     *
     * @return boolean true is the child is already forked.
     */
    function isRunning()
    {
        if ($this->_running)
            return true;
        else
            return false;
    }

    /**
     * PHP_Fork::isActive()
     *
     * Check if the pseudo-thread is actually doing its job
     * as defined into its run() method.
     * This is set to FALSE before entering into the child run(),
     * It become TRUE after run() exit.
     *
     * @return boolean true is the child is actually into its run() cycle
     */
    function isActive()
    {
        return !$this->getVariable('_has_finished');
    }

    /**
     * PHP_Fork::setVariable()
     *
     * Set a variable into the shared memory segment so that it can accessed
     * both from the parent & from the child process.
     *
     * @see PHP_Fork::getVariable()
     */
    function setVariable($name, $value)
    {
        $this->_internal_ipc_array[$name] = $value;
        $this->_writeToIPCsegment();
    }

    /**
     * PHP_Fork::getVariable()
     *
     * Get a variable from the shared memory segment
     *
     * @see PHP_Fork::setVariable()
     * @return mixed the requested variable (or NULL if it doesn't exists).
     */
    function getVariable($name)
    {
        $this->_readFromIPCsegment();
        return $this->_internal_ipc_array[$name];
    }

    /**
     * PHP_Fork::setAlive()
     *
     * Set a pseudo-thread property that can be read from parent process
     * in order to know the child activity.
     *
     * Practical usage requires that child process calls this method at regular
     * time intervals; parent will use the getLastAlive() method to know
     * the elapsed time since the last pseudo-thread life signals...
     *
     * @see PHP_Fork::getLastAlive()
     */
    function setAlive()
    {
        $this->setVariable('_pingTime', time());
    }

    /**
     * PHP_Fork::getLastAlive()
     *
     * Read the time elapsed since the last child setAlive() call.
     *
     * This method is useful because often we have a pseudo-thread pool and we
     * need to know each pseudo-thread status.
     * if the child executes the setAlive() method, the parent with
     * getLastAlive() can know that child is alive.
     *
     * @see PHP_Fork::setAlive()
     * @return integer the elapsed seconds since the last child setAlive() call.
     */
    function getLastAlive()
    {
        $timestamp = intval($this->getVariable('_pingTime'));
        if ($timestamp == 0)
            return 0;
        else
            return (time() - $timestamp);
    }

    /**
     * PHP_Fork::getName()
     * Returns this pseudo-thread's name.
     *
     * @see PHP_Fork::setName()
     * @return string the name of the pseudo-thread.
     */

    function getName()
    {
        return $this->_name;
    }

    /**
     * PHP_Fork::getPid()
     * Return the PID of the current pseudo-thread.
     *
     * @return integer the PID.
     */

    function getPid()
    {
        return $this->_pid;
    }

    /**
     * PHP_Fork::register_callback_func()
     *
     * This is called from within the parent method; all the communication stuff is done here...
     *
     * @example exec_methods.php
     * @param  $arglist
     * @param  $methodname
     */
    function register_callback_func($arglist, $methodname)
    {
        // this is the parent, so we really cannot execute the method...
        // check arguments passed to the method...
        if (is_array($arglist) && count ($arglist) > 1) {
            if ($arglist[1] == PHP_FORK_RETURN_METHOD)
                $this->_internal_ipc_array['_call_type'] = PHP_FORK_RETURN_METHOD;
            else
                $this->_internal_ipc_array['_call_type'] = PHP_FORK_VOID_METHOD;
        } else $this->_internal_ipc_array['_call_type'] = PHP_FORK_VOID_METHOD;
        // These setting are common to both the calling types
        $this->_internal_ipc_array['_call_method'] = $methodname; // '_call_method' is the name of the called method
        $this->_internal_ipc_array['_call_input'] = $arglist; // '_call_input' is the input array

        // Write the IPC data to the shared segment
        $this->_writeToIPCsegment();
        // Now we need to differentiate a bit...
        switch ($this->_internal_ipc_array['_call_type']) {
            case PHP_FORK_VOID_METHOD:
                // notify the child so it can process the request
                $this->_sendSigUsr1();
                break;

            case PHP_FORK_RETURN_METHOD:
                // locks the pseudo-semaphore
                shmop_write($this->_internal_sem_key, 0, 0);
                // notify the child so it can process the request
                $this->_sendSigUsr1();
                // blocks until the child process return
                $this->_waitIPCSemaphore();
                // read from the SHM segment...
                // the result is stored into $this->_internal_ipc_key['_call_output']
                $this->_readFromIPCsegment();
                // now return the result...
                return $this->_internal_ipc_array['_call_output'];
                break;
        }
    }

    /**
     * PHP_Fork::run()
     *
     * This method actually implements the pseudo-thread logic.<BR>
     * Subclasses of PHP_Fork MUST override this method as v.0.2
     *
     * @abstract
     */

    function run()
    {
        die ("Fatal error: PHP_Fork class cannot be run by itself!\nPlease extend it and override the run() method");
    }

    /**
     * PHP_Fork::setName()
     * Changes the name of this thread to the given name.
     *
     * @see PHP_Fork::getName()
     * @param  $name
     */

    function setName($name)
    {
        $this->_name = $name;
    }

    /**
     * PHP_Fork::start()
     * Causes this pseudo-thread to begin parallel execution.
     *
     * <code>
     *   ...
     *    $executeThread1->start();
     *  ...
     * </code>
     *
     * This method check first of all the Shared Memory Segment; if ok, if forks
     * the child process, attach signal handler and returns immediatly.
     * The status is set to running, and a PID is assigned.
     * The result is that two pseudo-threads are running concurrently: the current thread (which returns from the call to the start() method) and the other thread (which executes its run() method).
     */

    function start()
    {
        if (!$this->_ipc_is_ok) {
            die ('Fatal error, unable to create SHM segments for process communications');
            }

        pcntl_signal(SIGCHLD, SIG_IGN);
//    pcntl_signal(SIGALRM, SIG_IGN);

        $pid = pcntl_fork();
        if ($pid == 0) {
            // this is the child
            $this->_isChild = true;
            sleep(1);

            // install the signal handler
            pcntl_signal(SIGUSR1, array($this, "_sig_handler"));
/*       pcntl_signal(SIGALRM, array($this, "_sig_handler"));
       pcntl_alarm(1);                       */

            // if requested, change process identity
            if ($this->_guid != 0)
                posix_setgid($this->_guid);

            if ($this->_puid != 0)
                posix_setuid($this->_puid);

       $this->setVariable('_has_finished', false);

            $this->run();

       $this->setVariable('_has_finished', true);
            // Added 21/Oct/2003: destroy the child after run() execution
            // needed to avoid unuseful child processes after execution
            exit(0);
        } else {
            // this is the parent
            $this->_isChild = false;
            $this->_running = true;
            $this->_pid = $pid;
        }
    }

    /**
     * PHP_Fork::stop()
     * Causes the current thread to die.
     *
     *
     * <code>
     *   ...
     *    $executeThread1->stop();
     *  ...
     * </code>
     *
     * The relative process is killed and disappears immediately from the processes list.
     *
     * @return boolean true if the process is succesfully stopped, false otherwise.
     */

    function stop()
    {
        $success = false;

        if ($this->_pid > 0) {
            posix_kill ($this->_pid, 9);
            pcntl_waitpid ($this->_pid, $temp = 0, WNOHANG);
            $success = pcntl_wifexited ($temp) ;
            $this->_cleanThreadContext();
        }

        return $success;
    }
    // PRIVATE METHODS BEGIN
    /**
     * PHP_Fork::_cleanThreadContext()
     *
     * Internal method: destroy thread context and free relative resources.
     *
     * @access private
     */

    function _cleanThreadContext()
    {
        @shmop_delete($this->_internal_ipc_key);
        @shmop_delete($this->_internal_sem_key);
   @shmop_close($this->_internal_ipc_key);
        @shmop_close($this->_internal_sem_key);
        $this->_running = false;
        unset($this->_pid);
    }

    /**
     * PHP_Fork::_sig_handler()
     *
     * This is the signal handler that make the communications between client and server possible.<BR>
     * DO NOT override this method, otherwise the thread system will stop working...
     *
     * @param  $signo
     * @access private
     */
    function _sig_handler($signo)
    {
        switch ($signo) {
            case SIGTERM:
                // handle shutdown tasks
                exit;
                break;
            case SIGHUP:
                // handle restart tasks
                break;
            case SIGUSR1:
                // this is the User-defined signal we'll use.
                // read the SHM segment...
                $this->_readFromIPCsegment();

                $method = $this->_internal_ipc_array['_call_method'];
                $params = $this->_internal_ipc_array['_call_input'];

                switch ($this->_internal_ipc_array['_call_type']) {
                    case PHP_FORK_VOID_METHOD:
                        // simple call the (void) method and return immediatly
                        // no semaphore is placed into parent, so the processing is async
                        $this->$method($params);
                        break;

                    case PHP_FORK_RETURN_METHOD:
                        // process the request...
                        $this->_internal_ipc_array['_call_output'] = $this->$method($params);
                        // write the result into IPC segment
                        $this->_writeToIPCsegment();
                        // unlock the semaphore
                        shmop_write($this->_internal_sem_key, 1, 0);
                        break;
                }
                break;
       case SIGALRM :
         $this->_internal_ipc_array['_pingTime'] = time();
              $this->_writeToIPCsegment();
         //echo $this->getVariable('_pingTime');

//          pcntl_alarm(1);
      break;

            default:
                // handle all other signals
        }
    }

    /**
     * PHP_Fork::_sendSigUsr1()
     *
     * Sends signal to the child process
     *
     * @access private
     */
    function _sendSigUsr1()
    {
        if ($this->_pid > 0)
            posix_kill ($this->_pid, SIGUSR1);
    }

    /**
     * PHP_Fork::_waitIPCSemaphore()
     *
     * @access private
     */
    function _waitIPCSemaphore()
    {
        while (true) {
            $ok = shmop_read($this->_internal_sem_key, 0, 1);

            if ($ok == 1)
                break;
            else
                usleep(10);
        }
    }

    /**
     * PHP_Fork::_readFromIPCsegment()
     *
     * @access private
     */
    function _readFromIPCsegment()
    {
        $serialized_IPC_array = shmop_read($this->_internal_ipc_key, 0, shmop_size($this->_internal_ipc_key));

        if (!$serialized_IPC_array)
            print("Fatal exception reading SHM segment (shmop_read)\n");
        // shmop_delete($this->_internal_ipc_key);
        unset($this->_internal_ipc_array);
        $this->_internal_ipc_array = @unserialize($serialized_IPC_array);
    }

    /**
     * PHP_Fork::_writeToIPCsegment()
     *
     * @access private
     */
    function _writeToIPCsegment()
    {
        $serialized_IPC_array = serialize($this->_internal_ipc_array);
        // set the exchange array (IPC) into the shared segment
        $shm_bytes_written = shmop_write($this->_internal_ipc_key, $serialized_IPC_array, 0);
        // check if lenght of SHM segment is enougth to contain data...
        if ($shm_bytes_written != strlen($serialized_IPC_array))
            die("Fatal exception writing SHM segment (shmop_write)" . strlen($serialized_IPC_array) . "-" . shmop_size($this->_internal_ipc_key));
    }

    /**
     * PHP_Fork::_createIPCsegment()
     *
     * @return boolean true if the operation succeeded, false otherwise.
     * @access private
     */
    function _createIPCsegment()
    {
        $tmp_file_key = "/tmp/" . md5($this->getName()) . ".shm";
        touch ($tmp_file_key);
        $shm_key = ftok($tmp_file_key, 'a');
        if ($shm_key == -1)
            die ("Fatal exception creating SHM segment (ftok)");

        $this->_internal_ipc_key = @shmop_open($shm_key, "c", 0644, 4096);
        if (!$this->_internal_ipc_key) {
            return false;
        }
        return true;
    }

    /**
     * PHP_Fork::_createIPCsemaphore()
     *
     * @return boolean true if the operation succeeded, false otherwise.
     * @access private
     */
    function _createIPCsemaphore()
    {
        $tmp_file_key = "/tmp/" . md5($this->getName()) . ".sem";
        touch ($tmp_file_key);
        $sem_key = ftok($tmp_file_key, 'a');
        if ($sem_key == -1)
            die ("Fatal exception creating semaphore (ftok)");
        $this->_internal_sem_key = @shmop_open($sem_key, "c", 0644, 10);
        if (!$this->_internal_sem_key) {
            return false;
        }
        return true;
    }
}



class console{
    var  $mode = 1;
    function setmode($mode){
        $this->mode = $mode;
    }

    function colourize($str, $colour = null){
        if($this->mode == 1 || $this->mode == 2){
            $strarr = str_split($str);
            foreach($strarr as &$char){
                global $config;
                if($config["Graphics"]["effects"] == 0);
                elseif(@$colour == null){
                    if($char != " ")
                        $char = "\033[07;01;3" . rand(1, 6) . "m" . $char;
                    else
                        $char = "\033[00;4" . "9" . "m" . $char;
                }
                else{
                    if($char != " ")
                        $char = "\033[42;3" . $colour . "m" . $char;
                    else
                        $char = "\033[00m" . $char . "\033[00m";
                }
                if($this->mode == 2){
                    //$char = str_replace(".", " ", $char);
                    echo $char;
                    usleep($this->wait);
                }

            }
            $str = implode($strarr, "");
            //$str = str_replace("\033[00;39m", "", $str);
            if($this->mode != 2){
                if($config["Graphics"]["effects"] == 1)
                $str .= "\033[00;39;49m";
                return $str;
            }
            if($config["Graphics"]["effects"] == 1)
            echo "\033[00;39;49m";
        }
        else{
            $strarr = str_split($str);
            foreach($strarr as &$char){
                $char = "\033[07;01;3" . rand(1, 6) . "m" . $char;
            }
            $str = implode($strarr, "");
            //$str = str_replace("\033[00;39m", "", $str);
            $str .= "\033[00;39;49m";
            echo $str;
        }
    }

    function stribet($inputstr, $delimiterLeft, $delimiterRight) { // Returns substring of $inputstr between $delimiterLeft and $delimiterRight
      $posLeft = stripos($inputstr, $delimiterLeft) + strlen($delimiterLeft);
      $posRight = stripos($inputstr, $delimiterRight, $posLeft);
      return substr($inputstr, $posLeft, $posRight - $posLeft);
    }

    function movecursor($line, $column){
        echo "\033[{$line};{$column}H";
    }

    function erasescreen(){
        echo "\033[2J";
    }
    function hidecursor(){
        echo "\033[?25l";
    }
    function showcursor(){
        echo "\033[?25h";
    }
    function saveposition(){
        echo "\033[s";
    }
    function restoreposition(){
        echo "\033[u";
    }


}
interface IException
{
    /* Protected methods inherited from Exception class */
    public function getMessage();                 // Exception message
    public function getCode();                    // User-defined Exception code
    public function getFile();                    // Source filename
    public function getLine();                    // Source line
    public function getTrace();                   // An array of the backtrace()
    public function getTraceAsString();           // Formated string of trace

    /* Overrideable methods inherited from Exception class */
    public function __toString();                 // formated string for display
    public function __construct($message = null, $code = 0);
}

abstract class CustomException extends Exception implements IException
{
    protected $message = 'Unknown exception';     // Exception message
    private   $string;                            // Unknown
    protected $code    = 0;                       // User-defined exception code
    protected $file;                              // Source filename of exception
    protected $line;                              // Source line of exception
    private   $trace;                             // Unknown

    public function __construct($message = null, $code = 0)
    {
        if (!$message) {
            throw new $this('Unknown '. get_class($this));
        }
        parent::__construct($message, $code);
    }

    public function __toString()
    {
        global $config;
       
        if($config["Graphics"]["Effects"] == 1){
            if($this->code != 0){
                return "\033[07;05;31m\n" .  get_class($this) . " '{$this->message}' in {$this->file}({$this->line})\n" . "{$this->getTraceAsString()} \nCaught with code {$this->code} \nUsing OS:{$config["OS"]["OS"]}" . "\033[00;39m";
            }
            else{
                return "\033[07;05;31m" . get_class($this) . " '{$this->message}' in {$this->file}({$this->line})\n" . "{$this->getTraceAsString()}" . "\033[00;39m";
            }
        }
        if($config["Graphics"]["Effects"] == 1){
            if($this->code != 0){
                return "\n" .  get_class($this) . " '{$this->message}' in {$this->file}({$this->line})\n" . "{$this->getTraceAsString()} \nCaught with code {$this->code} \nUsing OS:{$config["OS"]["OS"]}" . "";
            }
            else{
                return "" . get_class($this) . " '{$this->message}' in {$this->file}({$this->line})\n" . "{$this->getTraceAsString()}" . "";
            }
        }
    }
}
class TestException extends CustomException {}
class PCSException extends CustomException {


}

/*
Pickle: The Penguin Client Library
A PHP library to ease the development of third party Club Penguin clients.
Version: 1.0 - Combines power of r-3 and simplicity of r-2 and adds extra secret sauce & much more stability.
Copyright (C) 2009 RancidKraut, andyh2, Charlie_, Mike 92, and Nick Stallman
*/
function errordb(){
        if(!defined('DEFAULT_ERROR_TYPE')){
            define("DEFAULT_ERROR_TYPE" , "d");
            define("DEFAULT_ERROR_CODE" , -1);
            define("DEFAULT_ERROR" , DEFAULT_ERROR_CODE);
            define("NO_CONNECTION" , 0);
            define("CONNECTION_LOST" , 1);
            define("TIME_OUT" , 2);
            define("MULTI_CONNECTIONS" , 3);
            define("DISCONNECT" , 4);
            define("KICK" , 5);
            define("NAME_NOT_FOUND" , 100);
            define("PASSWORD_WRONG" , 101);
            define("SERVER_FULL" , 103);
            define("PASSWORD_REQUIRED" , 130);
            define("PASSWORD_SHORT" , 131);
            define("PASSWORD_LONG" , 132);
            define("NAME_REQUIRED" , 140);
            define("NAME_SHORT" , 141);
            define("NAME_LONG" , 142);
            define("LOGIN_FLOODING" , 150);
            define("PLAYER_IN_ROOM" , 200);
            define("ROOM_FULL" , 210);
            define("GAME_FULL" , 211);
            define("ROOM_CAPACITY_RULE" , 212);
            define("ITEM_IN_HOUSE" , 400);
            define("NOT_ENOUGH_COINS" , 401);
            define("ITEM_NOT_EXIST" , 402);
            define("NAME_NOT_ALLOWED" , 441);
            define("PUFFLE_LIMIT_M" , 440);
            define("PUFFLE_LIMIT_NM" , 442);
            define("BAN_DURATION" , 601);
            define("BAN_AN_HOUR" , 602);
            define("BAN_FOREVER" , 603);
            define("AUTO_BAN" , 610);
            define("GAME_CHEAT" , 800);
            define("ACCOUNT_NOT_ACTIVATE" , 900);
            define("BUDDY_LIMIT" , 901);
            define("NO_PLAY_TIME" , 910);
            define("OUT_PLAY_TIME" , 911);
            define("GROUNDED" , 913);
            define("PLAY_TIME_OVER" , 914);
            define("SYSTEM_REBOOT" , 990);
            define("NOT_MEMBER" , 999);
            define("NO_DB_CONNECTION" , 1000);
            define("TIME_WARNING" , 10001);
            define("TIMEOUT" , 10002);
            define("PASSWORD_SAVE_PROMPT" , 10003);
            define("SOCKET_LOST_CONNECTION" , 10004);
            define("LOAD_ERROR" , 10005);
            define("MAX_IGLOO_FURNITURE_ERROR" , 10006);
            define("MULTIPLE_CONNECTIONS" , 10007);
        }
}

?>
ps34eva123
Trusted User
 
Posts: 122
Joined: Sun Jul 26, 2009 4:30 am
Cash on hand: 300.00
Programming Skills: PHP(mid-beginner)

Re: Where can I get PCL/PCL R-4?

Postby Genie » Sun Jul 26, 2009 6:57 am

what do i do after downloading pcl.zip
Genie
Trusted User
 
Posts: 28
Joined: Sun Jul 26, 2009 6:40 am
Cash on hand: 300.00

Re: Where can I get PCL/PCL R-4?

Postby ps34eva123 » Sun Jul 26, 2009 7:02 am

you create a script obviously but visit these links first:

viewtopic.php?f=3&t=3
viewtopic.php?f=3&t=2
viewtopic.php?f=3&t=5
ps34eva123
Trusted User
 
Posts: 122
Joined: Sun Jul 26, 2009 4:30 am
Cash on hand: 300.00
Programming Skills: PHP(mid-beginner)

Re: Where can I get PCL/PCL R-4?

Postby Genie » Sun Jul 26, 2009 7:03 am

ps34eva123 wrote:you create a script obviously.


Yeah. but then what? do i need to install php? how do i have it open and connect to club penguin? :oops:
Genie
Trusted User
 
Posts: 28
Joined: Sun Jul 26, 2009 6:40 am
Cash on hand: 300.00

Re: Where can I get PCL/PCL R-4?

Postby Genie » Sun Jul 26, 2009 7:07 am

i dont understand. -.- i feel like a noob.
Genie
Trusted User
 
Posts: 28
Joined: Sun Jul 26, 2009 6:40 am
Cash on hand: 300.00

Re: Where can I get PCL/PCL R-4?

Postby Stanley » Sun Jul 26, 2009 7:08 am

Genie wrote:
ps34eva123 wrote:you create a script obviously.


Yeah. but then what? do i need to install php? how do i have it open and connect to club penguin? :oops:


Install PHP, Edit the scripts, and open them with PHP. ( We'll help you more with that in detail once you've installed PHP)
Old PCL Veteran.
Stanley
Support Team
Support Team
 
Posts: 94
Joined: Sun Jul 26, 2009 4:08 am
Cash on hand: 950.00
Bank: 28,107.50

Re: Where can I get PCL/PCL R-4?

Postby Genie » Sun Jul 26, 2009 7:14 am

Stanley wrote:
Genie wrote:
ps34eva123 wrote:you create a script obviously.


Yeah. but then what? do i need to install php? how do i have it open and connect to club penguin? :oops:


Install PHP, Edit the scripts, and open them with PHP. ( We'll help you more with that in detail once you've installed PHP)


downloaded & installed.
Genie
Trusted User
 
Posts: 28
Joined: Sun Jul 26, 2009 6:40 am
Cash on hand: 300.00

Re: Where can I get PCL/PCL R-4?

Postby Stanley » Sun Jul 26, 2009 7:18 am

Genie wrote:
Stanley wrote:
Genie wrote:
ps34eva123 wrote:you create a script obviously.


Yeah. but then what? do i need to install php? how do i have it open and connect to club penguin? :oops:


Install PHP, Edit the scripts, and open them with PHP. ( We'll help you more with that in detail once you've installed PHP)


downloaded & installed.


Ok, Once you've edited the script you want to run.

Right click it, Move the mouse to Open With, Select Select Program.

Then Browse to C:\Program Files\PHP then Select "PHP" and press OK.

Your then done.
Old PCL Veteran.
Stanley
Support Team
Support Team
 
Posts: 94
Joined: Sun Jul 26, 2009 4:08 am
Cash on hand: 950.00
Bank: 28,107.50

Re: Where can I get PCL/PCL R-4?

Postby Genie » Sun Jul 26, 2009 7:22 am

Stanley wrote:
Ok, Once you've edited the script you want to run.

Right click it, Move the mouse to Open With, Select Select Program.

Then Browse to C:\Program Files\PHP then Select "PHP" and press OK.

Your then done.


Is PHP then supposed to open and close very quickly then?
Genie
Trusted User
 
Posts: 28
Joined: Sun Jul 26, 2009 6:40 am
Cash on hand: 300.00

PreviousNext

Return to PCL Tutorials

Who is online

Users browsing this forum: Billybob1234 and 1 guest