Jump to content
  • 0

Tvt Event Reward On Kill


rullezz

Question

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.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

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
Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0

 

 /**
  * 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
Link to comment
Share on other sites

  • 0

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

 

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

Link to comment
Share on other sites

  • 0

..............

 

replace it with killerPlayerInstance ................

You're late already answered: http://www.maxcheaters.com/topic/203773-free-help-small-code-fixes-request-small-codes/page-31

Link to comment
Share on other sites

  • 0

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

Edited by AbSoLuTePoWeR
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...