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
[107] = {
		name = "Ninja skill",
		desc = "You may only use it once.",
		r = 255, g = 255, b = 255,
		action = {"cast","hold"},
		slot = 9,
		level = 30,
		fimage = "gfx/weiwen/rune.png",
		func = {function(id, itemslot, itemid, equip)
			radiusmsg(player(id,"name") .. " use ninja skill.", player(id,"x"), player(id,"y"))
			if player(id,"team")>0 and player(id,"health")>0 then
				local rot = player(id,"rot")
				if rot < -90 then rot = rot + 360 end
					local distance = 32 * 2
					local angle = math.rad(math.abs(rot + 90)) - math.pi
					local xt = player(id,"x") + math.cos(angle) * distance
					local yt = player(id,"y") + math.sin(angle) * distance
					if tile(math.floor(x/32),math.floor(y/32),"walkable") then
					parse("setpos "..id.." "..xt.." "..yt)
					explosion(xt, yt, 96, 40, id)
					local pos = player(id,"x") .. " " .. player(id,"y")
					parse("effect \"colorsmoke\" " .. pos .. " 100 96 255 255 255")
					destroyitem(id, itemslot, equip)
					else
					message(id, 'You cannot use this to go into walls!','255255255')
					end
				end
			end,equip},
	},