Results 1 to 4 of 4

Thread: Problem when looting werewolves and getcreature()

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

    Problem when looting werewolves and getcreature()

    Hello everyone!
    I'm making a script for myself and I'm having two problems so far:
    1.When looting werewolves:
    My looting was working perfectly, even when I had 5+ monster around me, bot would open all the dead bodies and loot all stuff with no mistake, but, there is a respawn where there are some werewolves, after killing them and begining looting, the bot just stop working well!Sometimes it takes long to open a single body,sometimes it opens,loot, and open the same body again, sometimes it stands there doing nothing,after sometime it goes to the next waypoint, comes back and open again, in other words, it mess up the whole looting.The problem does not happen with only werevoles bodies, but when there are werevoles bodies around, (problem occours with other creature's bodies, if there are werevolves bodies around)
    I know it sounds really wierd that a looting problem occurs to a specific creature, but , after killing them and going to other respaws, the looting starting working flawless once again, the problem really only happens at the werewolves respawn!
    I don't think the problem is with my OpenBodyTime (I use default time: 300), since the bot is working perfectly with other creatures, also, my problem is not related with picking up the loot, but opening the bodies.
    At first sight, I highly doubted that the problem was linked to werewolves, it not likely the bot would have problems opening a single kind of monster.But, has anyone experienced something similar to this?

    2.Problem with getcreature()
    When I try to use getcreature() the following problem happens:
    (Example)
    PHP Code:
    local m getcreature("creatures name")
    if 
    m.dist <= 5 then
    ....
    end 
    My debug window shows this message:
    LUA:PersistentAction - LuaInterface LuaScriptException: [String: "chunck"]: attempt to compare string with number

    Notes:
    • My CPU usage don't go more than 15%
    • I'm using iBot v1.1.7
    • I have Sirmate's library latest version


    Thank you!
    Your's Roger.
    Last edited by Roger1; 01-28-2013 at 12:20 AM.

  2. #2
    Normal User sirmate's Avatar
    Join Date
    Mar 2012
    Location
    Poland
    Posts
    176
    Mentioned
    2 Post(s)
    Tagged
    3 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    105
    Rep Power
    6
    About second one:
    Code:
    local m = getcreature("CREATURE NAME")
    if (math.max(math.abs(posx - m.x), math.abs(posy - m.y)) <= 5) then
    ....
    end
    (๏̯͡๏ )

  3. #3
    Normal User
    Join Date
    Aug 2012
    Posts
    11
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    13
    Rep Power
    5
    Quote Originally Posted by sirmate View Post
    About second one:
    Code:
    local m = getcreature("CREATURE NAME")
    if (math.max(math.abs(posx - m.x), math.abs(posy - m.y)) <= 5) then
    ....
    end
    Thanks for you help !
    The action doesn't gives me debug error anylonger
    Just a quick question:
    When returning a creature's cordinate (x, y or z) I should use:
    (example)
    target.x or target.posx
    I saw you used .x and .y but some places like iBot > Help > variables > Creature properties says .posx
    Is there any diference?

  4. #4
    Normal User sirmate's Avatar
    Join Date
    Mar 2012
    Location
    Poland
    Posts
    176
    Mentioned
    2 Post(s)
    Tagged
    3 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    105
    Rep Power
    6
    Quote Originally Posted by Roger1 View Post
    Thanks for you help !
    The action doesn't gives me debug error anylonger
    Just a quick question:
    When returning a creature's cordinate (x, y or z) I should use:
    (example)
    target.x or target.posx
    I saw you used .x and .y but some places like iBot > Help > variables > Creature properties says .posx
    Is there any diference?
    There is one structure for "target" variable and another one for "getcreature" and "getcreatures" functions.

    For "target" there is "posx" and for "getcreature" and "getcreatures" there is "x" property.
    (๏̯͡๏ )

Posting Permissions

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