Author Topic: I'm in so much trouble...  (Read 1233 times)

Hey first at all I wanna need it to
if the man doesn't have PPT in his
clanPrefix, it should also check the
clanSuffix...

And it won't work of some bugs,
please fix it.

Thanks.
Code: [Select]
package PPT.Server
{
function GameConnection::OnConnection(%client)
{
if (%client.clanPrefix $= "PPT")
{
messageClient(%client,'',"\c3Welcome honered PPT Member!.");
messageClient(%client,'',"\c3You're will always be welcome,");
messageClient(%client,'',"\c3at Runeth's server.");
Parent::OnConnection(%client);
}
else
{
commandToClient(%client,'messageboxok',"<a:http://www.spation.co.uk/blockland/lotr.htm>PPT's Official Website.<a>");
MessageClient(%client,'',"\c2Welcome to \c0Runeth's PPT server. \c3Runeth\c2 last name was \"Hooga the Pirate\" if you didn't know.");
MessageClient(%client,'',"\c2Runeth isn't the leader of PPT, \c3Jervan\c2 is!. Respect all Admins/Super Admins and have fun.");
MessageClient(%client,'',"\c2For rules type \c0/rules\c2, thank you.");
Parent::onConnection(%client);

}
}
function serverCmdRules(%client)
{
Parent::serverCmdRules(%client);
{
MessageClient(%client,'',"\c6Under\c0 Counstuction!\c6 Check later, but thanks for typing.");
}
}
function serverCmdMessageSent(%client,%message)
{
Parent::serverCmdMessageSent(%client,%message); //the original MessageSent gets executed before the stuff under it...
if(%message $= "runeth sucks")
{
%client.player.kill();
messageAll('',"\c7SHP.\c3Runeth\c7.PPT\c6: Hell no! You're the one who sucks, " @ %client.name @ "!");  Think before you speak!");
//type return; if you don't want the message to be displayed
}
//Parent::serverCmdMessageSent(%client,%message);
//This would be executed after all the code above it.
}
}
};
ActivatePackage(PPT.Server);

or you can just check the file is in Attached...
« Last Edit: May 23, 2008, 12:42:06 PM by Runeth »

Changed the Script a little, so you don't have to fix so much.

I know that im like this now...

We probably shouldn't hate other clans.


Hey first at all I wanna need it to
if the man doesn't have PPT in his
clanPrefix, it should also check the
clanSuffix...
I couldn't understand this.
But I fixed some issues, in red:

Quote from: Code
package PPT_Server // You can't have a dot in the package name
{
   function GameConnection::onConnect(%client, %name)
   {   
      if (%client.clanPrefix $= "PPT")
      {
         messageClient(%client, '', "\c3Welcome, honered PPT Member!."); // Kinda lame...
         messageClient(%client, '', "\c3You will always be welcome at Runeth's server.");
         Parent::onConnect(%client, %name);
      }
      else
      {
         commandToClient(%client, 'messageBoxOk', "<a:http://www.spation.co.uk/blockland/lotr.htm>PPT's Official Website.</a>");
         messageClient(%client, '', "\c2Welcome to \c0Runeth's PPT server. \c3Runeth\c2 last name was \"Hooga the Pirate\" if you didn't know.");
         messageClient(%client, '', "\c2Runeth isn't the leader of PPT, \c3Jervan\c2 is!. Respect all Admins/Super Admins and have fun.");
         messageClient(%client, '', "\c2For rules, type \c0/rules\c2. Thank you.");
         Parent::onConnect(%client, %name);
      }
   }

   function serverCmdRules(%client)
   {
      Parent::serverCmdRules(%client);
      messageClient(%client, '', "\c6Under\c0 Counstuction!\c6 Check later, but thanks for typing.");
   }
   // I took out the rest because it was stupid.
};
activatePackage(PPT_Server);

« Last Edit: May 23, 2008, 02:29:53 PM by exidyne »

Quote from: Code
package PPT_Server // You can't have a dot in the package name
{
   function GameConnection::onConnect(%client, %name)
   {   
      if (%client.clanPrefix $= "PPT" || %client.clanSuffix $= "PPT")
      {
         messageClient(%client, '', "\c3Welcome, honoured PPT Member!."); // Kinda lame...
         messageClient(%client, '', "\c3You will always be welcome at Runeth's server.");
         Parent::onConnect(%client, %name);
      }
      else
      {
         commandToClient(%client, 'messageBoxOk', "<a:http://www.spation.co.uk/blockland/lotr.htm>PPT's Official Website.</a>");
         messageClient(%client, '', "\c2Welcome to \c0Runeth's PPT server. \c3Runeth\c2's last name was \"Hooga the Pirate\" if you didn't know.");
         messageClient(%client, '', "\c2Runeth isn't the leader of PPT, \c3Jervan\c2 is! Respect all Admins/Super Admins and have fun.");
         messageClient(%client, '', "\c2For rules, type \c0/rules\c2. Thank you.");
         Parent::onConnect(%client, %name);
      }
   }

   function serverCmdRules(%client)
   {
      Parent::serverCmdRules(%client);
      messageClient(%client, '', "\c6Under\c0 Construction!\c6 Check later, but thanks for typing.");
   }
   // I took out the rest because it was stupid.
};
activatePackage(PPT_Server);
I think he was asking to check both Prefix and Suffix.

Thats quite a pain in the ass to have a message box pop up while you're loading.

Lol sorry I thought people would had a harder ass...

Quote from: Code
package PPT_Server // You can't have a dot in the package name
{
   function GameConnection::onConnect(%client, %name)
   {   
      if (%client.clanPrefix $= "PPT" || %client.clanSuffix $= "PPT")
      {
         messageClient(%client, '', "\c3Welcome, honoured PPT Member!."); // Kinda lame...
         messageClient(%client, '', "\c3You will always be welcome at Runeth's server.");
         Parent::onConnect(%client, %name);
      }
      else
      {
         commandToClient(%client, 'messageBoxOk', "<a:http://www.spation.co.uk/blockland/lotr.htm>PPT's Official Website.</a>");
         messageClient(%client, '', "\c2Welcome to \c0Runeth's PPT server. \c3Runeth\c2's last name was \"Hooga the Pirate\" if you didn't know.");
         messageClient(%client, '', "\c2Runeth isn't the leader of PPT, \c3Jervan\c2 is! Respect all Admins/Super Admins and have fun.");
         messageClient(%client, '', "\c2For rules, type \c0/rules\c2. Thank you.");
         Parent::onConnect(%client, %name);
      }
   }

   function serverCmdRules(%client)
   {
      Parent::serverCmdRules(%client);
      messageClient(%client, '', "\c6Under\c0 Construction!\c6 Check later, but thanks for typing.");
   }
   // I took out the rest because it was stupid.
};
activatePackage(PPT_Server);
I think he was asking to check both Prefix and Suffix.
Randy get's candy :D


Thought you would puke if you had some, but thankies exidyne :D
:cookie: Send This To Exidyne.

I'm not gonna repost the entire script for this, but you may wanna get rid of the period in:

Quote
"\c3Welcome, honoured PPT Member!."