May 26, 2019, 08:17:15 AM

Author Topic: [ADDON] WCS_TOYBOX (v0.12beta) *New Commands*  (Read 5694 times)

Offline Kamiqawa

  • Watchdog
  • Level 7 Expert
  • *****
  • Posts: 784
  • Country: fi
[ADDON] WCS_TOYBOX (v0.12beta) *New Commands*
« on: January 21, 2014, 08:44:39 PM »
WCS TOYBOX
By Kamiqawa


Introduction

Hello!

Finally decided to release this. It is an addon which includes 19 new commands to be used in WCS races and other content. I have had this addon for 2+ years now but couldn't have decided when it would be ready to be released. Anyways as I got many requests regarding to the similar commands I finally decided to put it up.

Unfortunately I don't have time to troughoutly test everything so I have to call this beta at this point. Everything should work fine but there may also be human errors as I have edited the code a lot so it would be ready to be released.

Please report any and all bugs you may find and I'll do my best to resolve them ASAP! I will update the version here on this post, so always before reporting a new bug, make sure you are running the latest version.

Credits

I originally started coding this addon since I found a similar addon made by our loved MiB. So big thanks to him for making the addon for some old WCS version in the first place. He coded several new commands back to then and now I recoded them and decided to include 9 of them in my pack. Proper credit is given as you can see from the source file ;)
I also want to thank everyone who has helped me during the code process of this addon, especially Kami, La Muerte and Tha Pwned. Also later on Eareland helped me with his opinions and testing of some of the commands. Also thanks to everyone ever played or worked with GameWave Warcraft server - the only server to run this addon so far.

Installation

Requirements: WCS mod.

Just download the zip file from the attachment, extract it so you get folder wcs_toybox with a file es_wcs_toybox.txt inside it. Put the folder in your server's cstrike/addons/eventscritps/. Now make sure everything is in it's place and you have file cstrike/addons/eventscritps/wcs_toybox/es_wcs_toybox.txt. Now add new line with es_load wcs_toybox to your server's cfg/autoexec.cfg and restart your server. Note that commands only function if the round is active.

About

Few pieces of information: the addon will not cause any stress to the server if none of the commands is used, so you can keep it loaded without worries.

About the optimization: the code is not fully optimized yet. All the commands are pretty well optimized and none of the "loops" actually use es_repeat or similar command - everything is done using a fine recursion method. Anyways there is still some variables that aren't used/could be removed to save a tiny tiny bit of RAM, but I'll do that in future as I fix possible errors.

What can you do with this pack? Well I'll be posting several new skills and/or races in the coming days to show you something that I at least have planned. So just wait for it..

List of new commands and brief explanations are available here and in the actual file. I know some of the tooltips aren't the most informative out there, but I'll make them better on the future versions too. Just ask if you don't fully get something - I admit it being pretty messy :P

Code: [Select]
/////////////////////////////////////////
////////////New Wcs Commands/////////////
/////////////////////////////////////////
/////////MiB's original commands/////////
///////////Recoded by Kamiqawa///////////
/////////////////////////////////////////
// wcs_beacon - gives player a beacon - wcs_beacon <userid> <0/1> (0 = off | 1 = on)
// wcs_timebomb - after X amount of seconds the player is slayed and players around in radius of X will get slayed - wcs_timebomb <userid> <delay> <radius>
// wcs_slap - slaps player with x amount of force and damage - wcs_slap <userid> [<damage>] [<slapforce>]
// wcs_slay - slays the player - wcs_slay <userid>
// wcs_flashing_invis - makes a player flash invis and uninvis - wcs_flashing_invis <userid> <0/1 > (0 = off | 1 = on)
// wcs_rainbow - makes a change colors every .1 second - wcs_rainbow <userid> <0/1> (0 = off | 1 = on)
// wcs_mirrordmg - lets you do mirror dmg with this simple command - wcs_mirrordmg <attacker> <target> <inputdmg> <divider> [<show default chat message (0 = no | 1 = yes)>]
// wcs_multiplierdmg - lets you easily do multiplier damager - wcs_multiplierdmg <attacker> <target> <inputdmg> <multiplier> [<show default chat message (0 = no | 1 = yes)>]
// wcs_leechhealth - lets you easily leech health - wcs_leechhealth <userid> <inputdmg> <divider> [<show default chat message (0 = no | 1 = yes)>]
/////////////////////////////////////////

