February 17, 2020, 03:40:36 PM

Author Topic: Need help with debugging of custom race code  (Read 2040 times)

Offline Raynos

  • Level 7 Expert
  • *****
  • Posts: 158
Need help with debugging of custom race code
« on: November 29, 2008, 08:41:25 PM »
Hey guys im completely new to this.

Ive made a race from various its of copy/paste and editing

Here it is:

Code: [Select]
    "skillnames"        "Long jump|+health|Regen|Ward|Evade|Banish|Invisibility|teleport"
 

    "skill3_setting"    "es_xsetinfo wcs_hp 20;es_xsetinfo wcs_time 4;es_xsetinfo wcs_waves 100;es_xsetinfo wcs_radius 500|es_xsetinfo wcs_hp 30;es_xsetinfo wcs_time 4;es_xsetinfo wcs_waves 100;es_xsetinfo wcs_radius 500|es_xsetinfo wcs_hp 30;es_xsetinfo wcs_time 2;es_xsetinfo wcs_waves 100;es_xsetinfo wcs_radius 500|es_xsetinfo wcs_hp 10;es_xsetinfo wcs_time 0.3;es_xsetinfo wcs_waves 2000;es_xsetinfo wcs_radius 1000"
    "skill3_cmd"        "es es_xkeysetvalue WCSuserdata event_var(userid) regeneration 1;es es_xkeysetvalue WCSuserdata event_var(userid) regen_round server_var(wcs_roundcounter);es wcs_regeneration event_var(userid) server_var(wcs_hp) server_var(wcs_time) 300 server_var(wcs_waves) server_var(wcs_radius)"
    "skill3_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es_xmath wcs_z1 + 20;es est_Effect 10 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 20 200 1 20 100 1 0 40 255 200 10;es est_Effect 10 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 20 300 1 20 100 1 0 40 255 200 10"
   
  This heal doesnt work at all :\ might be because i set the timer to 0.3

 
    "skill6_setting"    "es_xsetinfo wcs_chance 21|es_xsetinfo wcs_chance 25|es_xsetinfo wcs_chance 27|es_xsetinfo wcs_chance 70"
    "racealias_ne3"     "es es_xsetinfo wcs_dmg event_var(dmg_health);es es_xif (server_var(wcs_game) != server_var(wcs_game_css)) then es_xrand wcs_dmg 1 20;es est_Health event_var(userid) + event_var(dmg_health);wcs_getlanguage wcs_lng wcs_lng_r_evade;es es_xtell event_var(userid) #multi server_var(wcs_lng)"
    "skill6_cmd"        "es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then est_isalive wcs_alive event_var(userid);es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xif (server_var(wcs_alive) = 1) then racealias_ne3"
    "skill6_sfx"        "es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(userid);es es_xif (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xif (server_var(wcs_alive) = 1) then est_effect 3 #a 0 sprites/yellowflare.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 5 5 255 255 255 255"

    "skill7_setting"    "|es_xsetinfo wcs_time 1.8|es_xsetinfo wcs_time 2.2|es_xsetinfo wcs_time 2.6|es_xsetinfo wcs_time 3.0"
    "racealias_bm2"     "es est_drug event_var(userid) server_var(wcs_time);wcs_getlanguage wcs_lng wcs_lng_r_banished;es es_xformat wcs_lng server_var(wcs_lng) event_var(es_attackername) event_var(es_username) server_var(wcs_time);es es_xtell event_var(userid) #multi server_var(wcs_lng);es es_xtell event_var(attacker) #multi server_var(wcs_lng)"
    "skill7_cmd"        "es es_xif (server_var(wcs_dice) <= 80) then racealias_bm2"
    "skill7_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(userid);es es_xmath wcs_z1 + 40;es es_xmath wcs_z2 + 40;es es_xif (server_var(wcs_dice) <= 30) 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 20 0 50 255 255 150;es es_xmath wcs_z1 + 40;es es_xmath wcs_z2 + 40;es es_xif (server_var(wcs_dice) <= 30) 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 0 20 0 255 255 150"
   
    "skill8_setting"    "es_xsetinfo wcs_invis 100;es_xsetinfo wcs_alpha 90|es_xsetinfo wcs_invis 85;es_xsetinfo wcs_alpha 100|es_xsetinfo wcs_invis 70;es_xsetinfo wcs_alpha 110|es_xsetinfo wcs_invis 25;es_xsetinfo wcs_alpha 120"
    "skill8_cmd"        "es est_setplayercolor event_var(userid) 255 255 255 server_var(wcs_invis) 1;es es_xtell event_var(userid) : Invisibility set."
    "skill8_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es_xmath wcs_z1 + 20;es est_effect 10 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1)server_var(wcs_z1) 30 60 2 10 0 0 0 255 50 128 10"

    "skill9_setting"    "es_xsetinfo wcs_range 940;es_xsetinfo wcs_fadetimer 4|es_xsetinfo wcs_range 1020;es_xsetinfo wcs_fadetimer 3|es_xsetinfo wcs_range 1100;es_xsetinfo wcs_fadetimer 2|es_xsetinfo wcs_range 1180;es_xsetinfo wcs_fadetimer 0"
    "skill9_cmd"        "es_xdoblock wcs/wcs_ulti_teleport" hp
    "skill9_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es est_effect 7 #a 0 sprites/smoke.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 40 1"
    "ultimate_cooldown" "0.01"

