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-07-14 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
July 14, 2009, 07:33:51 AM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Hall of Fame
Must Visit it
Google  
  Home   Forum   Help Search Login Register   *
Pages: 1 [2]   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: Race - Action man :)  (Read 858 times)
[Oddity]TeacherCreature
Co-Administrator
Level 7 Master
*****
Offline Offline

United States United States

Posts: 1359



WWW
bonggged

myServer 63.209.33.64:27015
(Warning: click connects through Steam)
« Reply #15 on: January 21, 2009, 05:21:03 PM »

I did not look at skill 2 or 3, but I did redo skill 1 real quick..
Look at it and test it because I didn't run it through any syntax checks or anything.
2 major things I noticed.
   1.Without saving your variables you can NOT use a delay with a racealias..
   2.When you do keysetvalue wcs_tmp savedhealth  later on when u do if then statement you have to use the wcs_tmp variable. (you will understand when you look what I changed)


Code:
"201"
  {
    "name"              "Action Man (finished)"
    "author"            "[H.F.M.]Rasmus{Chef}"
    "shortdescription"  "An Action man look a like race :)"
    "required_level"    "0"
    "maximum_level"     "0"
    "allow_only"        "<admins>"
    "teamlimit"         "2"
    "restrict_shop"     "0"
    "preloadcmd"        "es_xset wcs_savehealth 0;es_xset maxrandedhp 0"
    "player_spawn_cmd"  "es_xkeysetvalue WCSuserdata event_var(userid) wcs_savehealth 0;es_xrand wcs_rand 99 199;es es_xkeysetvalue WCSuserdata event_var(userid) maxrandedhp server_var(wcs_rand);es est_sethealth event_var(userid) 175;es_centertell event_var(userid) Action man is strong :)"
    "round_start_cmd"   "0"
    "round_end_cmd"     "0"
    "numberofskills"    "3"
    "numberoflevels"    "5"
    "skillnames"        "Power of plastic|Muscle power|Eternal arsenal"
    "skilldescr"        "Nothing hurts, but you will just dissolve at some point|Action man packs a deadly punch|Action man can use every weapon after practicing"
    "skillcfg"          "player_victim|player_attacker|player_ultimate"
   
    "skill1_setting" "0"
    "skill1_cmd"     "es_xsetinfo wcs_dmg event_var(dmg_health);es_xsetinfo wcs_tmp 0;es es_xkeygetvalue wcs_tmp WCSuserdata event_var(userid) maxrandedhp;if (server_var(wcs_dmg) >= server_var(wcs_tmp)) then es_xdoblock wcs/WCSultimates/wcs_ulti_disintegrate;if (server_var(wcs_dmg) < server_var(wcs_tmp)) then racealias_ActDO;;racealias_ACTH"
    "racealias_ActDO" "es_xsetinfo wcs_tmp2 0;es_keygetvalue wcs_tmp2 WCSuserdata event_var(userid) wcs_savehealth;es es_xdelayed 0.2 es_math wcs_tmp2 + server_var(wcs_dmg);es_delayed 0.3 es_keysetvalue WCSuserdata event_var(userid) wcs_savehealth server_var(wcs_tmp2);if (server_var(wcs_tmp2) >= server_var(wcs_tmp)) then es_delayed 0.5 es_xdoblock wcs/WCSultimates/wcs_ulti_disintegrate;if (server_var(wcs_tmp2) < server_var(wcs_tmp)) then es_delayed 0.8 es est_sethealth event_var(userid) 175"
    "racealias_ACTH" "es_tell event_var(userid) #multi #lightgreenYou didn't feel #greenanything#lightgreen, but #greenbeware#lightgreen, you will die at some point"
    "skill1_sfx"     "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);racealias_sfx1"
    "racealias_sfx1" "es es_xmath server_var(wcs_z1) + 5;es est_effect 8 #a 0 effects/ar2ground2.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 10 25 5 4 6 2 2 255 255 255 175 10 0;racealias_sfx2;racealias_sfx3"
    "racealias_sfx2" "es es_xdelayed 0.5 es_xmath server_var(wcs_z1) + 10;es es_xdelayed 0.5 est_effect 8 #a 0 effects/ar2ground2.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 10 25 5 4 6 2 2 255 255 255 175 10 0"
    "racealias_sfx3" "es es_xdelayed 1 es_xmath server_var(wcs_z1) + 15;es es_xdelayed 1 est_effect 8 #a 0 effects/ar2ground2.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 10 25 5 4 6 2 2 255 255 255 175 10 0"
   
    "skill2_setting" "es_xset wcs_multiplier 0.125|es_xset wcs_multiplier 0.25|es_xset wcs_multiplier 0.375|es_xset wcs_multiplier 0.5|es_xset wcs_multiplier 0.625"
    "skill2_cmd" "if (event_var(weapon) in server_var(wcs_wpn_knives)) then racealias_acTMan"
    "racealias_acTMan" "es_xset wcs_dmg event_var(dmg_health);es_xmath wcs_dmg float;es_xmath wcs_dmg * server_var(multiplier);es est_rounddecimal wcs_dmg server_var(wcs_dmg) 0;es wcs_dealdamage event_var(attacker) event_var(userid) server_var(wcs_dmg);racealias_AcTell1"
    "racealias_AcTell1" "wcs_getlanguage wcs_lng wcs_lng_r_action;es_format wcs_lng server_var(wcs_lng) server_var(wcs_dmg);es es_xtell event_var(attacker) #multi server_var(wcs_lng);racealias_AcTell2"
    "racealias_AcTell2" "wcs_getlanguage wcs_lng wcs_lng_r_knifedmg2;es_format wcs_lng server_var(wcs_lng) server_var(wcs_dmg) event_var(es_username);es es_xtell event_var(userid) #multi server_var(wcs_lng)"
    "skill2_sfx" "if (event_var(weapon) in server_var(wcs_wpn_knives)) then es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1;if (event_var(weapon) in server_var(wcs_wpn_knives)) then est_effect 23 #a 0 effects/ar2_altfire1.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 2 20 10"
   
    "skill3_setting" "0"
    "skill3_cmd" "es es_xdoblock wcs/WCSultimates/pgmenu"
    "skill3_sfx" "0"
    "ultimate_cooldown" "60"
  }
