Signup Now
Results 1 to 4 of 4
  1. #1
    Free User joraanpe's Avatar
    Join Date
    Dec 2013
    Posts
    212
    Reputation
    36
    Rep Power
    21

    Confirming if NPC on screen /maround?

    This is something ive been wondering a lot around here, how exactly can i confirm if certain NPC is on screen at the moment?

    Seems like maround isnt usefull here for that as i used to do on other bot, but the fact is that this NPC walks, so its never on the same location, and simply adding a single action to trade might cause it to talk with the air as the npc might be somewhere else at that moment...

    I was reading here and there and seems like the way around it to recognize npc comes working with the iterators, but i dont know much about it.
    Any ideas how can i confirm if the npc is on screen?

    Thanks i advance

  2. #2
    Free User Donatello's Avatar
    Join Date
    Dec 2013
    Location
    Tuscany, Italy
    Posts
    398
    Reputation
    51
    Rep Power
    21
    it's kinda easy to solve, use smt like that:
    local npcName = "Quentin"

    if findcreature(npcName) then
    reachcreature(npcName)
    waitping()
    else
    gotolabel($wpt.id - 1)
    end
    Last edited by Donatello; 12-30-2013 at 02:02 AM. Reason: Fixing Lua syntax

  3. #3
    Banned
    Join Date
    Dec 2013
    Location
    United States
    Posts
    848
    Reputation
    30
    Rep Power
    0
    Donatello is pro scripter. Just saying. <3

  4. #4
    Free User joraanpe's Avatar
    Join Date
    Dec 2013
    Posts
    212
    Reputation
    36
    Rep Power
    21
    ohhh niceee didnt know about the findcreature(), thats exactly what i needed, thanks mate, really appreciated!
    Thread Done.

 

 

Posting Permissions

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