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-09-25 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
September 25, 2009, 11:50:09 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: WCS Tournament being opened for applications!

Post here for signups!
Google  
  Home   Forum   Help Search Login Register   *
Poll
Question: How good is this guide?
AWSOME 5/5 46 (52.3%)
Pretty good 4/5 24 (27.3%)
so-so 3/5 10 (11.4%)
not very helpful 2/5 4 (4.5%)
dont bother 1/5 4 (4.5%)
Total Voters: 87

Pages: [1] 2   Go Down
  Print  
Current Topic Rating: ***** You have not rated this topic. Select a rating:
Author Topic: How to Self Code skills!!!!!! By: zero  (Read 4080 times)
Zero Skillz
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 525




Zero Skillz (<-[SD]->madcow)
madcow767
« on: March 10, 2008, 02:47:10 AM »

Ok, here we go this could take a while so i'll be processing this in chunks at a time

Step 1, Come up with an idea... We'll say we want to make something that swaps your ammo with your enemy unless your ammo is higher.

Step 2, Ok so first, we need to identify, how we want the skill to level up? chance, amount of ammo syphon, or w/e.. We'll do Chance atm. i will redo the following guide for the amount of syphon which will be more advanced.

Step 3, Since we decided the chance we need to know how many levels.. Lets say 4 atm.

Step 4, We need to set the skill1_setting...
looks like this
Code
GeSHi (eventscripts):
"skill1_setting" "es_xset wcs_chance 60|es_xset wcs_chance 40|es_xset wcs_chance 20|es_xset wcs_chance 10"
basically whats going on here is this.
1) We say es_xset, this sets a variable for when the skill runs, its saved as server_var(wcs_chance)
2) wcs_chance is the variable that we have decided, and this is now saved as 20 or w/e the skill is
3) this basically is a fancy way of saying 30, 40 ,50 or what ever... but it makes it so you can modify each level.
**EDIT**
ok there seems to be some confusion about this. The reason its going down will make sence later, i will point it out in a later step

Step 5, Ok, Now to the fun part, the CMD... Should look like this
Code
GeSHi (eventscripts):
"skill1_cmd" "if (server_var(wcs_chance) <= server_var(dice)) then racealias_ammosteal"
Ok lets walk through this step by step
if = If something, just a statment saying if something is true then do this.
server_var(wcs_chance) = The variable we set earlier.
server_var(dice) = this is a random variable that the server will do, its between 1 and 100.
<= = Less than or equal to, it simply means if your skill chance is less that what ever wcs_dice makes it will activate the then statement.
then = what tells it to activate what ever is after it, if the if statment is true.
racealias_ammosteal = the name of the Racealias were using i will explain in the next step.
**EDIT**
ok further up about that confusion, if you look here, i said <= which means if its less than or equal to, so if i set chance to 60, and dice comes up as 50, it wont activate, but if i set to 10 and it rolls a 50 it will, i am making the chance go down but it makes it happen more often, i am sorry this has confused some of you. if you have any more questions send me a PM

Step 6, The racealias, is something that you use to prevent haveing to repeat if (server_var(wcs_chance) <= server_var(dice)) then racealias_ammosteal.. its basically just a way to orignize skills... Ok so now this is the heart of the coding the part that makes it do what were doing. Now since this is an attacker skill... We are event_var(attacker) and the victim is event_var(userid) just not to get confused we are attacker they are userid
Now to the alias:
Ok so what we want to do is swap our ammo amounts right, How ever only if the person's ammo is higher than ours. And only when we attack them.
So first things fist.. We need to get the victim's ammo. We do this like this...
Code
GeSHi (eventscripts):
es est_getammo wcs_tmp event_var(userid) 1
This basically tells it to retrive how much ammo someone has in their clip
Next we need to see how much ammo we have Same thing but just for us
Code
GeSHi (eventscripts):
es est_getammo wcs_tmp2 event_var(attacker) 1
Note how wcs_tmp and wcs_tmp2 are different, cause we need two variables so we can compare them
Now we need to compare them to make sure our ammo isnt higher than theirs.
Code
GeSHi (eventscripts):
if (server_var(wcs_tmp) >= server_var(wcs_tmp2)) then racealias_ammosteal2
Note here instead of repeating the If statement we can just make a new alias and it will do the same thing for us just without us repeating.. How ever we need to make it do something if we have more ammo than they do
Code
GeSHi (eventscripts):
if (server_var(wcs_tmp) < server_var(wcs_tmp2)) then racealias_fail1
This is basically saying if their ammo is less than ours then do a different race alias.
heres it all together
Code
GeSHi (eventscripts):
"racealias_ammosteal" "es est_getammo wcs_tmp event_var(userid) 1;es est_getammo wcs_tmp2 event_var(attacker) 1;if (server_var(wcs_tmp) >= server_var(wcs_tmp2)) then racealias_ammosteal2;if (server_var(wcs_tmp) < server_var(wcs_tmp2)) then racealias_fail1"
Note that for each section you need a  ;
**EDIT**
again clearing up some confusion, wcs_tmp, is a temporary variable that you can use to set certain things to in the middle of a skill, all its doing is saving a number. Not inportant, but remember it as a way to store a variable!!

