Or is there another way? I was also thinking about simply copy+pasting this code with the ID of the other zone, but honestly I don't want to mess around and probably get owned by a bunch of errors, that would be a pity. :) I have no Java knowledge, I am trying to understand how it works, and I can edit some numbers, thats all.
Warning: This guy is a big scammer, trying to sell everything, advertising for servers etc.
That's his mail address evgesha.nrnr@gmail.com , stay away!
@Atom @Celestine
Warning: This guy is a big scammer, trying to sell everything, advertising for servers etc.
That's his mail address evgesha.nrnr@gmail.com , stay away!
@Celestine
@Atom
Question
Romotheone
Hello dear person who is reading my topic.
I have a question, more like a request to find out how to add a zoneID into an already existing Java code.
[table][tr]
[td]
public void increasePvpKills(L2Character target)
{
if (((target instanceof L2PcInstance)) && (AntiFeedManager.getInstance().check(this, target)))
{
setPvpKills(getPvpKills() + 1);
for (L2ZoneType zone : L2World.getInstance().getRegion(getX(), getY()).getZones()) {
if ((zone.isCharacterInZone(this)) && (zone.getName() != null) && (zone.getId() == 40001)) {
addItem("PvPReward", 14720, 1L, this, true);
}
}
sendPacket(new UserInfo(this));
sendPacket(new ExBrExtraUserInfo(this));
}
}
[/td]
[/tr][/table]
This code is supposed to spawn an item after every PvP kill in a certain zone. My question is:
How can I add another zone and keep this one aswell? Is it enough to seperate the 2 zones by writing a "," between the 2 zone IDs? Like this:
[table][tr]
[td]
if ((zone.isCharacterInZone(this)) && (zone.getName() != null) && (zone.getId() == 40001, 40002))
[/td]
[/tr][/table]
Or is there another way? I was also thinking about simply copy+pasting this code with the ID of the other zone, but honestly I don't want to mess around and probably get owned by a bunch of errors, that would be a pity. :) I have no Java knowledge, I am trying to understand how it works, and I can edit some numbers, thats all.
Thanks in advance.
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now