// The Chameleon
// for WCS v0.75+
// copy&paste this lines in es_WCSraces_db.txt
// check the following syntax:
//
//    "11"
//    {
//      <code>
//    }
//    "12"
//    {
//      "name" "Chameleon"
//      <and so on...chameleon code>...
//    }
//  }
//
// The last "}" is very important !!
// Start copy&paste after this line:

  "12"
  {
    "name"              "Chameleon"
    "author"            "Kryptonite/soundn3ko"
    "shortdescription"  "random skills every round !"
    "required_level"    "100"
    "maximum_level"     "0"
    "allow_only"        "0"
    "teamlimit"         "0"
    "preloadcmd"        "es_xsetinfo wcs_c_player 0;es_xsetinfo wcs_c_playern 0;es_xsetinfo wcs_c_spawn 6|health|speed|longjump|gravity|mole|regeneration;es_xsetinfo wcs_c_attack 5|extradmg|burn|freeze|blind|leechhealth;es_xsetinfo wcs_c_victim 4|evade|mirrordmg|slowdown|invisibility;es_xsetinfo wcs_c_death 4|explode|respawn|healteam|mana;es_xsetinfo wcs_c_ultimate 5|entangleroots|chainlightning|teleport|powerup|fly"
    "player_spawn_cmd"  "wcs_getlanguage wcs_lng wcs_lng_r_chamspawn;es_xsetinfo wcs_scounter 1;es es_xsetinfo wcs_counter server_var(wcs_c_spawn);racealias_cm_spwn1;es_xmath wcs_scounter + 1;es es_xsetinfo wcs_counter server_var(wcs_c_attack);racealias_cm_spwn;es_xmath wcs_scounter + 1;es es_xsetinfo wcs_counter server_var(wcs_c_victim);racealias_cm_spwn;es_xmath wcs_scounter + 1;es es_xsetinfo wcs_counter server_var(wcs_c_death);racealias_cm_spwn;es_xmath wcs_scounter + 1;es es_xsetinfo wcs_counter server_var(wcs_c_ultimate);racealias_cm_spwn;es es_xformat wcs_lng %1%2 server_var(wcs_lng) server_var(wcs_c_player);es es_xtell event_var(userid) #multi server_var(wcs_lng);es es_xkeysetvalue WCSuserdata event_var(userid) chameleon server_var(wcs_c_playern);es es_xif (server_var(wcs_gamestarted) = 0) then es_xkeysetvalue WCSuserdata event_var(userid) vengeance 1"
    "racealias_cm_spwn1" "es es_xtoken wcs_tmp server_var(wcs_counter) 1 |;es es_xrand wcs_rand 1 server_var(wcs_tmp);es es_xsetinfo wcs_c_playern server_var(wcs_rand);es_xmath wcs_rand + 1;es es_xtoken wcs_tmp2 server_var(wcs_counter) server_var(wcs_rand) |;es es_xformat wcs_c_player #green%1 server_var(wcs_tmp2)"
    "racealias_cm_spwn" "es es_xtoken wcs_tmp server_var(wcs_counter) 1 |;es es_xrand wcs_rand 1 server_var(wcs_tmp);es es_xformat wcs_c_playern %1|%2 server_var(wcs_c_playern) server_var(wcs_rand);es_xmath wcs_rand + 1;es es_xtoken wcs_tmp2 server_var(wcs_counter) server_var(wcs_rand) |;es es_xformat wcs_c_player %1%2%3 server_var(wcs_c_player) server_var(wcs_space) server_var(wcs_tmp2)"
    "round_start_cmd"   "0"
    "round_end_cmd"     "0"
    "numberofskills"    "5"
    "numberoflevels"    "5"
    "skillnames"        "Spawn Powers|Attacking Powers|Victim Powers|Death Powers|Ultimate Powers"
    "skilldescr"        "50-90% chance of spawning with either HP, speed, longjump, lowgravity, mole or regeneration|33% chance of extra damage, burning, freezing, blinding or leeching health|33% chance to evade, mirror damage, slowdown attacker or get invisibility|30-70% chance on death to explode, respawn, give team some health or gain mana|80% chance to mimic roots, teleport, chain lightning, health boost or fly"
    "skillcfg"          "player_spawn|player_attacker|player_victim|player_death|player_ultimate"
    
    "skill1_setting"    "es_xsetinfo wcs_chance 50|es_xsetinfo wcs_chance 60|es_xsetinfo wcs_chance 70|es_xsetinfo wcs_chance 80|es_xsetinfo wcs_chance 90"
    "racealias_cham_sp" "es es_xif (server_var(wcs_tmp) = 1) then est_Health event_var(userid) + 70;es es_xif (server_var(wcs_tmp) = 2) then est_speed event_var(userid) 1.3;es es_xif (server_var(wcs_tmp) = 3) then es_xkeysetvalue WCSuserdata event_var(userid) longjump 1.15;es es_xif (server_var(wcs_tmp) = 4) then es_xdelayed 2 est_SetGravity event_var(userid) 0.8;es es_xif (server_var(wcs_tmp) = 5) then es_xdelayed 1 wcs_mole_activate event_var(userid);es es_xif (server_var(wcs_tmp) = 6) then es_xkeysetvalue WCSuserdata event_var(userid) regeneration 1;es es_xif (server_var(wcs_tmp) = 6) then es_xkeysetvalue WCSuserdata event_var(userid) regen_round server_var(wcs_roundcounter);es es_xif (server_var(wcs_tmp) = 6) then wcs_regeneration event_var(userid) 3 4 150 15 0"
    "skill1_cmd"        "es_xsetinfo wcs_tmp 0;es es_xkeygetvalue wcs_tmp WCSuserdata event_var(userid) chameleon;es es_xtoken wcs_tmp server_var(wcs_tmp) 1 |;es es_xif (server_var(wcs_tmp) != 0) then es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then racealias_cham_sp;wcs_getlanguage wcs_lng wcs_lng_r_chamnospawn;es es_xif (server_var(wcs_dice) > server_var(wcs_chance)) then es_xtell event_var(userid) #multi server_var(wcs_lng)"
    "skill1_sfx"        "0"

    "skill2_setting"    "es_xsetinfo wcs_damage 5;es_xsetinfo wcs_hp 3|es_xsetinfo wcs_damage 6;es_xsetinfo wcs_hp 4|es_xsetinfo wcs_damage 7;es_xsetinfo wcs_hp 5|es_xsetinfo wcs_damage 8;es_xsetinfo wcs_hp 6|es_xsetinfo wcs_damage 9;es_xsetinfo wcs_hp 7"
    "racealias_cham_at" "es es_xif (server_var(wcs_tmp) = 1) then wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_damage);es es_xif (server_var(wcs_tmp) = 1) then est_csay event_var(attacker) + server_var(wcs_damage);es est_csay event_var(userid) server_var(wcs_damage) dmg;es es_xif (server_var(wcs_tmp) = 2) then est_burn event_var(userid) 2;es es_xif (server_var(wcs_tmp) = 3) then est_freeze event_var(userid) 1;es es_xif (server_var(wcs_tmp) = 3) then es_xdelayed 1 wcs_removefx freeze event_var(userid);es es_xif (server_var(wcs_tmp) = 4) then est_fade event_var(userid) 0 0.2 0.3 255 255 255 200;es es_xif (server_var(wcs_tmp) = 5) then est_health event_var(attacker) + server_var(wcs_hp)"
    "skill2_cmd"        "es_xsetinfo wcs_tmp 0;es es_xkeygetvalue wcs_tmp WCSuserdata event_var(attacker) chameleon;es es_xtoken wcs_tmp server_var(wcs_tmp) 2 |;es es_xif (server_var(wcs_tmp) != 0) then es_xif (server_var(wcs_dice) <= 33) then racealias_cham_at"
    "skill2_sfx"        "0"

    "skill3_setting"    "es_xsetinfo wcs_speed 0.9;es_xsetinfo wcs_invis 120;es_xsetinfo wcs_multiplier 0.1|es_xsetinfo wcs_speed 0.85;es_xsetinfo wcs_invis 110;es_xsetinfo wcs_multiplier 0.2|es_xsetinfo wcs_speed 0.8;es_xsetinfo wcs_invis 105;es_xsetinfo wcs_multiplier 0.25|es_xsetinfo wcs_speed 0.75;es_xsetinfo wcs_invis 100;es_xsetinfo wcs_multiplier 0.3|es_xsetinfo wcs_speed 0.7;es_xsetinfo wcs_invis 95;es_xsetinfo wcs_multiplier 0.35"
    "racealias_cham_vi" "es es_xif (server_var(wcs_tmp) = 1) then est_health event_var(userid) + event_var(dmg_health);es es_xif (server_var(wcs_tmp) = 2) then es_xsetinfo wcs_dmg event_var(dmg_health);es es_xif (server_var(wcs_tmp) = 2) then es_xmath wcs_dmg * server_var(wcs_multiplier);es es_xif (server_var(wcs_tmp) = 2) then wcs_dealdamage event_var(userid) event_var(attacker) server_var(wcs_dmg);es es_xif (server_var(wcs_tmp) = 2) then wcs_getlanguage wcs_lng wcs_lng_mirrordamage;es es_xif (server_var(wcs_tmp) = 2) then es_xtell event_var(userid) #multi #green server_var(wcs_dmg) #lightgreen server_var(wcs_lng);racealias_cham_vi2"
    "racealias_cham_vi2" "es es_xif (server_var(wcs_tmp) = 3) then est_speed event_var(attacker) server_var(wcs_speed);es es_xif (server_var(wcs_tmp) = 3) then es_xdelayed 2 wcs_removefx speed event_var(attacker);es es_xif (server_var(wcs_tmp) = 4) then est_setplayercolor event_var(userid) 255 255 255 server_var(wcs_invis) 1"
    "skill3_cmd"        "es_xsetinfo wcs_tmp 0;es es_xkeygetvalue wcs_tmp WCSuserdata event_var(userid) chameleon;es es_xtoken wcs_tmp server_var(wcs_tmp) 3 |;es es_xif (server_var(wcs_tmp) != 0) then es_xif (server_var(wcs_dice) <= 33) then racealias_cham_vi"
    "skill3_sfx"        "0"

    "skill4_setting"    "es_xsetinfo wcs_magnitude 80;es_xsetinfo wcs_radius 120;es_xsetinfo wcs_hp 5;es_xsetinfo wcs_cash 400|es_xsetinfo wcs_magnitude 85;es_xsetinfo wcs_radius 140;es_xsetinfo wcs_hp 8;es_xsetinfo wcs_cash 500|es_xsetinfo wcs_magnitude 88;es_xsetinfo wcs_radius 160;es_xsetinfo wcs_hp 11;es_xsetinfo wcs_cash 600|es_xsetinfo wcs_magnitude 90;es_xsetinfo wcs_radius 180;es_xsetinfo wcs_hp 13;es_xsetinfo wcs_cash 700|es_xsetinfo wcs_magnitude 92;es_xsetinfo wcs_radius 195;es_xsetinfo wcs_hp 15;es_xsetinfo wcs_cash 800"
    "racealias_cham_de" "es es_xif (server_var(wcs_tmp) = 1) then es_xdoblock wcs/WCSultimates/wcs_ulti_suicide;es es_xif (server_var(wcs_tmp) = 2) then es_xkeygetvalue wcs_tmp2 WCSuserdata event_var(userid) vengeance;es es_xif (server_var(wcs_tmp) = 2) then es_xif (server_var(wcs_tmp2) = 1) then es_xkeysetvalue WCSuserdata event_var(userid) vengeance 0;es es_xif (server_var(wcs_tmp) = 2) then es es_xif (server_var(wcs_tmp2) = 1) then es_xdelayed 4 est_spawn event_var(userid);es es_xgetplayerteam wcs_team event_var(userid);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;racealias_cham_de2"
    "racealias_cham_de2" "es es_xif (server_var(wcs_tmp) = 3) then est_health server_var(wcs_team) + server_var(wcs_hp);es es_xif (server_var(wcs_tmp) = 3) then wcs_getlanguage wcs_lng wcs_lng_r_chamteam;es es_xif (server_var(wcs_tmp) = 3) then est_msg server_var(wcs_team) server_var(wcs_lng);es es_xif (server_var(wcs_tmp) = 5) then est_cash event_var(userid) + server_var(wcs_cash)"
    "skill4_cmd"        "es_xsetinfo wcs_tmp 0;es es_xkeygetvalue wcs_tmp WCSuserdata event_var(userid) chameleon;es es_xtoken wcs_tmp server_var(wcs_tmp) 4 |;es es_xif (server_var(wcs_tmp) != 0) then es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then racealias_cham_de;wcs_getlanguage wcs_lng wcs_lng_r_chamnodeath;es es_xif (server_var(wcs_dice) > server_var(wcs_chance)) then es_xtell event_var(userid) #multi server_var(wcs_lng)"
    "skill4_sfx"        "0"
    
    "skill5_setting"    "es_xsetinfo wcs_range 600;es_xsetinfo wcs_fadetimer 1;es_xsetinfo wcs_maxtargets 2;es_xsetinfo wcs_radius 400;es_xsetinfo wcs_freezetime 3;es_xsetinfo wcs_hp 20|es_xsetinfo wcs_range 650;es_xsetinfo wcs_fadetimer 0.9;es_xsetinfo wcs_maxtargets 2;es_xsetinfo wcs_radius 450;es_xsetinfo wcs_freezetime 3.5;es_xsetinfo wcs_hp 25|es_xsetinfo wcs_range 700;es_xsetinfo wcs_fadetimer 0.8;es_xsetinfo wcs_maxtargets 3;es_xsetinfo wcs_radius 500;es_xsetinfo wcs_freezetime 3.8 ;es_xsetinfo wcs_hp 28|es_xsetinfo wcs_range 720;es_xsetinfo wcs_fadetimer 0.7;es_xsetinfo wcs_maxtargets 3;es_xsetinfo wcs_radius 520;es_xsetinfo wcs_freezetime 4;es_xsetinfo wcs_hp 30|es_xsetinfo wcs_range 740;es_xsetinfo wcs_fadetimer 0.6;es_xsetinfo wcs_maxtargets 4;es_xsetinfo wcs_radius 540;es_xsetinfo wcs_freezetime 4.2;es_xsetinfo wcs_hp 35"
    "racealias_cham_ul" "es es_xif (server_var(wcs_tmp) = 1) then es_xdoblock wcs/WCSultimates/wcs_ulti_roots;es es_xif (server_var(wcs_tmp) = 2) then es_xdoblock wcs/WCSultimates/wcs_ulti_chain;es es_xif (server_var(wcs_tmp) = 3) then es_xdoblock wcs/WCSultimates/wcs_ulti_teleport;es es_xif (server_var(wcs_tmp) = 4) then est_health server_var(wcs_userid) + server_var(wcs_hp);es_xsetinfo wcs_jetpack 0;es es_xif (server_var(wcs_tmp) = 5) then es_xkeygetvalue wcs_jetpack WCSuserdata server_var(wcs_userid) jetpack;es es_xif (server_var(wcs_tmp) = 5) then es_xif (server_var(wcs_jetpack) = 0) then racealias_cham_l0;es es_xif (server_var(wcs_tmp) = 5) then es_xif (server_var(wcs_jetpack) = 1) then racealias_cham_l1"
    "racealias_cham_l0" "es est_Jetpack server_var(wcs_userid) 1;es es_xkeysetvalue WCSuserdata server_var(wcs_userid) jetpack 1"
    "racealias_cham_l1" "es est_Jetpack server_var(wcs_userid) 0;es es_xkeysetvalue WCSuserdata server_var(wcs_userid) jetpack 0"
    "skill5_cmd"        "es_xsetinfo wcs_tmp 0;es es_xkeygetvalue wcs_tmp WCSuserdata server_var(wcs_userid) chameleon;es es_xtoken wcs_tmp server_var(wcs_tmp) 5 |;es es_xif (server_var(wcs_tmp) != 0) then es_xif (server_var(wcs_dice) <= 80) then racealias_cham_ul;wcs_getlanguage wcs_lng wcs_lng_r_chamnoultimate;es es_xif (server_var(wcs_dice) > 80) then es_xtell server_var(wcs_userid) #multi server_var(wcs_lng);es es_xif (server_var(wcs_dice) > 80) then es_xsetinfo wcs_ultinotexec 1"
    "skill5_sfx"        "0"
    "ultimate_cooldown" "15"
  }
