////////////////////////////////////////
// WCS - Warcraft:Source              //
// ---------------------------------- //
//  by kRypT0n!Te                     //
//      http://wcs.despo-clan.de      //
// ---------------------------------- //
// Content of this subscript          //
// - all ultimates                    //
////////////////////////////////////////
// commands:
// wcs_mole_activate <userid>
// wcs_regeneration <userid> <amount> <time> <maxHP> <maxHeal> <radius>
// wcs_warden	<userid> <duration> <damage> <radius> <target team> <team target name> <x> <y> <z> <round>
//
////////////////////////////////////////
// You can define here new ultimates, then use the command
// es_xdoblock wcs/WCSultimates/wcs_YOURSCRIPT
// to execute wcs_YOURSCRIPT block.
//

block load
{
  es_xexists wcs_exists command wcs_mole_activate
  es es_xif (server_var(wcs_exists) = 0) then es_xregcmd wcs_mole_activate wcs/WCSultimates/wcs_mole_activate "A player becomes a mole"
  es_xexists wcs_exists command wcs_regeneration
  es es_xif (server_var(wcs_exists) = 0) then es_xregcmd wcs_regeneration wcs/WCSultimates/wcs_regeneration "wcs_regeneration <userid> <amount> <time> <maxHP> <maxHeal> <radius> - Regenerate player for the current round"
  es_xexists wcs_exists command wcs_warden
  es es_xif (server_var(wcs_exists) = 0) then es_xregcmd wcs_warden wcs/WCSultimates/wcs_warden "Warden, deals damage on nearby enemies"
  es_xexists wcs_exists command wcs_wall
  es es_xif (server_var(wcs_exists) = 0) then es_xregcmd wcs_wall wcs/WCSultimates/wcs_wall "wall, deals damage on nearby enemies"
  es_xexists wcs_exists command wcs_dalias
  es es_xif (server_var(wcs_exists) = 0) then es_xregcmd wcs_dalias wcs/WCSultimates/wcs_dalias "Executes alias with delay without loosing data"
  
}

// >>>>>>>>>>>>>>>>> SPECIAL ULTIMATE SKILL CODE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
block wcs_ulti_teleport
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_teleport start
	// alot of calculations....does anyone know what I'm doing here ?
  es_xsetinfo wcs_ok 1
  es est_GetViewCoord server_var(wcs_userid) wcs_x1 wcs_y1 wcs_z1
  es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_userid)
  //es es_xmathparse wcs_x "abs ( wcs_x1 - wcs_x2 )"
  //es es_xmathparse wcs_y "abs ( wcs_y1 - wcs_y2 )"
  //es es_xmathparse wcs_z "abs ( wcs_z1 - wcs_z2 )"
  es_xcopy wcs_x wcs_x1
  es_xcopy wcs_y wcs_y1
  es_xcopy wcs_z wcs_z1
  es es_xmath wcs_x - server_var(wcs_x2)
  es es_xmath wcs_y - server_var(wcs_y2)
  es es_xmath wcs_z - server_var(wcs_z2)
  es es_xif (server_var(wcs_x) < 0) then es_xmath wcs_x * -1
  es es_xif (server_var(wcs_y) < 0) then es_xmath wcs_y * -1
  es es_xif (server_var(wcs_z) < 0) then es_xmath wcs_z * -1
  es es_xif (server_var(wcs_range) < server_var(wcs_x)) then es_xsetinfo wcs_ok 0
  es es_xif (server_var(wcs_range) < server_var(wcs_y)) then es_xsetinfo wcs_ok 0
  es es_xif (server_var(wcs_range) < server_var(wcs_z)) then es_xsetinfo wcs_ok 0
  es es_xif (server_var(wcs_ok) = 1) do
  {
    es es_xif (server_var(wcs_noskywalking) = "0") do
    {
    	es es_xexists wcs_exists command "ma_teleport"
    	es es_xif (server_var(wcs_exists) = 1) then ma_teleport server_var(wcs_userid) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1)
    	es es_xif (server_var(wcs_exists) != 1) then est_Teleport server_var(wcs_userid) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1)
    }
    es es_xif (server_var(wcs_noskywalking) = "1") then est_PushTo server_var(wcs_userid) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) "2"
    wcs_getlanguage "wcs_lng" "wcs_lng_teleported"
    es es_xtell server_var(wcs_userid) #multi server_var(wcs_lng)
    es est_Fade server_var(wcs_userid) 0 server_var(wcs_fadetimer) 1 0 0 0 250
  }
  es_xelse do
  {
  	// one or more vectors are too long to teleport .... damn math...
    es es_xif (server_var(wcs_range) < server_var(wcs_x)) do
    {
    	
      es es_xif (server_var(wcs_x2) >= 0) do
      {
      	es es_xif (server_var(wcs_x1) >= 0) do
      	{
	      	es es_xif (server_var(wcs_x2) <= server_var(wcs_x1)) then es_xmath wcs_x2 + server_var(wcs_range)
	      	es es_xif (server_var(wcs_x2) > server_var(wcs_x1)) then es_xmath wcs_x2 - server_var(wcs_range)
        }
        es_xelse do
        {
      		es es_xmath wcs_x2 - server_var(wcs_range)
        }
      }
      es_xelse do
      {
      	es es_xif (server_var(wcs_x1) < 0) do
      	{
	      	es es_xif (server_var(wcs_x2) <= server_var(wcs_x1)) then es_xmath wcs_x2 + server_var(wcs_range)
	      	es es_xif (server_var(wcs_x2) > server_var(wcs_x1)) then es_xmath wcs_x2 - server_var(wcs_range)
        }
        es_xelse do
        {
      		es es_xmath wcs_x2 + server_var(wcs_range)
        }      	
      }
      es_xcopy wcs_x1 wcs_x2
    }
    es es_xif (server_var(wcs_range) < server_var(wcs_y)) do
    {
      es es_xif (server_var(wcs_y2) >= 0) do
      {
      	es es_xif (server_var(wcs_y1) >= 0) do
      	{
	      	es es_xif (server_var(wcs_y2) <= server_var(wcs_y1)) then es_xmath wcs_y2 + server_var(wcs_range)
	      	es es_xif (server_var(wcs_y2) > server_var(wcs_y1)) then es_xmath wcs_y2 - server_var(wcs_range)
        }
        es_xelse do
        {
      		es es_xmath wcs_y2 - server_var(wcs_range)
        }
      }
      es_xelse do
      {
      	es es_xif (server_var(wcs_y1) < 0) do
      	{
	      	es es_xif (server_var(wcs_y2) <= server_var(wcs_y1)) then es_xmath wcs_y2 + server_var(wcs_range)
	      	es es_xif (server_var(wcs_y2) > server_var(wcs_y1)) then es_xmath wcs_y2 - server_var(wcs_range)
        }
        es_xelse do
        {
      		es es_xmath wcs_y2 + server_var(wcs_range)
        }      	
      }
      es_xcopy wcs_y1 wcs_y2
    }
    es es_xif (server_var(wcs_range) < server_var(wcs_z)) do
    {
      es es_xif (server_var(wcs_z2) >= 0) do
      {
      	es es_xif (server_var(wcs_z1) >= 0) do
      	{
	      	es es_xif (server_var(wcs_z2) <= server_var(wcs_z1)) then es_xmath wcs_z2 + server_var(wcs_range)
	      	es es_xif (server_var(wcs_z2) > server_var(wcs_z1)) then es_xmath wcs_z2 - server_var(wcs_range)
        }
        es_xelse do
        {
      		es es_xmath wcs_z2 - server_var(wcs_range)
        }
      }
      es_xelse do
      {
      	es es_xif (server_var(wcs_z1) < 0) do
      	{
	      	es es_xif (server_var(wcs_z2) <= server_var(wcs_z1)) then es_xmath wcs_z2 + server_var(wcs_range)
	      	es es_xif (server_var(wcs_z2) > server_var(wcs_z1)) then es_xmath wcs_z2 - server_var(wcs_range)
        }
        es_xelse do
        {
      		es es_xmath wcs_z2 + server_var(wcs_range)
        }      	
      }
      es_xcopy wcs_z1 wcs_z2
    }
    es es_xif (server_var(wcs_noskywalking) = "0") do
    {
    	es es_xexists wcs_exists command "ma_teleport"
    	es es_xif (server_var(wcs_exists) = 1) then ma_teleport server_var(wcs_userid) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1)
    	es es_xif (server_var(wcs_exists) != 1) then est_Teleport server_var(wcs_userid) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1)
    }
    es es_xif (server_var(wcs_noskywalking) = "1") then est_PushTo server_var(wcs_userid) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) "1"
    wcs_getlanguage "wcs_lng" "wcs_lng_toofaraway"
    es es_xtell server_var(wcs_userid) #multi server_var(wcs_lng)
    es est_Fade server_var(wcs_userid) 0 server_var(wcs_fadetimer) 0.2 0 0 0 220
  }
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_teleport end
}