/////////////////////////////////////////
///////////Additional commands///////////
///////////Coded by Kamiqawa/////////////
/////////////////////////////////////////
// wcs_togglewallhack - you see a picture of every enemy player through walls, no configuration possibilities - wcs_togglewallhack <userid> <0/1> (0 = off | 1 = on)
// wcs_wallhack - you see a picture of player through walls, many conifurable settings - wcs_wallhack <userid> <targetid,#a,#t,#ct,> <sprite/model> <sprite's size> <sprite's brightness> <wallhack duration>
// wcs_blackhole - creates a giantic blackhole that sucks enemies into it and makes damage to them - wcs_blackhole <userid> <x> <y> <z> <life> <suckradius> <hurtradius> <suckpower> <hurtdamage> <friendlyfire>
// wcs_screenoverlay - simple command for adding a texture as an overlay for player's screen - wcs_screenoverlay <userid> <sprite/file/path>
// wcs_aoe - lets you easily do area-of-effect skills, like burn every one in range of X from coords x,y,z - wcs_aoe <userid> <x> <y> <z> <radius> <targetteam> <fx (for example freeze, burn, etc..)> <identifer =, - or +> <amount> <duration>
// wcs_pusher - lets you easily do push skills, set the x,y,z coords where players are pushed to/from - wcs_pusher <target> <x> <y> <z> <duration> <radius> <power (positive = push to coords, negative = push away from coords)>
// wcs_balleffect - creates a moving ball effect which moves from start x,y,z to end x,y,z using est_effect 11 - wcs_balleffect <start-x> <start-y> <start-z> <end-x> <end-y> <end-z> <sprite> <life> <size> <brightness> <one step delay>
// wcs_regenhealth                  - lets you easily decrease or increase health over time                                             - wcs_regenhealth <userid> <totalamount> <seconds> [<attacker>]
// wcs_stun                         - you completely disable your enemy by freezing and stripping him for a duration                    - wcs_stun <userid> <duration>
// wcs_silence                      - similar to wcs_stun but without freeze; basically strips for a duration                           - wcs_silence <userid> <duration>
/////////////////////////////////////////

If you feel like I should add some additional commands, please feel free to comment here and suggest it!



Thank you.
- Kamiqawa
« Last Edit: February 03, 2014, 10:53:03 PM by Kamiqawa »
Want your own custom color for your forum username? No worries! La Muerte is here ready to fulfill your every rainbow-colored wish!

As a special offer of the day you can go talk with Tha Pwned first, and come ahead of the line!

I AM PINK!


Offline Kamiqawa

  • Watchdog
  • Level 7 Expert
  • *****
  • Posts: 784
  • Country: fi
Re: [ADDON] WCS_TOYBOX (v0.1beta) *new commands*
« Reply #1 on: January 21, 2014, 08:45:52 PM »
Changelog

Version 0.1beta
The addon was released. No known bugs.

Version 0.11beta
Fixed few errors I created while I changed some stuff for release.

Version 0.12beta
Fixed few debug messages left there. If you encounter random spam on the ingame chat, please update your version to 0.12b. Also added option for infinite wcs_wallhack. Use value 1337 for duration to make it last whole round.
Fixed also few other old variables with wcs_ prefix. NOTE: little bug found, executing any of these command in SPAWN (spawncmd, player_spawn) will not function properly since it happens BEFORE the round starts, and these command check if round is still on to execute. Workaround: add es_delayed 0.1 in front of these commands if used on spawn. Thanks to Eareland for testing and reporting.
« Last Edit: February 03, 2014, 10:54:35 PM by Kamiqawa »
Want your own custom color for your forum username? No worries! La Muerte is here ready to fulfill your every rainbow-colored wish!

As a special offer of the day you can go talk with Tha Pwned first, and come ahead of the line!

I AM PINK!


Offline Kamiqawa

  • Watchdog
  • Level 7 Expert
  • *****
  • Posts: 784
  • Country: fi
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #2 on: January 21, 2014, 08:48:37 PM »
Examples

