Signup Now
Results 1 to 2 of 2

Thread: Heeeelppp

  1. #1
    Free User
    Join Date
    Jan 2014
    Posts
    11
    Reputation
    7
    Rep Power
    0

    Heeeelppp

    I don't know if I'm posting in the correct section but I know that here I can have a huge Visibility please help me with this action:
    init start
    -- local SCRIPT_VERSION = '1.0.0'

    local waterloots = {281, 282, 3026, 3029, 3032, 9303}
    init end
    auto(200)

    --fish only if there are no bodies to be looted on the screen and you're not currently targeting anything
    if $lootsaround == 0 and $targetingtarget.hppc == 0 then
    --count how many of each item you have currently
    local count = {}
    for index,id in ipairs(waterloots) do
    count[index] = itemcount(id)
    end

    if fishspots(9582) > 0 then
    fish(9582)
    wait(800) --if fished a body, it gets here... wait 1 second, to give time for the item to arrive in your backpack

    --make a new count, and compare the new count with the previous values
    for index,id in ipairs(waterloots) do
    local newcount = itemcount(id)
    if (newcount > count[index]) then
    --if the value changed, increase the amount looted on loot counter
    increaseamountlooted(id, newcount-count[index])
    end
    end
    else
    --pauses the walker if there are any water elementals on the screen
    while fishspots(4037) > 10 do
    pausewalking(500)
    wait(300)
    end
    pausewalking(0)
    end
    end

    the problem is:
    12:28:01 error in Cavebot script FishWaterElemental:
    ["for k, v in ipairs(self) do"]:LucasTerra.lua:759 bad argument #1 to 'ipairs' (table expected, got number)
    stack traceback:
    ["for k, v in ipairs(self) do"]:LucasTerra.lua:759 in function ["function table:find(value, argument)"]:LucasTerra.lua:758
    ["elseif (type(self.id) == 'number' and self.id == cur.id) or ..."]:LucasTerra.lua:2625 in function ["function FISHSPOTS:update(id)"]:LucasTerra.lua:2609
    ["FISHSPOTS:update(n)"]:LucasTerra.lua:2714 in function ["function fishspots(n)"]:LucasTerra.lua:2711
    ["if fishspots(9582) > 0 then"]:FishWaterElemental:16 in user script


    HEEELPP MEEE

  2. #2
    Free User Harvey's Avatar
    Join Date
    Dec 2013
    Location
    Philippines
    Posts
    2,407
    Reputation
    15
    Rep Power
    25
    Quote Originally Posted by magelolz View Post
    I don't know if I'm posting in the correct section but I know that here I can have a huge Visibility please help me with this action:
    init start
    -- local SCRIPT_VERSION = '1.0.0'

    local waterloots = {281, 282, 3026, 3029, 3032, 9303}
    init end
    auto(200)

    --fish only if there are no bodies to be looted on the screen and you're not currently targeting anything
    if $lootsaround == 0 and $targetingtarget.hppc == 0 then
    --count how many of each item you have currently
    local count = {}
    for index,id in ipairs(waterloots) do
    count[index] = itemcount(id)
    end

    if fishspots(9582) > 0 then
    fish(9582)
    wait(800) --if fished a body, it gets here... wait 1 second, to give time for the item to arrive in your backpack

    --make a new count, and compare the new count with the previous values
    for index,id in ipairs(waterloots) do
    local newcount = itemcount(id)
    if (newcount > count[index]) then
    --if the value changed, increase the amount looted on loot counter
    increaseamountlooted(id, newcount-count[index])
    end
    end
    else
    --pauses the walker if there are any water elementals on the screen
    while fishspots(4037) > 10 do
    pausewalking(500)
    wait(300)
    end
    pausewalking(0)
    end
    end

    the problem is:
    12:28:01 error in Cavebot script FishWaterElemental:
    ["for k, v in ipairs(self) do"]:LucasTerra.lua:759 bad argument #1 to 'ipairs' (table expected, got number)
    stack traceback:
    ["for k, v in ipairs(self) do"]:LucasTerra.lua:759 in function ["function table:find(value, argument)"]:LucasTerra.lua:758
    ["elseif (type(self.id) == 'number' and self.id == cur.id) or ..."]:LucasTerra.lua:2625 in function ["function FISHSPOTS:update(id)"]:LucasTerra.lua:2609
    ["FISHSPOTS:update(n)"]:LucasTerra.lua:2714 in function ["function fishspots(n)"]:LucasTerra.lua:2711
    ["if fishspots(9582) > 0 then"]:FishWaterElemental:16 in user script


    HEEELPP MEEE
    post this in bug section, its easier to read there.

    btw this bug is already reported to lucas

 

 

Posting Permissions

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