block wcs_ulti_suicide
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_suicide start
  es_xsetinfo wcs_team_target 0
  es es_xgetplayerteam wcs_team server_var(wcs_userid)
  // check teams (T=2, CT=3)
  es es_xif (server_var(wcs_team) = 2) do
  {
    es_xsetinfo wcs_team_target 3
    es_xsetinfo wcs_team_targetn "#c!d"
  }
  es es_xif (server_var(wcs_team) = 3) do
  {
    es_xsetinfo wcs_team_target 2
    es_xsetinfo wcs_team_targetn "#t!d"
  }
  es es_xif (server_var(wcs_team_target) != "0") do
  {
    es_xsetinfo wcs_pcount 0
    es es_xgetlivingplayercount wcs_pcount server_var(wcs_team_target)
    es es_xif (server_var(wcs_pcount) > 0) do
    {
      alias wcs_run_ulti_suicide1 "es_xsetinfo wcs_immunity 0;es es_xkeygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity;es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_suicide2;es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng_ulti_immunity_a);es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng_ulti_immunity_v)"
      alias wcs_run_ulti_suicide2 "es_xmath wcs_counter + 1;es wcs_explode server_var(wcs_userid) server_var(wcs_targetid) server_var(wcs_magnitude) server_var(wcs_radius)"
      es_xsetinfo wcs_counter 0
      es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es es_xexists wcs_exists userid server_var(wcs_targetid);es es_xif (server_var(wcs_exists) = 1) then wcs_run_ulti_suicide1"
      // no more needed
      //es es_xif (server_var(wcs_counter) > 0) then wcs_explode server_var(wcs_userid) server_var(wcs_userid) server_var(wcs_magnitude) server_var(wcs_radius)
    }
  }
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_suicide end
}