Try using this as an ultimate on a race to test wcs_pusher command.
This block goes to wcs/tools/ultimates/default/default.txt and on a race's player_ultimate skill add command es_xdoblock wcs/tools/ultimates/default/wcs_ulti_pushtest.
It should make a laser pointer that pushes enemies away from it without letting them pass it.
Code: [Select]
block wcs_ulti_pushtest
{
es playerget viewcoord server_var(wcs_userid) wcs_x1 wcs_y1 wcs_z1
es playerget viewcoord server_var(wcs_userid) wcs_x2 wcs_y2 wcs_z2
es_xmath wcs_z2 + 300
es est_effect 3 #a 0 sprites/laser.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 15 2 2 255 5 5 155
es playerget viewcoord server_var(wcs_userid) wcs_x1 wcs_y1 wcs_z1
es_xmath wcs_z1 + 15
es est_effect 10 #a 0 sprites/laser.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 45 50 15 5 5 0 255 5 5 255 1
es wcs_pusher #all server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 15 50 -15
}
« Last Edit: January 21, 2014, 09:40:05 PM by Kamiqawa »
Want your own custom color for your forum username? No worries! La Muerte is here ready to fulfill your every rainbow-colored wish!

As a special offer of the day you can go talk with Tha Pwned first, and come ahead of the line!

I AM PINK!


Offline DoCNL

  • Level 7 Expert
  • *****
  • Posts: 341
  • Country: 00
  • http://5-starz.webs.com <-- AWESOME!
    • 5* website
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #3 on: January 21, 2014, 09:31:29 PM »
wcs_beacon +1, needed that :D
wcs_aoe      +1, needed that :D
all short versions of existing skills   +1, awesome!!

Love your work, i think this will be used a lot!

Offline Deathkilla

  • Level 7 Expert
  • *****
  • Posts: 899
  • Country: us
    • Elite-Gamers Community
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #4 on: January 21, 2014, 09:48:13 PM »
ooooh kill em
Visit Elite Gamers Today!
www.Elite-Gamers.org




Offline Eareland

  • Retarded retired
  • Level 7 Expert
  • *****
  • Posts: 712
  • Country: fi
  • Most honest is to be without a word of a lie
    • FSSM
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #5 on: January 21, 2014, 10:27:10 PM »
Kamiqawaaa I love u and your woooorks! That box is just so amazing. WH is amazing! wcs_balleffect is amazing! You boss here, man!

You don't maybe like this, but I still bring it forward:

wcs_balleffect <start-x> <start-y> <start-z> <end-x> <end-x> <end-x>

There is still typoss : D
« Last Edit: January 21, 2014, 10:29:27 PM by Eareland »


Offline Kamiqawa

  • Watchdog
  • Level 7 Expert
  • *****
  • Posts: 784
  • Country: fi
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #6 on: January 22, 2014, 06:56:11 AM »
Thanks guys, appreciate it.

Heh yeah, I fixed it somewhere in the code Eare but forgot that actual info line >.< So it should be end-x end-y and end-z. But afterall it's "just" a tooltip so there is nothing wrong with the code. I will update the tooltip text when I'm free. Sorry if it caused harm to you.
Want your own custom color for your forum username? No worries! La Muerte is here ready to fulfill your every rainbow-colored wish!

As a special offer of the day you can go talk with Tha Pwned first, and come ahead of the line!

I AM PINK!


Offline xines

  • Level 7 Expert
  • *****
  • Posts: 342
  • Country: dk
  • Wcs FTW <33 - - - - - - - but still doing ur mom!
    • Dark WCS
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #7 on: January 22, 2014, 03:44:33 PM »
Always cool to see new addons being released, good job Kamiqawa even when im not gonna use this, mabye later on i will.  8)

Toybox lol awesome name btw :P
Xines Making people laugh on WCS!



Offline DoCNL

  • Level 7 Expert
  • *****
  • Posts: 341
  • Country: 00
  • http://5-starz.webs.com <-- AWESOME!
    • 5* website
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #8 on: January 22, 2014, 06:21:58 PM »
Could you try to (sort of) remake beacon? :D

