What im trying to do is create a function that allows the armor to heal you when you select cast in the menu (there would be equip and cast). Here is the code I have so far
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[700] = { 		name = "Divine Armor", 		r = 255, g = 255, b = 255, 		action = {"cast","equip"}, 		slot = 2, 		eimage = "gfx/weiwen/rpgxserv/redknightarmor.png", 		fimage = "gfx/weiwen/rpgxserv/blueknightarmor.png", 		def = 3, 		speed = 3, 		func = {function(id,itemslot,itemid,equip) 		radiusmsg(player(id,"name") .. " Is healed by the power of divine !", player(id,"x"), player(id,"y")) 		explosion(player(id, "x"), player(id,"y"), 32, -50, id) 		local pos = player(id,"x") .. " " .. player(id,"y") 		parse("effect \"colorsmoke\" " .. pos .. " 5 5 128 255 255") 		radiussound("materials/glass2.wav", player(id,"x"), player(id,"y")) 		end, 		},
Would be great if you could show me other functions with armor too!
-Heal over time while equipped
-Add HP when equipped, and remove HP when removed. (basicly when its equipped you more more HP, and when you remove it, the players HP goes back to normal)
Thanks guys!