Jump to content

Recommended Posts

Posted

Well , Since It's My Very FIRST Java Creation , I Want To Hear Your Opinions..

 

This Is A Custom Item , That Allows You When You Double-Click On It , To Grand You With Noblesse Status + Noblesse Skills . ( For Ever. NOT Until Restart! )

 

NOTE!: Tested On L2JFree And L2J And It's Working. ( The Following Guide Is For L2J )

 

 

Okay Let's Start..

 

 

First , Go To java.net.sf.l2j.gameserver.handler.itemhandlers

And Create a New .java File Named "NobleCustomItem" ( Without The Quotes )

 

Second , Open It And Paste Inside It , These :

 

// Decompiled by DJ v3.10.10.93 Copyright 2007 Atanas Neshkov  Date: 5/10/2008 2:12:00 μμ
// Home Page: http://members.fortunecity.com/neshkov/dj.html  http://www.neshkov.com/dj.html - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   NobleCustomItem.java

package net.sf.l2j.gameserver.handler.itemhandlers;

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.handler.IItemHandler;
import net.sf.l2j.gameserver.model.L2ItemInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.SocialAction;

public class NobleCustomItem
    implements IItemHandler
{

    public NobleCustomItem()
    {
    }

    public void useItem(L2PlayableInstance playable, L2ItemInstance item)
    {
        if(Config.NOBLE_CUSTOM_ITEMS)
        {
            if(!(playable instanceof L2PcInstance))
                return;
            L2PcInstance activeChar = (L2PcInstance)playable;
            if(activeChar.isNoble())
            {
                activeChar.sendMessage("You Are Already A Noblesse!.");
            } else
            {
                activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 16));
                activeChar.setNoble(true);
                activeChar.sendMessage("You Are Now a Noble,You Are Granted With Noblesse Status , And Noblesse Skills.");
                activeChar.broadcastUserInfo();
                playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
            }
        }
    }

    public int[] getItemIds()
    {
        return ITEM_IDS;
    }

    private static final int ITEM_IDS[] = {
        6673
    };

}

 

Third , Save It And Close It.

 

Fourth , Go To  java.config

Find The File "Character.properties" And Open It.

 

Go At The Bottom And Paste This :

#============================================================#
#                          Custom Noblesse Item Configuration                                  #
#============================================================#


# Noble Custom Item Configuration.
# Item Id = 7196.
# When ActiveChar will use this item will gain Noble Status.

EnableNobleCustomItem = True

 

Save It And Close It.

 

Fifth , Go To java.net.sf.l2j

And Find The File "Config.java"

 

Find This Line  :

    public static int		PARTY_XP_CUTOFF_LEVEL;

 

And Paste This Right After It :

    public static boolean 	NOBLE_CUSTOM_ITEMS;

 

Now , Find This Line :

                PARTY_XP_CUTOFF_LEVEL				= Integer.parseInt(Character.getProperty("PartyXpCutoffLevel", "30"));

 

And Paste This Right After It :

                NOBLE_CUSTOM_ITEMS              = Boolean.parseBoolean(Character.getProperty("EnableNobleCustomItem", "true"));

 

Save It , And Close It.

 

Sixth, Go To java.net.sf.l2j.gameserver.handler

And Find The File "ItemHandler.java" Open It.

 

Find This :

import net.sf.l2j.gameserver.handler.itemhandlers.*;

 

And Paste This Right After It :

import net.sf.l2j.gameserver.handler.itemhandlers.NobleCustomItem;

 

Then Find This :

	registerItemHandler(new SpiritLake());

 

And Paste This , Right After It :

                registerItemHandler(new NobleCustomItem());

 

Save It And Close It.

 

Seventh, Compile Your Gs ( Via Maven , Ant Build Doesn't Really Matter..But Since I Use L2J I Did It Via Ant Build ) And You Are Okay..!

 

Enjoy!

 

P.S: Special Thanks To Cobra For Showing Me The First Steps Of Java...

Also , I'll Post a Video Later In Order To See What This Item Does..

 

[EDIT]

 

 

Ready Patch Files ( .diff )

 

http://www.4shared.com/file/87327813/a83a8f7a/NobleCustomItem.html

 

 

 

Posted

its awsome dude!! gg bro you rock!

 

nothing special....

 

for ppl without java  knowledge is just copy/past the "hero item handler"  and change only this part

activeChar.setNoble(true);

... shared by mafia

Posted

Good Job Stefoulis ;)

 

nothing special....

 

for ppl without java  knowledge is just copy/past the "hero item handler"  and change only this part

activeChar.setNoble(true);

... shared by mafia

 

About you, why dont you show us your Uber Mega Java Skills By Creating something by your Own ? (Using JAVA), Istead of criticizing other ppl work.

 

thanks again Stefoulis. Much appreciated.

Posted

Good Job Stefoulis ;)

 

About you, why dont you show us your Uber Mega Java Skills By Creating something by your Own ? (Using JAVA), Istead of criticizing other ppl work.

 

