h productions



Join the forum, it's quick and easy

h productions

h productions

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

h productions evrything about setting up a game or server eg.runescape private server and runing it

Log in

I forgot my password

mp3player


Get a playlist! Standalone player Get Ringtones

Who is online?

In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None


[ View the whole list ]


Most users ever online was 101 on Wed Jul 03, 2019 3:46 am

online chat

Chat login:
Nickname
Password (optional)

powered by h-prodz.co.cc

Latest topics

» New things for you
[tut]how to create a clanchat ingame EmptySun Nov 29, 2009 6:56 pm by marden

» DUN DUN DUN!
[tut]how to create a clanchat ingame EmptySun Nov 22, 2009 10:33 am by awesome pker

» tradescape stay online? or go away
[tut]how to create a clanchat ingame EmptyTue Aug 25, 2009 1:50 pm by FiZiX the second

» fix read!!!
[tut]how to create a clanchat ingame EmptyMon Aug 10, 2009 7:25 am by FiZiX the second

» LIGHT FALCONS SERVER HERE
[tut]how to create a clanchat ingame EmptyFri Jul 10, 2009 7:05 am by light falcon

» New CO Owner
[tut]how to create a clanchat ingame EmptyFri Jun 26, 2009 9:11 am by awesome pker

» I'm getting bored...
[tut]how to create a clanchat ingame EmptyFri Jun 26, 2009 7:26 am by Fizix

» what to post here
[tut]how to create a clanchat ingame EmptyMon Jun 22, 2009 12:26 pm by Fizix

» 2 servers 1 port LOOK!!!
[tut]how to create a clanchat ingame EmptyMon Jun 22, 2009 12:13 pm by Fizix

Navigation

Affiliates


    [tut]how to create a clanchat ingame

    Admin
    Admin
    Admin
    Admin


    Posts : 88
    Reputation : 5
    Join date : 2009-04-14

    [tut]how to create a clanchat ingame Empty [tut]how to create a clanchat ingame

    Post  Admin Sat Apr 18, 2009 10:49 am

    Purpose: How to add a ClanChat on your server as a command code.

    Description: This allows you to make a code that makes you join a user's clan and talk in that user's clan only. Perfect for Castle Wars or other team activities.

    Difficulty: 3/10 (If you really get stuck, that is the problem)

    Source used: Void-Pkz (Very Happy)

    Files Modified: Client.java

    Step 1.

    Look for this specific code:

    Code:
    public String specbar;

    Now under that, add this:
    Code:

    public String clan = null;   // Clan Chat  by xx v0ider xx

    Step 2:

    After that code was added, all you have to do is do the command for the joining the clan

    Go look for this code:

    Code:
    if (command.equalsIgnoreCase("god") && playerRights >= 2) {

    (Some servers may not have this code, so I recommend to the people that do not have this to look for:

    Code:
    if (command.equalsIgnoreCase("

    As a beginning command code)

    Now under that TYPE of coding, add in:

    Code:
    if (command.toLowerCase().startsWith("joinclan")) {
          try {
             clan = command.substring(8);
             sendMessage("You have joined the clan chat "+clan);
          for(int i = 0; i < 50; i++) {
             client p2 = (client) server.playerHandler.players[i];
          if(p2.clan.equalsIgnoreCase(clan) && !p2.playerName.equals(playerName) && p2 != null) {
             p2.sendMessage(playerName+" has joined the clan chat."); // by xx v0ider xx
                }
             }
          } catch(Exception e) {
       }

    So this is the code to join a clan of a friend on the server you know. An example to use this is ::joinclan xx v0ider xx. And it should say

    Code:
     " xx v0ider xx has joined the clan chat."

    Easy so far?

    Ok now how to talk on in the clan chat. Under the code you just added, add this code to talk now:

    Code:
    }
    if (command.startsWith("clan")) {
        try {
        for (int i = 0; i < server.playerHandler.maxPlayers; i++) {
             client toClan = (client) server.playerHandler.players[i];
         if (toClan != null && toClan.clan.equalsIgnoreCase(clan) && clan != null) {
              toClan.sendMessage("["+clan+"] " +playerName+": "+command.substring(5)+"");  // by xx v0ider xx
                       }
               }
          } catch(Exception e) {
         }
    }

    Ok now for this, the way to this is, you do the code ::clan "type your message", like ::clan hi. This will turn up as

    Code:
    [Clan Name] xx v0ider xx: Hi.

    Step 3:

    Now that you know how to use your clan chat, other people on the server need to have a guide of how to use it. So this is how you are going to do it.

    Ok to place this code, put it under the

    Code:
    public void

    region to make it simpler. Or you can use your welcome screen menu and put the code under that because the text is going to be the same as that.

    After you done finding that, add this:

    Code:
    }   
       
       public void ClanHelpMenu() {

         //misc interface
    clearQuestInterface();
    sendQuest("Close Window", 18447);//Close Text//By 0wner  v0id
    sendQuest("Clan Help", 18450);//Title
    sendQuest("", 18451);//Sub Title
    sendQuest("1. Do ::join + Usersname clan name u wanna join", 18439);//Line 1
    sendQuest("", 18440);//Line 2
    sendQuest("2. ::clan [Say] ", 18441);//Line 3
    sendQuest("To tell your clan what you wanna say", 18442);//Line 4
    sendQuest("", 18443);//Line 5
    sendQuest("Sorry for being basic, but atleast we have one X[)", 18446);//Line 6
    sendQuest("Enjoy!", 18445);//Line 7
    sendQuest("", 18444);//Line 8
    showInterface(18436);
    flushOutStream(); // by xx v0ider xx
       }

    Ok now, we are going to need to put this guide as a code so when someone types in the command code, this guide pops up.

    Look for this:

    Code:
    } else if (command.equalsIgnoreCase("home")) {

    Under that add this:


    Code:

    } else if (command.equalsIgnoreCase("clanhelp")) {
          
             ClanHelpMenu(); //by djakaruz


    You are basically done, Save & Compile. Smile

      Current date/time is Tue May 07, 2024 2:47 pm