[edit]

removed the working skills

above we have a evade and a banish that dont proc enough. and we have a teleport and invisibility that dont work at all.

The problem with the teleport is that the command refers to something that is problably not in the server

seeing as i ripped all the code i cant imagine whats wrong with it.

Any help at all would be great.

Thanks for pointing out the 5th skill on the ward one :)

Ray
« Last Edit: November 29, 2008, 10:46:36 PM by Raynos »

Offline Maxxi

  • Level 7 Expert
  • *****
  • Posts: 1485
Re: Need help with debugging of custom race code
« Reply #1 on: November 29, 2008, 08:48:31 PM »
Code: [Select]
"skill5_setting"    "es_xsetinfo wcs_count 1;es_xsetinfo wcs_params 10_12_200|es_xsetinfo wcs_count 1;es_xsetinfo wcs_params 12_14_220|es_xsetinfo wcs_count 2;es_xsetinfo wcs_params 14_16_240|es_xsetinfo wcs_count 2;es_xsetinfo wcs_params 14_18_260|es_xsetinfo wcs_count 4;es_xsetinfo wcs_params 60_30_280"
you wanted 4 levels but you have 5 settings thats why you wont get 4 wards

Offline Maxxi

  • Level 7 Expert
  • *****
  • Posts: 1485
Re: Need help with debugging of custom race code
« Reply #2 on: November 29, 2008, 09:38:37 PM »
please post everything in code, or we can't read  :P

can't that be in the rules or something there so many posts without code tags :P

Offline Berettonawak

  • French
  • Level 7 Expert
  • *****
  • Posts: 3147
  • Country: 00
  • Big Berettonawak is watching you...
    • Coding-Alliance.Com : A bunch of coders? Why not a bunch of players? :P
Re: Need help with debugging of custom race code
« Reply #3 on: November 29, 2008, 09:39:46 PM »
well, you can't force people to post in code, but i won't read anything which doesn't use bcc tag code :P
Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice :D
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed

Offline Raynos

  • Level 7 Expert
  • *****
  • Posts: 158
Re: Need help with debugging of custom race code
« Reply #4 on: November 29, 2008, 09:40:10 PM »
how do code tags work?

/codeon a /codeoff

/code a /code

Offline Maxxi

  • Level 7 Expert
  • *****
  • Posts: 1485
Re: Need help with debugging of custom race code
« Reply #5 on: November 29, 2008, 10:16:18 PM »
Code: [Select]


your code



Offline Berettonawak

  • French
  • Level 7 Expert
  • *****
  • Posts: 3147
  • Country: 00
  • Big Berettonawak is watching you...
    • Coding-Alliance.Com : A bunch of coders? Why not a bunch of players? :P
Re: Need help with debugging of custom race code
« Reply #6 on: November 29, 2008, 10:39:58 PM »
use this icon :

or [ code ] your code [ /code ] (without the spaces :p)
Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice :D
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed

Offline ItchiTriggaFinga

  • Level 0 Beginner
  • Posts: 4
Re: Need help with debugging of custom race code
« Reply #7 on: December 01, 2008, 03:32:56 AM »
first off from what i can see, u have set 8 skills out in the skill list at the top but teleport (your last skill) is skill 9 so that wont work, you have an extra skill in there, i'm assuming it's skill 7, which is why the invis and teleport dont work because you havn't setup the player_spawn/player_ultimate for those skills.

Offline Berettonawak

  • French
  • Level 7 Expert
  • *****
  • Posts: 3147
  • Country: 00
  • Big Berettonawak is watching you...
    • Coding-Alliance.Com : A bunch of coders? Why not a bunch of players? :P
Re: Need help with debugging of custom race code
« Reply #8 on: December 01, 2008, 10:47:09 AM »
Code: [Select]
    "skill7_setting"    "|es_xsetinfo wcs_time 1.8|es_xsetinfo wcs_time 2.2|es_xsetinfo wcs_time 2.6|es_xsetinfo wcs_time 3.0"

    "skill9_setting"    "es_xsetinfo wcs_range 940;es_xsetinfo wcs_fadetimer 4|es_xsetinfo wcs_range 1020;es_xsetinfo wcs_fadetimer 3|es_xsetinfo wcs_range 1100;es_xsetinfo wcs_fadetimer 2|es_xsetinfo wcs_range 1180;es_xsetinfo wcs_fadetimer 0"
    "skill9_cmd"        "es_xdoblock wcs/wcs_ulti_teleport" hp
    "skill9_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es est_effect 7 #a 0 sprites/smoke.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 40 1"
    "ultimate_cooldown" "0.01"
[/quote]
Skill7_settings, extra |
Skill9_cmd, hp shouldn't be there
Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice :D
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed

Offline Raynos

  • Level 7 Expert
  • *****
  • Posts: 158
