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?

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


  • Posts

    • NEW HIDDENSTASH KEY SYSTEM INTRODUCED TO THE SITE   **Earn While You Spend - Introducing HS Cashback!**   Every purchase on our site now rewards you with **HS Keys cashback**   EVERY ONE WHO REGISTERS IN SITE UNTILL 15TH OF MAY GETS 2000 HS KEYS IN HES BALANE   Here's how it works:       **1 USD = 1000 HS Keys**   **Get 3% cashback** on every purchase   **Use your HS Keys to **save on your next order**   ---   ### ⚡ Why this is awesome   * Every order gives you value back   * Stack it with promos & HS usage   * Turn your spending into future discounts   ---   ### Example   Spend **$10** → Get **300 HS Keys** back   Spend **$50** → Get **1500 HS Keys** back   ---   ### Smart system (built for fairness)   * Cashback is rounded to keep things balanced   * Prevents abuse from tiny orders   * Rewards real buyers   ---   ### Start earning now   Every purchase = progress toward your next discount   Shop now and build your HS balance!   #cashback #gamingdeals #d2r #rewards #loyalty   Stay safe out there, heroes - and happy hunting! www.d2rhiddenstash.com     We just launched our new Affiliate Program — and it’s the easiest way to earn HS Keys.   Invite your friends using your personal link.   Example: If your friend spends $10 → you get 300 HS Keys No limits. No effort. Just share your link.   Get your referral link here: www.d2rhiddenstash.com/profile     Start earning today
    • https://jumpshare.com/share/L45ApA5PVrGN2O5Ua5pQ   Skill synchronization with the server: Launching and synchronizing animations, launching and synchronizing effects. All of this is tied to the server's timing  
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..