block wcs_ulti_flash
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_flash start
  es_xsetinfo wcs_team_target 0
  es es_xgetplayerteam wcs_team server_var(wcs_userid)
  // check teams (T=2, CT=3)
  es es_xif (server_var(wcs_team) = 2) do
  {
    es_xsetinfo wcs_team_target 3
    es_xsetinfo wcs_team_targetn "#c!d"
  }
  es es_xif (server_var(wcs_team) = 3) do
  {
    es_xsetinfo wcs_team_target 2
    es_xsetinfo wcs_team_targetn "#t!d"
  }
  es es_xif (server_var(wcs_team_target) != "0") do
  {
    es_xsetinfo wcs_pcount 0
    es es_xgetlivingplayercount wcs_pcount server_var(wcs_team_target)
    es es_xif (server_var(wcs_pcount) > 0) do
    {
      alias wcs_run_ulti_flash1 "es_xsetinfo wcs_immunity 0;es es_xkeygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity;es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_flash2;es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng_ulti_immunity_a);es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng_ulti_immunity_v)"
      alias wcs_run_ulti_flash2 "es_xmath wcs_counter + 1;es est_fade server_var(wcs_targetid) 0 1.5 0 255 255 255 255"
      es_xsetinfo wcs_counter 0
      es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es es_xexists wcs_exists userid server_var(wcs_targetid);es es_xif (server_var(wcs_exists) = 1) then wcs_run_ulti_flash1"
    }
  }
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_flash end
}

block wcs_ulti_chain
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_chain start
  es_xsetinfo wcs_team_target 0
  es es_xgetplayerteam wcs_team server_var(wcs_userid)
  // check teams (T=2, CT=3)
  es es_xif (server_var(wcs_team) = 2) do
  {
    es_xsetinfo wcs_team_target 3
    es_xsetinfo wcs_team_targetn "#c!d"
  }
  es es_xif (server_var(wcs_team) = 3) do
  {
    es_xsetinfo wcs_team_target 2
    es_xsetinfo wcs_team_targetn "#t!d"
  }
  es es_xif (server_var(wcs_team_target) != "0") do
  {
    es_xsetinfo wcs_pcount 0
    es es_xgetlivingplayercount wcs_pcount server_var(wcs_team_target)
    es es_xif (server_var(wcs_pcount) > 0) do
    {
    	es est_Fade server_var(wcs_userid) 0 2 1 240 240 240 100
    	es_xsetinfo wcs_wall "1"
      alias wcs_run_ulti_chain1 "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es es_xgetplayerlocation 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);es es_xif (server_var(wcs_wall) = 0) then wcs_run_ulti_chain2"
      alias wcs_run_ulti_chain2 "es_xsetinfo wcs_immunity 0;es es_xkeygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity;es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_chain3;es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng_ulti_immunity_a);es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng_ulti_immunity_v)"
      alias wcs_run_ulti_chain3 "es_xmath wcs_counter + 1;es es_xif (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 200 255 255 255;es wcs_dealdamage server_var(wcs_userid) server_var(wcs_targetid) 32"
      es_xsetinfo wcs_counter 0
      es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es es_xexists wcs_exists userid server_var(wcs_targetid);es es_xif (server_var(wcs_exists) = 1) then es_xif (server_var(wcs_counter) < server_var(wcs_maxtargets)) then wcs_run_ulti_chain1"
      es es_xif (server_var(wcs_counter) > 0) do
      {
      	wcs_getlanguage "wcs_lng" "wcs_lng_chainlightning"
      	wcs_getlanguage "wcs_lng2" "wcs_lng_playersdamaged"
        esnq est_csay server_var(wcs_userid) server_var(wcs_lng) : server_var(wcs_counter) server_var(wcs_lng2)
      }
      es_xelse do
      {
        es_xsetinfo wcs_ultinotexec 1
      }
    }
    es_xelse do
    {
      es_xsetinfo wcs_ultinotexec 1
    }
  }
  wcs_getlanguage "wcs_lng" "wcs_lng_chainfailed"
  es es_xif (server_var(wcs_ultinotexec) = 1) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng)
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_chain end
}

block wcs_ulti_roots
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_roots start
  es_xsetinfo wcs_team_target 0
  es es_xgetplayerteam wcs_team server_var(wcs_userid)
  // check teams (T=2, CT=3)
  es es_xif (server_var(wcs_team) = 2) do
  {
    es_xsetinfo wcs_team_target 3
    es_xsetinfo wcs_team_targetn "#c!d"
  }
  es es_xif (server_var(wcs_team) = 3) do
  {
    es_xsetinfo wcs_team_target 2
    es_xsetinfo wcs_team_targetn "#t!d"
  }
  es es_xif (server_var(wcs_team_target) != "0") do
  {
    es_xsetinfo wcs_pcount 0
    es es_xgetlivingplayercount wcs_pcount server_var(wcs_team_target)
    es es_xif (server_var(wcs_pcount) > 0) do
    {
    	es est_Fade server_var(wcs_userid) 0 1 1 10 55 5 200
    	es_xsetinfo wcs_wall "1"
      alias wcs_run_ulti_roots1 "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es es_xgetplayerlocation 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);es es_xif (server_var(wcs_wall) = 0) then wcs_run_ulti_roots2"
      alias wcs_run_ulti_roots2 "es_xsetinfo wcs_immunity 0;es es_xkeygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity;es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_roots3;es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng_ulti_immunity_a);es es_xif (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 es_xdelayed server_var(wcs_freezetime) wcs_removefx freeze server_var(wcs_targetid);es es_xif (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"
      es_xsetinfo wcs_counter 0
      es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es es_xexists wcs_exists userid server_var(wcs_targetid);es es_xif (server_var(wcs_exists) = 1) then wcs_run_ulti_roots1"
      es es_xif (server_var(wcs_counter) > 0) do
      {
      	wcs_getlanguage "wcs_lng" "wcs_lng_entangleroots"
        esnq est_csay server_var(wcs_userid) server_var(wcs_lng) : server_var(wcs_counter)
      }
      es_xelse do
      {
        es_xsetinfo wcs_ultinotexec 1
      }
    }
    es_xelse do
    {
      es_xsetinfo wcs_ultinotexec 1
    }
  }
  wcs_getlanguage "wcs_lng" "wcs_lng_entanglefailed"
  es es_xif (server_var(wcs_ultinotexec) = 1) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng)
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_roots end
}

