Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2010-04-12 (original capture). Home · Forum · All archived topics · Downloads

Author Topic: damage over time with knife  (Read 622 times)

Offline Hetal

  • Administrator
  • Level 7 Expert
  • *****
  • Posts: 417
damage over time with knife
« on: July 27, 2007, 09:40:05 PM »
I'm using this skill which is coded by fast.food and for some reason there is so many problem if some one can help me out it would nice of you :)

1) If some one knifes you at end of round it does damage in next round...
2) also when some ones knifes you and your hp is 0 it wont kill you it just freezes player at that location.

Thanks in advance for any help or comments...
Code: [Select]

"skill2_setting"    "es_xsetinfo wcs_hp 10|es_xsetinfo wcs_hp 12|es_xsetinfo wcs_hp 14|es_xsetinfo wcs_hp 16|es_xsetinfo wcs_hp 18"
"racealias_rogue2"  "es es_xdelayed 5 est_Health event_var(userid) - server_var(wcs_hp);es es_xdelayed 10 est_Health event_var(userid) - server_var(wcs_hp);es es_xdelayed 15 est_Health event_var(userid) - server_var(wcs_hp);es es_xtell event_var(attacker) #multi #lightgreenHit #green event_var(es_username)#lightgreenwith #greenPoison Daggers;es es_xtell event_var(userid) #multi #lightgreenYou got hit by #green event_var(es_attackername)'s Poison Daggers!;es es_xdelayed 5 es_xtell event_var(userid) #lightgreenHit ;es es_xdelayed 10 es_xtell event_var(userid) #lightgreenHit ;es es_xdelayed 15 es_xtell event_var(userid) #lightgreenHit"
"skill2_cmd"        "es es_xif (event_var(weapon) = knife) then racealias_rogue2"
"skill2_sfx"        "0"

Offline Hetal

  • Administrator
  • Level 7 Expert
  • *****
  • Posts: 417
Re: damage over time with knife
« Reply #1 on: July 27, 2007, 10:05:03 PM »
you mean like this ? "skill2_cmd"        "es es_xif (event_var(weapon) = knife) then es_xif (server_var(wcs_alive) = 1) then racealias_rogue2"

if so when I add that it does not work at all.

Offline NovaKiller

  • <WCS coder>
  • Level 7 Expert
  • *****
  • Posts: 783
  • Loves WCS. Loves to make races. Loves to play WCS
    • |UbEr MiCrO ReVoLuTiOn|UMR|
Re: damage over time with knife
« Reply #2 on: July 28, 2007, 01:30:19 PM »
Try set this in befor the line es est_IsAlive wcs_alive event_var(userid) . So it looks like this.

Code: [Select]
"skill2_setting"    "es_xsetinfo wcs_hp 10|es_xsetinfo wcs_hp 12|es_xsetinfo wcs_hp 14|es_xsetinfo wcs_hp 16|es_xsetinfo wcs_hp 18"
"racealias_rogue2"  "es es_xdelayed 5 est_Health event_var(userid) - server_var(wcs_hp);es es_xdelayed 10 est_Health event_var(userid) - server_var(wcs_hp);es es_xdelayed 15 est_Health event_var(userid) - server_var(wcs_hp);es es_xtell event_var(attacker) #multi #lightgreenHit #green event_var(es_username)#lightgreenwith #greenPoison Daggers;es es_xtell event_var(userid) #multi #lightgreenYou got hit by #green event_var(es_attackername)'s Poison Daggers!;es es_xdelayed 5 es_xtell event_var(userid) #lightgreenHit ;es es_xdelayed 10 es_xtell event_var(userid) #lightgreenHit ;es es_xdelayed 15 es_xtell event_var(userid) #lightgreenHit"
"skill2_cmd"        "es est_IsAlive wcs_alive event_var(userid);es es_xif (event_var(weapon) = knife) then es_xif (server_var(wcs_alive) = 1) then racealias_rogue2"
"skill2_sfx"        "0"

Offline Fast.Food

  • Level 7 Expert
  • *****
  • Posts: 401
    • http://wcs.despo-clan.de
Re: damage over time with knife
« Reply #3 on: July 28, 2007, 01:40:14 PM »
then dont do est_health - uid, but wcs_dealdamage.

