Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- DO NOT EDIT ANYTHING BELOW
- local TIME = 0
- local firstRun = false
- local randTime = math.random(1, 520)*1000
- init end
- auto(5000, 20000)
- if ((not firstRun) or ($timems > TIME + randtime + 1000*60*31)) and sstime() > 60*10 then
- local firstChar = true
- for _, ACC in ipairs(accounts) do
- for index, accChar in ipairs(ACC.charList) do
- -- Connect char
- while not $connected do
- connect(ACC.accNr, ACC.pw, accChar)
- wait(1000)
- end
- local bpFound, bpNotFull = false, false
- while windowcount() < 2 do
- if windowcount() > 0 then
- closewindows()
- wait(1000, 1200)
- end
- -- Opening main bp
- local mainbp = itemname($back.id)
- while windowcount() == 0 do
- openitem(0, 'back')
- wait(500, 700)
- end
- -- Opening 2nd container
- for i=1, getcontainer(0).itemcount do
- if itemproperty(getcontainer(0).item[i].id, ITEM_CONTAINER) then
- bpFound = true
- while windowcount() < 2 and windowcount(mainbp) > 0 do
- openitem(getcontainer(0).item[i].id, 0, true)
- wait(1000)
- end
- end
- end
- if not bpFound then
- break
- end
- end
- if bpFound then
- if getcontainer(1).emptycount > 0 then
- bpNotFull = true
- else
- while (true) do
- local isContainerInside = false
- for i=1, getcontainer(1).itemcount do
- if not bpNotFull then
- if itemproperty(getcontainer(1).item[i].id, ITEM_CONTAINER) then
- isContainerInside = true
- openitem(getcontainer(1).item[i].id, 1, false)
- wait(200, 300)
- if getcontainer(1).emptycount > 0 then
- bpNotFull = true
- break
- else
- i = 0
- end
- end
- end
- end
- if bpNotFull or not isContainerInside then
- break
- end
- end
- end
- end
- if not bpFound or not bpNotFull then
- if not bpFound then
- printerror("Character " .. accChar .. " dont have any container inside main bp, removed from the character list.")
- table.remove(ACC.charList, index)
- elseif not bpNotFull then
- printerror("Character " .. accChar .. " used all slots in second container, removed from the character list.")
- table.remove(ACC.charList, index)
- end
- while $connected do
- logout()
- wait(1000)
- end
- press('[ESC]')
- wait(1000, 1500)
- else
- if (math.abs($posx - 33502) + math.abs($posy - 32545)) > 1 then
- reachlocation(33502, 32545, 7)
- wait(500)
- end
- local tempCap, tries = $cap, 0
- while $cap == tempCap and $cap > 1 and tries < 3 do
- useitem(15055, 33502, 32545, 7)
- wait(200, 300)
- tries = tries + 1
- end
- if tempCap ~= $cap then
- increaseamountlooted(20057, 1)
- end
- while itemcount(20057, 0) > 0 and getcontainer(1).emptycount > 0 do
- moveitems(20057, 1, 0, 1)
- wait(500)
- end
- while $connected do
- logout()
- wait(1000)
- end
- press('[ESC]')
- wait(1000, 1500)
- end
- end
- if firstChar then
- TIME, randtime, firstRun = $timems, math.random(1, 20)*1000, true
- firstChar = false
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement