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-10-01 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
October 01, 2009, 04:33:21 PM *
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]   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: An explanation on es_, est_ and wcs_ commands, variables and stuff...  (Read 1337 times)
Phat_Wizard
<WCS coder>
Level 7 Expert
*****
Offline Offline

Canada Canada

Posts: 229




Phat_Wizard
phatwizard
« on: January 16, 2008, 10:48:56 PM »

First off, the main reason for this post is because of an request...

Now to start, most of all the "wcs_" stuff is just variables. The main reason for this is so that other Event Scripts scripts  don't conflict with WCS, so that when you store data in a variable another script won't overwrite your data that is stored within the variable.

Commands can sometimes be difficult to use, and also you may think something is a command and it really is not... With WCS comes a bunch of commands which are all documented within the various *.txt files(I will list them all as of WCS v0.77). Also all if not most of the ES commands are very well documented on their wiki, which can be found here. And the commands here. Now the same goes for EST, but one major difference between EST and ES is that EST is not documented as well as ES, there is some documentation here, and some documented commands here.

A quick little explanation of the "es" before commands! For most commands you will use in your races and what not you will need a "es" in-front  of the command so that the server knows to expand event_var's and server_var's. What that means is if you put an "es" in-front of any command, if you set a variable or it is and event variable inside of the event the server will replace the event_var or the server_var with its value. Also note that all "es_" commands automatically expand these variables, but any "es_x" commands do not! as well as any "wcs_" and "est_" commands will not expand any variables. A little trick that most advanced scripter's would use to speed up their scripts was to use "es_x" commands and add a "es" before it to get a "es es_x" which was just a tad faster.

Now for the list off all the "wcs_" console commands and their syntax!
  • wcs_addonreload <NAME>
  • wcs_givecredits <userid> <amount> <reason> <forced>
  • wcs_menuzero <userid>
  • wcs_flash <userid> <targetid>
  • wcs_showcredits <userid>
  • wcs_removefx <userid> <effectype>
  • wcs_setfx <userid> <effectype> [<time>]
  • wcs_giveitem <userid> <item>
  • wcs_explode <userid> <targetid> <magnitude> <radius>
  • wcs_dealdamage <userid> <targetid> <magnitude> <radius>
  • wcs_saveplayer <userid> <full>
  • wcs_getplayer <userid> <full>
  • wcs_checkevents <userid> <type>
  • wcs_showinfohandle <type>
  • wcs_notice <userid> <text>
  • wcs_debuglog <text>
  • wcs_restrict_purge <userid>
  • wcs_restrict <userid> restrict <weapon>
  • wcs_restrict <userid> allow <weapon> <give> <knife>
  • wcs_restrict <userid> addallow <weapon>
  • wcs_restrict <userid> knife
  • wcs_restrict <userid> knifeonly
  • wcs_givexp <userid> <amount> <reason> <forced>
  • wcs_givelevel <userid> <amount> <reason> <forced>
  • wcs_showxp <userid>
  • wcs_deathhandle <userid> <attackerid> <weapon> <headshot>
  • wcs_getlanguage <var> <id>
  • wcs_race_menu <userid>
  • wcs_showraceinfo <userid>
  • wcs_shopmenu <userid>
  • wcs_giveshopitem <userid> <itemid>
  • wcs_showshopinfo <userid>
  • wcs_deathhandle_items <userid>
  • wcs_showtop10 <userid>
  • wcs_checktop10 <userid>
  • wcs_cleartop10
  • wcs_mole_activate <userid>
  • wcs_regeneration <userid> <amount> <time> <maxHP> <maxHeal> <radius>
  • wcs_warden  <userid> <duration> <damage> <radius> <target team> <team target name> <x> <y> <z> <round>
  • wcs_spendskills <userid>
  • wcs_showplayerinfo <userid>
  • wcs_showskills <userid>
  • wcs_resetskills <userid>
Yes I do know that there are other commands but they are not really useful for scripting...

NOTE: To find the SYNTAX of a command all you must do is type it in the server console and it should tell you its SYNTAX!!! And if the command does in fact NOT exist it will tell you the command is unknown!!!
Logged

 
Rasmus
Trapped in between
Level 7 Expert
*****
Offline Offline

Denmark Denmark

Posts: 1475




Rasmus4J
rasmus4j
« Reply #1 on: January 19, 2009, 10:39:15 PM »

is it possible to take xp from a player by doing wcs_givexp userid -(number) 0 1  ?
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 7 Expert
*****
Offline Offline

Russian Federation

Posts: 203




Namolem
« Reply #2 on: January 19, 2009, 10:44:51 PM »

no
if (server_var(wcs_amount) >= 0) do {.....}
es_xelse do
{
...
es_xmath wcs_amount * -1
...
}
Logged
Namolem
Level 7 Expert
*****
Offline Offline

Russian Federation

Posts: 203




Namolem
« Reply #3 on: January 19, 2009, 10:54:56 PM »

wcs_amount - is how much XP you wish to add
if it is less than 0, then is multiplies it on -1
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 11:43:28 AM
xD
Today at 02:51:27 AM
lol tenxo did you get that from tmu site...
September 30, 2009, 11:52:11 PM
lol @ the link
September 30, 2009, 09:58:44 PM
cool eh?
September 30, 2009, 09:21:33 PM
September 30, 2009, 07:55:53 PM
None
September 30, 2009, 05:15:29 PM
I been working since I got out of high school, and I genuinely prefer to work. xD
Recent
[Today at 04:32:38 PM]

[Today at 03:45:33 PM]

[Today at 01:33:56 PM]

[Today at 01:32:32 PM]

[Today at 12:26:37 PM]

[Today at 12:26:02 PM]

[Today at 12:23:15 PM]

[Today at 12:21:57 PM]

[Today at 06:56:38 AM]

[Today at 01:34:12 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.085 seconds with 23 queries.