Jump to content

[Share][IL]Fireworks & Social Action (victory) When Login! & Enchant Announce...


Recommended Posts

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


11cfodi.jpg


156tzza.jpg


Credits Me

Sorry For My Bad English

Link to comment
Share on other sites

Guest Elfocrash

The Fireworks and social action is already shared but the announcement on enchant is not and it's a cool code.

 

Thanks for sharing.Keep it up

Link to comment
Share on other sites

The Fireworks and social action is already shared but the announcement on enchant is not and it's a cool code.

 

Thanks for sharing.Keep it up

Oh I Say The True I Dont Search For The Code "already shared" but never mind!

Thnx! Very Much

Link to comment
Share on other sites

Where did you find it's not yours.

O_O Try To Spam and Flame More and More and More i dont find it anywhere its not hard to make this codes ....

and as i say

Credits Me

 

Link to comment
Share on other sites

O_O Try To Spam and Flame More and More and More i dont find it anywhere its not hard to make this codes ....

and as i say

I don't care what you write since all of yours share's are stolen.
Link to comment
Share on other sites

I don't care what you write since all of yours share's are stolen.

+ 1 I Dont Care About What You Say :) Out of My Topic.. You Just Spam IF YOU BELIEVE Its Stolen Just you can say it one time and then shut the fack up!

Link to comment
Share on other sites

Stop it guys. Mele if it isn't yours you should put the correct credits.

First i dont start anything and I Made This codes LoL! Becuase krash is immature Its not my fault!

Link to comment
Share on other sites

I had some problems . But now i it works :

 

1. I think you must add import com.l2jserver.gameserver.Announcements;

 

2. There is an error : Announcements.getInstance().announceToAll("Congratulations," + +activeChar.getName() + " successful enchanted " + item.getItem() + " + " + Config.ENCHANT_ANNOUNCE);

 

You must cut this + .

 

Nice share !

Link to comment
Share on other sites

I don't care what you write since all of yours share's are stolen.

 

Right. The code is from L2J Frozen and the fireworks and crap are included features on it.

Link to comment
Share on other sites

Right. The code is from L2J Frozen and the fireworks and crap are included features on it.

Some Moderator  Punish Spammers & Clean Topic :S

L2JFrozen Have A Different Code And Only The First Log Character Have Effects of Firework *only*

:) so you can stop spam!

I had some problems . But now i it works :

 

1. I think you must add import com.l2jserver.gameserver.Announcements;

 

2. There is an error : Announcements.getInstance().announceToAll("Congratulations," + +activeChar.getName() + " successful enchanted " + item.getItem() + " + " + Config.ENCHANT_ANNOUNCE);

 

You must cut this + .

 

Nice share !

yep you have right!

Sorry Import Added!

Link to comment
Share on other sites

  • 3 weeks later...

I did the social action and fireworks about 1 year ago...

Where , here?

I Dont Know Man..

I Dont Know If The Codes is sucks..But Work! Or Already Posted..

And i Dont copy / paste.. yours if you have share it dunno :D

Link to comment
Share on other sites

  • 1 month later...

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
Reply to this topic...

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