Jump to content
  • 0

[HELP] PvP Pk announced to Party color


BARO
 Share

Question

Hi there..... i need a code to make this

[80]BARO vs [79]MaxCheaters

[LVL]playername vs[LVL]playername but not to announcement ...i need this for green color    

i know is something with CreatureSay

for interlude

Link to comment
Share on other sites

Recommended Posts

  • 0

You can create a new CreatureSay with the requested text. The different kinds of chats (shout, party, trade, etc..) can be found at Say2, as static final int values. Just, broadcast it all the players you want

Link to comment
Share on other sites

  • 0

You should also provide info about when this message should be send, anyway litle example:

 

L2PcInstance player, target;

player.sendPacket(new CreatureSay(0, Say2.PARTY, "Server", "[" + player.getLevel() + "]" + player.getName() + " vs " + "[" + target.getLevel() + "]" + target.getName()));

Link to comment
Share on other sites

  • 0

thanks for your help

but i need full coded if you want to help will be great....

 

PLEASE

Thx Matim

 

How can I provide full code without basic info, in my previous post i said:

 

You should also provide info about when this message should be send (...)

 

And still no answer.

 

Also I gave u want do u exactly need, now simply use your brain and use it where u want.

Link to comment
Share on other sites

  • 0

I need this exaclty after pvp or pk ....this show "announcements" like

Announcements: Blabla assassinate ALBALB

 

I told you, use your brain.

 

L2PcInstance.java

 

Check how does pvp/pk increase works.

Link to comment
Share on other sites

  • 0

i`m noob of java ....

is my 1st time when i want to make a code with creatureSay

U are smart ....this is the reason i asked here ....

MaxCheaters have many people smart to help me

Link to comment
Share on other sites

  • 0

You should understand that this is "request dev help section", not request ready code.

 

The point is that you should show some personal effort to make it insteaf od asking for ready sollutions.

 

With this approach, you will never make your own code, trust me.

 

Anyway, there is another "hint", take a look at this share:

 

This one.

 

You can find there how to reward someone for each pvp/pk kill.

 

With this share, you may easily learn how to make your request (to send message after pvp/pk kill)

 

Simply replace this rewarding method with send packet (i gave u code at begining)

Link to comment
Share on other sites

  • 0
// Add karma to attacker and increase its PK counter

setPvpKills(getPvpKills() + 1);

 

L2PcInstance player =

null, target =

null;

player.sendPacket(new CreatureSay(0, Say2.PARTY, "Server", "[" + player.getLevel() + "]" + player.getName() + " vs " + "[" + target.getLevel() + "]" + target.getName()));

 

Something Like this??

Link to comment
Share on other sites

  • 0

Think a bit, whats the point to "send packet" to player object which is null?

 

Since its L2PcInstance, you don't have to use object of player, simply use:

 

sendPacket(new CreatureSay(0, Say2.PARTY, "Server", "[" + player.getLevel() + "]" + player.getName() + " vs " + "[" + target.getLevel() + "]" + target.getName()));

 

instead of:

 

player.sendPacket(new CreatureSay(0, Say2.PARTY, "Server", "[" + player.getLevel() + "]" + player.getName() + " vs " + "[" + target.getLevel() + "]" + target.getName()));

 

And about target object, it was just example, do not create new L2PcInstance object called target, simply you have to refer to this player which was killed by our player (ye ye, It may be confusing now)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



×
×
  • 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