Poison weapon
6 replies



17.09.13 01:57:59 pm
Hello all
I have idea but dont have skills.
Poison weapon,but i cant make it
i need help with this,and learn timer+spawneffect.
script like this
every second(3 sec total) player got damage -5 and green smoke.
if player have 30hp and i hit him,then he got -20hp(weapon damage) and 3 sec poison,and when he dead when poison then kill msg:
Player Poison [b]=.=
sorry,my english is tooooo bad.
Thanks

I have idea but dont have skills.
Poison weapon,but i cant make it
i need help with this,and learn timer+spawneffect.
script like this
Code:
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("hit","poison")
function poison(id,source,wpn,hpdmg)
if wpn==4 then
parse("timer 1000"player(id,'health')-5")and green smoke,like in tibia,when attack monsters.
parse("timer 2000"player(id,'health')-5")and green smoke,like in tibia,when attack monsters.
parse("timer 3000"player(id,'health')-5")and green smoke,like in tibia,when attack monsters.
and i dont know what next :(
function poison(id,source,wpn,hpdmg)
if wpn==4 then
parse("timer 1000"player(id,'health')-5")and green smoke,like in tibia,when attack monsters.
parse("timer 2000"player(id,'health')-5")and green smoke,like in tibia,when attack monsters.
parse("timer 3000"player(id,'health')-5")and green smoke,like in tibia,when attack monsters.
and i dont know what next :(
every second(3 sec total) player got damage -5 and green smoke.
if player have 30hp and i hit him,then he got -20hp(weapon damage) and 3 sec poison,and when he dead when poison then kill msg:
Player Poison [b]=.=
sorry,my english is tooooo bad.

Thanks

I love foxes
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("hit","poison")
function poison(id,source,wpn,hpdmg)
if wpn==4 then
parse("timer 1000"player(id,'health')-5")
parse("timer 2000"player(id,'health')-5")
parse("timer 3000"player(id,'health')-5")
end
end
function poison(id,source,wpn,hpdmg)
if wpn==4 then
parse("timer 1000"player(id,'health')-5")
parse("timer 2000"player(id,'health')-5")
parse("timer 3000"player(id,'health')-5")
end
end
use


Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("hit","poison")
function poison(id,source,wpn,hpdmg)
if wpn==4 then
parse("timer 1000"player(id,'health')-5")
parse("timer 2000"player(id,'health')-5")
parse("timer 3000"player(id,'health')-5")
end
end
function poison(id,source,wpn,hpdmg)
if wpn==4 then
parse("timer 1000"player(id,'health')-5")
parse("timer 2000"player(id,'health')-5")
parse("timer 3000"player(id,'health')-5")
end
end
use

parse("timer 1000") ???
Maybe you meant.
Code:
1
timer(1000,"parse",...)
this should do, untested code.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
function dmg(id)
local id = tonumber(id)
parse("sethealth "..id.." "..(player(id,"health")-5))
parse("effect \"colorsmoke\" "..player(id,"x").." "..player(id,"y").." 20 20 0 255 0")
end
addhook("hit","poison")
function poison(id,source,wpn,hpdmg)
if wpn == 4 then
for i = 1,3 do
timer(i * 1000, "dmg", tostring(id))
end
end
end
local id = tonumber(id)
parse("sethealth "..id.." "..(player(id,"health")-5))
parse("effect \"colorsmoke\" "..player(id,"x").." "..player(id,"y").." 20 20 0 255 0")
end
addhook("hit","poison")
function poison(id,source,wpn,hpdmg)
if wpn == 4 then
for i = 1,3 do
timer(i * 1000, "dmg", tostring(id))
end
end
end
More complicated, but more customizable. Moreover, with my script, when player collects a medikit or a bandage, he's not poisoned anylonger. Enjoy.
Trust me, I'm an engineer |
DC approved
Super extra mod for CS2D (64), yeah!






