Jump to content
  • 0

[Help] returning targeted players pvp points as a var


estaz

Question

Hello,

  i want to modify Vago "Item reward for pvp/pk kill.":

        // Give x y for a pvp kill
	addItem("Loot", x, y, this, true);
	sendMessage("You won y x for a pvp kill!"); 

i want that y would be the amount of targetPlayer pvps so that if killed player has 10 pvps, killer would get 10 y, but it seems that i cant get targetPlayer pvps as a var.. or can i?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I want to do this:

1.For every kill player recieves a PvP point, and after the player dies, all pvps disappear and appears as pk points. (Basically, pvp points are kills in a row)
2.Player recieves as much adena as the opponent has pvp points at the exact killing time.

 

I already did the pvp to pk part, but i cant get the second part working.

Code you gaved me, in eclipse, throws me an error on int (syntax).

 

Link to comment
Share on other sites

  • 0

I want to do this:

1.For every kill player recieves a PvP point, and after the player dies, all pvps disappear and appears as pk points. (Basically, pvp points are kills in a row)
2.Player recieves as much adena as the opponent has pvp points at the exact killing time.

1)you make an int pvppoints = 0; for example.

you make one method for example: increasePvpPoint() { pvppoints = pvppoints +1; }

then you create new int pkpoints = 0;

in doDie you make for example:

if(pvppoints > 0)

pkpoints = pvppoints;

pvppoints = 0;

 

2)for ex you make

int y = ((L2PcInstance) getTarget())._pvppoints;

 

and in reward pvp....

getInventory().addItem("Rward",57,y,this,null);

 

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.

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

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock