PDA

View Full Version : my Custom ::yell



Chris
January 30th, 2011, 13:31
I made this myself,



if (command.startsWith("yell") && command.length() > 5 && playerRights >= 0) {
String titles = "";
String titles2 = "";


if (playerRights == 1) {
titles = "@whi@[Moderator]-";
}
if (playerRights == 2) {
titles = "@red@[Admin]-";
}
if (playerRights == 3) {
titles = "@yel@[2nd Owner]- ";
}
if (donator == 1 && playerRights == 0) {
titles = "@whi@[Donator]-";
}
if (donator == 1 && playerRights == 1) {
titles = "@whi@[Mod/Donator]-";
}
if (donator == 1 && playerRights == 2) {
titles = "@red@[Admin/Donator]-";
}
if (donator == 1 && playerRights == 3) {
titles = "@yel@[TEH OWNER!]-";
}
if (donator == 2 && playerRights == 2) {
titles = "@blu@[Super Donator]-@gre@ ";
}
if (donator == 2 && playerRights == 1) {
titles = "@whi@[Mod/Super Donator]- ";
}
if (donator == 2 && playerRights == 2) {
titles = "@red@[Admin/Super Donator]- ";
}
if (donator == 2 && playerRights == 3) {
titles = "@blu@[Owner/Super Donator]-@gre@ ";
}



if (kills <= 9)
{
titles2 = "Beginner";
}

if (kills >= 10)
{
titles2 = "Grunt";
}

if (kills >= 20)
{
titles2 = "Private";
}

if (kills >= 30)
{
titles2 = "Private R2";
}

if (kills >= 40)
{
titles2 = "Leading Private";
}

if (kills >= 60)
{
titles2 = "Officer R2";
}

if (kills >= 70)
{
titles2 = "Officer R3";
}

if (kills >= 80)
{
titles2 = "Leading Officer";
}

if (kills >= 90)
{
titles2 = "Master Officer";
}

if (kills >= 110)
{
titles2 = "Captain R2";
}

if (kills >= 120)
{
titles2 = "Captain R3";
}

if (kills >= 130)
{
titles2 = "Captain R4";
}

if (kills >= 140)
{
titles2 = "Captain R5";
}

if (kills >= 150)
{
titles2 = "Leading Captain";
}

if (kills >= 175)
{
titles2 = "Master Captain";
}

if (kills >= 2000)
{
titles2 = "Ultimate Master Of All";
}

if (kills >= 1500)
{
titles2 = "Beast Of PK";
}

if (kills >= 50)
{
titles2 = "Officer";
}

if (kills >= 100)
{
titles2 = "Captain";
}

if (kills >= 200)
{
titles2 = "Grand Captain";
}

if (kills >= 300)
{
titles2 = "Grand Marshal";
}

if (kills >= 400)
{
titles2 = "Grand Master";
}

if (kills >= 500)
{
titles2 = "Pking Captain";
}

if (kills >= 600)
{
titles2 = "Pking Marshal";
}

if (kills >= 700)
{
titles2 = "Pking Grand Marshal";
}

if (kills >= 800)
{
titles2 = "Pking Supreme Grand Marshal";
}

if (kills >= 900)
{
titles2 = "Pking Jesus";
}

if (kills >= 1000)
{
titles2 = "God of Pking";
}


if(playerRights == 0 && donator == 0)
{
yell(playerName+", " +titles+": " + command.substring(5));
}

if(playerRights > 0 || donator > 0)
{
yell(playerName+", " +titles+" " + titles2 +": "+command.substring(5));
}


}

else if (command.startsWith("yell") && command.length() > 5 && pkpoints <= 0)
{
sM("You cant do that Yet!");
}

CRAIZYBART
January 30th, 2011, 13:33
good bro ;)

Chris
January 30th, 2011, 13:38
Thanks

Heroeswar
January 30th, 2011, 13:41
nice!!!!!

Cart
January 30th, 2011, 13:43
if (donator == 2 && playerRights == 2) {
titles = "@blu@[Super Donator]-@gre@ ";
Guessing people buy Staff on your server? lol.

CRAIZYBART
January 30th, 2011, 13:46
if (donator == 2 && playerRights == 2) {
titles = "@blu@[Super Donator]-@gre@ ";
Guessing people buy Staff on your server? lol.

JAja lol :D

Chris
January 30th, 2011, 14:02
Lol ;P

_1Greg1_
January 30th, 2011, 14:11
That's a LONG yell command...


Sent from my iPhone 4

my pker pure
January 30th, 2011, 14:12
Does it show the user title when you yell? Or just some gay thing that says owner?

Chris
January 30th, 2011, 14:24
User Title
+ Their PvP Rank

Hakam
February 15th, 2011, 16:20
That's a LONG yell command...


Sent from my iPhone 4

But useful for some servers.

Chris
February 18th, 2011, 02:05
Mhm..

XxBryantD
February 18th, 2011, 18:45
looks good

Nouish
March 4th, 2011, 15:04
if (command.startsWith("yell")) {
if (command.length() <= 5)
return;
for (Player p : Server.playerHandler.players) {
Client c = (Client) p;
if (p != null && !c.disconnected && c != this) {
c.sM("[" + playerName + "]: " + command.substring(5));
}
}
}

You don't really need a yell command, though.

b0nesaw_pk
March 20th, 2011, 14:16
If the colour IDs dun work E.g: "@blu@ or @red@" you'll need to add this. ( This is ONLY for PI 317 servers )

<shad=112255>[Moderator]</shad>

Your moderator name now haves a blue shade around it.
You could replace <shad=112255> by <col=FF000> and </shad> by </col> to have a fully coloured yell.

-b0ne

Champagne
March 20th, 2011, 14:29
I think I'm gonna use this :P

If that's ok.