bleh
Care.

Offline Hetal

  • Administrator
  • Level 7 Expert
  • *****
  • Posts: 417
Re: damage over time with knife
« Reply #4 on: July 28, 2007, 07:34:21 PM »
Thanks to all your help but none of this worked any other idea that you still might have in your bag for me ?

Offline [Oddity]TeacherCreature

  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 1433
    • Mirai Max clan
Re: damage over time with knife
« Reply #5 on: July 29, 2007, 01:14:56 AM »
Code: [Select]
"skill2_setting"    "es_xsetinfo wcs_dmg 10|es_xsetinfo wcs_dmg 12|es_xsetinfo wcs_dmg 14|es_xsetinfo wcs_dmg 16|es_xsetinfo wcs_dmg 18"
"racealias_rogue2"  "es es_xdelayed 5 es wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_dmg);es es_xdelayed 10 es wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_dmg);es es_xdelayed 15 es wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_dmg);es es_xtell event_var(attacker) #multi #lightgreenHit #green event_var(es_username)#lightgreenwith #greenPoison Daggers;es es_xtell event_var(userid) #multi #lightgreenYou got hit by #green event_var(es_attackername)'s Poison Daggers!;es es_xdelayed 5 es_xtell event_var(userid) #lightgreenHit ;es es_xdelayed 10 es_xtell event_var(userid) #lightgreenHit ;es es_xdelayed 15 es_xtell event_var(userid) #lightgreenHit"
"skill2_cmd"        "es est_IsAlive wcs_alive event_var(userid);es es_xif (event_var(weapon) = knife) then es_xif (server_var(wcs_alive) = 1) then racealias_rogue2"
"skill2_sfx"        "0"


Try that

Offline [Oddity]TeacherCreature

  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 1433
    • Mirai Max clan
Re: damage over time with knife
« Reply #6 on: July 29, 2007, 01:15:44 AM »
Might be too long but at least you get the idea

Offline Hetal

  • Administrator
  • Level 7 Expert
  • *****
  • Posts: 417
Re: damage over time with knife
« Reply #7 on: July 29, 2007, 01:56:40 AM »
Thanks for the heads up you'll....Kryptonite and fast.food helped me out to make this work. :)

Offline Hetal

  • Administrator
  • Level 7 Expert
  • *****
  • Posts: 417
Re: damage over time with knife
« Reply #8 on: July 29, 2007, 04:53:10 AM »
ROLF I dont give out products  :roll: But if you are talking about final code then sure here it is

Code: [Select]
"skill2_setting"    "es_xsetinfo wcs_hp 10|es_xsetinfo wcs_hp 12|es_xsetinfo wcs_hp 14|es_xsetinfo wcs_hp 16|es_xsetinfo wcs_hp 18"
    "racealias_rogue2"  "es es_xdelayed 5 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);es es_xdelayed 10 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);es es_xdelayed 15 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);es es_xtell event_var(attacker) #multi #lightgreenHit #green event_var(es_username)#lightgreenwith #greenPoison Daggers;es es_xtell event_var(userid) #multi #lightgreenYou got hit by #green event_var(es_attackername)'s Poison Daggers!;es es_xdelayed 5 es_xtell event_var(userid) #lightgreenHit ;es es_xdelayed 10 es_xtell event_var(userid) #lightgreenHit ;es es_xdelayed 15 es_xtell event_var(userid) #lightgreenHit"
"skill2_cmd"        "es est_IsAlive wcs_alive event_var(userid);es es_xif (event_var(weapon) = knife) then es_xif (server_var(wcs_alive) = 1) then racealias_rogue2"
"skill2_sfx"        "0"

Offline Fast.Food

  • Level 7 Expert
  • *****
  • Posts: 401
    • http://wcs.despo-clan.de
Re: damage over time with knife
« Reply #9 on: July 29, 2007, 08:54:03 AM »
tada
Care.

Offline Onslaught

  • Level 7 Expert
  • *****
  • Posts: 442
  • WWW.SNK-KLAN.NET
    • WWW.SNK-KLAN.NET