« Last Edit: January 21, 2009, 05:22:44 PM by [Oddity]TeacherCreature » Logged

WCA | Rasmus [DK]
wcs coder (part of new wcs dev team)
WCS Supporter
Level 7 Master
*****
Offline Offline

Denmark Denmark

Posts: 1494




Rasmus4J
rasmus4j

myServer 85.190.17.115:27015
(Warning: click connects through Steam)
« Reply #16 on: January 21, 2009, 07:44:34 PM »

hmm, dont see that big changes, and some small errors,

why do you do es_xsetinfo wcs_tmp 0 ? wcs_tmp does already exist, and why do you use es_xsetinfo instead of es_xset?
Logged

where would you put the comma in the following telegram from a wife, to her husband in the navy?
"Not getting any better hurry home!"
Namolem
Level 6 Experienced
******
Offline Offline

Russian Federation

Posts: 203




Namolem
« Reply #17 on: January 22, 2009, 12:59:53 AM »

And why so many "es" ?
Logged
[Oddity]TeacherCreature
Co-Administrator
Level 7 Master
*****
Offline Offline

United States United States

Posts: 1359



WWW
bonggged

myServer 63.209.33.64:27015
(Warning: click connects through Steam)
« Reply #18 on: January 22, 2009, 01:37:59 AM »

I used small changes but important ones.
I use es when it is needed fro expansion purposes.
I set wcs to 0 becasue I wasn't sure if it existed. I do not use tmp on my server and have removed it so it doesnt exist..
Logged

keepa
Level 1 Trained Beginner
*
Offline Offline

Australia Australia

Posts: 23



« Reply #19 on: January 26, 2009, 11:26:11 AM »