block wcs_regeneration
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_regeneration start
  es_xsetinfo wcs_uid 0
  es_xsetinfo wcs_amount 0
  es_xsetinfo wcs_time 0
  es_xsetinfo wcs_maxhp 0
  es_xsetinfo wcs_maxheal 0
  es_xsetinfo wcs_radius 0
  es_xgetargv wcs_uid 1
  es_xgetargv wcs_amount 2
  es_xgetargv wcs_time 3
  es_xgetargv wcs_maxhp 4
  es_xgetargv wcs_maxheal 5
  es_xgetargv wcs_radius 6
  es es_xexists wcs_exists userid server_var(wcs_uid)
  es es_xif (server_var(wcs_time) < 1) then es_xsetinfo wcs_exists 0
  es es_xif (server_var(wcs_exists) = 1) do
  {
    es es_xexists wcs_exists key WCSuserdata server_var(wcs_uid)
    es es_xif (server_var(wcs_exists) = 1) do
    {
      es_xsetinfo wcs_regenerate 0
      es es_xkeygetvalue wcs_regenerate WCSuserdata server_var(wcs_uid) regeneration
      es es_xif (server_var(wcs_regenerate) = "1") do
      {
        es es_xkeygetvalue wcs_round WCSuserdata server_var(wcs_uid) regen_round
        es es_xif (server_var(wcs_roundcounter) = server_var(wcs_round)) do
        {
          es es_xgetplayerprop wcs_dead server_var(wcs_uid) "CCSPlayer.baseclass.pl.deadflag"
          es es_xif (server_var(wcs_maxheal) = "0") then es_xsetinfo wcs_dead "1"
          es es_xif (server_var(wcs_dead) = "0") do
          {
						es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_uid)
						// check for team healing
            es es_xif (server_var(wcs_radius) > 0) do
            {
              es es_xgetplayerteam wcs_team server_var(wcs_uid)
              // check teams (T=2, CT=3)
	            es es_xif (server_var(wcs_team) = 2) then es_xsetinfo wcs_team "#t!d"
	            es es_xif (server_var(wcs_team) = 3) then es_xsetinfo wcs_team "#c!d"
	            es_xmath wcs_z1 + 50
	            wcs_getlanguage "wcs_lng" "wcs_lng_healed"
              alias wcs_run_heal "es est_sethealth server_var(wcs_targetid) server_var(wcs_health);es es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng);es est_fade server_var(wcs_targetid) 0 0.4 0 0 200 25 50;es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);es_xmath wcs_z2 + 50;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 2 2 0 255 0 255"
              es est_Near wcs_targetid server_var(wcs_team) server_var(wcs_radius) server_var(wcs_uid) "es est_gethealth wcs_health server_var(wcs_targetid);es es_xmath wcs_health + server_var(wcs_amount);es es_xif (server_var(wcs_maxhp) > 0) then es_xif (server_var(wcs_maxhp) >= server_var(wcs_health)) then wcs_run_heal;es es_xif (server_var(wcs_maxhp) = 0) then wcs_run_heal"
              es_xmath wcs_maxheal - 1
              es es_xdelayed server_var(wcs_time) wcs_regeneration server_var(wcs_uid) server_var(wcs_amount) server_var(wcs_time) server_var(wcs_maxhp) server_var(wcs_maxheal) server_var(wcs_radius)
            }
            es_xelse do
            {
              es est_GetHealth wcs_health server_var(wcs_uid)
              es es_xmath wcs_health + server_var(wcs_amount)
              es es_xif (server_var(wcs_maxhp) > 0) then es_xif (server_var(wcs_maxhp) >= server_var(wcs_health)) then est_SetHealth server_var(wcs_uid) server_var(wcs_health)
              es es_xif (server_var(wcs_maxhp) = 0) then est_SetHealth server_var(wcs_uid) server_var(wcs_health)
              es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_uid)
              es_xmath wcs_z2 + 200
              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 2 2 0 255 0 255
              wcs_getlanguage "wcs_lng" "wcs_lng_healed"
              es es_xtell server_var(wcs_uid) #multi server_var(wcs_lng)
              es_xmath wcs_maxheal - 1
              es es_xdelayed server_var(wcs_time) wcs_regeneration server_var(wcs_uid) server_var(wcs_amount) server_var(wcs_time) server_var(wcs_maxhp) server_var(wcs_maxheal) "0"
            }
          }
        }
        es_xelse do
        {
          es es_xkeysetvalue WCSuserdata server_var(wcs_uid) regen_round 0
        }
      }
    }
  }
es es_xif (server_var(wcs_debug) = "1") then echo wcs_regeneration end
}

