Signup Now
Results 1 to 8 of 8
  1. #1
    Free User
    Join Date
    Sep 2015
    Posts
    1
    Reputation
    10
    Rep Power
    0

    From browse field to lootbag.

    Hi, I would like to know if is possible to loot certain items from doing browse fied (manually or not) to a desired bps on a lootbag.

    For example if I browse field and there is gold coins, plate legs, flask, creature products etc... to pick plate legs to "green backpack" and flask to "red backpack" on the lootbag on the floor filled with green and red bps.

    I would apreciate it if some1 can help me

  2. #2
    Free User
    Join Date
    Jul 2015
    Posts
    12
    Reputation
    10
    Rep Power
    0
    up I need it too

  3. #3
    Free User Cisco's Avatar
    Join Date
    Aug 2014
    Location
    Brazil
    Posts
    1,424
    Reputation
    119
    Rep Power
    23
    Quote Originally Posted by ekhonera View Post
    up I need it too
    I know how to pick up items from the floor and put in your backpack.

    Get the item you are 1 sqm of character:

    auto(500)
    local Items = {'gold coin', 'hatchet', 'copper shield'}
    local BpLoot = 'brocade backpack'
    local Cap = 200

    if $cap > Cap then
    collectitems(BpLoot,unpack(Items))
    end


    Pick up items to increase sqm:

    auto(500)
    local Items = {'gold coin', 'hatchet', 'copper shield'}
    local BpLoot = 'brocade backpack'
    local Cap = 200
    local SqmAround = 3 --number 3 is 3 sqm around the character, max 10

    if $cap > Cap then
    collecthiddenitems(SqmAround, BpLoot, unpack(Items))
    end


    If you are taking stackable and heavy items like throw these next two work best.

    auto(500)
    local Items = {'spear', 'royal spear'}
    local BpLoot = 'brocade backpack'
    local Cap = 200
    local HeavyStack = 1 --Spear numbers that will take the floor

    --------------------------------------------------------------------------------------------------------------------------------------------------------
    function collectitems(bpname,...)
    local itemids = {...}
    table.id(itemids)
    if not bpname then
    bpname = ''
    elseif type(bpname) == 'number' then
    table.insert(itemids,bpname)
    bpname = ''
    end
    for j=-1,1 do
    for i=-1,1 do
    local t = topitem($posx+i,$posy+j,$posz).id
    if itemproperty(t,ITEM_PICKUPABLE) and (#itemids == 0 or table.find(itemids,t)) then
    pausewalking(10000)
    moveitems(t,bpname,ground($posx+i,$posy+j,$posz), HeavyStack)
    pausewalking(0)
    break
    end
    end
    end
    end

    if $cap > Cap then
    collectitems(BpLoot, unpack(Items))
    end


    auto(500)
    local Items = {'spear', 'royal spear'}
    local BpLoot = 'brocade backpack'
    local Cap = 200
    local SqmAround = 3 --number 3 is 3 sqm around the character, max 10
    local HeavyStack = 1 --Spear numbers that will take the floor

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------
    function collecthiddenitems(dist,...)
    local items = {...}
    if not dist then
    dist = 10
    elseif (type(dist) == 'number' and dist > 100) or (type(dist) == 'string') then
    table.insert(items, dist)
    dist = 10
    end
    table.id(items)
    local i,j
    for a=0, dist do
    j = -a
    while j <= a do
    i = -a
    while i <= a do
    local pos = {$posx+i,$posy+j,$posz}
    if tilehasinfo(unpack(pos)) and tilereachable(unpack(pos)) then
    local tile = gettile(unpack(pos))
    local found = 0
    for p=1, tile.itemcount do
    if table.find(items, tile.item[p].id) and $cap >= itemweight(tile.item[p].id) then
    found = p
    end
    if itemproperty(tile.item[p].id, ITEM_NOTMOVEABLE) then
    found = 0
    end
    end
    if found > 0 then
    local topick = tile.item[found].id
    reachlocation(unpack(pos))
    local topid = topitem(unpack(pos)).id
    while topid ~= topick and isitemontile(topick, unpack(pos)) do
    moveitems(topid, 'ground', ground(unpack(pos)), 100) waitping()
    topid = topitem(unpack(pos)).id
    end
    moveitems(topick, '', ground(unpack(pos)), HeavyStack)
    return true
    end
    end
    if j ~= a and j ~= -a then
    i = i+a*2
    else
    i = i+1
    end
    end
    j = j+1
    end
    end
    end

    if $cap > Cap then
    collecthiddenitems(SqmAround, BpLoot, unpack(Items))
    end

  4. #4
    Wind Powered
    Join Date
    Sep 2016
    Posts
    30
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Cisco View Post
    I know how to pick up items from the floor and put in your backpack.

    Get the item you are 1 sqm of character:

    auto(500)
    local Items = {'gold coin', 'hatchet', 'copper shield'}
    local BpLoot = 'brocade backpack'
    local Cap = 200

    if $cap > Cap then
    collectitems(BpLoot,unpack(Items))
    end


    Pick up items to increase sqm:

    auto(500)
    local Items = {'gold coin', 'hatchet', 'copper shield'}
    local BpLoot = 'brocade backpack'
    local Cap = 200
    local SqmAround = 3 --number 3 is 3 sqm around the character, max 10

    if $cap > Cap then
    collecthiddenitems(SqmAround, BpLoot, unpack(Items))
    end


    If you are taking stackable and heavy items like throw these next two work best.

    auto(500)
    local Items = {'spear', 'royal spear'}
    local BpLoot = 'brocade backpack'
    local Cap = 200
    local HeavyStack = 1 --Spear numbers that will take the floor

    --------------------------------------------------------------------------------------------------------------------------------------------------------
    function collectitems(bpname,...)
    local itemids = {...}
    table.id(itemids)
    if not bpname then
    bpname = ''
    elseif type(bpname) == 'number' then
    table.insert(itemids,bpname)
    bpname = ''
    end
    for j=-1,1 do
    for i=-1,1 do
    local t = topitem($posx+i,$posy+j,$posz).id
    if itemproperty(t,ITEM_PICKUPABLE) and (#itemids == 0 or table.find(itemids,t)) then
    pausewalking(10000)
    moveitems(t,bpname,ground($posx+i,$posy+j,$posz), HeavyStack)
    pausewalking(0)
    break
    end
    end
    end
    end

    if $cap > Cap then
    collectitems(BpLoot, unpack(Items))
    end


    auto(500)
    local Items = {'spear', 'royal spear'}
    local BpLoot = 'brocade backpack'
    local Cap = 200
    local SqmAround = 3 --number 3 is 3 sqm around the character, max 10
    local HeavyStack = 1 --Spear numbers that will take the floor

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------
    function collecthiddenitems(dist,...)
    local items = {...}
    if not dist then
    dist = 10
    elseif (type(dist) == 'number' and dist > 100) or (type(dist) == 'string') then
    table.insert(items, dist)
    dist = 10
    end
    table.id(items)
    local i,j
    for a=0, dist do
    j = -a
    while j <= a do
    i = -a
    while i <= a do
    local pos = {$posx+i,$posy+j,$posz}
    if tilehasinfo(unpack(pos)) and tilereachable(unpack(pos)) then
    local tile = gettile(unpack(pos))
    local found = 0
    for p=1, tile.itemcount do
    if table.find(items, tile.item[p].id) and $cap >= itemweight(tile.item[p].id) then
    found = p
    end
    if itemproperty(tile.item[p].id, ITEM_NOTMOVEABLE) then
    found = 0
    end
    end
    if found > 0 then
    local topick = tile.item[found].id
    reachlocation(unpack(pos))
    local topid = topitem(unpack(pos)).id
    while topid ~= topick and isitemontile(topick, unpack(pos)) do
    moveitems(topid, 'ground', ground(unpack(pos)), 100) waitping()
    topid = topitem(unpack(pos)).id
    end
    moveitems(topick, '', ground(unpack(pos)), HeavyStack)
    return true
    end
    end
    if j ~= a and j ~= -a then
    i = i+a*2
    else
    i = i+1
    end
    end
    j = j+1
    end
    end
    end

    if $cap > Cap then
    collecthiddenitems(SqmAround, BpLoot, unpack(Items))
    end
    Works good but it's not using the BPLoot backpack but the first open backpack. What could be the problem?

  5. #5

  6. #6
    Wind Powered
    Join Date
    Sep 2016
    Posts
    30
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Cisco View Post
    @xaluck

    In my scripts it is working normally. Tell me which one you're using in your script.
    I'm using it to look for semi-rares and rares rusty stuff in the floor... The Lua that i made is the next:

    init start
    local rustclean = getuseroption('unrust')
    local bp = "green backpack" -- Bp to put items on
    local items = {8895, 8896, 8899, 8898} -- Items
    local minCap = 250 -- Minimum cap to pick up items
    local SqmAround = 5 --number 3 is 3 sqm around the character, max 10
    init end

    auto(100)
    if $cap >= minCap and maroundfilter(10, false) == 0 and rustclean and itemcount('rust remover') > 0 and ($wptsection == 'FirstFloor' or $wptsection == 'SecondFloor') then

    collecthiddenitems(SqmAround, bp, unpack(items))

    end


    The conditions are working very well, also picking up the items. The only detail is that it doesn't use the 'green backpack' but uses the first backpack.

    Thanks for your time @Cisco!

  7. #7
    Free User Cisco's Avatar
    Join Date
    Aug 2014
    Location
    Brazil
    Posts
    1,424
    Reputation
    119
    Rep Power
    23
    Quote Originally Posted by xaluck View Post
    I'm using it to look for semi-rares and rares rusty stuff in the floor... The Lua that i made is the next:

    init start
    local rustclean = getuseroption('unrust')
    local bp = "green backpack" -- Bp to put items on
    local items = {8895, 8896, 8899, 8898} -- Items
    local minCap = 250 -- Minimum cap to pick up items
    local SqmAround = 5 --number 3 is 3 sqm around the character, max 10
    init end

    auto(100)
    if $cap >= minCap and maroundfilter(10, false) == 0 and rustclean and itemcount('rust remover') > 0 and ($wptsection == 'FirstFloor' or $wptsection == 'SecondFloor') then

    collecthiddenitems(SqmAround, bp, unpack(items))

    end


    The conditions are working very well, also picking up the items. The only detail is that it doesn't use the 'green backpack' but uses the first backpack.

    Thanks for your time @Cisco!
    This collecthiddenitems() I've never used, I use the collectitems(). But since you're not moving to bp loot, put it that way.

    local rustclean = getuseroption('unrust')
    local mainbp = 'brocade backpack'
    local bp = "green backpack" -- Bp to put items on
    local items = {8895, 8896, 8899, 8898} -- Items
    local MoveItems = {}
    local minCap = 250 -- Minimum cap to pick up items
    local SqmAround = 5 --number 3 is 3 sqm around the character, max 10


    auto(100)
    if $cap >= minCap and maroundfilter(10, false) == 0 and rustclean and itemcount('rust remover') > 0 and ($wptsection == 'FirstFloor' or $wptsection == 'SecondFloor') then
    collecthiddenitems(SqmAround, bp, unpack(items))
    end

    if (itemcount(8895, mainbp) ~= 0) or (itemcount(8896, mainbp) ~= 0) or (itemcount(8899, mainbp) ~= 0) or (itemcount(8898, mainbp) ~= 0) then
    for _, RustMove in ipairs(items) do
    moveitems(RustMove, bp, '1')
    waitping()
    end
    end


    Doing this every time he plays in the main backpack the moveitems() puts in the bp loot

  8. #8
    Wind Powered
    Join Date
    Sep 2016
    Posts
    30
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Cisco View Post
    This collecthiddenitems() I've never used, I use the collectitems(). But since you're not moving to bp loot, put it that way.

    local rustclean = getuseroption('unrust')
    local mainbp = 'brocade backpack'
    local bp = "green backpack" -- Bp to put items on
    local items = {8895, 8896, 8899, 8898} -- Items
    local MoveItems = {}
    local minCap = 250 -- Minimum cap to pick up items
    local SqmAround = 5 --number 3 is 3 sqm around the character, max 10


    auto(100)
    if $cap >= minCap and maroundfilter(10, false) == 0 and rustclean and itemcount('rust remover') > 0 and ($wptsection == 'FirstFloor' or $wptsection == 'SecondFloor') then
    collecthiddenitems(SqmAround, bp, unpack(items))
    end

    if (itemcount(8895, mainbp) ~= 0) or (itemcount(8896, mainbp) ~= 0) or (itemcount(8899, mainbp) ~= 0) or (itemcount(8898, mainbp) ~= 0) then
    for _, RustMove in ipairs(items) do
    moveitems(RustMove, bp, '1')
    waitping()
    end
    end


    Doing this every time he plays in the main backpack the moveitems() puts in the bp loot
    Thank you! i'll give it a try

 

 

Posting Permissions

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