Results 1 to 2 of 2

Thread: Talk to NPC only if he's close to me

  1. #1
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5

    Talk to NPC only if he's close to me

    This worked in NeoBot:

    if maround(3, "Sam") then

    end

    Now it doesn't, probably because NPCs are not recognised as monsters, and paround() doesn't work either. How can I talk to a NPC only if he's close enough to me, otherwise ignore him?
    Last edited by john86; 11-15-2012 at 07:43 PM.

  2. #2
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    PHP Code:
    if maround(3"Sam") > 0 then
        
    <action>
    end 
    PHP Code:
    if (findcreature("Sam") > -1) and (findcreature("Sam") <= 3then
        
    --action
    end 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •