-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#41
Post
by rock5 » Tue Jun 05, 2012 2:15 am
Please remember to add code into [ code] tags for easier reading.
It looks like the slot numbering is wrong. As the comments say "1 = bag 1 slot 1". The rest of the comment you added is wrong. Let me explain. The slots in the inventory go like this
- 1-50 = itemshop bags
51-60 = transmutor
61-240 = backpack (6 bags)
But the option for autosell can only sell from the bags so they go from 1 to 180. It was never changed when we changed the slot numbering for the inventory.
Thats why you are using
Code: Select all
settings.profile.options.INV_AUTOSELL_FROMSLOT + 60
in your code.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
Salrom
- Posts: 2
- Joined: Wed Jan 26, 2011 8:35 pm
#42
Post
by Salrom » Tue Jun 05, 2012 5:52 am
So if I am understanding you correctly for the autosell functions bag1 slot 1 is still 1 not 61 therefore if I want to sell bags 3, 4 and 5 only it would look like this
Code: Select all
<!-- Auto selling options when used with player:merchant -->
<option name="INV_AUTOSELL_ENABLE" value="false" /> <!-- true | false -->
<option name="INV_AUTOSELL_FROMSLOT" value="61" /> <!-- 1 = bag 1 slot 1 -->
<option name="INV_AUTOSELL_TOSLOT" value="150" /> <!-- 30 = last slot bag 1 -->
<option name="INV_AUTOSELL_QUALITY" value="white,green" /> <!-- white,green,blue,purple -->
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#43
Post
by rock5 » Tue Jun 05, 2012 7:18 am
Yes.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
romaniac
- Posts: 79
- Joined: Sat Feb 04, 2012 8:25 am
#44
Post
by romaniac » Sat Jul 14, 2012 2:50 am
I have tried to use this script, but it does not seem to drop anything. I have put in trace output and it defnitely enters the slot index check
Code: Select all
if item:isType("Runes") then
item:delete()
end
if ( item:isType("Weapons") or item:isType("Armor") ) and (400 > item.Worth)then
item:delete()
end
But this code never drops anything, even thogh there are runes and cheap armor in the bag.
Any ideas?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#45
Post
by rock5 » Sat Jul 14, 2012 4:33 am
When are you running it? What slot numbers are you going through? Are you sure you assigned the correct value to 'item'? Are you playing on an English client?
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
romaniac
- Posts: 79
- Joined: Sat Feb 04, 2012 8:25 am
#46
Post
by romaniac » Sun Jul 15, 2012 6:07 am
That's probably it. It's not an english client. The values for Type() in the bot are language dependent?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#47
Post
by rock5 » Sun Jul 15, 2012 7:52 am
Look in "cache\itemtypestable.lua" to see the name you should use.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
kuripot
- Posts: 493
- Joined: Mon Nov 07, 2011 9:14 pm
#48
Post
by kuripot » Sun Aug 05, 2012 11:41 pm
lisa wrote:Actually since I made that function specific to KS I just add it to the onload for the KS WP file.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
setwindow("gold")
ToPancer = 1
StopAtBoss = 3
-- 0 = white / 1 = green / 2 = blue / 3 = purple / 4 = orange / 5 = gold
changeProfileOption("INV_AUTOSELL_ENABLE",true)
function CleanBagKS()
for i, item in pairs(inventory.BagSlot) do
if item.SlotNumber >= settings.profile.options.INV_AUTOSELL_FROMSLOT + 60 and
settings.profile.options.INV_AUTOSELL_TOSLOT + 60 >= item.SlotNumber then
if item:isType("Runes") then
item:delete()
end
if ( item:isType("Weapons") or item:isType("Armor") ) and (400 > item.Worth and 3 > item.Quality)then
item:delete()
end
if item.Name == "Link Rune" then
item:delete()
end
if item:isType("Potions") and (45 > item.RequiredLvl and item.RequiredLvl > 10) then
item:delete()
end
end
end
end
</onLoad>
then I just do this a few times in the waypoints
Code: Select all
<!-- # 27 --><waypoint x="4148" z="1439">CleanBagKS() </waypoint>
<!-- # 60 --><waypoint x="3149" z="1446">CleanBagKS() </waypoint>
<!-- # 83 --><waypoint x="2857" z="2210">CleanBagKS() </waypoint>
Code literally takes a second to dump 15-20 items, I didn't even put in a rest for it.
how can i delete all Runes,Ammunition,Raw Material and Potion
i use this
Code: Select all
function CleanBagDOD()
for i, item in pairs(inventory.BagSlot) do
if item.SlotNumber >= settings.profile.options.INV_AUTOSELL_FROMSLOT + 30 and
settings.profile.options.INV_AUTOSELL_TOSLOT + 30 >= item.SlotNumber then
if item:isType("Runes") then
item:delete()
end
if ( item:isType("Weapons") or item:isType("Armor") ) and (1000 > item.Worth and 4 > item.Quality)then
item:delete()
end
if item:isType("Equipment Enhancement") then
item:delete()
end
if 1000 > item.Worth and 4 > item.Quality then
item:delete()
end
if item.Name == "Wild Boar Meat" then
item:delete()
end
if item:isType("Potions") and (70 > item.RequiredLvl and item.RequiredLvl > 10) then
item:delete()
end
end
end
end
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#49
Post
by lisa » Mon Aug 06, 2012 12:05 am
Have a look in the file
scripts/rom/cache/itemtypestable.lua
you can use
Code: Select all
if item:isType("Runes") then
item:delete()
end
For any of the names in that file.
Code: Select all
[3] = { Name = "Raw Materials" },
[4] = { Name = "Production Runes" },
I am sure you can find the others you want easy enough.
-
kuripot
- Posts: 493
- Joined: Mon Nov 07, 2011 9:14 pm
#50
Post
by kuripot » Mon Aug 06, 2012 12:41 am
still not working,,,, not deleting
Code: Select all
function CleanBagDOD()
for i, item in pairs(inventory.BagSlot) do
if item.SlotNumber >= settings.profile.options.INV_AUTOSELL_FROMSLOT + 30 and
settings.profile.options.INV_AUTOSELL_TOSLOT + 30 >= item.SlotNumber then
if item:isType("Materials") then
item:delete()
end
if item:isType("Arrows") then
item:delete()
end
if item:isType("Projectiles") then
item:delete()
end
if ( item:isType("Weapons") or item:isType("Armor") ) and (1000 > item.Worth and 5 > item.Quality)then
item:delete()
end
if item:isType("Equipment Enhancement") then
item:delete()
end
if 1000 > item.Worth and 5 > item.Quality then
item:delete()
end
if item.Name == "Wild Boar Meat" then
item:delete()
end
if item:isType("Potion") then
item:delete()
end
end
end
end
Code: Select all
<waypoint x="2252" z="2444" y="401">
useGoodie("mdmg2");
useGoodie("casting");
useGoodie("speed");
useGoodie("matt3");
useGoodie("defense");
Boss_buff()
trash_boss()
lootMob()
CleanBagDOD()
Memoscount()
</waypoint>
<waypoint x="2290" z="2357" y="401" type="TRAVEL">
CleanBagDOD()
Memoscount()
settings.profile.friends = {"Incomplete Bloody Beast"} </waypoint>
<!-- # 19 -->
<waypoint x="2191" z="2520" y="401">fly()
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#51
Post
by rock5 » Mon Aug 06, 2012 12:56 am
You can only sell from your bags so INV_AUTOSELL_FROMSLOT and INV_AUTOSELL_TOSLOT count 1 as being the first bag slot. The first bag slot for the inventory is 61 so you'll need to do something like this,
Code: Select all
if item.SlotNumber - 60 >= settings.profile.options.INV_AUTOSELL_FROMSLOT + 30 and
settings.profile.options.INV_AUTOSELL_TOSLOT + 30 >= item.SlotNumber - 60 then
Edit: Wait that still doesn't look right. Why would you want to drop items 30 past INV_AUTOSELL_TOSLOT? Maybe you meant to do this.
Code: Select all
if item.SlotNumber >= settings.profile.options.INV_AUTOSELL_FROMSLOT + 60 and
settings.profile.options.INV_AUTOSELL_TOSLOT + 60 >= item.SlotNumber then
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
kuripot
- Posts: 493
- Joined: Mon Nov 07, 2011 9:14 pm
#52
Post
by kuripot » Mon Aug 06, 2012 1:16 am
waaaaaaaaaaaaaaaaa
Code: Select all
function CleanBagDOD()
for i, item in pairs(inventory.BagSlot) do
if item.SlotNumber - 60 >= settings.profile.options.INV_AUTOSELL_FROMSLOT + 30 and
settings.profile.options.INV_AUTOSELL_TOSLOT + 30 >= item.SlotNumber - 60 then
if item:isType("Materials") then
item:delete()
end
if item:isType("Arrows") then
item:delete()
end
if item:isType("Projectiles") then
item:delete()
end
if ( item:isType("Weapons") or item:isType("Armor") ) and (1000 > item.Worth and 5 > item.Quality)then
item:delete()
end
if item:isType("Equipment Enhancement") then
item:delete()
end
if 1000 > item.Worth and 5 > item.Quality then
item:delete()
end
if item.Name == "Wild Boar Meat" then
item:delete()
end
if item:isType("Potion") then
item:delete()
end
end
end
end
i lost important item
-
Attachments
-