In zombiemod its used often to attract zombies to your hideout, but most maps have several floors/different altitudes, so you still can't really find them..

My idea: add a beam-effect from the player>way up into the sky and maybe something like double xp for killing someone with that beacon? :)

-DoC

Offline Kamiqawa

  • Watchdog
  • Level 7 Expert
  • *****
  • Posts: 784
  • Country: fi
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #9 on: January 22, 2014, 10:01:37 PM »
@DoCNL Mhmm.. I came up with an idea regarding to your request which I may be able to code tomorrow if I have the time. We'll see. Also planning on posting more examples on the new possibilities this addon creates ASAP.

Also thinking of re-coding everything in Python at somepoint which would further improve the efficiency... But that's probably not happening anytime soon...
Want your own custom color for your forum username? No worries! La Muerte is here ready to fulfill your every rainbow-colored wish!

As a special offer of the day you can go talk with Tha Pwned first, and come ahead of the line!

I AM PINK!


Offline DoCNL

  • Level 7 Expert
  • *****
  • Posts: 341
  • Country: 00
  • http://5-starz.webs.com <-- AWESOME!
    • 5* website
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #10 on: January 24, 2014, 03:04:49 PM »
Im not sure if its supposed to be this way, but beacon (i used in this shopitem:
[Spoiler]
   [[vipbeacon]]
      name        = "VIP-Beacon"
      desc        = "Beacons the buyer"
      cost        = 1000
      level       = 0
      dab         = 1 #0=death, 1=alive, 2=both
      duration    = 0 #0=this round, 1=untill death
      max         = 150
      rest        = "STEAM_0:0:11233151"
      cfg         = "player_buy"
      cmdbuy      = "es wcs_beacon server_var(wcs_userid) 1"
      cmdactivate = ""
) fires all the time, the sound+effect instant loop.
The bleep starts to irritate after a couple of minutes haha, its like beepbeepbeepbeep.

If its a bug, please add some delay, if not, maybe another syntax?
es wcs_beacon <userid> <delay between 2 beeps> <1/0>

Edit: maybe another syntax for the sound?
es wcs_beacon <userid> <delay between 2 beeps> <1/0> <sound 1/0>
« Last Edit: January 24, 2014, 04:09:26 PM by DoCNL »

Offline Kamiqawa

  • Watchdog
  • Level 7 Expert
  • *****
  • Posts: 784
  • Country: fi
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #11 on: January 24, 2014, 10:31:59 PM »
You mean the sound doesn't end and it keeps beeping all the time when the beacon is active? Yes it is intended. It is similar to those admin mods like Mani Admin beacon etc.

I cold add a config to disable the sound but before that you can use a self made workaround:
1. Open the es_wcs_toybox.txt
2. Find block called block wcs_beacon_effect
3. There's a line es_playsound... in it. Either comment it with // or add a delay command es_delayed <seconds> in front of it so the line becomes for example es_delayed 2 es_playsound...
4. Save and restart/reload.

Hope it helps.
Want your own custom color for your forum username? No worries! La Muerte is here ready to fulfill your every rainbow-colored wish!

As a special offer of the day you can go talk with Tha Pwned first, and come ahead of the line!

I AM PINK!


Offline DoCNL

  • Level 7 Expert
  • *****
  • Posts: 341
  • Country: 00
  • http://5-starz.webs.com <-- AWESOME!
    • 5* website
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #12 on: January 24, 2014, 10:36:46 PM »
Thanks, will do that!

Offline hehe12

  • Level 0 Beginner
  • Posts: 13
  • <3 WCS :)
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #13 on: January 29, 2014, 04:29:38 AM »
what commands do i use to activate it :(

Offline DoCNL

  • Level 7 Expert
  • *****
  • Posts: 341
  • Country: 00
  • http://5-starz.webs.com <-- AWESOME!
    • 5* website
Re: [ADDON] WCS_TOYBOX (v0.1beta) *New Commands*
« Reply #14 on: January 29, 2014, 08:03:12 AM »
Activate what?
Script: es_load wcs_toybox in cstrike/cfg/autoexex.cfg
For the commands, find the one you look for in the included list, then right of it (divided with 'tabs'/'spaces') are the commands+syntaxes.

Hope that helps haha