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
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end
players = initArray(32)
hasKnife = initArray(32)
addhook("hit","poison")
function poison(id,x,y,player,victim)
	if (player.hasKnife()) then
		players[victim] = true
		parse("effect colorsmoke "..x.." "..y.." 20 50 000255000")
	end
end
addhook("second","pocheck")
function pocheck()
	if players[victim] == true then
		parse("sethealth" ..players[victim].." "..player(players[victim],"health")-1)
		msg2(players[victim],"©255000000Oh no....you are getting poisoned!@C")
	end
end
addhook("serveraction","getpo")
function getpo(players,action)
	if action == 1 then
		menu(players,"Shop,Poisonous Knife|Costs 16000")
	end
end
addhook("menu","getpom")
function getpom(players,title,sel)
if title == "Shop" then
		if sel == 1 and player(players,"money") == 16000 then
			parse("setmoney "..players.." "..player(players,"money")-16000)
			player.hasKnife = true
		elseif player(players,"money") <= 15999 then
			msg2(players,"You do not have enough money,so go away!!")
		end
	end
end