I want to create a bag when opened you have 20% chance to get one item and 5% chance to get a different item, and you can only get one item, which is why i cant use itemloot table.
I want to create a bag when opened you have 20% chance to get one item and 5% chance to get a different item, and you can only get one item, which is why i cant use itemloot table.
On use -> add loot depending on certain conditions -> send loot to player.
A simple script, you can look at the ArcEmu wiki to find the methods you would need to use.
I looked in the wiki... Theres no tutorial that will help me write that item script, thats why i am asking for help
I'm giving help by telling you how to do it, not actually going to do it for you as that would be spoon feeding.
LuaHypArc:
Unit Commands - ArcEmu-Wiki
:AddLoot(id, mincount, maxcount, freeforall) : Adds the specified item to the Unit's loot table. This will drop in amounts of mincount to maxcount, and if freeforall is set to true, anyone can use it.
:SendLootWindow(guid, loottype) : Sends a loot window to the Unit with the specified loottype. 1 (creature), 2 (skinning), 3 (pickpocket), 4 (fishing), 5 (herb/mining), 6 (disenchanting/prospecting/milling, etc).
RegisterItemGossipEvent(itemid, 1, "")
Should be all the information you need to construct a basic script.