Page 1 of 1

Userfunction Lootomatic - Control lootomatic from rombot

Posted: Sat Aug 10, 2013 6:54 am
by Rintintin
This is my userfunction to attempt to control the lootomatic behaviour from rombot. It has been developed an tested regarding to Lootomatic version 1.0. Currently you can:
  • enable/disable lootomatic
  • add items to the itemlist of lootomatic (by name or itemid)
  • remove items from the itemlist of lootomatic (by name or itemid)
Usage:
Alle method have the lootomatic. prefix.
1. enable lootomatic
This command enables the plugin in RoM

Code: Select all

lootomatic.enable()
2. disable lootomatic
This command disables the plugin in RoM

Code: Select all

lootomatic.disable()
3. add Item to itemlist of lootomatic
This command adds or appends a new item to lootomatics' internal filterlist. Its the list that is also accessable via the gui in the game. This command has three arguments to hand over.
  • item - the name or id of the item
  • loot - one of the following: 'dont_loot','loot','drop'
  • roll - one of the following: 'pass','greed','need','manual'
example:

Code: Select all

lootomatic.addItem ("$ammo","loot","greed")
Puts all kind of ammo in the list with the option loot and in case of a party or raid being greedy for the item.
HINT: the $ammo is a lootomatic feature and described in the plugin itself. You can of course also enter an itemid or the itemname itself.

4. remove an item from the itemlist of lootomatic
This command removes one item from the list without any confirmation. Provide the name or the id of the item to the function.
example:

Code: Select all

lootomatic.removeItem (123456)
Removes the item with the id 123456 from the list. If it wasn't on the list before, nothing will happen except a short note in the commandline window.


Final note:
For the convinience of all those user, which propably don't have this userfunction installed, you should enclosure all commands like this

Code: Select all

if lootomatic then
       lootomatic.addItem ("$ammo","loot","greed");  -- or any other function related to this userfunction.
end
This ensures that the related waypoint does not throw an error, when it's being used by one who didn't install this userfunction (yet?)

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Sat Aug 10, 2013 10:23 am
by rock5
There's nothing attached. :D

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Sat Aug 10, 2013 2:34 pm
by Rintintin
i fixed a minor bug and in the updateprocess the file got somehow lost. Download now possible.

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Thu Oct 31, 2013 3:57 am
by kuripot
i can use same category like this??

Code: Select all

