Forum

> > CS2D > Scripts > Lua! RPG Tibia armor function.
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lua! RPG Tibia armor function.

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Lua! RPG Tibia armor function.

gear
User Off Offline

Zitieren
I can seem to get my armor function work, this is probably a easy problem to solve, but lets face it; Im a noob when it comes to LUA. So maybe you guys can help me.
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
[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!
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht