September 28, 20178 yr Hello guys, I'm working on a selling script, my player stands at Lumby bank and is selling Varrock teleports. Now I got stuck at how to know if someone is trading my player and how to prevent trading someone after selling them runes. I was thinking something like this: Get first line in chatbox If contains trade requests get name trade player My problems are: 1. I have very little knowledge of Java, working with lists is kinda new for me (do have some Python exp) 2. I don't know how the chat API of OSBot will return the messages (Will it only return trade message if i put public off? Will it return every message? Is the first message at the top or at the bottom of this list) If someone knows anything on this subject I would really appreciate some explanation on the topics.
September 28, 20178 yr Take a look at messagelistening, this will help notify you when you receive a message and give you the name of the player who sent it.
September 28, 20178 yr Use getTrade() and get the last requesting player. Then gets his name, and store it.
Create an account or sign in to comment