Flame script (error)
6 replies



09.03.12 05:23:35 pm
I made script, but he don't work. I can't find error, can you help me?
Code:
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
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
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
pl_fire=initArray(32)
pl_afire=initArray(32)
addhook("hit","fire2")
function fire2(idp,ida,w,hpdmg,apdmg)
if (w==46) then
pl_fire[idp]=pl_fire[idp]+10
pl_afire[idp]=ida
end
end
time=100
timeflamedraw = 0
addhook("ms100","fireing")
function fireing()
if timeflamedraw == 1 then
timeflamedraw = 0
dmg=2
time=time-1
for idp=1,32 do
if (player(idp,"exists")) then
if (player(idp,"health")>0) then
if (pl_fire[idp]>=dmg) then
parse('effect "fire" '..player(idp,"x")..' '..player(idp,"y")..' 1 1')
pl_fire[idp]=pl_fire[idp]-dmg
if (player(idp,"health")>=dmg+1) then
parse("sethealth "..idp.." "..player(idp,"health")-dmg)
else
parse("customkill "..pl_afire[idp].." Fire "..idp)
end
if (player(idp,"health")<=0) then
pl_fire[idp]=0
pl_afire[idp]=0
end
end
else
pl_fire[idp]=0
pl_afire[idp]=0
end
end
end
else
timeflamedraw = timeflamedraw+1
end
end
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
pl_fire=initArray(32)
pl_afire=initArray(32)
addhook("hit","fire2")
function fire2(idp,ida,w,hpdmg,apdmg)
if (w==46) then
pl_fire[idp]=pl_fire[idp]+10
pl_afire[idp]=ida
end
end
time=100
timeflamedraw = 0
addhook("ms100","fireing")
function fireing()
if timeflamedraw == 1 then
timeflamedraw = 0
dmg=2
time=time-1
for idp=1,32 do
if (player(idp,"exists")) then
if (player(idp,"health")>0) then
if (pl_fire[idp]>=dmg) then
parse('effect "fire" '..player(idp,"x")..' '..player(idp,"y")..' 1 1')
pl_fire[idp]=pl_fire[idp]-dmg
if (player(idp,"health")>=dmg+1) then
parse("sethealth "..idp.." "..player(idp,"health")-dmg)
else
parse("customkill "..pl_afire[idp].." Fire "..idp)
end
if (player(idp,"health")<=0) then
pl_fire[idp]=0
pl_afire[idp]=0
end
end
else
pl_fire[idp]=0
pl_afire[idp]=0
end
end
end
else
timeflamedraw = timeflamedraw+1
end
end
Use tabbing!
A thousand may fall at your side, ten thousand at your right hand, but it will not come near you. You will only look with your eyes and see the recompense of the wicked. - Psalm 91:7-8 ESV



