I used lootomatic but that addon is problem while go to char slection screen or escape to the game, game is crushed and item drop list will not be save.
I want to delete cheap items from 1200 gold ,arrows, Projectiles ,Crafting Runes, Runes with bot.
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 (1200 > item.Worth and 5 > item.Quality)then
item:delete()
end
if item:isType("Runes") then
item:delete()
end
function CleanBag()
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("Arrows") then
item:delete()
end
if item:isType("Projectiles") then
item:delete()
end
if item:isType("Runes") then
item:delete()
end
if ( item:isType("Weapons") or item:isType("Armor") ) and (1200 > item.Worth and 3 > item.Quality) then
item:delete()
end
if item:isType("Potions") and (46 > item.RequiredLvl and item.RequiredLvl > 10) then
item:delete()
end
end
end
end
function CleanBag()
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("Arrows") then
item:delete()
end
if item:isType("Projectiles") then
item:delete()
end
if item:isType("Runes") then
item:delete()
end
if ( item:isType("Weapons") or item:isType("Armor") ) and (1200 > item.Worth and 3 > item.Quality) then
item:delete()
end
if item:isType("Potions") and (46 > item.RequiredLvl and item.RequiredLvl > 10) then
item:delete()
end
end
end
end
I want to delete from slot 7 to slot 30 ?
and it didnt work, I must put something in rom\userfunctions folder ?
Last edited by mrtgtr on Mon Dec 17, 2012 6:44 pm, edited 1 time in total.
-- custom database for user added items to trow out
forcedrop = {
"Unknown Gift",
"Lost Gift",
"Sled Fragment",
}
for k, v in ipairs(forcedrop) do
if v == item.Name then
printf("Deleting Item: "..item.Name.."\n");
item:delete();
end
end
-- custom database for user added items to trow out
forcedrop = {
"Unknown Gift",
"Lost Gift",
"Sled Fragment",
}
for k, v in ipairs(forcedrop) do
if v == item.Name then
printf("Deleting Item: "..item.Name.."\n");
item:delete();
end
end
this code works ^^
hm, idk how work for you , but it give me an error
-- sell prize = value which drops all below it
-- rarity = / 0 = white / 1 = green / 2 = blue / 3 = purple / 4 = orange / 5 = gold
-- drop true/false = if allready learned recipes should be dropped
function CleanBag(sellprize, rarity, drop, logg)
inventory:update();
-- custom database for user added items to trow out
forcedrop = {
"Unknown Gift",
"Lost Gift",
"Sled Fragment",
}
if sellprize == nil then sellprize = 750 end;
if rarity == nil then rarity = 1 end;
if drop == nil then drop = false end;
if logg == nil then logg = true end;
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
for k, v in ipairs(forcedrop) do
if v == item.Name then
printf("Deleting Item: "..item.Name.."\n");
item:delete();
end
end
if (item:isType("Weapons") or item:isType("Armor")) and sellprize > item.Worth and item.Quality < rarity then
printf("Deleting Item: "..item.Name.."\n");
if logg == true then
logInfo("CleanBag", "" ..player.Name.. ": Deleted: " ..item.Name.. "." , true)
end
item:delete();
elseif item:isType("Recipes") then
if RoMScript("GetCraftItemInfo("..item.Id..")") == nil and item.Quality < rarity then -- Don't have it
printf("Learning recipe: "..item.Name.."\n");
if logg == true then
logInfo("LearnRecipe", "" ..player.Name.. ": Learning recipe: " ..item.Name.. "." , true);
end
item:use();
yrest(5000);
else
if drop == true and item.Quality < rarity then
printf("Deleting Recipe: "..item.Name.."\n");
if logg == true then
logInfo("LearnRecipe", "" ..player.Name.. ": Deleting recipe: " ..item.Name.. "." , true);
end
item:delete();
end
end
elseif item:isType("Monster Cards") then
if not haveCard(item.Id) then
printf("Using card: "..item.Name.."\n");
if logg == true then
logInfo("UseCard", "" ..player.Name.. ": Using card: " ..item.Name.. "." , true);
end
item:use();
yrest(5000);
end
elseif item:isType("Potions") and item.RequiredLvl < player.Level - 10 then
item:delete()
elseif item:isType("Runes") then
item:delete()
end
end
end
end