Jump to content
  • 0

Another problem .


Question

Posted

Why this code doesn't work ? ( it works in eclipse , without error , but no effect in game ) .

 

if (newChar.isWearingMagicArmor())

        {

newChar.setTitle(Config.ADD_CHAR_TITLE_M);

newChar.getAppearance().setNameColor(244, 14, 203);

newChar.sendMessage("Congratulations , you are born to be Master of Dark Magic \n  !");

        }

        else

        {

        newChar.setTitle(Config.ADD_CHAR_TITLE_F);

        newChar.getAppearance().setNameColor(26, 135, 205);

        newChar.sendMessage("Congratulations , you are born to be a Invincible Knight of Holy .  \n !");

        }

 

I've added it in CharacterCreation.java

5 answers to this question

Recommended Posts

  • 0
Posted

Hmm what aboy this??

 

Index: java/com/l2jserver/gameserver/network/clientpackets/EnterWorld.java
===================================================================
@@ -19,6 +19,7 @@

import com.l2jserver.Base64;
import com.l2jserver.Config;
+import com.l2jserver.L2DatabaseFactory;
import com.l2jserver.gameserver.Announcements;
import com.l2jserver.gameserver.GmListTable;
import com.l2jserver.gameserver.LoginServerThread;
@@ -477,9 +478,42 @@

       TvTEvent.onLogin(activeChar);

+
       if (Config.WELCOME_MESSAGE_ENABLED)
-         activeChar.sendPacket(new ExShowScreenMessage(Config.WELCOME_MESSAGE_TEXT, Config.WELCOME_MESSAGE_TIME));

+         if (activeChar.getLevel() == 85)
+         {
+            activeChar.sendPacket(new ExShowScreenMessage("Welcome Back!", 10000));
+         }
+         else
+            switch(activeChar.getRace()){
+            
+            case Human:
+            activeChar.getAppearance().setNameColor(244, 14, 203);
+            activeChar.sendMessage("Congratulations , you are born to be Master of Dark Magic \n  !");
+
+            case DarkElf:
+            
+            activeChar.getAppearance().setNameColor(244, 14, 203);
+            activeChar.sendMessage("Congratulations , you are born to be Master of Dark Magic \n  !");
+            break;
+
+            case Dwarf:
+            
+            activeChar.getAppearance().setNameColor(244, 14, 203);
+            activeChar.sendMessage("Congratulations , you are born to be Master of Dark Magic \n  !");
+            break;
+
+            case Elf:
+            
+            activeChar.getAppearance().setNameColor(244, 14, 203);
+            activeChar.sendMessage("Congratulations , you are born to be Master of Dark Magic \n  !");
+            break;
+
+            case Kamael:
+            
+            activeChar.getAppearance().setNameColor(244, 14, 203);
+            activeChar.sendMessage("Congratulations , you are born to be Master of Dark Magic \n  !");
+            break;
+
+            case Orc:
+            
+            activeChar.getAppearance().setNameColor(244, 14, 203);
+            activeChar.sendMessage("Congratulations , you are born to be Master of Dark Magic \n  !");
+            break;
+
+            }
       L2ClassMasterInstance.showQuestionMark(activeChar);
       
       int birthday = activeChar.checkBirthDay();

 

Correct me if i made any Errors!! :) Hope you like it!

  • 0
Posted

It's about if you are mage , there must send " Cong......Master of Dark Magic " and if you're fighter , there must send " Cong ... Invincible knight of holy "

 

Can you edit it ?

 

well my eclipse don't work ://

 

try it like this

 

       

    if (newChar.isMage())
        	{
			newChar.setTitle(Config.ADD_CHAR_TITLE_M);
			newChar.getAppearance().setNameColor(244, 14, 203);
			newChar.sendMessage("Congratulations , you are born to be Master of Dark Magic \n  !");
        	}
        else
        	{
        		newChar.setTitle(Config.ADD_CHAR_TITLE_F);
        		newChar.getAppearance().setNameColor(26, 135, 205);
        		newChar.sendMessage("Congratulations , you are born to be a Invincible Knight of Holy .   \n !");
        	}

 

 

cause maybe the "isWearingMagicArmor"  isnt working.. type isMage.. and try it!!!

  • 0
Posted

Why this code doesn't work ? ( it works in eclipse , without error , but no effect in game ) .

 

if (newChar.isWearingMagicArmor())

        {

newChar.setTitle(Config.ADD_CHAR_TITLE_M);

newChar.getAppearance().setNameColor(244, 14, 203);

newChar.sendMessage("Congratulations , you are born to be Master of Dark Magic \n  !");

        }

        else

        {

        newChar.setTitle(Config.ADD_CHAR_TITLE_F);

        newChar.getAppearance().setNameColor(26, 135, 205);

        newChar.sendMessage("Congratulations , you are born to be a Invincible Knight of Holy .  \n !");

        }

 

I've added it in CharacterCreation.java

 

What exactly do you want this code to do?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...