Forum

> > CS2D > Scripts > Poison weapon
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Poison weapon

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Poison weapon

strelok_953
User Off Offline

Zitieren
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

alt Re: Poison weapon

ubmasterr
BANNED Off Offline

Zitieren
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.

alt Re: Poison weapon

Rainoth
Moderator Off Offline

Zitieren
user ubmasterr hat geschrieben
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",...)

alt Re: Poison weapon

gotya2
GAME BANNED Off Offline

Zitieren
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

alt Re: Poison weapon

Avo
User Off Offline

Zitieren
Mehr >

More complicated, but more customizable. Moreover, with my script, when player collects a medikit or a bandage, he's not poisoned anylonger. Enjoy.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht