clubpenguinz
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Basic PCL CP

Go down

Basic   PCL  CP Empty Basic PCL CP

Post  7mode96 Sat Sep 06, 2008 6:22 pm

Im going to teach you the basics of PCL.

Vars:
$Username is a var; it determines what the user name is for the client when it logs in, you can also add vars like ; $Playerid, $Puffleid, $Roomid and $Message

Functions
Functions are used to make scripts easier and faster to write.
All the functions are stored in tasks.php
Say if you wanted to walk to 302,100 you'd have to send the packet wich would take time to find a place in, but if you use a function (goto 302,100) that does the same thing but simpler. Basicly anything can be added to tasks.php

echo
echo is used to show a peice of code in the command line, so in the script you sau "pie", when the client says "pie" you can echo on the command line "you said pie".
echo can also be used with x,y and rawpacks, like;
$x = 100
$y = 100
echo "You walked to $x, $y"
so echo is a VERY handy php function

Stripo
Stripo is used to single out a peice of code in a string or packet, so if you want a penguins id you put.
if (stripos($rawPack, "xt%sm%$myRoomID%")){
$PenguinID = stribet($rawPack, "%xt%sm%$myRoomID%", "%");
say($PenguinID Sent a message);
}
}
so you can single a part from a packet and echo it.

There you guys go; theres basic PCL for you, now if you want to get into statements and explodes you have to get better and when that happens i release a semi-advanced PCL thread.
7mode96
7mode96
7mode96
cheating master

Posts : 23
Join date : 2008-08-21
Age : 27

https://clubpenguinz.board-directory.net

Back to top Go down

Back to top


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