Forum

> > CS2D > Scripts > Poison weapon
Forums overviewCS2D overview Scripts overviewLog in to reply

English Poison weapon

6 replies
To the start Previous 1 Next To the start

old Poison weapon

strelok_953
User Off Offline

Quote
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
1
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 :(
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

old Re: Poison weapon

ubmasterr
BANNED Off Offline

Quote
1
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

use cs2d cmd effect for colorsmoke.

old Re: Poison weapon

Rainoth
Moderator Off Offline

Quote
user ubmasterr has written
1
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

use cs2d cmd effect for colorsmoke.


parse("timer 1000") ???

Maybe you meant.

1
timer(1000,"parse",...)

old Re: Poison weapon

gotya2
GAME BANNED Off Offline

Quote
this should do, untested code.

1
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

old Re: Poison weapon

Avo
User Off Offline

Quote
More >

More complicated, but more customizable. Moreover, with my script, when player collects a medikit or a bandage, he's not poisoned anylonger. Enjoy.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview