1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
[300] = { 		name = "leather helmet", 		desc = "Protect yourself from headshots!", 		r = 128, g = 64, b = 0, 		action = "equip", 		slot = 1, 		eimage = "gfx/weiwen/helmet.png", 		fimage = "gfx/weiwen/helmet.png", 		def = 0.05, 		speed = -1, 		func = equip, 	},
It would take me a long time to add all item's affixes to all items. For example, I want to add:
- Speed bonus
- Health bonus
- Magic dmg bonus
- Attack dmg bonus
- Magic resist bonus
- Physical resist bonus
- +EXP bonus
- +Money drop bonus
- +Item drop chance bonus
- Dodge bonus
- Critical chance bonus
- Critical dmg bonus
- Mana per 5 secs bonus
- Health per 5 secs bonus
- ETC............
I would have to add those item affixes to each item ID, and there are a lot of combinations like:
Item 301: Health bonus
Item 302: Health bonus + Magic resist bonus
Item 303: Health bonus + Speed bonus
Item 304: ETC.........................
There could be over 100 tables for each item that I want to add. Can someone give me an idea how to generate table (items) randomly with different item bonus to each item?