Resolved Player.interact

Discussion in 'Client & Site Support' started by countvidal, May 27, 2015.

  1. Special case with postfix:

    [​IMG]
    [​IMG]

    where code is:

    Code (Javascript):
    1. System.out.println("Going to Trade Player: " + playerName);
    2.                 if (p.interact("Trade with", playerName)) {
    and p is not null, it actually found the player using:
    Code (Text):
    1.  
    2. Players.newQuery().names("Lunarslash67").results().first();
    3.  
    It was not, however, interacting with trade for both playerName as Lunarslash67 or as Lunarslash67 of Zamorak (level: 93+5).

    Any ideas?

    @Cloud
     
  2. "of Zamorak"
     
  3. This is probably correct.
     
  4. Code (Javascript):
    1. System.out.println("Going to Trade Player: " + playerName);
    2. if (p.interact("Trade with")) {
    3. // Why add the players name to the interact? You're sure it's the correct player since you're calling interact on p..
    4. }
    5.  
     
  5. 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.
     
  6. Oh this explains alot..
     

Share This Page

Loading...