itemtypes = {
	[1] = { Name = "Armor",
		[1] = { Name = "Chain",
			[1] = { Name = "Upper Body", UniqueName = "Upper Body Chain" },
			[2] = { Name = "Belts", UniqueName = "Belts Chain" },
			[3] = { Name = "Lower Body", UniqueName = "Lower Body Chain" },
			[4] = { Name = "Hands", UniqueName = "Hands Chain" },
			[5] = { Name = "Feet", UniqueName = "Feet Chain" },
			[6] = { Name = "Capes", UniqueName = "Capes Chain" },
			[7] = { Name = "Shoulders", UniqueName = "Shoulders Chain" },
			[0] = { Name = "Head", UniqueName = "Head Chain" },
		},
		[2] = { Name = "Leather",
			[1] = { Name = "Upper Body", UniqueName = "Upper Body Leather" },
			[2] = { Name = "Belts", UniqueName = "Belts Leather" },
			[3] = { Name = "Lower Body", UniqueName = "Lower Body Leather" },
			[4] = { Name = "Hands", UniqueName = "Hands Leather" },
			[5] = { Name = "Feet", UniqueName = "Feet Leather" },
			[6] = { Name = "Capes", UniqueName = "Capes Leather" },
			[7] = { Name = "Shoulders", UniqueName = "Shoulders Leather" },
			[0] = { Name = "Head", UniqueName = "Head Leather" },
		},
		[3] = { Name = "Cloth",
			[1] = { Name = "Upper Body", UniqueName = "Upper Body Cloth" },
			[2] = { Name = "Belts", UniqueName = "Belts Cloth" },
			[3] = { Name = "Lower Body", UniqueName = "Lower Body Cloth" },
			[4] = { Name = "Hands", UniqueName = "Hands Cloth" },
			[5] = { Name = "Feet", UniqueName = "Feet Cloth" },
			[6] = { Name = "Capes", UniqueName = "Capes Cloth" },
			[7] = { Name = "Shoulders", UniqueName = "Shoulders Cloth" },
			[0] = { Name = "Head", UniqueName = "Head Cloth" },
		},
		[4] = { Name = "Accessories",
			[1] = { Name = "Rings" },
			[2] = { Name = "Necklace" },
			[0] = { Name = "Earrings" },
		},
		[5] = { Name = "Off-hand",
			[1] = { Name = "Talismans" },
			[0] = { Name = "Shields" },
		},
		[6] = { Name = "Amulets" },
		[7] = { Name = "Back" },
		[0] = { Name = "Plate",
			[1] = { Name = "Upper Body", UniqueName = "Upper Body Plate" },
			[2] = { Name = "Belts", UniqueName = "Belts Plate" },
			[3] = { Name = "Lower Body", UniqueName = "Lower Body Plate" },
			[4] = { Name = "Hands", UniqueName = "Hands Plate" },
			[5] = { Name = "Feet", UniqueName = "Feet Plate" },
			[6] = { Name = "Capes", UniqueName = "Capes Plate" },
			[7] = { Name = "Shoulders", UniqueName = "Shoulders Plate" },
			[0] = { Name = "Head", UniqueName = "Head Plate" },
		},
	},
	[2] = { Name = "Supplies",
		[1] = { Name = "Desserts" },
		[2] = { Name = "Potions" },
		[0] = { Name = "Foods" },
	},
	[3] = { Name = "Materials",
		[1] = { Name = "Wood" },
		[2] = { Name = "Herbs" },
		[3] = { Name = "Raw Materials" },
		[4] = { Name = "Production Runes" },
		[5] = { Name = "Prepared Materials" },
		[0] = { Name = "Ores" },
	},
	[4] = { Name = "Recipes",
		[1] = { Name = "Carpentry" },
		[2] = { Name = "Armorcrafting" },
		[3] = { Name = "Tailoring" },
		[4] = { Name = "Alchemy" },
		[5] = { Name = "Cooking" },
		[0] = { Name = "Blacksmithing" },
	},
	[5] = { Name = "Equipment Enhancement",
		[1] = { Name = "Runes" },
		[2] = { Name = "Fusion Stones" },
		[0] = { Name = "Refining Gems" },
	},
	[6] = { Name = "Monster Cards" },
	[7] = { Name = "Mounts" },
	[8] = { Name = "Household",
		[1] = { Name = "Furniture" },
		[2] = { Name = "Knowledge Books" },
		[0] = { Name = "House Contracts" },
	},
	[9] = { Name = "Special Items" },
	[10] = { Name = "Quest Items" },
	[11] = { Name = "Others" },
	[12] = { Name = "Money",
		[1] = { Name = "Diamonds" },
		[0] = { Name = "Gold" },
	},
	[0] = { Name = "Weapons",
		[1] = { Name = "Axes",
			[1] = { Name = "2-Handed", UniqueName = "2-Handed Axes" },
			[0] = { Name = "1-Handed", UniqueName = "1-Handed Axes" },
		},
		[2] = { Name = "Hammers",
			[1] = { Name = "2-Handed", UniqueName = "2-Handed Hammers" },
			[0] = { Name = "1-Handed", UniqueName = "1-Handed Hammers" },
		},
		[3] = { Name = "Daggers" },
		[4] = { Name = "Staves",
			[1] = { Name = "2-Handed", UniqueName = "2-Handed Staves" },
			[0] = { Name = "1-Handed", UniqueName = "1-Handed Staves" },
		},
		[5] = { Name = "Ranged Weapons",
			[1] = { Name = "Crossbows" },
			[2] = { Name = "Arrows" },
			[0] = { Name = "Bows" },
		},
		[6] = { Name = "Projectiles" },
		[0] = { Name = "Swords",
			[1] = { Name = "2-Handed", UniqueName = "2-Handed Swords" },
			[0] = { Name = "1-Handed", UniqueName = "1-Handed Swords" },
		},
	},
}
itemtypes_language = "EN"
itemtypes_version = 1
for adding and removing??

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Thu Oct 31, 2013 4:07 am
by kuripot
or there a option to scan and save all item that previously added and when do manually added all item in lootomatic and when the patch coming out.. or reinstall the addon.. all aded item will me reset and cleared.. so i need to start all over again

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Thu Oct 31, 2013 1:37 pm
by Rintintin
Well the main intention was when you do the daily quests or especially farming an ini or doing the minigames you know which items you can get rid of to save valuable bagspace.

So in the <onload> section of every related quest i put a line for every Item I don't want to keep.

For example my char ain't a healer so I never ever need the "Amulet of Light" (id: 203606)

The line for inserting it in lootomatic from the rombot side would be:

Code: Select all

if (lootomatic) then
		lootomatic.enable();                  -- optional. ensures that lootomatic is enabled for that specific waypoint
		lootomatic.addItem (203606,"drop","manual");    --passing over the name of the Item is also ok, but keep in mind this might only work in YOUR language. 
                                                                                 -- So please always try to work with ids!
end

"drop" means -> throw it away..
manual means-> when you are in a party, you decide manually to loot or to pass it to your fellows.


Got it??

You are only allowed to insert real items or item ids. Item types are not permitted as you aren't allowed to do so from within the game.

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Fri Nov 01, 2013 6:51 am
by kuripot
what i mean to say is if i dont need all ammunition.. and all runes grade I II III IV V VI etc....

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Fri Nov 01, 2013 10:48 am
by Rintintin
Fortunatly Lootomatic has an option to get rid of this items by cathegory!

To drop alle tier 1 runes enter

$rune1

for all ammo

$ammo


this is nothing that you need this userfunction for.

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Mon Nov 11, 2013 8:16 pm
by ZZZZZ
Can this be easily modified for Lootit! or is that another kettle of fish?

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Tue Nov 12, 2013 11:41 am
by Rintintin
what is lootit?

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Tue Nov 12, 2013 7:58 pm
by ZZZZZ
Its more or less Lootomatic but i believe updated + a few more features.

http://rom.curseforge.com/addons/lootit/

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Mon Sep 01, 2014 3:16 am
by Lamkefyned
as I can change the preferences of the general subdivision?

*never
*common
*normal
*good
*rare
*epic
*legendary

*no bosses

?¿?¿

Re: Userfunction Lootomatic - Control lootomatic from rombot

Posted: Wed Sep 03, 2014 10:29 pm
by rock5
This is a test post. Please ignore.