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-16 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
September 16, 2009, 02:29:15 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Remember to check on the FAQ before start posting.
It may save you time and effort.
Google  
  Home   Forum   Help Search Login Register   *
Poll
Question: How good is this guide?
AWSOME 5/5 45 (51.7%)
Pretty good 4/5 24 (27.6%)
so-so 3/5 10 (11.5%)
not very helpful 2/5 4 (4.6%)
dont bother 1/5 4 (4.6%)
Total Voters: 86

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 4006 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

 
MikeHORROR
Level 0 Beginner

Offline Offline

Belgium Belgium

Posts: 18




Cptbullet
« Reply #16 on: December 06, 2008, 08:35:34 PM »

Yeah, I know this may be a n00b question but I don't really understand the RaceAlias part.
Could you explain me how to make a racealias for extra damage?

Thanks in regards
Logged
Maxxi
Level 7 Expert
*****
Offline Offline

Netherlands Netherlands

Posts: 1452



WWW
16maxpayne16

myServer 84.243.214.217:27015
(Warning: click connects through Steam)
« Reply #17 on: December 06, 2008, 09:15:56 PM »

Yeah, I know this may be a n00b question but I don't really understand the RaceAlias part.
Could you explain me how to make a racealias for extra damage?

Thanks in regards
racealias is just an ectra cmd line

you could say it's an extention
Logged

CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2559


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #18 on: December 07, 2008, 11:25:51 AM »

A racealias, is just like an alias. It's a kind of shortcut, which leads to another code. It allows you to make your code more readable, or write more than 1024 chars per skill Tongue
Logged

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 Cheesy
AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 361



doug_tiozao
« Reply #19 on: March 01, 2009, 08:26:50 PM »

DUDE AMAZING!
THIS HELPED ME ALOT
I LOVED IT
KEEP LIKE THIS!
CONGRATZ:
didixin
Logged

Smiley
Lukasz22
Level 1 Trained Beginner
*
Offline Offline

Sweden

Posts: 34



« Reply #20 on: April 09, 2009, 06:35:47 PM »

Guys i am in need Smiley
I dont really understand it so i need some kind of explanation :/
Could someone talk to me on msn or translate to swedish ?
It would help me a lot Smiley
Logged

Smiley
Inky
Guest
« Reply #21 on: April 13, 2009, 05:54:16 AM »

I loved it and it really helped. But there's still a few things unclear to me, the thing is I can't place them, but there's just this sort of 'what?' feeling.
Logged
M.R.
Level 5 Trained Intermediate
*****
Offline Offline

Denmark Denmark

Posts: 104




ansix

myServer 77.92.67.252:27016
(Warning: click connects through Steam)
« Reply #22 on: July 05, 2009, 09:25:17 AM »

Really, REALLY nice guide. It helped me alot to understand the coding in many skills TY alot,  Wink
Logged

dashi619
Level 0 Beginner

Offline Offline

United States United States

Posts: 12



« Reply #23 on: July 13, 2009, 04:17:16 AM »

ok so im kinda confused can anyone provide me with a list of things we can do? like ammosteal? how do we know the list of it?
Logged
Sanzennin
Level 0 Beginner

Offline Offline

Finland

Posts: 1



« Reply #24 on: July 16, 2009, 05:50:07 PM »

Im a total newbie my self, but I _guess here you could find something for starters.
http://www.eventscripts.com/pages/Category:Est_commands

And about the tutorial, few points if you dont mind?
Its a good tutorial, over the average, but could you cut the quite useless parts of it, and improve the more interesting ones? Like, I doubt there is really need for explaining what "if" is. Then again, I would like to know what on earth might server_var be? What does it do? Could we name our temporary variables with some other names than wcs_tmp? (I mean, wcs_vAmmo, wcs_aAmmo would be easier to remember and more logical as in victim/ attackerAmmo. Also, I'd love to drop the wcs_ coz thats not too informative in anyway... is that possible?)
Someone mentioned something about 1024 character limit, what is that?

Thanks anyways, good tut ^^
« Last Edit: July 16, 2009, 05:55:50 PM by Sanzennin » Logged
|ĄḈ|๖ۣۜPђѻȩnɨж
Level 3 Trained Apprentice
***
Offline Offline

Denmark Denmark

Posts: 63




Doffer999

myServer 212.187.209.57:27015
(Warning: click connects through Steam)
« Reply #25 on: August 12, 2009, 08:04:03 PM »

This little toturial have also helped me kinda much.
TY now i better understand the Racealias  Grin
Regards |AC|Phoenix
Logged
n0Life
Part-time Admin
Watchdogs
Level 7 Expert
*****
Online Online

Finland

Posts: 745


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


WWW
4ngry4ngel

myServer 85.190.14.35:27015
(Warning: click connects through Steam)
« Reply #26 on: August 12, 2009, 09:03:38 PM »

Im a total newbie my self, but I _guess here you could find something for starters.
http://www.eventscripts.com/pages/Category:Est_commands

And about the tutorial, few points if you dont mind?
Its a good tutorial, over the average, but could you cut the quite useless parts of it, and improve the more interesting ones? Like, I doubt there is really need for explaining what "if" is. Then again, I would like to know what on earth might server_var be? What does it do? Could we name our temporary variables with some other names than wcs_tmp? (I mean, wcs_vAmmo, wcs_aAmmo would be easier to remember and more logical as in victim/ attackerAmmo. Also, I'd love to drop the wcs_ coz thats not too informative in anyway... is that possible?)
Someone mentioned something about 1024 character limit, what is that?

Thanks anyways, good tut ^^

I'll answer in finnish: 1024 kirjainta per rivi on maximi.
Logged

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

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

Last 7 Shouts:
Today at 01:43:39 PM
anyone here have desktop that from cyber power
Today at 12:44:52 PM
i'll ignore him cuz he is wrong about website...he think i hack his website because i got unban myself...well you were wrong it was someone....and yes my computer is fucked up and now have to buy new one or repair motherboard for $230
Today at 10:50:00 AM
Starting again?
Today at 08:27:33 AM
Can someone reply to my
Catagorized Changerace System to reduce lag in the support section, i really need it.
Today at 04:43:43 AM
oh and i have no idea who it is, could be you, but no way for me to know I will let hetal deal with it.
Today at 04:42:15 AM
are you trying to start shit especially after telling you your mobo or your PSU was broken?  Not to mention, I SAID was you for the WEBSITE which it is, not for the stealing of races which was pietro.
Today at 04:33:24 AM
good thing you don't think it was me.. cuz everytime something has done for you. you always call on me that i did it.... i found out why my computet not working cuz of  post...mean motherboard not working so it cost 230$ to repair motherboard or 260$ to get new computer same set up as ur old one...
Recent
[Today at 02:01:36 PM]

[Today at 01:59:38 PM]

[Today at 01:09:24 PM]

[Today at 01:08:29 PM]

[Today at 10:51:05 AM]

[Today at 08:45:05 AM]

[Today at 08:37:03 AM]

[Today at 06:46:20 AM]

[Today at 06:04:42 AM]

[Today at 05:29:22 AM]
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.287 seconds with 25 queries.