Page 1 of 1
Auto sales
Posted: Thu May 01, 2014 7:15 am
by Agrozet
Hi,
How do I write to Items List
Code: Select all
-- changeProfileOption("INV_AUTOSELL_TYPES", )
changeProfileOption("INV_AUTOSELL_TYPES_NOSELL", Potion,General,Tools,Rune,Runes)
Code: Select all
Unknown profile option 'INV_AUTOSELL_TYPES_NOSELL'. We can't change that value. Please check your settings.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
changeProfileOption("INV_AUTOSELL_ENABLE", true)
changeProfileOption("INV_AUTOSELL_FROMSLOT", 1)
changeProfileOption("INV_AUTOSELL_TOSLOT", 90)
-- changeProfileOption("INV_AUTOSELL_TYPES", Potion,General,Tools,Rune,Runes)
changeProfileOption("INV_AUTOSELL_TYPES_NOSELL", "Potion,General,Tools,Rune,Runes")
-- changeProfileOption("INV_AUTOSELL_IGNORE", Purify Rune,Frost Rune,Blend Rune,Link Rune,Poison Bottle,Phirius Potion - Type B,Phirius Elixir - Type A)
changeProfileOption("INV_AUTOSELL_NOSELL_DURA", 110)
</onload>
<!-- # 1 --><waypoint x="-7077" z="-4164" y="171">
yrest(100);
player:merchant(118078);
yrest(100);
</waypoint>
</waypoints>
I have a list of ignored item in the script. I searched the forum, does anyone script for sale according to the list.
Does not work RoM Bot Wiki?
thank you
Re: Auto sales
Posted: Thu May 01, 2014 7:47 am
by noobbotter
Your list of types has to consist only of values listed in the itemtypestable.lua file. The only valid option you have listed is "Runes".
"Potion" should be "Potions" with an "s".
There is no "General" or "Tools" item type.
For Runes, there are two options available. either "Production Runes" (such as frost rune, link rune, etc...) or "Runes" (all equipment enhancing runes).
Re: Auto sales
Posted: Thu May 01, 2014 8:32 am
by rock5
Agrozet wrote:Code:
Unknown profile option 'INV_AUTOSELL_TYPES_NOSELL'. We can't change that value. Please check your settings.
changeProfileOption only changes existing values. I think it was meant to be a safety feature to catch misspelt option values. So you need to add the option to the profile for it to work.
Also it expects 1 value only. INV_AUTOSELL_TYPES_NOSELL is actually a string of comma separated values so changeProfileOption wont work with it unless you use it like this.
Code: Select all
changeProfileOption("INV_AUTOSELL_TYPES_NOSELL","Weapons,Armor,Runes")
That will replace the list, not add to it. If you want to add to it you could try
Code: Select all
settings.profile.options.INV_AUTOSELL_TYPES_NOSELL = settings.profile.options.INV_AUTOSELL_TYPES_NOSELL .. ",Weapons,Armor,Runes"
Another option is to use your own autosell eval function. Here's an example.
Code: Select all
ignorelist = {"Weapons","Armor","Runes"}
function evalsellignore(item)
if item.CannotBeSold or item.Quality > 2 then return false end
for k,v in pairs(ignorelist) do
if item:isType(v) then return false end
end
return true -- passed all the checks
end
player:openStore("npc name")
inventory:autoSell(evalsellignore)
That's probably more than you need but if you want to do something really complex, that would be the best way to do it.
Re: Auto sales
Posted: Sat May 03, 2014 11:42 am
by Agrozet
the problem was setting, I was not in the profile function
Code: Select all
<option name="INV_AUTOSELL_TYPES_NOSELL" value="nil" />
must write to your profile
Code: Select all
<!-- Auto selling options when used with player:merchant -->
<option name="INV_MAX_SLOTS" value="180" />
<option name="INV_UPDATE_INTERVAL" value="300" />
<option name="INV_AUTOSELL_ENABLE" value="false" /> <!-- true | false -->
<option name="INV_AUTOSELL_FROMSLOT" value="1" /> <!-- 1 = bag 1 slot 1 -->
<option name="INV_AUTOSELL_TOSLOT" value="60" /> <!-- 30 = last slot bag 1 -->
<option name="INV_AUTOSELL_QUALITY" value="nil" /> <!-- white,green,blue,purple -->
<option name="INV_AUTOSELL_IGNORE" value="nil" /> <!-- Purify Rune,Frost Rune,Blend Rune,Link Rune -->
<option name="INV_AUTOSELL_TYPES" value="nil" /> <!-- Runes, Potions, Production Runes -->
<option name="INV_AUTOSELL_TYPES_NOSELL" value="nil" /> <!-- Runes, Potions, Production Runes -->
<option name="INV_AUTOSELL_NOSELL_DURA" value="0" />
<option name="INV_AUTOSELL_STATS_NOSELL" value="nil" />
<option name="INV_AUTOSELL_STATS_SELL" value="nil" />
<option name="DEBUG_AUTOSELL" value="false" />
and script
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
changeProfileOption("INV_MAX_SLOTS", 90)
changeProfileOption("INV_UPDATE_INTERVAL", 300)
changeProfileOption("INV_AUTOSELL_ENABLE", true)
changeProfileOption("INV_AUTOSELL_FROMSLOT", 1)
changeProfileOption("INV_AUTOSELL_TOSLOT", 90)
changeProfileOption("INV_AUTOSELL_QUALITY", "white,green")
changeProfileOption("INV_AUTOSELL_IGNORE", "Poison Bottle")
changeProfileOption("INV_AUTOSELL_TYPES","Weapons,Armor,Recipes,Others")
changeProfileOption("INV_AUTOSELL_TYPES_NOSELL","Runes,Potions,Production Runes")
changeProfileOption("INV_AUTOSELL_NOSELL_DURA", 109)
-- changeProfileOption("INV_AUTOSELL_STATS_NOSELL"," X,XI")
-- changeProfileOption("INV_AUTOSELL_STATS_SELL","IX")
-- changeProfileOption("INV_AUTOSELL_NOSELL_STATSNUMBER",2)
changeProfileOption("DEBUG_AUTOSELL", true)
</onload>
<!-- # 1 --><waypoint x="-7077" z="-4164" y="171">
yrest(100);
player:merchant(118078);
yrest(100);
</waypoint>
</waypoints>
is an exception for one item? Here is just the type of item
Code: Select all
changeProfileOption("INV_AUTOSELL_TYPES_NOSELL","Runes,Potions,Production Runes")
I need to sell "Potions" - Phirius Potion - Type A
Does not work RoM Bot Wiki?
Re: Auto sales
Posted: Sat May 03, 2014 8:05 pm
by rock5
Have you tried moving "Potions" to INV_AUTOSELL_TYPES? Or are you saying you don't want to sell potions but you do want to sell Phirius Potion - Type A?
Re: Auto sales
Posted: Sun May 04, 2014 4:44 am
by Agrozet
Yes I need to sell only one item, such as Phirius Potion - Type A
Re: Auto sales
Posted: Sun May 04, 2014 5:34 am
by rock5
There is no option for that. You can ignore items by name but there is no "sell by name" option. If there was then it would be limited to only selling the items in that list. The autosell feaature is for selling groups of things, not individual items.
You can still manually sell it yourself without the auto sell option. Just do this after you player:merchant call.
Code: Select all
if player:openStore("npc name") then
inventory:useItem("Phirius Potion - Type A")
end