Hey MxC Iam Newbie On Java And I Make Two Easy Codes... I Dont Know If The Codes is sucks..But Work! Or Already Posted..
Lets Start
Fireworks & Social Action (victory) When Login ->
Config.java
public static boolean SOCIAL_ACTION_ON_LOGIN;
SOCIAL_ACTION_ON_LOGIN = Boolean.parseBoolean(configname.getProperty("SocialActionOnLogin", "False"));
EnterWorld.java
if (Config.SOCIAL_ACTION_ON_LOGIN)
{
activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 3));
MagicSkillUser MSU = new MagicSkillUser(activeChar, activeChar, 2025, 1, 1, 0);
activeChar.sendPacket(MSU);
activeChar.broadcastPacket(MSU);
}
configname.Properties
# On Login Players get social action (victory) & Fire Works when login
# Default: False
SocialActionOnLogin = False
Enchant Level Announce... This Code Announce When One Player Enchant A Item By The Config in enchant level
Config.java
public static int ENCHANT_LEVEL_ANNOUNCE;
public static int ENCHANT_ANNOUNCE;
ENCHANT_LEVEL_ANNOUNCE = Integer.parseInt(ENCHANTSetting.getProperty("EnchantLevelAnnounce", "15"));
ENCHANT_ANNOUNCE = Integer.parseInt(ENCHANTSetting.getProperty("EnchantAnnounce", "16"));
RequestEnchantItem.java
net.sf.l2j.gameserver.Announcements;
if(item.getEnchantLevel() == 0)
{
sm = new SystemMessage(SystemMessageId.S1_SUCCESSFULLY_ENCHANTED);
sm.addItemName(item.getItemId());
activeChar.sendPacket(sm);
+ {
+ if (item.getEnchantLevel() == Config.ENCHANT_LEVEL_ANNOUNCE)
+ {
+
+
+ Announcements.getInstance().announceToAll("Congratulations," + +activeChar.getName() + " successful enchanted " + item.getItem() + " + " + Config.ENCHANT_ANNOUNCE);
+
+
+
+ }
+ }
+}
sm = new SystemMessage(SystemMessageId.S1_S2_SUCCESSFULLY_ENCHANTED);
sm.addNumber(item.getEnchantLevel());
sm.addItemName(item.getItemId());
activeChar.sendPacket(sm);
+ {
+ if (item.getEnchantLevel() == Config.ENCHANT_LEVEL_ANNOUNCE)
+ {
+
+ Announcements.getInstance().announceToAll("Congratulations, " + activeChar.getName() + " successful enchanted " + +item.getItem() + " + " + Config.ENCHANT_ANNOUNCE);
+
+ }
+
+ }
+ }
item.setEnchantLevel(item.getEnchantLevel() + Config.CUSTOM_ENCHANT_VALUE);
item.updateDatabase();
}
configname.Properties
# Announce When a Item Will Be Enchanted By The Config!
# HOW WORKS: if you set EnchantLevelAnnounce it to 15, and EnchantAnnounce to 16
# Will Be ANNOUNCE Congratulations,*Players Name* successful enchated *itemname* + 16
# When Player Will Be Enchated +16 One Item...
EnchantLevelAnnounce = 15
EnchantAnnounce = 16
Some Pictures Here....
Credits Me
Sorry For My Bad English