September 24, 2018, 04:43:03 AM

Author Topic: Custom Commands  (Read 1468 times)

Offline Kami

  • Developer
  • Level 7 Expert
  • *****
  • Posts: 886
  • Country: de
  • Pokemon Master!
Custom Commands
« on: February 10, 2018, 10:24:00 AM »
I thought about giving the community the opportunity to ask for certain commands or present ideas for custom commands to be made and then release an addon on GitHub containing the custom commands.

I think this should follow a certain layout though:


Code: [Select]
#Example for custom command presentation
Command name: wcs_custom_command
Command syntax: <userid> <amount> <duration>
Command purpose: Serve as an example for the custom command layout

If you like this idea feel free to give me your ideas for custom commands.

Offline WCS - Wookie

  • Level 6 Experienced
  • *****
  • Posts: 123
  • Country: nz
  • Qualified Teacher, working in IT and loving WCS.
Re: Custom Commands
« Reply #1 on: February 17, 2018, 01:42:36 AM »
Code: [Select]
Command name: wcs_noflash
Command syntax: <userid>
Command purpose: There used to be a command that prevented flashbangs and blinding effects in our previous WCS version. The way it worked was first it blocked any flashbang effects, but also upon taking damage it would change the overlay of your screen to 0, meaning you had no overlays, and could not be blinded by other versions of blinds that apply overlays.

I use Naiken's RTD plugin at the moment and one of the rewards is antiflash shades. This is the code he uses for that, idk if it could be helpful going forward trying to implement it but hopefully it will be :)

Code: [Select]
event player_blind
{
es_keygetvalue wcs_tmp WCSuserdata event_var(userid) noflash
if (server_var(wcs_tmp) = 1) do
{
    es_xmath wcs_flashcounter + 1
    es_format wcs_flashid "%1%2|" server_var(wcs_flashid) event_var(userid)
    es_setplayerprop event_var(userid) CCSPlayer.m_flFlashDuration 1
    es_setplayerprop event_var(userid) CCSPlayer.m_flFlashMaxAlpha 1
}
}
If you like WCS and are from AUS/NZ drop by our server to take a look.


Offline WCS - Wookie

  • Level 6 Experienced
  • *****
  • Posts: 123
  • Country: nz
  • Qualified Teacher, working in IT and loving WCS.
Re: Custom Commands
« Reply #2 on: February 17, 2018, 11:07:17 AM »
Code: [Select]
Command name: wcs_healingward
Command syntax: <userid>
Command purpose: To deploy a ward that targets teammates and gives them a regeneration event while within the radius of the ward, similar to how the regeneration even works currently.

Code: [Select]
Command name: wcs_spawndead
Command syntax:
Command purpose: To actively respawn all dead teammates once per round.

Code: [Select]
Command name: wcs_aoe
Command syntax: <userid> <radius>
Command purpose: To do damage to enemies nearby the target when they receive damage. E.g. When you shoot an enemy there is a chance that you will also deal 10 splash damage to nearby enemies within a certain radius.

Code: [Select]
Command name: wcs_norecoil
Command syntax: <userid> <duration>
Command purpose: To get rid of recoil on a weapon for the duration of the ability.

Code: [Select]
Command name: wcs_static
Command syntax: <userid>
Command purpose: To track player movement and store the value for use in dealing extra damage. E.g. player runs for 10 seconds = 20 bonus damage on next shot that hits.
If you like WCS and are from AUS/NZ drop by our server to take a look.


Offline Manifest

  • Race & effect creator
  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 1045
  • Country: dk
  • Content creator for the new WCS version by Kami.
Re: Custom Commands
« Reply #3 on: March 03, 2018, 08:31:12 PM »
Hi Kami!

I removed my previous post to update this one to be a bit more relevant as I've also added a few other commands that are indeed very useful.


Code: [Select]
Command name: wcs_setresist
Command syntax: <userid> <value> <weapon>
Command purpose: wcs_setresist event_var(userid) 0.0 weapon_hegrenade
Command description: Allows a player to become resistant to a certain weapon by a percentage of damage. Shown above is an example of 100% resistance to hegrenades for the specified userid.


Code: [Select]
Command name: wcs_absorb
Command syntax: <userid> <1/0> <0/1>
Command purpose: wcs_absorb event_var(userid) 1 0.2
Command description: This command causes the specified userid to have a percentage of all damage taken reduced. Above is an example of absorbation being enabled, and absorbing 20% of all damage taken.


Code: [Select]
Command name: wcs_noflash
Command syntax: <userid>
Command purpose: wcs_noflash event_var(userid)
Command description: Renders the specified userid immune to all flashbang and blinding effects such as fade messages and screen overlays, lasts till the player dies.


Code: [Select]
Command name: wcs_setfx falldamage
Command syntax: <userid> <= + -> <value> <duration>
Command purpose: wcs_setfx falldamage event_var(userid) = 0.50 0
Command description: The specified userid takes less or more damage from falling during the duration. In the example given the player will be taking 50% less damage from falling.


