Jump to content
  • 0
Pyroz HD

667 Trade Message

Question

Hey guys,

I am trying to add a simple message that opens up in green when you open the trade screen.

What I mean by this, when players trade, it is really buggy and items are lost if they are not careful. So I would like to make a message pop up in the chatbox preventing players from losing items.

My question to you guys is, well how do I do this?
Where would I place the code, and what would it look like?

Thanks in advance (:

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
player.getPackets().sendGameMessage("");

Share this post


Link to post
Share on other sites
  • 0
where would I put that?

Share this post


Link to post
Share on other sites
  • 0
Why not just fix the trade? I think a tutorial has been released somewhere.

Share this post


Link to post
Share on other sites
  • 0
I've tried most tutorials and I still get buggy results... :/

Share this post


Link to post
Share on other sites
  • 0
[code]private void openInterface(Player player) {
player.getInterfaceManager().sendInventoryInterface(336);
player.getInterfaceManager().sendInterface(335);
player.getPackets().sendIComponentText(335, 15, (new StringBuilder("Trading with: ")).append(Utils.formatPlayerNameForDisplay(getOther(player).getUsername())).toString());
setCurrentState(State.FIRST_SCREEN);
sendOptions(player);
sendInterItems();
player.getPackets().sendMessage("Be careful when trading!");[/code]
}

Share this post


Link to post
Share on other sites
  • 0
[quote name='Pyroz HD']Thank you Hash (:[/QUOTE]

No problem ;)

Share this post


Link to post
Share on other sites

×