ive added this race to my private server and to test it out and with the 1st skill you just die eventually but you dont disintergrate like you should
Logged
WCA | Rasmus [DK]
wcs coder (part of new wcs dev team)
WCS Supporter
Level 7 Master
*****
Offline Offline

Denmark Denmark

Posts: 1494




Rasmus4J
rasmus4j

myServer 85.190.17.115:27015
(Warning: click connects through Steam)
« Reply #20 on: January 27, 2009, 12:14:41 PM »

ive added this race to my private server and to test it out and with the 1st skill you just die eventually but you dont disintergrate like you should

i know, im still testing and trying to find the mistake
Logged

where would you put the comma in the following telegram from a wife, to her husband in the navy?
"Not getting any better hurry home!"
HOLLIDAY
<Race Maker>
Moderator
Level 7 Master
*****
Offline Offline

Posts: 2172



WWW
Wc3_HOLLIDAY_Wc3
wc3hollidaywc3

myServer 8.2.0.222:27015
(Warning: click connects through Steam)
« Reply #21 on: January 29, 2009, 07:26:46 AM »

wcs_rand will save for the entire round,
as long as nothing els uses wcs_rand for the entire round

creating unique var names is also a good idea,

es_xset unique_var 0
Logged


Namolem
Level 6 Experienced
******
Offline Offline

Russian Federation

Posts: 203




Namolem
« Reply #22 on: January 29, 2009, 11:09:58 AM »

Code:
Variables were not expand!!! es_xkeysetvalue WCSuserdata event_var(userid) wcs_savehealth 0
(line: 12)

Variables were not expand!!! es_xsetinfo wcs_dmg event_var(dmg_health)
(line: 22)

Unnecesary expands (1). es es_xdelayed 0.2 es_math wcs_tmp2 + server_var(wcs_dmg)
Unnecesary expands (1). if (server_var(wcs_tmp2) >= server_var(wcs_tmp)) then es_delayed 0.5 es_xdoblock wcs/WCSultimates/wcs_ulti_disintegrate
Unnecesary expands (2). if (server_var(wcs_tmp2) < server_var(wcs_tmp)) then es_delayed 0.8 es est_sethealth event_var(userid) 175
(line: 23)

Variables were not expand!!! es_xset wcs_dmg event_var(dmg_health)
Variables were not expand!!! es_xmath wcs_dmg * server_var(multiplier)
(line: 32)

Unnecesary expands (1). if (event_var(weapon) in server_var(wcs_wpn_knives)) then es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1
(line: 35)

Unnecesary expands (1). es es_xdoblock wcs/WCSultimates/pgmenu
(line: 38)
Logged
WCA | Rasmus [DK]
wcs coder (part of new wcs dev team)
WCS Supporter
Level 7 Master
*****
Offline Offline

Denmark Denmark

Posts: 1494




Rasmus4J
rasmus4j

myServer 85.190.17.115:27015
(Warning: click connects through Steam)
« Reply #23 on: January 29, 2009, 06:50:56 PM »

(click to show/hide)

i will do some code optimizing this weekend as a result of the post i've quoted.
Logged

where would you put the comma in the following telegram from a wife, to her husband in the navy?
"Not getting any better hurry home!"
WCA | Rasmus [DK]
wcs coder (part of new wcs dev team)
WCS Supporter
Level 7 Master
*****
Offline Offline

Denmark Denmark

Posts: 1494




Rasmus4J
rasmus4j

myServer 85.190.17.115:27015
(Warning: click connects through Steam)
« Reply #24 on: January 29, 2009, 10:36:08 PM »

i've already done some, hope it will be enough, but read the update (EDIT) for the full info.

Kind regards
Rasmus
Logged

where would you put the comma in the following telegram from a wife, to her husband in the navy?
"Not getting any better hurry home!"
Namolem
Level 6 Experienced
******
Offline Offline

Russian Federation

Posts: 203




Namolem
« Reply #25 on: January 30, 2009, 12:22:37 AM »

Only crytical errors:
Code:
Variables were not expand!!! es_xkeysetvalue WCSuserdata event_var(userid) wcs_savehealth 0
(line: 12)

