Jump to content
  • 0

Tvt Event Reward On Kill


Question

Posted

Gia sas.

Exw perasei auto edw to TvT Event pano sto aCis rev. 362

http://www.l2jbrasil.com/index.php?/topic/116510-tvt-event-acis-358-100-completo/

Thelo na kano otan enas skotonei ton allon sto event na tou dinete kai ena reward px adena gia to kill.

9 answers to this question

Recommended Posts

  • 0
Posted (edited)

Gia sas.

Exw perasei auto edw to TvT Event pano sto aCis rev. 362

http://www.l2jbrasil.com/index.php?/topic/116510-tvt-event-acis-358-100-completo/

Thelo na kano otan enas skotonei ton allon sto event na tou dinete kai ena reward px adena gia to kill.

bres to void onKill sto TvtEvent.java,  

 

katw apo to increasePoints bale auto: killerPlayerInstance.addItem("TvT", adenaid, count, this, false);  dwkimase k pes m. 

Edited by AbSoLuTePoWeR
  • 0
Posted (edited)

bres to void onKill sto TvtEvent.java,  

 

katw apo to increasePoints bale auto: killerPlayerInstance.addItem("TvT", adenaid, count, this, false);  dwkimase k pes m. 

 

 /**
  * Is called when a player is killed
  * @param killerCharacter
  * @param killedPlayerInstance
  */
 public static void onKill(L2Character killerCharacter, L2PcInstance killedPlayerInstance)
 {
 if (killerCharacter == null || killedPlayerInstance == null ||
 (!(killerCharacter instanceof L2PcInstance) &&
  !(killerCharacter instanceof L2PetInstance) &&
  !(killerCharacter instanceof L2SummonInstance)) ||
 !isStarted())
 return;


 L2PcInstance killerPlayerInstance = null;


 if (killerCharacter instanceof L2PetInstance || killerCharacter instanceof L2SummonInstance)
 {
 killerPlayerInstance = ((L2Summon)killerCharacter).getOwner();


 if (killerPlayerInstance == null)
 return;
 }
 else
 killerPlayerInstance = (L2PcInstance)killerCharacter;


 String playerName = killerPlayerInstance.getName();
 byte killerTeamId = getParticipantTeamId(playerName);


 playerName = killedPlayerInstance.getName();


 byte killedTeamId = getParticipantTeamId(playerName);


 if (killerTeamId != -1 && killedTeamId != -1 && killerTeamId != killedTeamId)
 _teams[killerTeamId].increasePoints();


 killerPlayerInstance.addItem("TvT", 57, 100, this, false); 


 if (killedTeamId != -1)
 new TvTEventTeleporter(killedPlayerInstance, _teams[killedTeamId].getCoordinates(), false, false);
 }

 

Error (Cannot use this in static context)

Edited by rullezz
  • 0
Posted (edited)

 

 /**
  * Is called when a player is killed
  * @param killerCharacter
  * @param killedPlayerInstance
  */
 public static void onKill(L2Character killerCharacter, L2PcInstance killedPlayerInstance)
 {
 if (killerCharacter == null || killedPlayerInstance == null ||
 (!(killerCharacter instanceof L2PcInstance) &&
  !(killerCharacter instanceof L2PetInstance) &&
  !(killerCharacter instanceof L2SummonInstance)) ||
 !isStarted())
 return;


 L2PcInstance killerPlayerInstance = null;


 if (killerCharacter instanceof L2PetInstance || killerCharacter instanceof L2SummonInstance)
 {
 killerPlayerInstance = ((L2Summon)killerCharacter).getOwner();


 if (killerPlayerInstance == null)
 return;
 }
 else
 killerPlayerInstance = (L2PcInstance)killerCharacter;


 String playerName = killerPlayerInstance.getName();
 byte killerTeamId = getParticipantTeamId(playerName);


 playerName = killedPlayerInstance.getName();


 byte killedTeamId = getParticipantTeamId(playerName);


 if (killerTeamId != -1 && killedTeamId != -1 && killerTeamId != killedTeamId)
 _teams[killerTeamId].increasePoints();


 killerPlayerInstance.addItem("TvT", 57, 100, this, false); 


 if (killedTeamId != -1)
 new TvTEventTeleporter(killedPlayerInstance, _teams[killedTeamId].getCoordinates(), false, false);
 }

 

Error (Cannot use this in static context)

 

i forget it.  use this -> killerPlayerInstance.getInventory().addItem("TvT", 57,100, activeChar, null);

Edited by AbSoLuTePoWeR
  • 0
Posted

i forget it.  use this -> killerPlayerInstance.getInventory().addItem("TvT", 57,100, activeChar, null);

 

now error at activChar <---- cannot be resolved to a variable

  • 0
Posted (edited)

i did not.  :( i just thought that he will understand this, but ok.  anyway locked :)

Edited by AbSoLuTePoWeR
Guest
This topic is now closed to further replies.
×
×
  • Create New...