LUA question - Function
Deleted User1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook('use','epress')
function pre(id,t)
function epress(p)
local dot=object(0,'table')
for b=1,#dot do
return ((player(p,'tilex')==object(dot[b],'tilex')-1 and player(p,'tiley')==object(dot[b],'tiley')-1) or
(player(p,'tilex')==object(dot[b],'tilex')-1 and player(p,'tiley')==object(dot[b],'tiley')) or
(player(p,'tilex')==object(dot[b],'tilex')-1 and player(p,'tiley')==object(dot[b],'tiley')+1) or
(player(p,'tilex')==object(dot[b],'tilex') and player(p,'tiley')==object(dot[b],'tiley')+1) or
(player(p,'tilex')==object(dot[b],'tilex')+1 and player(p,'tiley')==object(dot[b],'tiley')+1) or
(player(p,'tilex')==object(dot[b],'tilex')+1 and player(p,'tiley')==object(dot[b],'tiley')) or
(player(p,'tilex')==object(dot[b],'tilex')+1 and player(p,'tiley')==object(dot[b],'tiley')-1) or
(player(p,'tilex')==object(dot[b],'tilex') and player(p,'tiley')==object(dot[b],'tiley')-1)) and object(dot[b],'type')==t and p==id
end
end
end
after that I make this
1
2
3
4
5
6
2
3
4
5
6
addhook('always','chk')
function chk()
if pre(1,7) then
msg(':DDD')
end
end
edited 1×, last 13.04.11 04:48:08 pm