Step 7, And so now we must finish up by making the two racealiases, this will make the one that will activate if we do swap ammo's
Code
GeSHi (eventscripts):
"racealias_ammosteal2" "es est_setammo event_var(userid) 1 server_var(wcs_tmp2);es est_setammo event_var(attacker) 1 server_var(wcs_tmp);es_xtell server_var(wcs_userid) #Lightgreen Swaped Ammo."
Now since we have already gotten the ammo of each play and stored as wcs_tmp = victim and wcs_tmp2 = attacker (us) then we simply need to set the ammo to the opposite person to swap them. Just for neatness i included the tell command (not needed)

Step 8, This is the code for when it fails =(
"racealias_fail1" "es_xtell server_var(wcs_userid) #Lightgreen You have more ammo then your target!"

Step 9, Paste it all together
player_attacker
4levels

Code
GeSHi (eventscripts):
"skill1_setting" "es_xset wcs_chance 60|es_xset wcs_chance 40|es_xset wcs_chance 20|es_xset wcs_chance 10"
"skill1_cmd" "if (server_var(wcs_chance) <= server_var(dice)) then racealias_ammosteal"
"racealias_ammosteal" "es est_getammo wcs_tmp event_var(userid) 1;es est_getammo wcs_tmp2 event_var(attacker) 1;if (server_var(wcs_tmp) >= server_var(wcs_tmp2)) then racealias_ammosteal2;if (server_var(wcs_tmp) < server_var(wcs_tmp2)) then racealias_fail1"
"racealias_ammosteal2" "es est_setammo event_var(userid) 1 server_var(wcs_tmp2);es est_setammo event_var(attacker) 1 server_var(wcs_tmp);es_xtell server_var(wcs_userid) #Lightgreen Swaped Ammo."
"racealias_fail1" "es_xtell server_var(wcs_userid) #Lightgreen You have more ammo then your target!"
"skill1_sfx" "0"
 
For the SFX see the Comming soon HOW to make and SFX
And the How to put together skills into a race post!!
Step 10, Make a few more skills, paste together and make a race WOOT!! Note i said make the skills , not take the skills XD

When your done Run your skill/race through here
RACE CHECKER
ENJOY Cheesy

-zero
« Last Edit: March 28, 2008, 01:47:46 AM by Zero Skillz » Logged

 
Uperie
Level 2 Apprentice
**
Offline Offline

Denmark Denmark

Posts: 40




SnIpErFaCe or Uperie
« Reply #1 on: March 11, 2008, 02:35:46 PM »

can't you make a note with all The codes names and so on? realy hard to remember all that stuff ^^ but im trying Smiley
Logged
n0Life
Part-time Admin
Watchdogs
Level 7 Expert
*****
Offline Offline

Finland

Posts: 751


Bunny has NoRecoil/Speedhack/WH/Aimbot/BUNNYHOP!


WWW
4ngry4ngel

myServer 85.190.14.35:27015
(Warning: click connects through Steam)
« Reply #2 on: March 11, 2008, 08:32:24 PM »

can't you make a note with all The codes names and so on? realy hard to remember all that stuff ^^ but im trying Smiley

http://www.warcraft-source.com/board/index.php?topic=370.0

http://www.warcraft-source.com/board/index.php?topic=2779.0
Logged

Quote
yay! found a way how to enlarge this!
not meaning my penis
meaning the the script window

Uperie
Level 2 Apprentice
**
Offline Offline

Denmark Denmark

Posts: 40




SnIpErFaCe or Uperie
« Reply #3 on: March 12, 2008, 08:53:01 AM »

thank you Smiley
Logged
Zero Skillz
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 525




Zero Skillz (<-[SD]->madcow)
madcow767
« Reply #4 on: March 28, 2008, 01:49:45 AM »

ok... do people want me to make another guide for player_spawn and victim and such?
Logged

Venkman
Level 0 Beginner

Offline Offline

United States United States

Posts: 1




Venkman
« Reply #5 on: March 31, 2008, 05:03:05 AM »

Anything to help get us started would be great!

Thanks Zero
Logged
venom1992
Level 3 Trained Apprentice
***
Offline Offline

United Kingdom

Posts: 62




valentdrv
meanbean1992

myServer 85.234.155.73:27118
(Warning: click connects through Steam)
« Reply #6 on: May 18, 2008, 10:34:25 PM »

ya... prettyy good guide but whos going to bother reading it unless they really want to make some crazy race :DDD


nice one though,, you put time and effort explaining it for those who need.


Logged


dasok
Level 0 Beginner

Offline Offline

New Zealand New Zealand

Posts: 2



« Reply #7 on: May 21, 2008, 05:34:26 AM »

hey man thanks for this
hey i was wondering can you make a tuturial on how to make like extra damage and other effects like that cheers i wana no how to code because im getting aserver soon and i wana sell private races cheers your a big help
Logged
jere
Level 0 Beginner

Offline Offline

United States United States

Posts: 2



« Reply #8 on: May 26, 2008, 06:15:31 PM »

I tried adding this to my server just to learn how to code more, and it doesn't seem to activate at all.

Code
GeSHi (eventscripts):
 "20"
 {
   "name"              "Test Race"
   "author"            "zero skills"
   "required_level"    "0"
   "maximum_level"     "0"
   "allow_only"        "<STEAM_0:1:8461570>"
   "teamlimit"         "0"
   "preloadcmd"        "0"
   "player_spawn_cmd"  "0"
   "round_start_cmd"   "0"
   "round_end_cmd"     "0"
   "numberofskills"    "1"
   "numberoflevels"    "4"
   "skillnames"        "does nothing"
   "skilldescr"        "Does Nothing"
   "skillcfg"          "player_spawn"
 
"skill1_setting" "es_xset wcs_chance 60|es_xset wcs_chance 40|es_xset wcs_chance 20|es_xset wcs_chance 10"
"skill1_cmd" "if (server_var(wcs_chance) <= server_var(dice)) then racealias_ammosteal"
"racealias_ammosteal" "es est_getammo wcs_tmp event_var(userid) 1;es est_getammo wcs_tmp2 event_var(attacker) 1;if (server_var(wcs_tmp) >= server_var(wcs_tmp2)) then racealias_ammosteal2;if (server_var(wcs_tmp) < server_var(wcs_tmp2)) then racealias_fail1"
"racealias_ammosteal2" "es est_setammo event_var(userid) 1 server_var(wcs_tmp2);es est_setammo event_var(attacker) 1 server_var(wcs_tmp);es_xtell server_var(wcs_userid) #Lightgreen Swaped Ammo."
"racealias_fail1" "es_xtell server_var(wcs_userid) #Lightgreen You have more ammo then your target!"
"skill1_sfx" "0"
}

Problem is it just doesn't activate at all.  I'll admit I'm still just jumping into learning how to code.
Logged
mobsi
Level 7 Expert
*****
Offline Offline

Germany Germany

Posts: 208



« Reply #9 on: May 26, 2008, 06:18:53 PM »

what doesnt activat ?
the race ? the skill?
Logged

better the devil you know than the devil you don't
jere
Level 0 Beginner

Offline Offline

United States United States

Posts: 2



« Reply #10 on: May 26, 2008, 06:50:34 PM »

my bad; the skill doesn't activate.  I can select the race just fine, and put points into the skill
Logged
[Oddity]TeacherCreature
Moderator
Level 7 Expert
*****
Online Online

United States United States

Posts: 1340



WWW
bonggged

myServer 72.5.102.44:27015
(Warning: click connects through Steam)
« Reply #11 on: May 26, 2008, 07:12:08 PM »

add the different configs to the tutorial

player_spawn - This happens when you spawn you are event_var(userid)
player_attacker - This is when you shoot someone you are event_var(attacker); opponent = userid
player_victim This is when you get shot you are event_var(userid); opponent = attacker
player_death This is when you die you are event_var(userid)
player_say This si when you say something specific you are event_var(userid)
player_ultimate This is a key bound to ultimate  you are server_var(wcs_userid) [All ultimates must use this]
Logged

Serenkiy Vol4onok
Level 7 Expert
*****
Offline Offline

Russian Federation

Posts: 195


Never Surrender!!!



serenkiyvol4onok
« Reply #12 on: May 26, 2008, 07:49:30 PM »

Will this work? It should push your enemy into  air and than slap him down  :twisted:
Code:
"skill3_setting"    "es_xset wcs_gravity 1000"
    "racealias_sw41" "es est_Fade server_var(wcs_userid) 0 1 1 10 150 5 80;es est_getviewplayer server_var(wcs_userid) wcs_targetid;es_exists wcs_exists2 userid server_var(wcs_targetid);es est_isalive wcs_alive2 server_var(wcs_targetid);es_getplayerteam wcs_team1 server_var(wcs_userid);es_getplayerteam wcs_team2 server_var(wcs_targetid);racealias_sw42"
    "racealias_sw42" "if (server_var(wcs_exists2) = 1) then if (server_var(wcs_alive2) = 1) then if (server_var(wcs_team1) != server_var(wcs_team2)) then racealias_sw43"
    "racealias_sw43" "es_xset wcs_wall 1;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 racealias_sw44"
    "racealias_sw44" "es_xset wcs_immunity 0;es_keygetvalue wcs_immunity WCSuserdata server_var(wcs_targetid) ulti_immunity;if (server_var(wcs_immunity) = 0) then racealias_sw46;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)"
    "racealias_sw46" "es est_SetGravity event_var(wcs_targetid) .001;es_delayed 0.1 ma_slap;es_delayed 0.2 ma_slap event_var(wcs_targetid) ;es_delayed 2 es est_SetGravity server_var(wcs_targetid) server_var(wcs_gravity);es_xmath wcs_counter + 1;es est_speed server_var(wcs_targetid) 0.6;es_delayed 5 wcs_removefx speed server_var(wcs_targetid);racealias_sw47"
    "racealias_sw47" "es_setinfo wcs_nametarget 0;es est_getname wcs_nametarget server_var(wcs_targetid);es_setinfo wcs_nameuserid 0;es est_getname wcs_nameuserid server_var(wcs_userid);es_tell server_var(wcs_userid) #multi #Lightgreen : your enemy, server_var(wcs_nametarget) 's gravity has been #Green set to server_var(wcs_gravity) !! ;es_tell server_var(wcs_targetid) #multi #Lightgreen : your gravity #Green has been made server_var(wcs_gravity) by server_var(wcs_nameuserid) !! ;es_xset wcs_ultinotexec 0"
    "racealias_sw48" "if (server_var(wcs_ultinotexec) != 0) then es_xtell server_var(wcs_userid) #Lightgreen Ultimate failed theres no one where your pointing lol."
    "skill3_cmd" "es_xset wcs_exists2 0;es_xset wcs_hptarget 0;es_xset wcs_ultinotexec 1;es_xset wcs_targetid 0;es_xset wcs_alive1 0;es_xset wcs_team1 0;es_xset wcs_team2 0;es_xset wcs_alive2 0;es est_isalive wcs_alive1 server_var(wcs_userid);if (server_var(wcs_alive1) = 1) then racealias_sw41;racealias_sw48"
    "skill3_sfx"        "0"
    "ultimate_cooldown" "10"
Logged

  ~ Just a Nightfall God
  :twisted: :twisted: :twisted: :twisted: :twisted: :twisted::
  Steel a soul for a second chance
  But you'll never become a man
devil2dante
Level 0 Beginner

Offline Offline

United States United States

Posts: 1




uvswifty
« Reply #13 on: September 28, 2008, 03:47:51 AM »

wheres the other guides he promised Cheesy
Logged
Zero Skillz
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 525




Zero Skillz (<-[SD]->madcow)
madcow767
« Reply #14 on: October 25, 2008, 01:07:29 PM »

Ima resume soon, however i'm in the middle of a RL mess so ive only got around 1 hour a week to do stuff, so i'll get around to it when this is over.
Logged

Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 06:14:32 PM
I got Pink name and spammer rank on another forum Tongue
Today at 07:06:44 AM
is gameservers.com good place to host for server..i need to find one after i done with dedicated server
Today at 05:34:52 AM
yay just got desktop from mail....finaly get to be online in steam after week offf
September 24, 2009, 09:43:13 PM
haha, pink name = spammer Cheesy
September 24, 2009, 09:30:55 PM
can i have a pink name then? Cheesy
Recent
[Today at 11:14:25 PM]

[Today at 11:11:00 PM]

[Today at 11:00:25 PM]

[Today at 10:46:06 PM]

[Today at 10:44:35 PM]

[Today at 10:43:40 PM]

[Today at 10:39:31 PM]

[Today at 10:37:53 PM]

[Today at 10:25:31 PM]

[Today at 10:24:25 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.378 seconds with 26 queries.