thanks again Stefoulis. Much appreciated.

 

LOL IiIiJacKiIiI you are omfg...Have you ever seen Fogotend's shares?? LOL...Learn first then speak..(check forum for his creations)..Anyway Stefoulis Thank you for the awesome share..

 

Posted

nothing special....

 

for ppl without java  knowledge is just copy/past the "hero item handler"  and change only this part

activeChar.setNoble(true);

... shared by mafia

 

Look the other share is from Vago and Hanwik did it .... the wrong on other share is the item can't be disapear ..

 

Wen the Character press on the item ....!! So if you understand about java you must see it ....!!!

 

Anyway ([Gr]O kathenas me tin trela tou)

 

//End

 

p.s: Stef Again you do great job :)

 

Posted

Look the other share is from Vago and Hanwik did it .... the wrong on other share is the item can't be disapear ..

 

Wen the Character press on the item ....!! So if you understand about java you must see it ....!!!

 

Anyway ([Gr]O kathenas me tin trela tou)

 

//End

 

 

Yep I agree with you...(3 months ago I played in a server and when i click 1 item i get full buffs..I will check it in mxc forum..)

[GR]Ti na peis....Epeidi o allos dn kanei search nomizei oti o Fogotend einai kanenas tyxaiws pou aplos einai perastikos apo to mxc...Anyway o ka8enas me tn trela tou edw mesa :)

Posted

nothing special....

 

for ppl without java  knowledge is just copy/past the "hero item handler"  and change only this part

activeChar.setNoble(true);

... shared by mafia

 

Man he learn how to make things in java...

I dont know why but there are some ppl like you who said its not a big deal easy to make but thats nonsense because you talk but dont do anything i see too many ppl in mxc like you...

correct me if i'm wrong but i dont see any JAVA guide share or else from you only a subclass delay(but its implemented in l2jfree so easy to have it...) make a USEFULL JAVA share when you have it you can talk like that but until you dont have it plz let them to learn java and dont insult them...

Posted

Man he learn how to make things in java...

I dont know why but there are some ppl like you who said its not a big deal easy to make but thats nonsense because you talk but dont do anything i see too many ppl in mxc like you...

correct me if i'm wrong but i dont see any JAVA guide share or else from you only a subclass delay(but its implemented in l2jfree so easy to have it...) make a USEFULL JAVA share when you have it you can talk like that but until you dont have it plz let them to learn java and dont insult them...

 

Look his insulting style is F@cking wrong but he knows things(L2 modding etc...)I didnt agree with IiIiJacKiIiI because he said that Fogotend didnt make any good share..Anyway all these things are offtopic...

Posted

Look his insulting style is F@cking wrong but he knows things(L2 modding etc...)I didnt agree with IiIiJacKiIiI because he said that Fogotend didnt make any good share..Anyway all these things are offtopic...

 

Thats all nice and good BUT you dont understand my reply i said LET THEM LEARN...look what stef said: Well , Since It's My Very FIRST Java Creation , I Want To Hear Your Opinions.. for fogotend its not a hard thing to make?thats ok but for stef its a good start because java is not an easy thing and because of that the only thing we can do is thanks the work he made not reply like this: for ppl without java  knowledge is just copy/paste... ahh i really start to understand why A-style leave...

Posted

Well ,Thanks For Your Comments People..

 

Also , Yes Maybe It Is a C/p Fogotendx20 for people without java knowledge..

 

but u can check that the people that created the hero item , wasn't working fully..

 

so it can't be a c/p

 

 