Re: damage over time with knife
« Reply #10 on: October 03, 2008, 11:52:16 PM »
Know this is old, but im implementing that skill.  Problem, like a few other skills, is the poison carries over to the next round if it does not kill them.  Any help?

         

Offline Onslaught

  • Level 7 Expert
  • *****
  • Posts: 442
  • WWW.SNK-KLAN.NET
    • WWW.SNK-KLAN.NET
Re: damage over time with knife
« Reply #11 on: October 29, 2008, 09:24:15 AM »
any help with this, im getting bitches again and i forgot about this and that i had posted before.

Using the code hetal had:

Code: (eventscripts) [Select]
"skill2_setting"    "es_xsetinfo wcs_hp 10|es_xsetinfo wcs_hp 12|es_xsetinfo wcs_hp 14|es_xsetinfo wcs_hp 16|es_xsetinfo wcs_hp 18"
    "racealias_rogue2"  "es es_xdelayed 5 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);es es_xdelayed 10 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);es es_xdelayed 15 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);es es_xtell event_var(attacker) #multi #lightgreenHit #green event_var(es_username)#lightgreenwith #greenPoison Daggers;es es_xtell event_var(userid) #multi #lightgreenYou got hit by #green event_var(es_attackername)'s Poison Daggers!;es es_xdelayed 5 es_xtell event_var(userid) #lightgreenHit ;es es_xdelayed 10 es_xtell event_var(userid) #lightgreenHit ;es es_xdelayed 15 es_xtell event_var(userid) #lightgreenHit"
"skill2_cmd"        "es est_IsAlive wcs_alive event_var(userid);es es_xif (event_var(weapon) = knife) then es_xif (server_var(wcs_alive) = 1) then racealias_rogue2"
"skill2_sfx"        "0"


Still carries over to next round

         

Offline CA.Berettonawak

  • Le renomm� m�connu...
  • Watchdogs
  • Level 7 Expert
  • *****
  • Posts: 3057
  • Big Berettonawak is watching you...
    • Coding-Alliance.Com : A bunch of coders? Why not a bunch of players? :P
Re: damage over time with knife
« Reply #12 on: October 29, 2008, 01:00:31 PM »
try this :
Code: [Select]
"skill2_setting"    "es_xset rogue_dmg 3|es_xsetinfo rogue_dmg 5|es_xset rogue_dmg 8|es_xset rogue_dmg 11|es_xset rogue_dmg 14"
"skill2_cmd"        "if (event_var(weapon) = knife) then racealias_rogue20"
        "racealias_rogue20" "racealias_rogue2;es_delayed 5 racealias_rogue2;es_delayed 10 racealias_rogue2;es_delayed 15 racealias_rogue2"
        "racealias_victimdead" "es_xset is_he_alive 0;es est_IsAlive is_he_alive event_var(userid)"
        "racealias_rogue2" "racealias_victimdead;if (server_var(is_he_alive) = 1) then if (server_var(is_round) = 1) then racealias_rogue21"
        "racealias_rogue21" "es est_damage event_var(attacker) event_var(userid) server_var(rogue_dmg);es_tell event_var(userid) #multi #lightgreenYou got hit by #green event_var(es_attackername)'s Poison Daggers!;es_tell event_var(attacker) #multi #lightgreenYou hit #green event_var(es_username) #lightgreen with your Poison Daggers!"
"skill2_sfx"        "0"

