1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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 Java Warlord

    Joined:
    Nov 17, 2014
    Messages:
    4,906
    Likes Received:
    2,748
    "of Zamorak"
     
  3. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    This is probably correct.
     
  4. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    408
    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 Java Warlord

    Joined:
    Nov 17, 2014
    Messages:
    4,906
    Likes Received:
    2,748
    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:
    408
    Likes Received:
    84
    Oh this explains alot..
     

Share This Page

Loading...