Well if you check the race of the player this will return the # of the race as stated in the es_wcsraces.txt file and then depending on the race# tell it what to do.
aka
---
es_keygetvalue wcs_race WCSuserdata server_var(wcs_userid) race
es_keygetvalue wcs_name WCSraces server_var(wcs_race) name
// this would return its name if you actually want that but can easily cause some bugs.
if (server_var(wcs_race) = 5) do
{
es est_playplayer server_var(wcs_userid) wcs/wc3/KeeperoftheGrove/KeeperRootsSource.mp3
}
---
where in racefile it'd be
---
"5"
{
"Name" "Keeper of the Grove"
etc
}
---
This can also be used on stuff like chain lightning where you want different races to have different effects.
The duration of the freeze wcs_freezetime and to make the most out of this I would convert
---
alias wcs_run_ulti_roots1 "es_getplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es_getplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);es_xmath wcs_z1 + 50;es_xmath wcs_z2 + 50;es est_getwallbetween wcs_wall server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2);if (server_var(wcs_wall) = 0) then wcs_run_ulti_roots2"
alias wcs_run_ulti_roots2 "es_xset wcs_immunity 0;es_keygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity;if (server_var(wcs_immunity) = 0) then wcs_run_ulti_roots3;if (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng_ulti_immunity_a);if (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng_ulti_immunity_v)"
alias wcs_run_ulti_roots3 "es_xmath wcs_counter + 1;es est_Freeze server_var(wcs_targetid) 1;es_delayed server_var(wcs_freezetime) wcs_removefx freeze server_var(wcs_targetid);if (server_var(wcs_graphicfx) = 1) then est_effect 3 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 1 10 10 0 255 0 255"
---
into a block, which is not only faster, but also easier to edit. This way you could add in the "es est_playplayer server_var(wcs_targetid) wcs/wc3/KeeperoftheGrove/KeeperRootsTarget.mp3" into that block alone, so on each player the sound is played.
If you want to try that yourself go ahead but I have already done that and added in your keeper of the grove stuff too:
---
block wcs_ulti_entangle
{
es_getplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid)
es_getplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid)
es_xmath wcs_z1 + 50
es_xmath wcs_z2 + 50
es_xset wcs_wall 1
es est_getwallbetween wcs_wall server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2)
ifx false(wcs_wall) do
{
es_xset wcs_immunity 0
es_keygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity
ifx false(wcs_immunity) do
{
es_xmath wcs_counter + 1
es est_Freeze server_var(wcs_targetid) 1
es_delayed server_var(wcs_freezetime) est_freeze server_var(wcs_targetid) 0
es est_effect 3 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 1 10 10 0 255 0 255"
// custom race commands, no need to get wcs_race again as it is gathered in previous block
// keeper of the grove sounds
ifx parse("wcs_race == 5") do
{
es est_playplayer server_var(wcs_targetid) wcs/wc3/KeeperoftheGrove/KeeperRootsTarget.mp3
}
}
es_xelse do
{
es_tell server_var(wcs_userid) #multi server_var(wcs_lng_ulti_immunity_a)
es_tell server_var(wcs_targetid) #multi server_var(wcs_lng_ulti_immunity_v)"
}
}
}
---
How to make it communicate with the block? just change
---
es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es_exists ex userid server_var(wcs_targetid);if (server_var(ex) = 1) then wcs_run_ulti_roots1"
---
to
---
es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es_exists ex userid server_var(wcs_targetid);if (server_var(ex) = 1) then es_xdoblock wcs/wcsultimates/wcs_ulti_entangle"
---
where you name the block containing all the stuff as "wcs_ulti_entangle"
I wouldn't reccomend doing it by name as you can alter the name and forget and break a lot of things while the # of the race is unlikely to ever change. And sorry that it looks like a lot of work but its just editing three things really
