Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Findcreature

  1. #1
    Normal User
    Join Date
    Apr 2012
    Posts
    65
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    13
    Rep Power
    5

    Exclamation Findcreature

    Important

    What does findcreature return ?
    How can i use it ?

  2. #2
    Normal User
    Join Date
    Feb 2012
    Posts
    129
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    12
    Rep Power
    5
    i never have used findcreature()
    i don't know if is available in ibot

    but i use a similar function reachcreature()

    used to reach a creature/npc
    used to travels etc

    example:

    PHP Code:
    reachcreature("Boat Man")
    wait(1000,2000)
    say("hi")
    wait(1000,1500)
    npcsay("yalahar")
    wait(600,800)
    npcsay("yes"
    REP+ If I helped you

  3. #3
    Normal User
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    PHP Code:
    if findcreature('captain') == 3 then
    say
    ('hi')
    end 
    that giving you distance in sqm to creature and if distance = 3 do something
    ofcourse you can specified = to < or > thats no problem
    Last edited by echose; 06-26-2012 at 05:29 AM.

  4. #4
    Banned
    Join Date
    May 2012
    Location
    Rio de Janero - RJ / Canada
    Posts
    870
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    30
    Rep Power
    0
    It gives u the distance to a npc

    for example

    local npc = findcreature('Xodet')

    if not npc then
    gotolabel(wptid - 1)
    elseif npc.dist > 3 then
    reachcreature(npc)
    end

  5. #5
    Banned
    Join Date
    May 2012
    Posts
    1,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    127
    Rep Power
    0
    Simple one:
    PHP Code:
    reachcreature("Xodet"

    A bit advanced:
    PHP Code:
    local npc findcreature('Xodet'

    if 
    not npc then 
         gotolabel
    (wptid 1)
    elseif 
    npc.dist 3 then 
         reachcreature
    (npc)
    end 

  6. #6
    Normal User billhc's Avatar
    Join Date
    May 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Where did you found the function findcreature() i cant see it in the standard...

    Quote Originally Posted by BUgWT View Post
    Simple one:
    PHP Code:
    reachcreature("Xodet"

    A bit advanced:
    PHP Code:
    local npc findcreature('Xodet'

    if 
    not npc then 
         gotolabel
    (wptid 1)
    elseif 
    npc.dist 3 then 
         reachcreature
    (npc)
    end 
    how you can reach the creature "findcreature('Xodet')"?

  7. #7
    Normal User
    Join Date
    May 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5
    Quote Originally Posted by BUgWT View Post
    Simple one:
    PHP Code:
    reachcreature("Xodet"

    A bit advanced:
    PHP Code:
    local npc findcreature('Xodet'

    if 
    not npc then 
         gotolabel
    (wptid 1)
    elseif 
    npc.dist 3 then 
         reachcreature
    (npc)
    end 

    PHP Code:
    local npc findcreature('Xodet'

    if 
    npc == -1 then 
         gotolabel
    (wptid 1)
    elseif 
    npc.dist 3 then 
         reachcreature
    (npc)
    end 

  8. #8
    Normal User billhc's Avatar
    Join Date
    May 2012
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Quote Originally Posted by wgrzelak View Post
    PHP Code:
    local npc findcreature('Xodet'

    if 
    npc == -1 then 
         gotolabel
    (wptid 1)
    elseif 
    npc.dist 3 then 
         reachcreature
    (npc)
    end 
    PHP Code:
    local npc 'Npc Name'

    if findcreature(npc) == -1 then 
         gotolabel
    (wptid 1)
    elseif 
    findcreature(npc) > 3 then 
         reachcreature
    (npc)
    end 

  9. #9
    Normal User
    Join Date
    May 2012
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5
    Quote Originally Posted by billhc View Post
    PHP Code:
    local npc 'Npc Name'

    if findcreature(npc) == -1 then 
         gotolabel
    (wptid 1)
    elseif 
    findcreature(npc) > 3 then 
         reachcreature
    (npc)
    end 
    right
    0010101011101

  10. #10
    Normal User
    Join Date
    Apr 2012
    Posts
    65
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    13
    Rep Power
    5
    Why do you use -1?

Posting Permissions

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