-
kuripot
- Posts: 493
- Joined: Mon Nov 07, 2011 9:14 pm
#53
Post
by kuripot » Mon Aug 06, 2012 1:19 am
my onload
Code: Select all
loadProfile("Main")
changeProfileOption("INV_AUTOSELL_FROMSLOT", 1)
changeProfileOption("INV_AUTOSELL_TOSLOT", 30)
settings.profile.friends = {"Incomplete Bloody Beast"}
changeProfileOption("EGGPET_ENABLE_ASSIST", "true")
changeProfileOption("INV_AUTOSELL_ENABLE", "true")
dura = 0.9
Magic_Tambourine = true
Magic_Guitar = true
__WPL:setWaypointIndex(__WPL:findWaypointTag("start"))
changeProfileOption("AUTO_ELITE_FACTOR", 1000)
changeProfileOption("HARVEST_DISTANCE", 50)
-- 0 = white / 1 = green / 2 = blue / 3 = purple / 4 = orange / 5 = gold
i only use backpack I for selling
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#54
Post
by rock5 » Mon Aug 06, 2012 1:25 am
I told you it doesn't look right? Or did you miss that edit?
Example: If you have INV_AUTOSELL_FROMSLOT = 1 and INV_AUTOSELL_TOSLOT = 30 because you only want to sell from the first bag then the code you have would drop from the second bag which doesn't make sense. The second code I wrote would sell from the first bag.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
kuripot
- Posts: 493
- Joined: Mon Nov 07, 2011 9:14 pm
#55
Post
by kuripot » Mon Aug 06, 2012 1:38 am
i miss your edit
now its working
Who is online
Users browsing this forum: No registered users and 1 guest