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
badwords = {"cunt", "bitch", "asshole",} 	-- add flame words
firetime = {} 		-- ammount of time a person will be on fire
flame_fire_time = 5
flame_fire_dmg = 3
add_time_for_each_bad_wrd = true	-- for each bad word found it will add flame_fire_time to the players fire time
									-- use only true or false
for i = 1, 32 do
	firetime[i] = 0
end
addhook("say", "flame_detect")
function flame_detect(id, txt)
	local flame_instances = 0
	for k, v in pairs(badwords) do
		if ( txt:find(tostring(v)) ) then
			flame_instances = flame_instances + 1
		end
	end
	if ( not add_time_for_each_bad_wrd ) then
		flame_instance = 1
	end
	flametime[id] = flame_instance * flame_fire_time
end
addhook("second", "flame_do")
function flame_do()
	for k, v in pairs(player(0, "tableliving") do
		if ( firetime[v] > 0 ) then
			parse("effect \"fire\" "..player(v, "x").." "..player(v, "y").." "..math.random(4, 7).." "..math.random(8, 25).." 0 0 0")
			parse("sethealth "..v.." "..player(v, "health")-flame_fire_dmg);
			firetime[v] = firetime[v] - 1
		end
	end
end