Jump to content
  • 0

Another problem .


Joκκєrino

Question

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

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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!

Link to comment
Share on other sites

  • 0

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 ?

Link to comment
Share on other sites

  • 0

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!!!

Link to comment
Share on other sites

  • 0

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?

Link to comment
Share on other sites

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...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock