item drop like adena

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
gmakhs
Posts: 215
Joined: Sat Apr 14, 2007 12:00 pm

item drop like adena

Post by gmakhs »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 5069:
L2JDP Revision 8518:

hello everyone im trying to set some items share in party like adena .
i tryed use search in forum and i found some nice posts but they just helped me to get the idea how to do it.y.java

i opened L2Party.java
and i edited this line

Code: Select all

if (item.getItemId() == 57 
and i edited like this

Code: Select all

 if (item.getItemId() == 57 && (item.getItemId() ==6393 && (item.getItemId() ==3483 && (item.getItemId() ==6673 && (item.getItemId() ==9143 && (item.getItemId() ==6393))))))
i did a lot of test i even searched google so i tryed with == or with != but nothing worked... with == none of items shared in party not event adena with != only adena shared like normal.... can anyone help me?


google says it must look like this

Code: Select all

if (x == 2 && y != 2) {  System.out.println("Both conditions are true.");}
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: item drop like adena

Post by Zoey76 »

I already did and share this months ago: viewtopic.php?f=73&t=21266
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: item drop like adena

Post by Zoey76 »

In order to answer your question:
Think in the English phrase that describe what you want to do:
"if Item Id equals 57 or Item Id equals Other Id or Item Id equals Some other Id then do something."

This is translated to Java as:

Code: Select all

 if (itemId == 57 || itemId == otherId ||itemId == someOtherId)    doSomething(); 
You want the item Id to be one of them, not all at the same time, you can easily see why that won't make sense:
If x equals 3 and x equals 4 then do something.
You cannot request a variable to have the two different values at the same time.

I hope this help you out getting a bit of boolean logic. :wink:
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
User avatar
gmakhs
Posts: 215
Joined: Sat Apr 14, 2007 12:00 pm

Re: item drop like adena

Post by gmakhs »

ok now i understand a little bit :) i saw your share during search bit i was wanna try it alone and without use confing ffiles:) now i have another problem
if i can understand right this code gets item id and appears the massage like you gain xxx adena or you gain xxx this item
after i used your suggestion party loot is working but whatever you pick up from this items appear as adena if this code gets the item id where is the mistake?

Code: Select all

if (item.getCount() > 1)        {            SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.C1_OBTAINED_S3_S2);            msg.addString(target.getName());            msg.addItemName(item);            msg.addItemNumber(item.getCount());            broadcastToPartyMembers(target, msg);        }
alexiszero
Posts: 2
Joined: Tue Oct 16, 2012 1:51 am

Re: item drop like adena

Post by alexiszero »

I can finally show me how he did it????
User avatar
TeNaCiOuS
Posts: 10
Joined: Mon May 23, 2011 12:17 pm
Location: Chile

Re: item drop like adena

Post by TeNaCiOuS »

ty ^^_
Post Reply