Re: Need help with debugging of custom race code
« Reply #9 on: December 03, 2008, 12:14:37 AM »
Thanks for all the help, trying to get it reuploaded to a server then ill test it some more and probably come back for more help :)

Also anyway to run a wcs server and play it on one pc? i tried messing with sdk but got nowhere

Offline Raynos

  • Level 7 Expert
  • *****
  • Posts: 158
Re: Need help with debugging of custom race code
« Reply #10 on: December 03, 2008, 08:40:52 PM »
Hey

Ive muddled around with the race a bit and fixed a couple of things

The basic parts:

Code: [Select]

"player_spawn_cmd"  "es est_setplayercolor event_var(userid) 255 000 000"
    "round_start_cmd"   "0"
    "round_end_cmd"     "0"
    "numberofskills"    "9"
    "numberoflevels"    "4"
    "skillnames"        "Long jump|+health|Regen|Badaboom!|Ward|Evade|Banish|Invisibility+speedw|teleport"
    "skilldescr"        "Tranverse vast distances|Start of tougher|Need to kill me fast|Boom!|Plant landmines|Block attacks with awesomeness|Distrupt your foes vision|fade into the background|fly around the map"
    "skillcfg"          "player_spawn|player_spawn|player_spawn|player_victim|player_spawn|player_victim|player_attacker|player_spawn|player_ultimate"


As for the skills that still dont work

Code: [Select]


    "skill6_setting"    "es_xrand wcs_rand 1 30|es_xrand wcs_rand 1 20|es_xrand wcs_rand 1 19|es_xrand wcs_rand 1 18"
    "racealias_oo1"     "es es_xsetinfo wcs_dmg event_var(dmg_health);es es_xif (server_var(wcs_game) != server_var(wcs_game_css)) then es_xrand wcs_dmg 1 20;es est_GetHealth wcs_health event_var(userid);es es_xmath wcs_health + server_var(wcs_dmg);es est_SetHealth event_var(userid) server_var(wcs_health);es es_xtell event_var(userid) : You shield yourself from injury, using the Force."
    "skill6_cmd"        "es es_xif (server_var(wcs_rand) <= 10) then est_isalive wcs_alive event_var(userid);es es_xif (server_var(wcs_rand) <= 10) then es_xif (server_var(wcs_alive) = 1) then racealias_oo1"
    "skill6_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(userid);es es_xif (server_var(wcs_rand) <= 10) then est_effect 3 #a 0 sprites/greenshaft1.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 5 5 255 255 255 255"

    "skill7_setting"    "es_xsetinfo wcs_time 1.2|es_xsetinfo wcs_time 1.5|es_xsetinfo wcs_time 1.8|es_xsetinfo wcs_time 5.0"
    "racealias_tal3"    "es est_drug event_var(userid) server_var(wcs_time);es es_xtell event_var(userid) #green Your vision has been disrupted by the;es es_xtell event_var(attacker) #green Force"
    "skill7_cmd"        "es es_xif (server_var(wcs_dice) <= 50) then racealias_tal3"
    "skill7_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(userid);es es_xmath wcs_z1 + 40;es es_xmath wcs_z2 + 40;es es_xif (server_var(wcs_dice) <= 30) 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 20 0 50 255 255 150;es es_xmath wcs_z1 + 40;es es_xmath wcs_z2 + 40;es es_xif (server_var(wcs_dice) <= 30) 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 0 20 0 255 255 150"

    "skill8_setting"    "es_xsetinfo wcs_invis 100|es_xsetinfo wcs_invis 75|es_xsetinfo wcs_invis 50|es_xsetinfo wcs_invis 25;es_xsetinfo wcs_speed 2.00;es_xsetinfo wcs_alpha 90"
    "skill8_cmd"        "es est_setplayercolor event_var(userid) 0 0 0 25; es es_xkeygetvalue wcs_tmp WCSuserdata event_var(userid) speed;es es_xif (server_var(wcs_tmp) > server_var(wcs_speed)) then es_xsetinfo wcs_speed server_var(wcs_tmp);es es_xkeysetvalue WCSuserdata event_var(userid) speed server_var(wcs_speed);es est_Speed event_var(userid) server_var(wcs_speed);es es_xtell event_var(userid) : Unholy Aura activated."
    "skill8_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es est_effect 10 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 20 50 1 30 100 0.8 255 100 100 255 1"

    "skill9_setting"    "es_xsetinfo wcs_range 1000;es_xsetinfo wcs_fadetimer 0|es_xsetinfo wcs_range 1500;es_xsetinfo wcs_fadetimer 0|es_xsetinfo wcs_range 1750;es_xsetinfo wcs_fadetimer 0|es_xsetinfo wcs_range 2000;es_xsetinfo wcs_fadetimer 0"
    "skill9_cmd"        "es_xdoblock wcs/WCSultimates/wcs_ulti_teleport"
    "skill9_sfx"        "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 server_var(wcs_userid);es est_effect 10 #a 0 sprites/lgtning.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 20 500 3 100 100 0 255 55 0 255 10"
    }


The banish and evade dont work at all

the invisibility i believe should work but i havn't tested it atm

and the teleport is as broke as ever -_-

Any help would be much appreciated