block wcs_warden
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_warden start
	es_xsetinfo wcs_uid 0
	es_xsetinfo wcs_duration 0
	es_xsetinfo wcs_dmg 0
	es_xsetinfo wcs_radius 0
	es_xsetinfo wcs_team_target 0
	es_xsetinfo wcs_wardenround 0
	es_xgetargv wcs_uid 1
	es_xgetargv wcs_duration 2
	es_xgetargv wcs_dmg 3
	es_xgetargv wcs_radius 4
	es_xgetargv wcs_team_target 5
	es_xgetargv wcs_team_targetn 6
	es_xgetargv wcs_x1 7
	es_xgetargv wcs_y1 8
	es_xgetargv wcs_z1 9
	es_xgetargv wcs_wardenround 10
  es es_xexists wcs_exists userid server_var(wcs_uid)
  es es_xgetlivingplayercount wcs_alive server_var(wcs_team_target)
  es es_xif (server_var(wcs_alive) < 1) then es_xsetinfo wcs_exists 0
  es es_xif (server_var(wcs_wardenround) != server_var(wcs_roundcounter)) then es_xsetinfo wcs_duration 0
	es es_xif (server_var(wcs_exists) = 1) do
	{
		es es_xif (server_var(wcs_duration) > 0) do
		{
			es es_xif (server_var(wcs_radius) != "0") do
			{
				es es_xif (server_var(wcs_team_targetn) != "0") do
				{
					es est_Effect 11 #a 0 effects/tp_eyefx/tpeye3.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 20 server_var(wcs_radius) 255
				  //es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_uid) "es wcs_dealdamage server_var(wcs_uid) server_var(wcs_targetid) server_var(wcs_dmg);es es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng_wardenhit);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);es est_effect 3 #a 0 effects/tp_eyefx/tpeye3.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 20 255 150 70 255"
				  es_xsetinfo wcs_wall "1"
				  wcs_getlanguage "wcs_lng" "wcs_lng_wardenhit"
				  alias wcs_run_warden "es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);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);es es_xif (server_var(wcs_wall) = 0) then wcs_run_warden2"
				  alias wcs_run_warden2 "es est_speed server_var(wcs_targetid) 0.7;es es_xif (server_var(wcs_speed) != 0) then es_xdelayed 2 wcs_removefx speed server_var(wcs_targetid);es wcs_dealdamage server_var(wcs_uid) server_var(wcs_targetid) server_var(wcs_dmg);es es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng);es est_effect 3 #a 0 effects/tp_eyefx/tpeye3.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 20 255 150 70 255"
				  es nearcoord wcs_targetid server_var(wcs_team_targetn) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) server_var(wcs_radius) server_var(wcs_radius) server_var(wcs_radius) "es es_xgetplayerprop wcs_dead server_var(wcs_targetid) CCSPlayer.baseclass.pl.deadflag;es es_xif (server_var(wcs_dead) = 0) then wcs_run_warden"
				  es_xmath wcs_duration - 1
				  es es_xdelayed 1 wcs_warden server_var(wcs_uid) server_var(wcs_duration) server_var(wcs_dmg) server_var(wcs_radius) server_var(wcs_team_target) server_var(wcs_team_targetn) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) server_var(wcs_wardenround)
			  }
			}
		}
	}
es es_xif (server_var(wcs_debug) = "1") then echo wcs_warden end
}

block wcs_mole_activate
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_mole_activate start
	es_xsetinfo wcs_uid 0
	es_xgetargv wcs_uid 1
	es es_xexists wcs_exists userid server_var(wcs_uid)
	es es_xif (server_var(wcs_exists) = 1) do
	{
		es_xsetinfo wcs_team_target 0
    es es_xgetplayerteam wcs_team server_var(wcs_uid)
		// check teams (T=2, CT=3)
    es es_xif (server_var(wcs_team) = 2) do
    {
      es_xsetinfo wcs_team_target 3
      es_xsetinfo wcs_team_targetn "#c!d"
    }
    es es_xif (server_var(wcs_team) = 3) do
    {
      es_xsetinfo wcs_team_target 2
      es_xsetinfo wcs_team_targetn "#t!d"
    }
    es es_xif (server_var(wcs_team_target) != "0") do
    {
    	es_xsetinfo wcs_pcount 0
      es es_xgetlivingplayercount wcs_pcount server_var(wcs_team_target)
      es es_xif (server_var(wcs_pcount) > 0) do
      {
			  es_xsetinfo wcs_player 0
			  es es_xif(server_var(wcs_game) = server_var(wcs_game_css)) then es_xif (server_var(wcs_team) = 3) then est_SetModel server_var(wcs_uid) "player/t_phoenix"
			  es es_xif(server_var(wcs_game) = server_var(wcs_game_css)) then es_xif (server_var(wcs_team) = 2) then est_SetModel server_var(wcs_uid) "player/ct_urban"
			  es es_xif(server_var(wcs_game) = server_var(wcs_game_dods)) then es_xif (server_var(wcs_team) = 2) then est_SetModel server_var(wcs_uid) "player/german_assault"
			  es es_xif(server_var(wcs_game) = server_var(wcs_game_dods)) then es_xif (server_var(wcs_team) = 3) then est_SetModel server_var(wcs_uid) "player/american_assault"
			  es est_RandPlayer wcs_player server_var(wcs_team_targetn)
			  es es_xexists wcs_exists userid server_var(wcs_player)
			  es es_xif (server_var(wcs_exists) = 1) do
			  {
          //es es_xgetplayerlocation wcs_x wcs_y wcs_z server_var(wcs_player)
          //es_xmath wcs_x + 40
          //es_xmath wcs_y + 40
          // new pos
          es es_xif (server_var(wcs_team) = 2) do
          {
            es es_xif (server_var(wcs_location_c) != "0") do
            {
            es es_xtoken wcs_x server_var(wcs_location_c) 1 |
            es es_xtoken wcs_y server_var(wcs_location_c) 2 |
            es es_xtoken wcs_z server_var(wcs_location_c) 3 |
            }
            es_xelse do
            {
			  	es es_xgetplayerlocation wcs_x wcs_y wcs_z server_var(wcs_player)
            }
          }
          es es_xif (server_var(wcs_team) = 3) do
          {
            es es_xif (server_var(wcs_location_t) != "0") do
            {
            es es_xtoken wcs_x server_var(wcs_location_t) 1 |
            es es_xtoken wcs_y server_var(wcs_location_t) 2 |
            es es_xtoken wcs_z server_var(wcs_location_t) 3 |
            }
            es_xelse do
            {
              es es_xgetplayerlocation wcs_x wcs_y wcs_z server_var(wcs_player)
            }
          }
			  	// new, delayed teleport
			  	es es_xsetinfo wcs_tmp server_var(mp_freezetime)
			  	es_xmath wcs_tmp + 3
			  	wcs_getlanguage "wcs_lng" "wcs_lng_moledelay"
			  	es es_xtell server_var(wcs_uid) #multi server_var(wcs_lng)
			  	es es_xdelayed server_var(mp_freezetime) es_xtell server_var(wcs_uid) #multi server_var(wcs_lng)
			  	es es_xdelayed server_var(wcs_tmp) est_Teleport server_var(wcs_uid) server_var(wcs_x) server_var(wcs_y) server_var(wcs_z)
			  	es es_xkeysetvalue "WCSuserdata" server_var(wcs_uid) "ismole" "1"
			  }
			  wcs_getlanguage "wcs_lng" "wcs_lng_mole"
			  es es_xdelayed server_var(mp_freezetime) es_xtell server_var(wcs_uid) #multi server_var(wcs_lng)
	  	}
	  	es_xelse do
	  	{
	  		wcs_getlanguage "wcs_lng" "wcs_lng_molefailed"
	  		es es_xtell server_var(wcs_uid) #multi server_var(wcs_lng)
	  	}
		}
		es_xelse do
		{
			wcs_getlanguage "wcs_lng" "wcs_lng_molefailed"
			es es_xtell server_var(wcs_uid) #multi server_var(wcs_lng)
		}
  }