Code: [Select]
Command name: wcs_getcolors
Command syntax: <userid> <red> <green> <blue> <alpha>
Command purpose: wcs_getcolors event_var(userid) wcs_tmp1 wcs_tmp2 wcs_tmp3 wcs_invis
Command description: Makes it possible to retrieve the color values of a userid and store them to use them later on. In the example shown we are retrieving the red, green, blue and transparency color values and saving them in the variables: wcs_tmp1, wcs_tmp2, wcs_tmp3 and wcs_invis respectively.


Code: [Select]
Command name: wcs_setfx ulti_immunity
Command syntax: <userid> <= + -> <value> <duration>
Command purpose: wcs_setfx ulti_immunity event_var(userid) = 1 0
Command description: This will cause the userid to be immune to all ultimates that have the immunity check implemented. The immunity duration is set to 0 which means the immunity is permanent, in other words till it is changed or the target dies.


Code: [Select]
Command name: wcs_anticc
Command syntax: <userid> <value on/off> <type>
Command purpose: es wcs_anticc event_var(userid) 1 1
Command description: This causes the specified userid to become immune to three different types of crowd control. The type parameter allows you to specify which type of CC it shall be immune to. 1 means immunity to slows. 2 means immunity to freezes. Whilst 3 means immunity to stuns.


Code: [Select]
Command name: wcs_nervegas
Command syntax: <userid> <damage per tick>
Command purpose: es wcs_nervegas event_var(userid) 5
Command description: Turns the userid's smoke emitted from their smoke grenades into poisonous smoke. Enemies who stands in the smoke will in the example given, take 5 damage each second they remain within the poisonous smoke. The smoke also turns green.


Code: [Select]
Command name: wcs_aura
Command syntax: <userid of the aura owner> <team for the aura to affect> <radius> <time between ticks> <"command to be executed on every tick">
Command purpose: event_var(userid) server_var(wcs_targetid) 200 0.5 "es_wcsdealdamage server_var(wcs_targetid) event_var(userid) 5"
Command description: Grants the userid an aura that will affect every player in the targetid filter who are within a 200 game unit range. The aura affects the targets every 0.5 seconds and deals 5 damage to the affected targets.



In addition to the commands above, I suggest the conversion of the wcs_toybox addon.
I know that the Russian community used the features of the toybox a lot, fixing this might cause us to see more Russian members to use this version of the modification. :-)
« Last Edit: March 07, 2018, 03:18:26 PM by Manifest »
"BRAVORA: Bruh it is fucking operation crystal night when you are approving races."


Offline Kami

  • Developer
  • Level 7 Expert
  • *****
  • Posts: 886
  • Country: de
  • Pokemon Master!
Re: Custom Commands
« Reply #4 on: June 16, 2018, 12:16:53 AM »
Added:

- wcs_noflash <userid> <0/1>
- wcs_overlay <userid> <overlay> <duration>
- wcs_absorb <userid> <amount>
- wcs_setresist <userid> <value> <weapon>
- wcs_getcolors <userid> <r> <g> <b> <a>

- Healing ward ability:

  Player_spawn skill:
Code: [Select]
    [[skill1]]
        setting = "es_xset wcs_count 1;es_xset wcs_params 10_12_200|es_xset wcs_count 1;es_xset wcs_params 12_14_220|es_xset wcs_count 2;es_xset wcs_params 14_16_240|es_xset wcs_count 2;es_xset wcs_params 14_18_260|es_xset wcs_count 3;es_xset wcs_params 14_20_280"
        cmd     = "es wcsgroup set ability event_var(userid) healingwarden;es wcsgroup set ability_count event_var(userid) server_var(wcs_count);es wcsgroup set ability_parameter event_var(userid) server_var(wcs_params);es wcsgroup set ability_cooldown event_var(userid) 3"
        sfx     = ""

This is an example and you should use different values, as this will heal 20 health every second which will add up really fast.

« Last Edit: July 03, 2018, 07:07:14 PM by Kami »

Offline WCS - Wookie

  • Level 6 Experienced
  • *****
  • Posts: 123
  • Country: nz
  • Qualified Teacher, working in IT and loving WCS.
Re: Custom Commands
« Reply #5 on: June 17, 2018, 01:46:36 PM »
Cool! I know this has been a requested feature for many years, at least in the communities I have been a part of. I should hopefully be able to start working on my server again this week so I will be sure to let you know how I get on and any issues I have :)
If you like WCS and are from AUS/NZ drop by our server to take a look.


Offline Kami

  • Developer
  • Level 7 Expert
  • *****
  • Posts: 886
  • Country: de
  • Pokemon Master!
Re: Custom Commands
« Reply #6 on: June 17, 2018, 02:21:53 PM »
Added:

- wcs_trap ability

Player_spawn skill:

Code: [Select]
    [[skill1]]
        setting = "es_xset wcs_count 1;es_xset wcs_params 10_12_200|es_xset wcs_count 1;es_xset wcs_params 12_14_220|es_xset wcs_count 2;es_xset wcs_params 14_16_240|es_xset wcs_count 2;es_xset wcs_params 14_18_260|es_xset wcs_count 3;es_xset wcs_params 14_20_280"
        cmd     = "es wcsgroup set ability event_var(userid) trap;es wcsgroup set ability_count event_var(userid) server_var(wcs_count);es wcsgroup set ability_parameter event_var(userid) server_var(wcs_params);es wcsgroup set ability_cooldown event_var(userid) 3"
        sfx     = ""


