Jump to content
  • 0

Need Premium Rune For L2Jfrozen


Dan7E2

Question

12 answers to this question

Recommended Posts

  • 0

l2jfrozen already have //setdonator command which give a character sp xp adena drop spoil bonus rate

i want an item like this:

when you have the item in inventory you get donator status , can be a quest item for example and i set the item duration in database to 24 hours for example

Link to comment
Share on other sites

  • 0

If you want it for free, then teach Java. This code you will not find.

 

What need:

1. Create new items and itemhandler for activation premium time.

2. Create global task for control premium state of all characters. If you want global premium for all characters and servers when need cretate global task on the Login server side. Otherwise, on the Game server.

3. Add modifiers and checks for rates EXP, SP and DROP for premium users.

 

And this you want to get at free? Learn Java or buy.

Link to comment
Share on other sites

  • 0

If you want it for free, then teach Java. This code you will not find.

 

What need:

1. Create new items and itemhandler for activation premium time.

2. Create global task for control premium state of all characters. If you want global premium for all characters and servers when need cretate global task on the Login server side. Otherwise, on the Game server.

3. Add modifiers and checks for rates EXP, SP and DROP for premium users.

 

And this you want to get at free? Learn Java or buy.

I made the code but i have some errors when compile

Link to comment
Share on other sites

  • 0
compile:

    [javac] Compiling 1122 source files to C:\Users\XXX\Desktop\source\source\build\classes

    [javac] C:\Users\XXX\Desktop\source\source\head-src\com\l2jfrozen\gameserver\handler\admincommandhandlers\AdminDonator.java:179: error: cannot find symbol

    [javac] stmt.setLong(6, player.getHeroDate(player.getObjectId()));

    [javac]                      ^

    [javac]   symbol:   method getHeroDate(int)

    [javac]   location: variable player of type L2PcInstance

    [javac] C:\Users\XXX\Desktop\source\source\head-src\com\l2jfrozen\gameserver\handler\itemhandlers\DonatorCustomItem.java:96: error: cannot find symbol

    [javac] stmt.setLong(6, player.isHero() ? 0 : player.getHeroDate(player.getObjectId()));

    [javac]                                            ^

    [javac]   symbol:   method getHeroDate(int)

    [javac]   location: variable player of type L2PcInstance

    [javac] C:\Users\XXX\Desktop\source\source\head-src\com\l2jfrozen\gameserver\handler\itemhandlers\HeroCustomItem.java:99: error: cannot find symbol

    [javac] stmt.setLong(6, player.getHeroDate(player.getObjectId()) + heroTime);

    [javac]                      ^

    [javac]   symbol:   method getHeroDate(int)

    [javac]   location: variable player of type L2PcInstance

    [javac] 3 errors

 

BUILD FAILED

C:\Users\XXX\Desktop\source\source\build.xml:65: Compile failed; see the compiler error output for details.

 

Total time: 14 seconds
Link to comment
Share on other sites

  • 0

hmm try to activechar.gerinventory() and them getitemid if its true activechar setdonator its should work.. or simply u can make it by clicking on item..to gain donator status..just copy the noble one and edit it ( if i got what you mean)!!

Link to comment
Share on other sites

  • 0

You must create an Handler like NoblessCustomItem.java name it Donateruneitem.java then copy/paste what nobless handler got inside .. change all the important thinks and the check you want to have like  

			if (activeChar.isInOlympiadMode())
			{
				activeChar.sendMessage("This Item Cannot Be Used On Olympiad Games.");
			}
			
			if (activeChar.isNoble())
			{
				activeChar.sendMessage("You Are Already A Noblesse!.");
			}

Then change the with setdonator or however is the command to set someone donator 

			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);
				activeChar.getInventory().addItem("Tiara", 7694, 1, activeChar, null);
			}

and for the last go to Config.java check how noblesse work

somethink like that:

if (Config.NOBLE_CUSTOM_ITEMS) // this is inside NoblessCustomItem.java

public static boolean NOBLE_CUSTOM_ITEMS; // this is inside config.java

			NOBLE_CUSTOM_ITEMS = Boolean.parseBoolean(L2JFrozenSettings.getProperty("EnableNobleCustomItem", "true"));
			NOOBLE_CUSTOM_ITEM_ID = Integer.parseInt(L2JFrozenSettings.getProperty("NoobleCustomItemId", "6673")); 

# -------------------------------------------------------
# Noble Custom Item Configuration -  ///////////// <--- This is inside config.properties
# -------------------------------------------------------
# When ActiveChar will use this item will gain Noble Status.
EnableNobleCustomItem = True // Is the NOBLE_CUSTOM_ITEMS in config.java
# Id Itemn Need's
NoobleCustomItemId = 10085 // is the NOOBLE_CUSTOM_ITEM_ID in config.java

well from the time you got allready the "command" instance is very very very easy to make it usable from an item

Link to comment
Share on other sites

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
Answer this question...

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