es es_xif (server_var(wcs_debug) = "1") then echo wcs_mole_activate end
}


block wcs_ulti_frost
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_frost start
  es_xsetinfo wcs_team_target 0
  es es_xgetplayerteam wcs_team server_var(wcs_userid)
  // check teams (T=2, CT=3)
  es es_xif (server_var(wcs_team) = 2) do
  {
    es_xsetinfo wcs_team_target 3
    es_xsetinfo wcs_team_targetn "#c!d"
  }
  es es_xif (server_var(wcs_team) = 3) do
  {
    es_xsetinfo wcs_team_target 2
    es_xsetinfo wcs_team_targetn "#t!d"
  }
  es es_xif (server_var(wcs_team_target) != "0") do
  {
    es_xsetinfo wcs_pcount 0
    es es_xgetlivingplayercount wcs_pcount server_var(wcs_team_target)
    es es_xif (server_var(wcs_pcount) > 0) do
    {
    	es est_Fade server_var(wcs_userid) 0 2 1 40 40 240 50
    	es_xsetinfo wcs_wall "1"
      alias wcs_run_ulti_frost1 "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);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);es es_xif (server_var(wcs_wall) = 0) then wcs_run_ulti_frost2"
      alias wcs_run_ulti_frost2 "es_xsetinfo wcs_immunity 0;es es_xkeygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity;es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_frost3;es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng_ulti_immunity_a);es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng_ulti_immunity_v);es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_frost4"
      alias wcs_run_ulti_frost4 "es_xmath wcs_z1 + 50;es est_Effect 10 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 20 server_var(wcs_radius) 1 20 100 1 100 155 255 255 10;es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);es_xmath wcs_z1 + 1620;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) 2 13 16 100 155 255 255;es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_targetid);es est_effect 10 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 30 50 3 150 100 0 45 65 251 255 0;es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);es est_Effect 3 #a 0 sprites/lgtning.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) server_var(wcs_x3) server_var(wcs_y3) server_var(wcs_z3) 2 13 16 100 155 255 255"
      alias wcs_run_ulti_frost3 "es_xmath wcs_counter + 1;es es_xif (server_var(wcs_graphicfx) = 1) then es_delayed 0.5 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) 2 13 16 100 155 255 255;es es_xsetplayerprop server_var(wcs_targetid) CBasePlayer.m_fFlags 32.0;es es_xdelayed server_var(wcs_freezetime) wcs_removefx freeze server_var(wcs_targetid);es est_setplayercolor server_var(wcs_targetid) 15 0 255 255 1;es es_delayed server_var(wcs_freezetime) est_setplayercolor server_var(wcs_targetid) 255 255 255 255 1;es est_playplayer event_var(userid) ambient/fire/mtov_flame2.wav;es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);es_xmath wcs_z2 + 150;es est_Effect 10 #a 0 sprites/lgtning.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 20 server_var(wcs_radius) 1 20 50 1 75 155 255 255 10"
      es_xsetinfo wcs_counter 0
      es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es es_xexists wcs_exists userid server_var(wcs_targetid);es es_xif (server_var(wcs_exists) = 1) then es_xif (server_var(wcs_counter) < server_var(wcs_maxtargets)) then wcs_run_ulti_frost1"
      es es_xif (server_var(wcs_counter) > 0) do
      {
        esnq est_csay server_var(wcs_userid) Flash Freeze hit server_var(wcs_counter) players!
      }
      es_xelse do
      {
        es_xsetinfo wcs_ultinotexec 1
      }
    }
    es_xelse do
    {
      es_xsetinfo wcs_ultinotexec 1
    }
  }
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_frost end
}
block wcs_dalias
{

if (server_var(wcs_debug) = "1") then echo wcs_dalias start
    es_xsetinfo wcs_tmp1 0
   es_xsetinfo wcs_tmp2 0
   es_xsetinfo wcs_tmp3 0
   es_xsetinfo wcs_tmp4 0
   es_xsetinfo wcs_tmp5 0
    es_xsetinfo wcs_tmp6 0
   es_xsetinfo wcs_tmp7 0
   es_xsetinfo wcs_tmp8 0
   es_xsetinfo wcs_tmp9 0
   es_xsetinfo wcs_tmp10 0
    es_xsetinfo wcs_tmp11 0
   es_xsetinfo wcs_tmp12 0
   es_xsetinfo wcs_tmp13 0
   es_xsetinfo wcs_tmp14 0
   es_xsetinfo wcs_tmp15 0
   es_xgetargv wcs_tmp1 1
   es_xgetargv wcs_tmp2 2
   es_xgetargv wcs_tmp3 3
   es_xgetargv wcs_tmp4 4
   es_xgetargv wcs_tmp5 5
   es_xgetargv wcs_tmp6 6
   es_xgetargv wcs_tmp7 7
   es_xgetargv wcs_tmp8 8
   es_xgetargv wcs_tmp9 9
   es_xgetargv wcs_tmp10 10
   es_xgetargv wcs_tmp11 11
   es_xgetargv wcs_tmp12 12
   es_xgetargv wcs_tmp13 13
   es_xgetargv wcs_tmp14 14
   es_xgetargv wcs_tmp15 15
es server_var(wcs_tmp1)
if (server_var(wcs_debug) = "1") then echo wcs_dalias end
}

