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-09-01 (original capture). Home · Forum · All archived topics · Downloads

Author Topic: Fixing your shopmenu items and other stuff that does extra damage.  (Read 339 times)

MiB

  • Custom Coder
  • Level 7 Expert
  • Posts: 1039
Below is the fix for repeating damage and what not.
Okay go to your wcs core file(es_wcs.txt) and find this.
Code: [Select]
  es es_xif (server_var(wcs_hurtcheck) = 1) do
  {
    es es_xexists wcs_exists key WCSuserdata event_var(attacker)
    es es_xif (server_var(wcs_exists) = 1) do
    {
      es es_xkeygetvalue wcs_skill WCSuserdata event_var(attacker) player_attacker
      es es_xif (server_var(wcs_skill) != "0") do
      {
        // check race skills
        es wcs_checkskills event_var(attacker) "player_attacker"
        // check for custom item action
        es wcs_checkevents event_var(attacker) "WCSpha"
      }
    }
    es es_xexists wcs_exists key WCSuserdata event_var(userid)
    es es_xif (server_var(wcs_exists) = 1) do
    {
      es es_xkeygetvalue wcs_skill WCSuserdata event_var(userid) player_victim
      es es_xif (server_var(wcs_skill) != "0") do
      {
        // check race skills
        es wcs_checkskills event_var(userid) "player_victim"
        // check for custom item action
        es wcs_checkevents event_var(userid) "WCSphv"
      }
    }
  }
And change it to this.
Code: [Select]
if (server_var(wcs_hurtcheck) = 1) do
{
es_exists wcs_exists key WCSuserdata event_var(attacker)
if (server_var(wcs_exists) = 1) do
{
es_keygetvalue wcs_skill WCSuserdata event_var(attacker) player_attacker
if (server_var(wcs_skill) != "0") do
{
if (event_var(weapon) != "point_hurt") do
{
// check race skills
es wcs_checkskills event_var(attacker) "player_attacker"
// check for custom item action
es wcs_checkevents event_var(attacker) "WCSpha"
}
}
}
es_exists wcs_exists key WCSuserdata event_var(userid)
if (server_var(wcs_exists) = 1) do
{
es_keygetvalue wcs_skill WCSuserdata event_var(userid) player_victim
if (server_var(wcs_skill) != "0") do
{
if (event_var(weapon) != "point_hurt") do
{
// check race skills
es wcs_checkskills event_var(userid) "player_victim"
// check for custom item action
es wcs_checkevents event_var(userid) "WCSphv"
}
}
}
}
Then save and restart your server.

~The Sig Changes Each Time~
~The Sigs Them Selfs Are By Hybrid Click The Sigs To See His Other Sigs~

Scyther

  • Level 4 Intermediate
  • Posts: 92
  • <3 WCS :)
Thanks for this, helps instead of the whole editing each skill that a race with a damage of time skill has to only damage on weapon damage :)

Thanks :)

Yiyas

  • Watchdogs
  • Level 7 Expert
  • Posts: 429
  • The name's Bugger. De-Bugger.
Sorry Shidobu but doesn't the if then then then then then es_xset hurtcheck 0 include if "weapon = point_hurt" by default?

MiB

  • Custom Coder
  • Level 7 Expert
  • Posts: 1039
No it just includes world_spawn and world which I should just add a check to instead >.<

~The Sig Changes Each Time~
~The Sigs Them Selfs Are By Hybrid Click The Sigs To See His Other Sigs~

Yiyas

  • Watchdogs
  • Level 7 Expert
  • Posts: 429
  • The name's Bugger. De-Bugger.
Oh okay, sometimes I forget what I've edited and what I haven't xD

Ibsen

  • Level 0 Beginner
  • Posts: 18
  • <3 WCS :)
So, this is a fix.. but what does it fix?? that extra damage?? is there something wrong with it ?? and i have not noticed anything about shopmenu either? i dont use it that much either tho ;o

^[Psycho]^

  • Level 7 Expert
  • Posts: 205
  • ~~~~~~~~
So, this is a fix.. but what does it fix?? that extra damage?? is there something wrong with it ?? and i have not noticed anything about shopmenu either? i dont use it that much either tho ;o

for example:

buy claws of attack, shoot 1 enemy, and he take +6dmg till he die, but it should be +6dm per hit, thats the fix

Ibsen

  • Level 0 Beginner
  • Posts: 18
  • <3 WCS :)
So, this is a fix.. but what does it fix?? that extra damage?? is there something wrong with it ?? and i have not noticed anything about shopmenu either? i dont use it that much either tho ;o

for example:

buy claws of attack, shoot 1 enemy, and he take +6dmg till he die, but it should be +6dm per hit, thats the fix

Aha Okay thanks m8.. gonna put that in now then :D

[Oddity]TeacherCreature

  • Moderator
  • Level 7 Expert
  • Posts: 1714
also works quite well to just uncomment old wcs_dealdamage in functions

I left old code

so just uncomment it and recomment my code and works again

MiB

  • Custom Coder
  • Level 7 Expert
  • Posts: 1039
also works quite well to just uncomment old wcs_dealdamage in functions

I left old code

so just uncomment it and recomment my code and works again
Its better to block point_hurt instead that way other addons/plugins that use point_hurt don't trigger skills.

~MiB

~The Sig Changes Each Time~
~The Sigs Them Selfs Are By Hybrid Click The Sigs To See His Other Sigs~

[Oddity]TeacherCreature

  • Moderator
  • Level 7 Expert
  • Posts: 1714
point hurt has is advantages

It is very cool to use point hurt in my opinion.

1. damage shows in console
2. Psycho stats records it, and if you go far enoguh to define damage you can have stat programs record source of damage

IE.

Chain Lightning
 used 5% Damage Dealt 2042 Players killed 47 blah blah blah

I am not saying leaving point hurt alone does this but In source mod we use point hurt for physical damage which allows skills to account for armor also, jsut a thought to sizzle the brain

MiB

  • Custom Coder
  • Level 7 Expert
  • Posts: 1039
You could do that your self by calculating the armor and all when in your ultimate coding.

~MiB

~The Sig Changes Each Time~
~The Sigs Them Selfs Are By Hybrid Click The Sigs To See His Other Sigs~

Yiyas

  • Watchdogs
  • Level 7 Expert
  • Posts: 429
  • The name's Bugger. De-Bugger.
Using point_hurt (from es_fire) reloads a person's clip does it not?

MiB

  • Custom Coder
  • Level 7 Expert
  • Posts: 1039
Using point_hurt (from es_fire) reloads a person's clip does it not?
I don't know why?
Also I don't think it does since the damage command from corelib which ESTCommands uses for est_damage doesn't reload your clip.

~MiB

~The Sig Changes Each Time~
~The Sigs Them Selfs Are By Hybrid Click The Sigs To See His Other Sigs~

Evil Genuix

  • Level 1 Trained Beginner
  • Posts: 21
Has this been fixed in the latest update since this is from a while back but the comments are quite recent?