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 I'm your motherfucking conscience

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

    Cloud Just another one...

    Joined:
    Jul 28, 2013
    Messages:
    2,457
    Likes Received:
    831
    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 I'm your motherfucking conscience

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