Signup Now
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Free User Ragekemi's Avatar
    Join Date
    Jan 2014
    Location
    Curitiba - Parana - Brazil
    Posts
    242
    Reputation
    13
    Rep Power
    21

    Help in Depot Action!

    Hello, i am currently having a bug that i can't find a way to solve, i even made a script to print the user options and they are all being printed correctly from my Cavebot User Option,

    Here's my 2 scripts that keep printing
    "Couldn't find item named 'maindpbp'.
    Here's my user option widget:

    This image is hosted on a possibly dangerous website (http://s10.postimg.org/x5pbahdu1/widgets.jpg). Please consider reuploading it on Imgur.com.


      {
    "type" : "combobox",
    "name" : "MainDpBp",
    "text" : "Main Depot Backpack:",
    "items" : ["Zaoan Chess Box", "Anniversary Backpack", "Backpack", "Backpack of Holding", "Beach Backpack", "Blue Backpack", "Brocade Backpack", "Buggy Backpack", "Camouflage Backpack", "Crown Backpack", "Crystal Backpack", "Deepling Backpack", "Demon Backpack", "Dragon Backpack", "Expedition Backpack", "Fur Backpack", "Golden Backpack", "Green Backpack", "Grey Backpack", "Heart Backpack", "Jewelled Backpack", "Minotaur Backpack", "Moon Backpack", "Mushroom Backpack", "Orange Backpack", "Pannier Backpack", "Pirate Backpack", "Purple Backpack", "Red Backpack", "Santa Backpack", "Yellow Backpack"]
    },


    (yeah , it is correctly placed in group and etc, since it's being printed correctly)


    And my depot action:
    local maindpbp = getuseroption('MainDpBp')
    local lootbp = getuseroption('LootBp')
    local lootbpdp = getuseroption('LootDpBp')
    local stackabledpbp = getuseroption('StackableDpBp')

    -- Dp Depositer.

    setsetting('Looting/OpenNextBP', 'no')
    wait(1000,1200)
    reachgrounditem('Depot')
    wait(1000,1500)
    openitem('Depot')
    wait(1000,1200)
    depotaction('maindpbp', 'lootbp', {'b', 'lootdpbp', 'c', 'stackabledpbp'})

    wait(1000,1200)

    setsetting('Looting/OpenNextBP', 'yes')




    It keeps debugging and the character reach depots, open depot chest, locker, and then print maindpbp error... =/

  2. #2
    Moderator sirmate's Avatar
    Join Date
    Dec 2013
    Location
    Poland
    Posts
    42
    Reputation
    37
    Rep Power
    0
    Use this:
    depotaction('MainDpBp', 'LootBp', {'b', 'LootDpBp', 'c', 'StackableDpBp'})
    (๏̯͡๏ )

  3. #3
    Free User Ragekemi's Avatar
    Join Date
    Jan 2014
    Location
    Curitiba - Parana - Brazil
    Posts
    242
    Reputation
    13
    Rep Power
    21
    Quote Originally Posted by sirmate View Post
    Use this:
    depotaction('MainDpBp', 'LootBp', {'b', 'LootDpBp', 'c', 'StackableDpBp'})
    I've changed my action to work better with looting destinations, but still returning debug error Couldnt Find item "mainbp"


    MainBp = getlootingdestination('mainbp')
    LootBp = getlootingdestination('lootbp')
    MainDpBp = getlootingdestination('maindpbp')
    LootDpBp = getlootingdestination('lootdpbp')
    StackableDpBp = getlootingdestination('stackabledpbp')

    -- Dp Depositer.

    setsetting('Looting/OpenNextBP', 'no')
    wait(1000,1200)
    closewindows()
    wait(1000,1200)
    openitem('MainBp', 'back')
    wait(1000,1200)
    openitem('LootBp', 'MainBp')
    wait(1000,1200)
    depotaction('MainDpBp', 'LootBp', {'b', 'LootDpBp', 'c', 'StackableDpBp'})
    wait(1000,1200)

    setsetting('Looting/OpenNextBP', 'yes')

  4. #4
    Moderator sirmate's Avatar
    Join Date
    Dec 2013
    Location
    Poland
    Posts
    42
    Reputation
    37
    Rep Power
    0
    If your looting destinations are ('MainDpBp', 'LootBp', 'LootDpBp', 'StackableDpBp'):
    local MainBp = getlootingdestination('MainBp')
    local LootBp = getlootingdestination('LootBp')

    setsetting('Looting/OpenNextBP', 'no')
    wait(1000,1200)
    closewindows()
    wait(1000,1200)
    openitem(0, 'back')
    wait(1000,1200)
    openitem(LootBp, MainBp, true)
    wait(1000,1200)
    depotaction('MainDpBp', 'LootBp', {'b', 'LootDpBp', 'c', 'StackableDpBp'})
    wait(1000,1200)
    setsetting('Looting/OpenNextBP', 'yes')


    If your looting destinations are ('maindpbp', 'lootbp', 'lootdpbp', 'stackabledpbp'):
    local MainBp = getlootingdestination('mainbp')
    local LootBp = getlootingdestination('lootbp')

    setsetting('Looting/OpenNextBP', 'no')
    wait(1000,1200)
    closewindows()
    wait(1000,1200)
    openitem(0, 'back')
    wait(1000,1200)
    openitem(LootBp, MainBp, true)
    wait(1000,1200)
    depotaction('maindpbp', 'lootbp', {'b', 'lootdpbp', 'c', 'stackabledpbp'})
    wait(1000,1200)
    setsetting('Looting/OpenNextBP', 'yes')
    (๏̯͡๏ )

  5. #5
    Free User Ragekemi's Avatar
    Join Date
    Jan 2014
    Location
    Curitiba - Parana - Brazil
    Posts
    242
    Reputation
    13
    Rep Power
    21
    Quote Originally Posted by sirmate View Post
    If your looting destinations are ('MainDpBp', 'LootBp', 'LootDpBp', 'StackableDpBp'):
    local MainBp = getlootingdestination('MainBp')
    local LootBp = getlootingdestination('LootBp')

    setsetting('Looting/OpenNextBP', 'no')
    wait(1000,1200)
    closewindows()
    wait(1000,1200)
    openitem(0, 'back')
    wait(1000,1200)
    openitem(LootBp, MainBp, true)
    wait(1000,1200)
    depotaction('MainDpBp', 'LootBp', {'b', 'LootDpBp', 'c', 'StackableDpBp'})
    wait(1000,1200)
    setsetting('Looting/OpenNextBP', 'yes')


    If your looting destinations are ('maindpbp', 'lootbp', 'lootdpbp', 'stackabledpbp'):
    local MainBp = getlootingdestination('mainbp')
    local LootBp = getlootingdestination('lootbp')

    setsetting('Looting/OpenNextBP', 'no')
    wait(1000,1200)
    closewindows()
    wait(1000,1200)
    openitem(0, 'back')
    wait(1000,1200)
    openitem(LootBp, MainBp, true)
    wait(1000,1200)
    depotaction('maindpbp', 'lootbp', {'b', 'lootdpbp', 'c', 'stackabledpbp'})
    wait(1000,1200)
    setsetting('Looting/OpenNextBP', 'yes')

    Omg ! Worked like a charm, but it didnt open the next LootBp inside the first one, is the bot actually limited to only 1 LootBp?

  6. #6
    Moderator sirmate's Avatar
    Join Date
    Dec 2013
    Location
    Poland
    Posts
    42
    Reputation
    37
    Rep Power
    0
    Ahh, I forgot 'depotaction' work in reverse order. You are supposed to open your last loot backpack and bot will go up until main backpack. So when you back from your hunt and you are about to deposit you should just close supply and gold backpack and then run 'depotaction' function.
    (๏̯͡๏ )

  7. #7
    Free User Ragekemi's Avatar
    Join Date
    Jan 2014
    Location
    Curitiba - Parana - Brazil
    Posts
    242
    Reputation
    13
    Rep Power
    21
    Quote Originally Posted by sirmate View Post
    Ahh, I forgot 'depotaction' work in reverse order. You are supposed to open your last loot backpack and bot will go up until main backpack. So when you back from your hunt and you are about to deposit you should just close supply and gold backpack and then run 'depotaction' function.

    Right, you teach me perfectly how it works, now i just dont add closewindows() after hunt so the char will go to depot with the last loot bp open, and this way it worked like a charm, tested with 18 loot bps one inside other and every one with a depositable item and it worked ! Thanks

    local MainBp = getlootingdestination('mainbp')
    local LootBp = getlootingdestination('lootbp')

    setsetting('Looting/OpenNextBP', 'no')
    wait(1000,1200)
    resizewindows()
    wait(1000,1200)
    reachgrounditem('Depot')
    wait(2000,2200)
    depotaction('maindpbp', 'lootbp', {'b', 'lootdpbp', 'c', 'stackabledpbp'})
    wait(1000,1200)
    setsetting('Looting/OpenNextBP', 'yes')

  8. #8
    Free User stmaster's Avatar
    Join Date
    Dec 2013
    Location
    Mexico
    Posts
    222
    Reputation
    24
    Rep Power
    21
    Hello i have something similiar in a script. maybe it can help you... (but i want to give you a TIP) i see so made MainDpBP. and at the local setting you have maindpbp
    maybe im not sure.. im lazy to go check and test, but maybe its caps sensitive.

    cause i have something very similar and its always working good. i understand your action code, cause i know what is trying to do.. and i made this one to do exactly the same.

    Code:
    local mainbp = getlootingdestination('mainbp') 
    local lootbp = getlootingdestination('lootbp')
    local goldbp = getlootingdestination('goldbp')
    
    if not islocation(4) then
    	gotolabel($wptid-1)
    else
    	closewindows()	
    	wait(500)
    	if windowcount(mainbp) ~= 1 then
    		openitem(mainbp,'back')
    		wait(500,700)
    		resizewindows(0,mainbp)
    		wait(300,600)
    end
    	if windowcount(lootbp) ~= 1 then
    		openitem(lootbp,true)
    		wait(500,700)
    		resizewindows(0,lootbp)
    		wait(300,600)
    	end
    	if windowcount(lootbp) ~= 1 then
    		gotolabel($wptid-1)
    	end
    	if not islocation() then
    		gotolabel($wptid-1)
    	else	
    	depotaction('dpbp', 'lootbp', {'a,b','dplootbp'})
    end
    end
    and what this does.. if its NOT in correct location it will go -1 waypoint else it will close all windows, open my main backpack, it will open my lootbp and i will have only ONE window open which is lootbp, else it will start all over. if this is correct then it will check again if im in correct position and lootbp is open else it will go -1 waypoint (just incase something went wrong) but if its all ok then it will continue to open DEPOT->CHEST->MAINDPBACKPACK->and inside all bps are the same so it will start putting stuff there from which are in category a and b but only from my 1 windown open which is lootbp.

    if i read correctly yours. its the same.. except for the caps.. thats why i think it could be cap sensitive. dunno xD
    Check my Botting Project: HERE - If i helped, please +REP

  9. #9
    Moderator sirmate's Avatar
    Join Date
    Dec 2013
    Location
    Poland
    Posts
    42
    Reputation
    37
    Rep Power
    0
    @Ragekemi, you don't have to add "reachgrounditem('Depot')" in your action. "depotaction" will do this.
    (๏̯͡๏ )

  10. #10
    Free User stmaster's Avatar
    Join Date
    Dec 2013
    Location
    Mexico
    Posts
    222
    Reputation
    24
    Rep Power
    21
    oh, reachgrounditem('Depot') its NOT necessary.. depotaction is already doing this.

    original code depotaction what does is:
    Code:
    function depotaction(...)
    	local function moveitemstodepot(frombp, categoriesAndDestinationsTable)
    		local frombp = getlootingdestination(frombp)
    		local id = itemid(frombp)
    
    		if id == $back.id then
    			printerror('You can\'t use your main backpack\'s ID as a looting destination. Consider changing the backpack type.')
    
    			return false
    		elseif id == 0 then
    			printerror("'" .. frombp .. "'" .. " does not contain a valid 'backpack name'")
    			
    			return false
    		else
    			for i = 0, 15 do
    				local cont = getcontainer(i)
    				if cont.isopen and cont.itemid == id then
    					while cont.itemid == id and cont.isopen do
    						for k = 1, #categoriesAndDestinationsTable, 2 do
    							local category = categoriesAndDestinationsTable[k]
    							local destination = getlootingdestination(categoriesAndDestinationsTable[k+1])
    							local destinationid = itemid(destination)
    							
    							if (destinationid ~= 0) then
    								foreach lootingitem j category do
    									local itemdata = iteminfo(j.id)
    									
    									if itemdata.iscumulative then
    										moveitemsonto(j.id, destinationid, 0)
    									else
    										moveitemsonto(j.id, destinationid, $lastonto)
    									end
    								end
    							end
    						end
    						
    						if cont.hashigher then
    							higherwindows(i, true) waitping()
    						end
    					end
    					repeat
    						openitem(id, i, false, count) waitping()
    					until cont.itemid == id or not cont.isopen or itemcount(id, i) == 0
    					
    					return true
    				end
    			end
    		end
    	end
    	
    	local args = {...}
    	local bpindp = 0
    	local argstart = 1
    	
    	if type(args[1]) == 'string' and type(args[2]) == 'string' then
    		argstart = 2
    		local bpindpname = getlootingdestination(args[1])
    		
    		if bpindpname == '' then
    			bpindp = itemid(args[1])
    		else
    			bpindp = itemid(bpindpname)
    		end
    	end
    	
    	local oldOpenNextBP = getsetting('Looting/OpenNextBP')
    	setsetting('Looting/OpenNextBP', 'no')
    	
    	--[[reachgrounditem('depot')
    	openitem('depot') wait(700, 1000)
    	openitem(3502) wait(700, 1000)--]]
    	opendepot()
    	if (bpindp > 0) then
    		openitem(bpindp) wait(700, 1000)
    	end
    	
    	for k = argstart, #args, 2 do
    		if type(args[k]) == 'string' and type(args[k+1]) == 'table' then
    			moveitemstodepot(args[k], args[k+1])
    		end
    	end
    	
    	setsetting('Looting/OpenNextBP', oldOpenNextBP)
    end
    
    local function __creaturesaround(callfunction, callparams, list, issafelist, filter)
    	local count = 0
    	table.lower(list)
    	foreach creature m filter do
    		if m ~= $self and callfunction(m, unpack(callparams)) and (#list == 0 or (not issafelist and table.find(list, m.name:lower())) or (issafelist and not table.find(list, m.name:lower()))) then
    			count = count + 1
    		end
    	end
    	
    	return count
    end
    all this checks and do the function: depotaction()
    if you want to learn more, i suggest you read lucas and rapahel librarys. =)

    i do notice that when you try to code something which a function already does.. something happens, you get stuck or create a cycle. or something...
    Check my Botting Project: HERE - If i helped, please +REP

 

 

Posting Permissions

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