Variables were not expand!!! es_xsetinfo wcs_dmg event_var(dmg_health)
(line: 22)

Variables were not expand!!! es_xset wcs_dmg event_var(dmg_health)
Variables were not expand!!! es_xmath wcs_dmg * server_var(multiplier)
(line: 32)

Optimize errors (nothing except speed):
Code:
"es_command" is better than "es es_xcommand" es es_xkeysetvalue WCSuserdata event_var(userid) maxrandedhp server_var(wcs_rand)
(line: 12)

"es_command" is better than "es es_xcommand" es es_xkeygetvalue wcs_tmp WCSuserdata event_var(userid) maxrandedhp
(line: 22)

"es_command" is better than "es es_xcommand" es es_xdelayed 0.2 es_math wcs_tmp2 + server_var(wcs_dmg)
Unnecesary expands (1). if (server_var(wcs_tmp2) >= server_var(wcs_tmp)) then es_delayed 0.5 es_xdoblock wcs/WCSultimates/wcs_ulti_disintegrate
Unnecesary expands (2). if (server_var(wcs_tmp2) < server_var(wcs_tmp)) then es_delayed 0.8 es est_sethealth event_var(userid) 175
(line: 23)

"es_command" is better than "es es_xcommand" es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid)
(line: 25)

"es_command" is better than "es es_xcommand" es es_xmath server_var(wcs_z1) + 5
(line: 26)

"es_command" is better than "es es_xcommand" es es_xdelayed 0.5 es_xmath server_var(wcs_z1) + 10
"es_command" is better than "es es_xcommand" es es_xdelayed 0.5 est_effect 8 #a 0 effects/ar2ground2.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 10 25 5 4 6 2 2 255 255 255 175 10 0
(line: 27)

"es_command" is better than "es es_xcommand" es es_xdelayed 1 es_xmath server_var(wcs_z1) + 15
"es_command" is better than "es es_xcommand" es es_xdelayed 1 est_effect 8 #a 0 effects/ar2ground2.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 10 25 5 4 6 2 2 255 255 255 175 10 0
(line: 28)

(line: 32)

"es_command" is better than "es es_xcommand" es es_xtell event_var(attacker) #multi server_var(wcs_lng)
(line: 33)

"es_command" is better than "es es_xcommand" es es_xtell event_var(userid) #multi server_var(wcs_lng)
(line: 34)

"es_command" is better than "es es_xcommand" if (event_var(weapon) in server_var(wcs_wpn_knives)) then es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1
(line: 35)

"es_command" is better than "es es_xcommand" es es_xdoblock wcs/WCSultimates/pgmenu
(line: 38)
Logged
Pages: 1 [2]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 03:34:59 AM
what you mean.
are you adding it to your C&P race ?
Today at 02:05:00 AM
i cant get the [Oddity] Ninja race's first skill to work. the one where you go faster,slower,faster,slower.
someone help me? Smiley
Today at 01:55:13 AM
And i dont wanna test on my own server.
thats not fun.
Cheesy
July 13, 2009, 10:42:55 PM
I wanna Test My race but cant add you.
add me.
nichosv
July 13, 2009, 10:05:49 PM
let me know if u guys want ur race tested on a server and you dont have one and ill put it up 8.6.76.177:27015
thts my server ip just let me know or add me on steam $$$$NJO$$$$ Dashi
July 13, 2009, 09:36:34 AM
and good mornin
July 12, 2009, 01:05:12 PM
Bye Bye
Recent
[Today at 05:50:38 AM]

[Today at 03:36:18 AM]

[Today at 12:37:38 AM]

[Today at 12:28:05 AM]

[July 13, 2009, 11:53:20 PM]

[July 13, 2009, 11:51:56 PM]

[July 13, 2009, 11:19:28 PM]

[July 13, 2009, 10:52:14 PM]

by maze
[July 13, 2009, 10:04:15 PM]

[July 13, 2009, 08:07:39 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.225 seconds with 27 queries.