Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved Player.interact

Joined
Nov 17, 2013
Messages
63
Special case with postfix:

468be515b7.jpg

8267f0ec72.png


where code is:

JavaScript:
System.out.println("Going to Trade Player: " + playerName);
                if (p.interact("Trade with", playerName)) {

and p is not null, it actually found the player using:
Code:
Players.newQuery().names("Lunarslash67").results().first();

It was not, however, interacting with trade for both playerName as Lunarslash67 or as Lunarslash67 of Zamorak (level: 93+5).

Any ideas?

@Cloud
 
Joined
Apr 18, 2015
Messages
408
JavaScript:
System.out.println("Going to Trade Player: " + playerName);
if (p.interact("Trade with")) {
// Why add the players name to the interact? You're sure it's the correct player since you're calling interact on p..
}
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
JavaScript:
System.out.println("Going to Trade Player: " + playerName);
if (p.interact("Trade with")) {
// Why add the players name to the interact? You're sure it's the correct player since you're calling interact on p..
}
If there are multiple players on the menu it will choose the first action matching "Trade with", even if it's not the desired player.
 
Top