block wcs_ulti_quake
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_quake start
  es_xsetinfo wcs_team_target 0
  es es_xgetplayerteam wcs_team server_var(wcs_userid)
  // check teams (T=2, CT=3)
  es es_xif (server_var(wcs_team) = 2) do
  {
    es_xsetinfo wcs_team_target 3
    es_xsetinfo wcs_team_targetn "#c!d"
  }
  es es_xif (server_var(wcs_team) = 3) do
  {
    es_xsetinfo wcs_team_target 2
    es_xsetinfo wcs_team_targetn "#t!d"
  }
  es es_xif (server_var(wcs_team_target) != "0") do
  {
    es_xsetinfo wcs_pcount 0
    es es_xgetlivingplayercount wcs_pcount server_var(wcs_team_target)
    es es_xif (server_var(wcs_pcount) > 0) do
    {
    
    	es_xsetinfo wcs_wall "1"
      alias wcs_run_ulti_quake1 "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);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);es es_xif (server_var(wcs_wall) = 0) then wcs_run_ulti_quake2"
      alias wcs_run_ulti_quake2 "es_xsetinfo wcs_immunity 0;es es_xkeygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity;es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_quake3;es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng_ulti_immunity_a);es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng_ulti_immunity_v);es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_quake4"
      alias wcs_run_ulti_quake4 "es est_effect 10 #a 2.5 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 20 5000 2 100 300 1.8 175 175 255 255 1;es est_effect 10 #a 2.5 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 20 5000 2 100 300 3.8 255 75 25 255 5;es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_targetid);es est_effect 10 #a 2.5 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 30 50 3 50 100 2 255 75 25 255 2"
      alias wcs_run_ulti_quake3 "es_xmath wcs_counter + 1;es es_xif (server_var(wcs_graphicfx) = 1) then es est_effect 3 #a 2.5 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) 2 13 16 255 75 25 255;es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es est_physpush server_var(wcs_userid) 0 0 500;es es_delayed 1 est_pushto server_var(wcs_userid) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 1;wcs_run_ulti_quake5"
      alias wcs_run_ulti_quake5 "es es_delayed 1.2 est_shake server_var(wcs_targetid) 3 5 7;es es_delayed 1.2 est_shake server_var(wcs_userid) 3 5 7;es es_delayed 1.3 wcs_dealdamage server_var(wcs_userid) server_var(wcs_targetid) 10;es es_delayed 1.2 est_playplayer server_var(wcs_userid) weapons/hegrenade/explode4.wav;es es_delayed 1.2 est_playplayer server_var(wcs_targetid) weapons/hegrenade/explode4.wav"
      es_xsetinfo wcs_counter 0
      es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es es_xexists wcs_exists userid server_var(wcs_targetid);es es_xif (server_var(wcs_exists) = 1) then es_xif (server_var(wcs_counter) < server_var(wcs_maxtargets)) then wcs_run_ulti_quake1"
      es es_xif (server_var(wcs_counter) > 0) do
      {
        esnq est_csay server_var(wcs_userid) Earth Quake hit server_var(wcs_counter) players!
      }
      es_xelse do
      {
        es_xsetinfo wcs_ultinotexec 1
      }
    }
    es_xelse do
    {
      es_xsetinfo wcs_ultinotexec 1
    }
  }
es es_xif (server_var(wcs_ultinotexec) = 1) then es_xtell server_var(wcs_userid) #multi #greenEarth Quake #lightgreenfailed because no enemies were close
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_quake end
}

