aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/runefire.lua
blob: e629558c1db05a08c823d806142baf9a8a42dc31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ITEM.Name 			= "Fire Rune"
ITEM.Class 			= "resource"
ITEM.Desc 			= "A perpetually warm stone"
ITEM.Model 			= "models/props_combine/breenlight.mdl"
ITEM.Icon 			= Material("wintersurvival2/hud/ws2_icons/icon_runefire.png")
game.AddParticles("particles/particletest.pcf")

ITEM.Structure = {
	{
		Bone = "ValveBiped.Bip01_R_Hand",
		Model = "models/props_junk/rock001a.mdl",
		Size = Vector(1,1,1),
		Pos = Vector(3,-1.6,0.5),
		Ang = Angle(0,0,0),
	},
}

ITEM.Recipe		= {
	Resources = {
		["Blank Rune"] = 1,
		["Pitch"] = 1,
	},
	Tools = {},
}



ITEM.Damage 	= 1
ITEM.Range 		= 500
ITEM.CD 		= 1

function ITEM:OnUse(user)
	if(CLIENT) then return end
	user:Ignite(1)
    user:SetHeat(0)
	user:RemoveItem(self.Name,1)
end

function ITEM:OnPrimary(ply,tr)
	ParticleEffect("firetest",ply:GetPos()+Vector(0,0,72),ply:GetAngles(),ply)
    if(CLIENT) then

	else
	    if(tr.Hit && tr.Entity && tr.Entity:IsPlayer()) then
			tr.Entity:Ignite(5)
			user.RemoveItem(self.Name,1)
		end
	end

end