Jump to content
  • 0

[Help] PvP reward


Question

Posted

i want to add pvp drops on my server (i know how) but the problem is farming them,i thought to make a pvp zone and only there if player kills another player (pvp) to get pvp reward i want to make my pvp zone in gludin... guide me how to do it it :)

7 answers to this question

Recommended Posts

  • 0
Posted

For example.. you can create new boolean in L2PcInstance.

 

private boolean _ready = false;

 

And this method:

 

    public boolean isReady()

    {

    return _ready;

    }

 

and:

 

public void setReady()

{

_ready = true;

}

 

And now, create new zone, and you have to put something like this at onEnter void:

 

player.setReady();

 

And now.. create your code to reward players for pvp kills with check:

 

if(player.isReady)

//give reward

 

- Sample Idea.

 

 

  • 0
Posted

wow and this gonna reward player only if he takes pvp in gludin?

 

Yes, but you have to create this special Zone..for this town.

 

But its really simple, just fallow my 1st post.

  • 0
Posted

package java.eu.l2jcustom.model.zone;

import com.l2jserver.gameserver.datatables.MapRegionTable;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.zone.L2ZoneType;
import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;

/**
* Custom PvP Zone
*/
public class CustomPvPZone extends L2ZoneType  {

public CustomPvPZone(int id) {
	super(id);
}

@Override
protected void onEnter(L2Character character) {
	L2PcInstance player = character.getActingPlayer();
	if(player == null)
		return;
	player.setReady();

}

@Override
protected void onExit(L2Character character) {
	L2PcInstance player = character.getActingPlayer();

	player.setNotReady();
}

@Override 
public void onDieInside(L2Character character) {}

@Override 
public void onReviveInside(L2Character character) {}
}

 

And you have to also add one more void to L2PcInstance:

 

  public void setNotReady()

  {

      _ready = false;

  }

  • 0
Posted

Testing it thanks :D

 

p.s you could make a topic about pvp kill reward on specific zone i searched about it and i dont think there is one....you would help many members i guarantee it :)

  • 0
Posted

Testing it thanks :D

 

p.s you could make a topic about pvp kill reward on specific zone i searched about it and i dont think there is one....you would help many members i guarantee it :)

 

actually i made a share for reward regarding to zone type

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