1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function GetPos(CenterPos, UpOffSet, LeftOffSet, RightOffSet, Dir)
local x, y = CenterPos[1], CenterPos[2]
local UpPos = {x + math.sin(math.rad(Dir)) * UpOffSet, y - math.cos(math.rad(Dir)) * UpOffSet}
local LeftPos = {x + math.sin(math.rad(Dir-90)) * LeftOffSet, y - math.cos(math.rad(Dir-90)) * LeftOffSet}
local RightPos = {x + math.sin(math.rad(Dir+90)) * RightOffSet, y - math.cos(math.rad(Dir+90)) * RightOffSet}
return UpPos, LeftPos, RightPos
end
imgs = {image("gfx/npc1.png", 0, 0, 1), image("gfx/npc1.png", 0, 0, 1), image("gfx/npc1.png", 0, 0, 1)}
addhook('ms100', 'm')
function m()
	local up, left, right = GetPos({player(1, 'x'), player(1, 'y')}, 64, 64, 64, player(1, 'rot'))
	imagepos(imgs[1], up[1], up[2], 0)
	imagepos(imgs[2], left[1], left[2], 0)
	imagepos(imgs[3], right[1], right[2], 0)
end