-- Open backpack
local lootBp = getlootingdestination('rare')
local mainBp = getlootingdestination('main')
local supBP = getlootingdestination('supplies')
local goldBP = getlootingdestination('gold')
while windowcount() ~= 4 then
closewindows()
open(0, 'back')
resizewindows()
wait(700,1000)
openitem(goldBP, mainBp, 'opennew')
resizewindows()
wait(700,1000)
openitem(supBP, mainBp, 'opennew')
resizewindows()
wait(700,1000)
openitem(lootBp, mainBp, 'opennew')
resizewindows()
wait(700,1000)
end
07-25-2014, 12:33 AM
Raphael
Quote:
Originally Posted by Justx
error in Action script wptid:3:
[" while windowcount() ~= 4 then"]:Action: :9: 'do' expected near 'then'
-- Open backpack
local lootBp = getlootingdestination('rare')
local mainBp = getlootingdestination('main')
local supBP = getlootingdestination('supplies')
local goldBP = getlootingdestination('gold')
while windowcount() ~= 4 then
closewindows()
open(0, 'back')
resizewindows()
wait(700,1000)
openitem(goldBP, mainBp, 'opennew')
resizewindows()
wait(700,1000)
openitem(supBP, mainBp, 'opennew')
resizewindows()
wait(700,1000)
openitem(lootBp, mainBp, 'opennew')
resizewindows()
wait(700,1000)
end
My bad, it's while windowcount() ... do, not then.
07-25-2014, 12:41 AM
Justx
Th-th-thanks!
07-25-2014, 12:57 AM
Chiezuz
Quote:
Originally Posted by Raphael
Yes, enable looting on both chars.
Ya ended up just being a bug. One char had a loot bug twice and then i restarted the bot a third time and it worked!
Hey, could you help me create a house depositor? I'm using Bug's Goroma SS and the backpacks in depot get filled very quickly.
They way I used to do it on the other bot is I'd create 1 persistent that gets switched on in the house that makes sure that the char stands on the specific SQM before he starts throwing the loot.
Then in the cavebot there would be the action that has all the items and the coordinates of the house tiles of where to throw the loot. I tried converting the one I had from ibot, but it didn't seem to work.
Would be great if you could explain how to make one. Thanks
07-25-2014, 02:32 PM
Raphael
Quote:
Originally Posted by Kostek
Hey, could you help me create a house depositor? I'm using Bug's Goroma SS and the backpacks in depot get filled very quickly.
They way I used to do it on the other bot is I'd create 1 persistent that gets switched on in the house that makes sure that the char stands on the specific SQM before he starts throwing the loot.
Then in the cavebot there would be the action that has all the items and the coordinates of the house tiles of where to throw the loot. I tried converting the one I had from ibot, but it didn't seem to work.
Would be great if you could explain how to make one. Thanks
Make waypoints to house
Drop items using action
Don't use hotkeys for that. Ever.
That's all. Let me know if you need more specifics.
07-25-2014, 02:49 PM
Kostek
I do need more specifics since I'm not very good at writing those type of actions myself xD I need the basic of dropping items and where you put the coordinates of each sqm. The only thing I use the hotkey for is to ensure that the character was in the house, so that in case of a random bug or script messing up, he's not dropping the loot all over the place. If you gave me and example of what it should look like, I should be able to customize it for myself.
07-25-2014, 07:21 PM
Raphael
Quote:
Originally Posted by Kostek
I do need more specifics since I'm not very good at writing those type of actions myself xD I need the basic of dropping items and where you put the coordinates of each sqm. The only thing I use the hotkey for is to ensure that the character was in the house, so that in case of a random bug or script messing up, he's not dropping the loot all over the place. If you gave me and example of what it should look like, I should be able to customize it for myself.
local items = {'demon shield', 'giant sword'}
for _, v in ipairs(items) do
moveitems(v, ground($wptx, $wpty, $wptz))
end
This moves the items listed on the table to the location of the action waypoint. I'd recommend you have multiple action waypoints, one for each sqm.
07-25-2014, 07:37 PM
Kostek
Holy Jesus, I didn't expect it to be this simple. Works perfectly, thanks.
@edit How do I add so that it opens next bp after dropping all of the stuff?
The way I was thinking was: at the end of dropping all the stuff he checks if the lootbp is empty - if not, open next bp and repeat process. Do that until lootbp is empty then he carries on with regular waypoints. Would be super grateful if you could help me with that or another solution if there's a better one.
Another way is that he opens till last bp, then presses 'show higher container' arrow in the corner until he reaches main bp.
07-25-2014, 08:38 PM
Raphael
Quote:
Originally Posted by Kostek
Holy Jesus, I didn't expect it to be this simple. Works perfectly, thanks.
@edit How do I add so that it opens next bp after dropping all of the stuff?
The way I was thinking was: at the end of dropping all the stuff he checks if the lootbp is empty - if not, open next bp and repeat process. Do that until lootbp is empty then he carries on with regular waypoints. Would be super grateful if you could help me with that or another solution if there's a better one.
Another way is that he opens till last bp, then presses 'show higher container' arrow in the corner until he reaches main bp.
Add a last waypoint after all the dropping ones with this:
local lootBP = getcontainer('Green Backpack')
if lootBP.itemcount ~= 0 then
if itemcount(lootBP.itemid, lootBP.index) > 0 then
openitem(lootBP.itemid, lootBP.index)
gotolabel('StartDropping')
end
end
07-25-2014, 09:00 PM
Kostek
Nice, everything works well. Thanks for your help :)
you made a small typo in getcontainer in case someone wants to use it gotta change it :P
07-25-2014, 10:09 PM
nexurno
I'm having a trouble in Drillworm respawns...
I need a persistent that changes the healer when X monsters on my screen and if not, back the first healer settings..
Something like this:
Code:
local MONSTERS = {"Drillworm"} -- Add the creatures that are being lured
local minMonsters = 6 -- Change X to whatever amount you want
auto(200)
if (maround(6, unpack(MONSTERS)) >= minMonsters) then >>>>THE CODE FOR CHANGE HEALER SETTINGS(ULTIMATE HEALING POTION FOR 60%<<<
end
else >>>THE CODE TO BACK THE FIRST HEALER<<<
end
If someone can help me, sorry for my bad english.
07-25-2014, 11:20 PM
Diabolic
Quote:
Originally Posted by nexurno
I'm having a trouble in Drillworm respawns...
I need a persistent that changes the healer when X monsters on my screen and if not, back the first healer settings..
Something like this:
Code:
local MONSTERS = {"Drillworm"} -- Add the creatures that are being lured
local minMonsters = 6 -- Change X to whatever amount you want
auto(200)
if (maround(6, unpack(MONSTERS)) >= minMonsters) then >>>>THE CODE FOR CHANGE HEALER SETTINGS(ULTIMATE HEALING POTION FOR 60%<<<
end
else >>>THE CODE TO BACK THE FIRST HEALER<<<
end
If someone can help me, sorry for my bad english.
local MONSTERS = {"Drillworm"} -- Add the creatures that are being lured
local minMonsters = 6 -- Change X to whatever amount you want
auto(200)
if maround(6, unpack(MONSTERS)) >= minMonsters then
setsetting('PotionHealer/Rules/RULENAME/ConditionValue', '60 to 60%')
else
setsetting('PotionHealer/Rules/RULENAME/ConditionValue', '40 to 40%')
end
Only change RULENAME.
07-25-2014, 11:25 PM
Raphael
Quote:
Originally Posted by Kostek
Nice, everything works well. Thanks for your help :)
you made a small typo in getcontainer in case someone wants to use it gotta change it :P
Ooops, my bad.
07-25-2014, 11:26 PM
Raphael
Quote:
Originally Posted by nexurno
I'm having a trouble in Drillworm respawns...
I need a persistent that changes the healer when X monsters on my screen and if not, back the first healer settings..
Something like this:
Code:
local MONSTERS = {"Drillworm"} -- Add the creatures that are being lured
local minMonsters = 6 -- Change X to whatever amount you want
auto(200)
if (maround(6, unpack(MONSTERS)) >= minMonsters) then >>>>THE CODE FOR CHANGE HEALER SETTINGS(ULTIMATE HEALING POTION FOR 60%<<<
end
else >>>THE CODE TO BACK THE FIRST HEALER<<<
end
local readyRootIds = {21104, 21105}
local lootId = 21291
local function findrootspots()
for x, y in screentiles(ORDER_RADIAL, topuseitem) do
if table.find(readyRootIds, topuseitem(x, y, $posz).id) then
return {x = x, y = y}
end
end
return nil
end
init end
auto(100)
if $lootsaround == 0 and $targetingtarget.hppc == 0 then
local bestSpot = findrootspots()
while bestSpot ~= nil do
pausewalking(6^9) -- Yeah babe!
if bestSpot ~= nil then
local lootCount = itemcount(lootId)
if itemcount(lootId) > lootCount then
increaseamountlooted(lootId, itemcount(lootId) - lootCount)
end
end
-- If starting conditions are no longer met, abort mission!
if $lootsaround ~= 0 or $targetingtarget.hppc ~= 0 then
break
end
bestSpot = findrootspots()
end
pausewalking(0) -- Orgasm.
end
07-26-2014, 07:29 PM
aafaz
Quote:
Originally Posted by Raphael
Try this out:
init start
-- local SCRIPT_VERSION = '1.0.0'
-- DO NOT EDIT BELOW THIS LINE --
local readyRootIds = {21104, 21105}
local lootId = 21291
local function findrootspots()
for x, y in screentiles(ORDER_RADIAL, topuseitem) do
if table.find(readyRootIds, topuseitem(x, y, $posz).id) then
return {x = x, y = y}
end
end
return nil
end
init end
auto(100)
if $lootsaround == 0 and $targetingtarget.hppc == 0 then
local bestSpot = findrootspots()
while bestSpot ~= nil do
pausewalking(6^9) -- Yeah babe!
if bestSpot ~= nil then
local lootCount = itemcount(lootId)
@Raphael olha o pvt por favor!! tive uma boa ideia!!
08-01-2014, 02:33 PM
Justx
hey raphael, I want to edit these persistents to when I'm attacked by any player, the bot will run execute the same actions it would if it were without supplies (go to dp and refill)
auto(800, 1000)
if itemcount(getuseroption('mpId', 'all')) < getuseroption('mpCheck') and $posz == 10 and $lootbodies < 1 and $battlesigned
then
setsetting("Persistent/Scripts/ForceRefillLower/Enabled","no")
settargeting("off")
gotolabel("leave lower")
end
if itemcount(getuseroption('hpId', 'all')) < getuseroption('hpCheck') and $posz == 10 and $lootbodies < 1 and $battlesigned
then
setsetting("Persistent/Scripts/ForceRefillLower/Enabled","no")
settargeting("off")
gotolabel("leave lower")
end
if $cap < getuseroption('capCheck') and $posz == 10 and $lootbodies < 1 and $battlesigned
then
setsetting("Persistent/Scripts/ForceRefillLower/Enabled","no")
settargeting("off")
gotolabel("leave lower")
end
auto(800, 1000)
if itemcount(getuseroption('mpId', 'all')) < getuseroption('mpCheck') and $posz == 9 and $lootbodies < 1 and $battlesigned
then
setsetting("Persistent/Scripts/ForceRefill/Enabled","no")
settargeting("off")
gotolabel("leave normal")
end
if itemcount(getuseroption('hpId', 'all')) < getuseroption('hpCheck') and $posz == 9 and $lootbodies < 1 and $battlesigned
then
setsetting("Persistent/Scripts/ForceRefill/Enabled","no")
settargeting("off")
gotolabel("leave normal")
end
if $cap < getuseroption('capCheck') and $posz == 9 and $lootbodies < 1 and $battlesigned
then
setsetting("Persistent/Scripts/ForceRefill/Enabled","no")
settargeting("off")
gotolabel("leave normal")
end