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 2009-08-21 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
August 21, 2009, 12:47:49 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Please obey the rules, to achieve a pleasent order in our community.
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: Need assistance with an ultimate/block...  (Read 101 times)
Crazy
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 26



« on: August 12, 2009, 06:27:57 PM »

Ok so my friend and I have been trying to make a skill that does the following.
You stare at an enemy and activate your ultimate.
The enemy your staring at then will have an effect bestowed on him that will make him take double damage from ANYBODY and EVERYBODY that shoots him. After 20 seconds it will wear off.
We made a skill and an ultimate, I'm not good at keyvalues but he's good. We worked togeather to make what we have but it's not working. Could somebody point us in the right direction?


This is the block I have in a folder in eventscripts called double_damage...
Code:
block load
{
es_set victimid 0
es_set DD 0
es_set AttackerDamage
}

block unload
{
}

event player_hurt
{
es_getplayersteamid victimid event_var(userid)
es_keygetvalue DD WCSuserdata server_var(victimid) Double_Damage
es_set AttackerDamage event_var(dmg_health)
es_math server_var(AttackerDamage) * 2
if (server_var(DD) == 1) then wcs_dealdamage event_var(Attacker) event_var(userid) server_var(AttackerDamage)
}

This is the skill in the wcsraces_db, its skills cfg is set as player_ultimate
Code:
"skill2_setting" "es_set wcs_time 2|es_set wcs_time 4|es_set wcs_time 6|es_set wcs_time 8|es_set wcs_time 15"
"skill2_cmd" "es_set target 0;es_set steamid 0;es est_getviewplayer server_var(wcs_userid) target;es es_getplayersteamid steamid server_var(target);if (server_var(target) != 0) then es_keysetvalue WCSuserdata server_var(steamid) Double_Damage 1;es_load double_damage;es es_delayed server_var(wcs_time) es_unload double_damage"
"skill2_sfx" "0"
"ultimate_cooldown" "30"


Any help would be appreciated. Thank you.
Logged
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2505


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #1 on: August 12, 2009, 07:28:00 PM »

1. Better use es_xset than es_set to define variables.
2. Do not ever leave empty blocks (remove block unload).
3. WCSuserdata works with userid, not steamid.
4. better use ifx than if then.
5. Do not unload the script.
6 (very optional). You can use pre-defined vars to avoid having too many server_vars Smiley

Fixed/Optimised:
Code:
event player_hurt
{
  es_keygetvalue wcs_tmp WCSuserdata server_var(victimid) double_damage
  ifx true(wcs_tmp) do
  {
    es_set wcs_dmg event_var(dmg_health)
    es_math server_var(wcs_dmg) * 2
    es wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_dmg)
  }
}

block ultimate
{
  es est_getviewplayer server_var(wcs_userid) wcs_tmp
  ifx true(wcs_tmp) do
  {
    es_keysetvalue WCSuserdata server_var(wcs_tmp) double_damage 1
    es_delayed server_var(wcs_time) es_xkeysetvalue WCSuserdata server_var(wcs_tmp) 0
  }
}

Code:
"skill2_setting" "es_xset wcs_time 2|es_xset wcs_time 4|es_xset wcs_time 6|es_xset wcs_time 8|es_xset wcs_time 15"
"skill2_cmd" "es_xdoblock double_damage/ultimate"
"skill2_sfx" "0"
"ultimate_cooldown" "30"

Click on the following link to find out why you must use es_xset in this case:
http://eventscripts.com/pages/Esx_commands
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Crazy
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 26



« Reply #2 on: August 13, 2009, 06:05:03 PM »

It didn't work, but thanks for the help. I still need to learn a lot about keysetvalues. But thanks for the heads up, I'm going to make another attempt.
Logged
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2505


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #3 on: August 13, 2009, 08:06:52 PM »

Oh yes, you are right, i made a mistake Tongue

Code:
  es_keygetvalue wcs_tmp WCSuserdata server_var(victimid) double_damage
-->
Code:
  es_keygetvalue wcs_tmp WCSuserdata event_var(userid) double_damage
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Crazy
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 26



« Reply #4 on: August 17, 2009, 04:53:31 AM »

It still didn't work, thanks anyways for trying.
Logged
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2505


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #5 on: August 17, 2009, 09:14:11 PM »

It still didn't work, thanks anyways for trying.
Oh man, another mistake of mine Tongue


Code:
    es_math server_var(wcs_dmg) * 2

--->

Code:
    es_xmath wcs_dmg * 2
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Crazy
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 26



« Reply #6 on: August 19, 2009, 10:08:08 PM »

Still no dice... Lol
Logged
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2505


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #7 on: August 20, 2009, 08:07:17 AM »

Still no dice... Lol
Please show me the code you use.
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 12:39:42 PM
;o

Today at 09:52:03 AM
can an admin check my permissions so that i can view the forum,the front page,own messages and this box? lol.. would appreciate it
Today at 05:03:59 AM
ugh so exhausted worked 21 hours last 29 hours....
August 20, 2009, 09:05:08 PM
I have invalid time oh here :O Some body help ! help me!
August 20, 2009, 08:18:35 PM
4 days, 22 hours and 38 minutes.
August 20, 2009, 08:18:33 PM
im here longer then you :p
August 20, 2009, 08:13:08 PM
yea, but i have bin here the time i have bin logged inn,
Recent
[Today at 12:30:01 PM]

by M.R.
[Today at 11:10:48 AM]

[Today at 08:59:22 AM]

[Today at 07:40:33 AM]

[Today at 12:38:29 AM]

[Today at 12:14:32 AM]

[August 20, 2009, 08:15:02 PM]

[August 20, 2009, 07:53:42 PM]

[August 20, 2009, 07:33:16 PM]

by M.R.
[August 20, 2009, 05:55:25 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.074 seconds with 23 queries.