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 ?

  • 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?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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