block wcs_ulti_char
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_char start
  es_xsetinfo wcs_team_target 0
  es es_xgetplayerteam wcs_team server_var(wcs_userid)
  // check teams (T=2, CT=3)
  es es_xif (server_var(wcs_team) = 2) do
  {
    es_xsetinfo wcs_team_target 3
    es_xsetinfo wcs_team_targetn "#c!d"
  }
  es es_xif (server_var(wcs_team) = 3) do
  {
    es_xsetinfo wcs_team_target 2
    es_xsetinfo wcs_team_targetn "#t!d"
  }
  es es_xif (server_var(wcs_team_target) != "0") do
  {
    es_xsetinfo wcs_pcount 0
    es es_xgetlivingplayercount wcs_pcount server_var(wcs_team_target)
    es es_xif (server_var(wcs_pcount) > 0) do
    {
    
    	es_xsetinfo wcs_wall "1"
      alias wcs_run_ulti_char1 "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_targetid);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);es es_xif (server_var(wcs_wall) = 0) then wcs_run_ulti_char2"
      alias wcs_run_ulti_char2 "es_xsetinfo wcs_immunity 0;es es_xkeygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity;es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_char3;es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng_ulti_immunity_a);es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng_ulti_immunity_v);es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_char4"
      alias wcs_run_ulti_char4 "es est_effect 7 #a 0 sprites/smoke.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 100 10;es_xmath wcs_z2 + 15;es est_effect 7 #a 0.5 sprites/smoke.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 100 10;es_xmath wcs_z1 + 30;es est_effect 7 #a 1 sprites/smoke.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 100 10"
      alias wcs_run_ulti_char3 "es_xmath wcs_counter + 1;es es_xif (server_var(wcs_graphicfx) = 1) then es est_effect 7 #a 1.5 sprites/smoke.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 100 10;es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);wcs_run_ulti_char5"
      alias wcs_run_ulti_char5 "es est_effect 7 #a 2 sprites/smoke.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 100 10;es est_playplayer server_var(wcs_targetid) ambient/machines/steam_release_1.wav"
      es_xsetinfo wcs_counter 0
      es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es es_xexists wcs_exists userid server_var(wcs_targetid);es es_xif (server_var(wcs_exists) = 1) then es_xif (server_var(wcs_counter) < server_var(wcs_maxtargets)) then wcs_run_ulti_char1"
      es es_xif (server_var(wcs_counter) > 0) do
      {
        esnq est_csay server_var(wcs_userid) Smoke Screen hit server_var(wcs_counter) players!
      }
      es_xelse do
      {
        es_xsetinfo wcs_ultinotexec 1
      }
    }
    es_xelse do
    {
      es_xsetinfo wcs_ultinotexec 1
    }
  }
es es_xif (server_var(wcs_ultinotexec) = 1) then es_xtell server_var(wcs_userid) #multi #greenSmoke Screen #lightgreenfailed because no enemies were close
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_char end
}
block wcs_ulti_saur
{
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_saur start
  es_xsetinfo wcs_team_target 0
  es es_xgetplayerteam wcs_team server_var(wcs_userid)
  // check teams (T=2, CT=3)
  es es_xif (server_var(wcs_team) = 2) do
  {
    es_xsetinfo wcs_team_target 3
    es_xsetinfo wcs_team_targetn "#c!d"
  }
  es es_xif (server_var(wcs_team) = 3) do
  {
    es_xsetinfo wcs_team_target 2
    es_xsetinfo wcs_team_targetn "#t!d"
  }
  es es_xif (server_var(wcs_team_target) != "0") do
  {
    es_xsetinfo wcs_pcount 0
    es es_xgetlivingplayercount wcs_pcount server_var(wcs_team_target)
    es es_xif (server_var(wcs_pcount) > 0) do
    {
    	es est_Fade server_var(wcs_userid) 0 2 1 240 240 240 100
    	es_xsetinfo wcs_wall "1"
      alias wcs_run_ulti_saur1 "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es es_xgetplayerlocation 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);es es_xif (server_var(wcs_wall) = 0) then wcs_run_ulti_saur2"
      alias wcs_run_ulti_saur2 "es_xsetinfo wcs_immunity 0;es es_xkeygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity;es es_xif (server_var(wcs_immunity) = 0) then wcs_run_ulti_saur3;es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng_ulti_immunity_a);es es_xif (server_var(wcs_immunity) != 0) then es_xtell server_var(wcs_targetid) #multi server_var(wcs_lng_ulti_immunity_v)"
      alias wcs_run_ulti_saur3 "es_xmath wcs_counter + 1;es es_xif (server_var(wcs_graphicfx) = 1) then est_effect 3 #a 0 sprites/hydragutbeam.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 7 8 200 255 255 255;es wcs_dealdamage server_var(wcs_userid) server_var(wcs_targetid) 32;es est_playplayer server_var(wcs_userid) weapons/slam/throw.wav"
      es_xsetinfo wcs_counter 0
      es est_Near wcs_targetid server_var(wcs_team_targetn) server_var(wcs_radius) server_var(wcs_userid) "es es_xexists wcs_exists userid server_var(wcs_targetid);es es_xif (server_var(wcs_exists) = 1) then es_xif (server_var(wcs_counter) < server_var(wcs_maxtargets)) then wcs_run_ulti_saur1"
      es es_xif (server_var(wcs_counter) > 0) do
      {
      	
        esnq est_csay server_var(wcs_userid) Vine Whip hit : server_var(wcs_counter) players
      }
      es_xelse do
      {
        es_xsetinfo wcs_ultinotexec 1
      }
    }
    es_xelse do
    {
      es_xsetinfo wcs_ultinotexec 1
    }
  }
 
  es es_xif (server_var(wcs_ultinotexec) = 1) then es_xtell server_var(wcs_userid) #multi #greenVine Whip failed
es es_xif (server_var(wcs_debug) = "1") then echo wcs_ulti_saur end
}
// <<<<<<<<<<<<<<<<< END ULTIMATE SKILL CODE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