W/e , I'll Continue Creating Things.. Don't Really Care If You Like It Or Not.

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.




  • Posts

    • Where I can buy a cheap domain .com? cheapest I found was on Godaddy for 12 euro and Hostinger for 10 euro.
    • Hello everyone, here's a simple and useful idea for any type of server.   This code applies a discount when a player makes a purchase inside a clan’s castle or clan hall, offering a benefit to clan members who own a castle or clan hall. Important: Merchant transactions must be handled through multisell, not buylist. The discount is directly applied within the multisell, so the price shown is already reduced.   "For example, if a scroll costs 1000 Adena and you set a 20% discount in the config, the final price when purchasing inside a castle or clan hall will be 800 Adena."   This code is developed on the public aCis 401 revision.   public static int CLAN_BASE_OWNERSHIP_MERCHANT_DISCOUNT; CLAN_BASE_OWNERSHIP_MERCHANT_DISCOUNT = clans.getProperty("ClanBaseOwnershipMechantDiscount", 20); # If clan owns a clan hall or castle, all members have a discount of X% at merchant transactions (multisell). # Discount applies only inside the base (castle or clan hall). ClanBaseOwnershipMechantDiscount = 20   /** diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MultisellData.java b/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MultisellData.java index 556e111..bbf8e69 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MultisellData.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MultisellData.java @@ -101,7 +101,7 @@ do { // send list at least once even if size = 0 - player.sendPacket(new MultiSellList(list, index)); + player.sendPacket(new MultiSellList(list, index, player)); index += PAGE_SIZE; } while (index < list.getEntries().size()); diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java index 7c82c5b..1654abc 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java @@ -6,6 +6,7 @@ import net.sf.l2j.Config; import net.sf.l2j.gameserver.enums.FloodProtector; import net.sf.l2j.gameserver.enums.StatusType; +import net.sf.l2j.gameserver.enums.ZoneId; import net.sf.l2j.gameserver.enums.items.CrystalType; import net.sf.l2j.gameserver.model.Augmentation; import net.sf.l2j.gameserver.model.actor.Player; @@ -225,6 +226,20 @@ return; } + if (player.isInsideZone(ZoneId.CLAN_HALL) && player.getClan() != null && player.getClan().hasClanHall()) + { + e.setItemCount(e.getItemCount() * (100 - Config.CLAN_BASE_OWNERSHIP_MERCHANT_DISCOUNT) / 100); + if (e.getItemCount() == 0) + e.setItemCount(1); + } + + if (player.isInsideZone(ZoneId.CASTLE) && player.getClan() != null && player.getClan().hasCastle()) + { + e.setItemCount(e.getItemCount() * (100 - Config.CLAN_BASE_OWNERSHIP_MERCHANT_DISCOUNT) / 100); + if (e.getItemCount() == 0) + e.setItemCount(1); + } + if (Config.BLACKSMITH_USE_RECIPES || !e.getMaintainIngredient()) { // if it's a stackable item, just reduce the amount from the first (only) instance that is found in the inventory diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/MultiSellList.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/MultiSellList.java index 9269b06..c6102a0 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/MultiSellList.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/MultiSellList.java @@ -2,6 +2,9 @@ import static net.sf.l2j.gameserver.data.xml.MultisellData.PAGE_SIZE; +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.enums.ZoneId; +import net.sf.l2j.gameserver.model.actor.Player; import net.sf.l2j.gameserver.model.multisell.Entry; import net.sf.l2j.gameserver.model.multisell.Ingredient; import net.sf.l2j.gameserver.model.multisell.ListContainer; @@ -15,7 +18,9 @@ private boolean _finished; - public MultiSellList(ListContainer list, int index) + private Player _player; + + public MultiSellList(ListContainer list, int index, Player player) { _list = list; _index = index; @@ -28,6 +33,8 @@ } else _finished = true; + + _player = player; } @Override @@ -74,7 +81,14 @@ { writeH(ing.getItemId()); writeH(ing.getTemplate() != null ? ing.getTemplate().getType2() : 65535); - writeD(ing.getItemCount()); + + if (_player.isInsideZone(ZoneId.CLAN_HALL) && _player.getClan() != null && _player.getClan().hasClanHall()) + writeD((ing.getItemCount() * (100 - Config.CLAN_BASE_OWNERSHIP_MERCHANT_DISCOUNT) / 100) < 1 ? 1 : ing.getItemCount() * 80 / 100); + else if (_player.isInsideZone(ZoneId.CASTLE) && _player.getClan() != null && _player.getClan().hasCastle()) + writeD((ing.getItemCount() * (100 - Config.CLAN_BASE_OWNERSHIP_MERCHANT_DISCOUNT) / 100) < 1 ? 1 : ing.getItemCount() * 80 / 100); + else + writeD(ing.getItemCount()); + writeH(ing.getEnchantLevel()); writeD(0x00); // TODO: i.getAugmentId() writeD(0x00); // TODO: i.getManaLeft()  
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/uthciha-services https://campsite.bio/utchihaamkt
    • WTB EXP ETERNAL 10x new dm.
    • This project is based on the latest public aCis sources (revision 401) and supports a multi-client system (C4 & IL), making it suitable for custom usage but not for retail.   You can configure the SelectedClient option in server.properties and loginserver.properties to switch between C4 and IL.  Both clients are fully synchronized, including login, server selection, packets, and geodata.   Notable Features: - Completed the login and server selection phase for both clients. - Synchronized all packets to support both clients (including some specific features). - Reworked the datapack and SQL files (excluding HTML files) to work seamlessly with both clients. - Added geodata support for both clients. - Adapted nearly all AI, scripts, bosses, HTML, and MULTISELL files to match C4 functionality. - Reduced the maximum clan level from 8 to 5 (C4 feature). - Rewrote clan HTML to remove C5-C6 features.   Disabled the following C5 and C6 features: - Divine Inspiration (C6 feature). - Clan skills and clan reputation points (C5 feature). - Pledge class (C5 feature). - Hero skills (C5 feature). - Dueling system (C6 feature). - Augmentations (C6 feature). - Cursed weapons (C5-C6 feature).   General Improvements: - Performed a general HTML cleanup and optimized features based on the client version. - Added an option to display the remaining time of disabled skills. - Skill timestamps now update when using the skill list.   This flexibility allows you to create a unique progression system tailored to your needs. The price for the diff patch, which can be applied to aCis public sources, is €150. For inquiries, please contact me via PM or Discord (ID: @Luminous).
  • Topics

×
×
  • Create New...