Jump to content

Recommended Posts

  • 1 month later...
  • 1 month later...
  • 8 months later...
  • 3 months later...
Posted (edited)

adapted for High Five datapack rev. 9573, server rev. 5909

 

http://www.4shared.com/zip/UrLv3_Q-/AugmentShop.html?

 

By the way, I tried to change it a bit so instead of destroying 1 Item for Augment, it will take 2 Items. But I had error:

 

I made changes like below to AugmentShop.java

Line 23
	private final static int ITEM_ID = 50030;
	private final static int ITEM_COUNT = 10000;
+	private final static int ITEM_ID_2 = 50030;
+	private final static int ITEM_COUNT_2 = 500;
	private final static String qn = "AugmentShop";
	private final static int NPC = 93000;

-------------------------------------

Connection con = null;
		try
		{
-			player.destroyItemByItemId("Consume", ITEM_ID, ITEM_COUNT, player, true);
+			player.destroyItemByItemId("Consume",  ITEM_ID, ITEM_ID_2, ITEM_COUNT, ITEM_COUNT_2, player, true);
			con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("REPLACE INTO item_attributes VALUES(?,?,?,?)");
			statement.setInt(1, item.getObjectId());

				statement.setInt(2, attribute*65536+1);
				statement.setInt(3, skill);
				statement.setInt(4, level);
			
			statement.executeUpdate();
			player.sendMessage("Succesfully augmented. You have to relog now.");
			statement.close();
			
		}

but after that I'm getting error like that in the console and don't know how to make it work. I know what it means but not sure what and where should I add code in L2PcInstance.java or L2Object

----------
1. ERROR in \custom\AugmentShop\AugmentShop.java (at line 110)
        player.destroyItemByItemId("Consume", ITEM_ID, ITEM_ID_2, ITEM_COUNT, IT
EM_COUNT_2, player, true);
               ^^^^^^^^^^^^^^^^^^^
The method destroyItemByItemId(String, int, long, L2Object, boolean) in the type
 L2PcInstance is not applicable for the arguments (String, int, int, int, int, L
2PcInstance, boolean)
----------
1 problem (1 error)The method destroyItemByItemId(java.lang.String, int, long, c
om.l2jserver.gameserver.model.L2Object, boolean) in the type com.l2jserver.games
erver.model.actor.instance.L2PcInstance is not applicable for the arguments (jav
a.lang.String, int, int, int, int, com.l2jserver.gameserver.model.actor.instance
.L2PcInstance, boolean)
Failed executing script: G:\Test Server H5\game\data\scripts\custom\AugmentShop\
AugmentShop.java. See AugmentShop.java.error.log for details.

I was thinking to add it here, but not sure:

L2PcInstance.java:

line 4036

	 * @return boolean informing if the action was successful
	 */
	@Override
-	public boolean destroyItemByItemId(String process, int itemId, long count, L2Object reference, boolean sendMessage)
+	public boolean destroyItemByItemId(String process, int itemId, long count, int itemId2, long count2, L2Object reference, boolean sendMessage)
	{
		if (itemId == PcInventory.ADENA_ID)
		{
			return reduceAdena(process, count, reference, sendMessage);
		}

Any advise?

Edited by Gorion
  • 1 month later...
  • 1 month later...
Guest
This topic is now closed to further replies.



  • Posts

    • Hello everyone, Lineage II clan MightyTeam is reopening recruitment and looking for ambitious, active players who want to compete seriously and grow together. We are building a disciplined and organized environment focused on teamwork, strategy, and long-term success. What we offer: Strong and experienced leadership, Fair and respectful treatment for every member, Organized clan structure and tactical gameplay, Competitive mentality with clear goals, Stable and drama-free environment, What we expect: Activity and willingness to improve, Teamplay and communication, Respect toward clan members, Motivation to compete and dominate, No politics. No toxicity. Only focused players with the right mentality.   If you are interested in joining MightyTeam, contact on Discord: tzelal.  <-- there is a dot  or Telegram tz3gg. 
    • Lol thanks no l better get Acis /Lucera/Mobius and will squeeze more profit that your crazy ass price files for fucks know what. Even Reborn was smart enough use Acis after Lucera to squeeze shit a lot of money 😁 Fucking hell 15 grants lol 😂 
    • It seems the SkyLord is simply not familiar with what l2-scripts and Bonux represents today. His opinion is likely based on our older materials — which is understandable. We haven't been standing still. Over the years, the studio has moved to a fundamentally different level of development. Our early builds are still available on the legacy site at very accessible prices — and they remain entirely viable for launching a project. As practice shows, solid servers can still be built on them, albeit with greater effort. As for the market — Classic, Essence, and Main have long been running on l2-scripts engines, and the majority of successful servers have, at one stage or another, used our source code as their foundation. This isn't self-promotion — it's the history of the industry. Today, for established projects with a reputation, we offer a different format: private partnership with individual terms tailored to your business goals. If you're interested in long-term collaboration — we're open to the conversation. We have solutions for every level — from newcomers to top-tier projects. Feel free to reach out, and we'll be happy to discuss.
  • 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..