Using a code someone posted (i don't remember who), you would have to use a script :
Code: (eventscripts) [Select]
block load
  {
    es_xset is_round 1
  }

event round_start
  {
    es_xset is_round 1
  }

event round_end
  {
    es_xset is_round 0
  }
Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.

Quote from: myself
i love tuna juice :D

Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD

Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed


Offline Onslaught

  • Level 7 Expert
  • *****
  • Posts: 442
  • WWW.SNK-KLAN.NET
    • WWW.SNK-KLAN.NET
Re: damage over time with knife
« Reply #13 on: October 30, 2008, 06:48:14 AM »
Is that code for sure tested, and what is the second code you posted all about?

         

Offline Onslaught

  • Level 7 Expert
  • *****
  • Posts: 442
  • WWW.SNK-KLAN.NET
    • WWW.SNK-KLAN.NET
Re: damage over time with knife
« Reply #14 on: February 20, 2009, 11:01:41 AM »
berret i forgot you were trying to help me with this, but can you tell my why the following isn't working?  The damage still carries over to the next round, like the check alive code doesn't effing work.....why...

Code: [Select]
"skill1_setting"    "es_xsetinfo wcs_hp 5|es_xsetinfo wcs_hp 8|es_xsetinfo wcs_hp 12|es_xsetinfo wcs_hp 15"
    "racealias_rogue2"  "es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xdelayed 5 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);racealias_rogue3;es es_xtell event_var(attacker) #multi #lightgreenYou've hit #green event_var(es_username)#lightgreenwith #greenFeral Claws!;es es_xtell event_var(userid) #multi #lightgreenYou been attacked by #green event_var(es_attackername)'s Feral Claws!;es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xdelayed 5 es_xtell event_var(userid) #multi #lightgreenYou feel the wound from the Feral Claws!"
"racealias_rogue3"  "es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xdelayed 10 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);racealias_rogue4;es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xdelayed 10 es_xtell event_var(userid) #multi #lightgreenYou feel the wound from the Feral Claws!"
"racealias_rogue4"  "es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xdelayed 15 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xdelayed 15 es_xtell event_var(userid) #multi #lightgreenYou feel the wound from the Feral Claws!"
"skill1_cmd"        "es est_IsAlive wcs_alive event_var(userid);es es_xif (event_var(weapon) = knife) then es_xif (server_var(wcs_alive) = 1) then racealias_rogue2"
"skill1_sfx"        "0"

EDIT: wow i just learned an assload in the past 10 min.  Still noobin along here, but i think wcs_dalias needs to be used.  I wanna do this without a block, cuz i know it can be done.  I'll try to learn the dalias on this one, as i dont think there is any other way.  I read about using the repeat or cancel method, but that's a bit out of my reach right now as far as comprehension

EDIT2:

Tried using dalias, even got this to work right the first time but it STILL carries over to next round.  I'm extremely pissed......not so much about it carrying over, but rather why this code isnt doing what it's supposed to.  This code does the SAME as the above, and i dont understand that...

Code: [Select]
"skill1_setting"    "es_xsetinfo wcs_hp 5;es_xsetinfo wcs_time 5|es_xsetinfo wcs_hp 8;es_xsetinfo wcs_time 5|es_xsetinfo wcs_hp 12;es_xsetinfo wcs_time 5|es_xsetinfo wcs_hp 15;es_xsetinfo wcs_time 5"
    "racealias_rogue2"  "es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xdelayed 5 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);es_xdelayed wcs_dalias racealias_rogue3 server_var(wcs_time);es es_xtell event_var(attacker) #multi #lightgreenYou've hit #green event_var(es_username)#lightgreenwith #greenFeral Claws!;es es_xtell event_var(userid) #multi #lightgreenYou been attacked by #green event_var(es_attackername)'s Feral Claws!"
"racealias_rogue3"  "es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xtell event_var(userid) #multi #lightgreenYou feel the wound from the Feral Claws!;es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xdelayed 5 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);es_xdelayed wcs_dalias racealias_rogue4 server_var(wcs_time)"
"racealias_rogue4"  "es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xtell event_var(userid) #multi #lightgreenYou feel the wound from the Feral Claws!;es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xdelayed 5 wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_hp);es est_IsAlive wcs_alive event_var(userid);es es_xif (server_var(wcs_alive) = 1) then es_xdelayed 5 es_xtell event_var(userid) #multi #lightgreenYou feel the wound from the Feral Claws!"
"skill1_cmd"        "es est_IsAlive wcs_alive event_var(userid);es es_xif (event_var(weapon) = knife) then es_xif (server_var(wcs_alive) = 1) then racealias_rogue2"
"skill1_sfx"        "0"

EDIT3: I see why, because even though this uses dalias, when you spawn, the delay is still being checked and you are obviously alive, so it goes ahead.  There has to be a way to cancel all delays and dalias on round end, but i'm still noob enough to not know how to do this.  Any help would be appreciated.
« Last Edit: February 20, 2009, 12:04:29 PM by Onslaught »