Results 1 to 5 of 5

Thread: Action "if NPC on Screen"

  1. #1
    zami84's Avatar
    Join Date
    May 2012
    Posts
    316
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    48
    Rep Power
    5

    Action "if NPC on Screen"

    Search action that will be "do something" when npc XXX is on the screen.

    example.

    If npconscreen("XXX") then closetibia() end

  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
    Lua Code:
    if findcreature("NPC NAME") ~= -1 then closetibia() end

  3. #3
    zami84's Avatar
    Join Date
    May 2012
    Posts
    316
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    48
    Rep Power
    5
    Why ~= -1?
    Thats mean whotever - is there NPC or NO bot will close tibia. im right?

  4. #4
    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
    Anything else than -1 is the distance to the NPC, meaning it's on the screen. -1 means there is no range to the NPC and it's not on your screen.

  5. #5
    zami84's Avatar
    Join Date
    May 2012
    Posts
    316
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    48
    Rep Power
    5
    Ohhh. Its range... Ok, Thx

Posting Permissions

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