English Poison weapon

6 replies
Goto Page
To the start Previous 1 Next To the start
17.09.13 01:57:59 pm
Up
strelok_953
User
Offline Off
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
Code:
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
I love foxes
17.09.13 02:23:38 pm
Up
ubmasterr
BANNED
Offline Off
Code:
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.
17.09.13 02:28:23 pm
Up
Rainoth
Moderator
Offline Off
user ubmasterr has written:
Code:
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.

Code:
1
timer(1000,"parse",...)
17.09.13 02:32:33 pm
Up
strelok_953
User
Offline Off
@user Rainoth: yes,my bad.

Someone can help me?
edited 1×, last 17.09.13 04:07:05 pm
I love foxes
17.09.13 06:05:04 pm
Up
gotya2
GAME BANNED
Offline Off
this should do, untested code.

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
17.09.13 06:49:44 pm
Up
strelok_953
User
Offline Off
is works!
thanks you so much @user gotya2: !
you god!
I love foxes
17.09.13 07:17:57 pm
Up
Avo
User
Offline Off
More >

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 | user DC approved file cs2d Super extra mod for CS2D (64), yeah!
To the start Previous 1 Next To the start