Resolved Player.interact

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

  1. countvidal

    Joined:
    Nov 17, 2013
    Messages:
    63
    Likes Received:
    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. Savior

    Savior You'll float too

    Joined:
    Nov 17, 2014
    Messages:
    3,668
    Likes Received:
    1,510
    "of Zamorak"
     
  3. Cloud

    Joined:
    Jul 28, 2013
    Messages:
    2,585
    Likes Received:
    931
    This is probably correct.
     
  4. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    394
    Likes Received:
    84
    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. Savior

    Savior You'll float too

    Joined:
    Nov 17, 2014
    Messages:
    3,668
    Likes Received:
    1,510
    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. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    394
    Likes Received:
    84
    Oh this explains alot..
     

Share This Page

Loading...