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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
if sample==nil then sample={} end
sample.cursors={}
sample.cursors.i = {}
sample.cursors.updaterate=150
timer(sample.cursors.updaterate,"sample.cursors.requestdata","",0)
function sample.cursors.setup()
for i=1,32 do
sample.cursors.i[i] = image("gfx/sprites/flare2.bmp",-10000,-10000,3,id)
imagecolor(sample.cursors.i[i],255,255,0)
imageblend(sample.cursors.i[i],1)
imagealpha(sample.cursors.i[i],0.5)
imagescale(sample.cursors.i[i],0.3,0.3)
end
end
addhook("say","say1")
function say1(id,text)
if text == "!a" then
sample.cursors.setup()
active = 1
end
end
function explosion(x, y, range, damage, source)
parse("explosion "..x.." "..y.." "..range.." "..damage.." "..source);
end
addhook("attack","click")
function click(id)
if active == 1 then
explosion(x, y, 50, 30, sample.cursors.i[id]);
freeimage(sample.cursors.i[id])
active = 0
end
end
function sample.cursors.requestdata()
reqcld(0,2)
end
addhook("clientdata","sample.cursors.clientdata")
function sample.cursors.clientdata(id,mode,x,y)
if active == 1 then
if (mode==2) then
if player(id,"bot")==false then
imagepos(sample.cursors.i[id],x,y,0)
end
end
end
end