This skill will create a ward like circle with a small flare in the middle. If an enemy player enters the circle the trap will go off and explode and dissapear afterwards.
« Last Edit: July 03, 2018, 07:06:59 PM by Kami »

Offline Manifest

  • Race & effect creator
  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 1045
  • Country: dk
  • Content creator for the new WCS version by Kami.
Re: Custom Commands
« Reply #7 on: June 17, 2018, 06:24:03 PM »
Added:

- wcs_noflash <userid> <0/1>
- wcs_overlay <userid> <overlay> <duration>
- wcs_absorb <userid> <amount>
- wcs_setresist <userid> <value> <weapon>
- wcs_getcolors <userid> <r> <g> <b> <a>

This is looking very promising :-)
I have just a few questions:

1. wcs_overlay
If no overlay duration is specified will it then assume it's permanent like the setfx commands, or will the command simply not work?

2. wcs_absorb
The amount value, is that defined in percentages or as a static amount say 10 damage or is it in percentages of the damage taken?


Also really like that we finally have an actual healing ward :-)
"BRAVORA: Bruh it is fucking operation crystal night when you are approving races."


Offline Manifest

  • Race & effect creator
  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 1045
  • Country: dk
  • Content creator for the new WCS version by Kami.
Re: Custom Commands
« Reply #8 on: July 03, 2018, 06:20:13 PM »
- Healing ward ability:

  Player_spawn skill:
Code: [Select]
    [[skill1]]
        setting = "es_xset wcs_count 1;es_xset wcs_params 10_12_200|es_xset wcs_count 1;es_xset wcs_params 12_14_220|es_xset wcs_count 2;es_xset wcs_params 14_16_240|es_xset wcs_count 2;es_xset wcs_params 14_18_260|es_xset wcs_count 3;es_xset wcs_params 14_20_280"
        cmd     = "es wcsgroup set ability event_var(userid) healingwarden;es wcsgroup set ability_countevent_var(userid) server_var(wcs_count);es wcsgroup set ability_parameter event_var(userid) server_var(wcs_params);es wcsgroup set ability_cooldown event_var(userid) 3"
        sfx     = ""

I assume this hasn't been tested at least not the exact same code?
The reason why I am asking is because the following line which pressumably should break the skill causing the ability count to be unable to function:

es wcsgroup set ability_countevent_var(userid) server_var(wcs_count)

I am however looking forward to using this skill in a race.
"BRAVORA: Bruh it is fucking operation crystal night when you are approving races."


Offline Kami

  • Developer
  • Level 7 Expert
  • *****
  • Posts: 886
  • Country: de
  • Pokemon Master!
Re: Custom Commands
« Reply #9 on: July 03, 2018, 07:07:23 PM »
Fixed, thanks.

Offline rossobenoit

  • Level 0 Beginner
  • Posts: 13
  • <3 WCS :)
Re: Custom Commands
« Reply #10 on: September 04, 2018, 11:27:23 PM »

Offline Kami

  • Developer
  • Level 7 Expert
  • *****
  • Posts: 886
  • Country: de
  • Pokemon Master!
Re: Custom Commands
« Reply #11 on: September 05, 2018, 04:34:43 PM »
This command should still work with CS:S and propably with CS:GO too. Due to the reason that I'm not too familiar with trace rays in Source Python this command is not one that I planned to remake with Source Python.

Offline Hojjke

  • Level 4 Intermediate
  • ****
  • Posts: 91
  • Country: ru
  • I <3 WCS :)
Re: Custom Commands
« Reply #12 on: September 05, 2018, 07:32:19 PM »
This command should still work with CS:S and propably with CS:GO too. Due to the reason that I'm not too familiar with trace rays in Source Python this command is not one that I planned to remake with Source Python.

Greetings Kami, could you provide an example of using your wcs_teleport, please?

cause I've tryed things like
Code: [Select]
[[skill4]]
setting        = ""
        cmd = "es playerget viewcoord server_var(wcs_userid) wcs_x1 wcs_y1 wcs_z1;es wcs_teleport server_var(wcs_userid) server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1)"
        sfx = ""
        cooldown = "0"
and it didn't work out :/

Offline rossobenoit

  • Level 0 Beginner
  • Posts: 13
  • <3 WCS :)
Re: Custom Commands
« Reply #13 on: September 06, 2018, 10:05:52 AM »
I do not understand how to use that can you showed us how to use the teleport    :'( :'( :'( :'(

Offline Kami

  • Developer
  • Level 7 Expert
  • *****
  • Posts: 886
  • Country: de
  • Pokemon Master!
Re: Custom Commands
« Reply #14 on: September 06, 2018, 07:00:17 PM »
I did a test with a skill and it did not work. I also did a test with using the command via console and it did so I guess that for some reason Source Pythons way of executing commands does not like SM commands that much. I might have found some info on how to remake this command in SP though. I will keep you updated!