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 2010-02-05 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
February 05, 2010, 10:52:22 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] 2   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: :D Requesting another custom skill!  (Read 234 times)
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 207



« on: November 28, 2009, 05:37:19 PM »

Alright, I got another one for you guys.

I need to make an ability that when you attack someone you destroy weapon type or take foes weapon on hit. 5% chance - 25% chance

I know how to destroy a weapon, but not that weapon type.

if you could code it for me Thanks! <333
Logged




AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 775




doug_tiozao
« Reply #1 on: November 28, 2009, 07:54:25 PM »

Let me see, you want to make the victim get a specific weapon restricted and dropped if he is using it?
Logged

Lol?
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 207



« Reply #2 on: November 28, 2009, 08:16:16 PM »

Yeah restrict the weapon he is using, and make him drop it xD
Logged




AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 775




doug_tiozao
« Reply #3 on: November 28, 2009, 08:36:30 PM »

Ok just wait a lil bit.
Logged

Lol?
AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 775




doug_tiozao
« Reply #4 on: November 28, 2009, 08:55:12 PM »

Well, i don't know if its Pretty Correct, but from what i know about WCS it may work.

Instructions:
Create a new Folder in eventscripts folder Called YourScript, inside of it create a notepad called es_YourScript.txt.
Then add this:

Block
Code:
block load
{
es_xset prohibited_AWP 0
es_xset prohibited_M4A1 0
es_xset prohibited_AK47 0
es_xset prohibited_Deagle 0
es_xset prohibited_Dual 0
es_xset prohibition_chance 0
}

event es_map_start
{
downloadable "YourScriptSounds/prohibited.wav"
}

block prohibition
{
if (server_var(prohibited_AWP) = 1) do
{
if (event_var(weapon) = weapon_awp) do
{
es est_dropweapon event_var(userid) 1
es est_restrict event_var(userid) weapon_awp
es est_playplayer event_var(userid) YourScriptSounds/prohibited.wav
es est_playplayer event_var(attacker) YourScriptSounds/prohibited.wav
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You are#lightgreenNot Allowed #defaultto use #lightgreenAWP Sniper
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You #lightgreenProhibited event_var(es_username) #defaultof using #lightgreenAWP Sniper
}
}

if (server_var(prohibited_M4A1) = 2) do
{
if (event_var(weapon) = weapon_m4a1) do
{
es est_dropweapon event_var(userid) 1
es est_restrict event_var(userid) weapon_m4a1
es est_playplayer event_var(userid) YourScriptSounds/prohibited.wav
es est_playplayer event_var(attacker) YourScriptSounds/prohibited.wav
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You are#lightgreenNot Allowed #defaultto use #lightgreenM4A1 Rifle
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You #lightgreenProhibited event_var(es_username) #defaultof using #lightgreenM4A1 Rifle
}
}

if (server_var(prohibited_AK47) = 3) do
{
if (event_var(weapon) = weapon_ak47) do
{
es est_dropweapon event_var(userid) 1
es est_restrict event_var(userid) weapon_ak47
es est_playplayer event_var(userid) YourScriptSounds/prohibited.wav
es est_playplayer event_var(attacker) YourScriptSounds/prohibited.wav
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You are#lightgreenNot Allowed #defaultto use #lightgreenAK47 Rifle
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You #lightgreenProhibited event_var(es_username) #defaultof using #lightgreenAK47 Rifle
}
}

if (server_var(prohibited_Deagle) = 4) do
{
if (event_var(weapon) = weapon_deagle) do
{
es est_dropweapon event_var(userid) 1
es est_restrict event_var(userid) weapon_deagle
es est_playplayer event_var(userid) YourScriptSounds/prohibited.wav
es est_playplayer event_var(attacker) YourScriptSounds/prohibited.wav
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You are#lightgreenNot Allowed #defaultto use #lightgreenDeagle
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You #lightgreenProhibited event_var(es_username) #defaultof using #lightgreenDeagle
}
}

if (server_var(prohibited_Dual5) = 5) do
{
if (event_var(weapon) = weapon_elite) do
{
es est_dropweapon event_var(userid) 1
es est_restrict event_var(userid) weapon_elite
es est_playplayer event_var(userid) YourScriptSounds/prohibited.wav
es est_playplayer event_var(attacker) YourScriptSounds/prohibited.wav
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You are#lightgreenNot Allowed #defaultto use #lightgreenDual Elites
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You #lightgreenProhibited event_var(es_username) #defaultof using #lightgreenDual Elites
}
}
}

The Skill_cfg is player_attacker...

Skill:
Code:
    "skill4_setting"    "es_xset prohibited_AWP 1;es_xset prohibited_M4A1 2;es_xset prohibited_AK47 3;es_xset prohibited_Deagle 4;es_xset prohibited_Dual 5;es_xset prohibition_chance x"
    "racealias_prob"    "es_xdoblock YourScript/prohibition
    "skill4_cmd"        "if (server_var(wcs_dice) <= server_var(prohibition_chance)) then racealias_prob"
    "skill4_sfx"        "0"

Then create a new folder in sounds folder called YourScriptSounds, then add the sound prohibited.wav ...

OBS: Download the SOUND!

Enjoy Cheesy
Logged

Lol?
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 207



« Reply #5 on: November 28, 2009, 09:17:57 PM »

People will use more than m4a1/ak/awp/deagle/elite...

Should i just C&P:

Code:
if (server_var(prohibited_AWP) = 1) do
{
if (event_var(weapon) = weapon_awp) do
{
es est_dropweapon event_var(userid) 1
es est_restrict event_var(userid) weapon_awp
es est_playplayer event_var(userid) YourScriptSounds/prohibited.wav
es est_playplayer event_var(attacker) YourScriptSounds/prohibited.wav
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You are#lightgreenNot Allowed #defaultto use #lightgreenAWP Sniper
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You #lightgreenProhibited event_var(es_username) #defaultof using #lightgreenAWP Sniper

And change for different weapons?
Logged




AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 775




doug_tiozao
« Reply #6 on: November 28, 2009, 10:37:25 PM »

Yes. and add in the setting es_xset prohibited_Nameofthegun 6..
Logged

Lol?
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 207



« Reply #7 on: November 28, 2009, 10:41:57 PM »

Gunna take me forever, but alright <3

Thanks for all the help!
Logged




AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 775




doug_tiozao
« Reply #8 on: November 28, 2009, 11:34:55 PM »

No problem Smiley, just tell me which guns you want
Logged

Lol?
Zawmbee
Guest
« Reply #9 on: November 29, 2009, 12:53:12 AM »

No problem Smiley, just tell me which guns you want

Any the user is using... you have to get event_var(weapon) of the user and restrict it...
Logged
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 207



« Reply #10 on: November 29, 2009, 12:58:40 AM »

Well i think i did it correct, here's what i typed to restrict the P90.

Code:
if (server_var(prohibited_P90) = 7) do
{
if (event_var(weapon) = weapon_P90) do
{
es est_dropweapon event_var(userid) 1
es est_restrict event_va(userid) weapon_P90
es est_playplayer event_var(userid) YourScriptSounds/prohibited.wav
es est_playplayer event_var(attacker) YourSciptSounds/prohibited.wav
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You are#lightgreenNot Allowed #defaultto use #lightgreenP90
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default Youare#lightgreenNot Allowed #defaultto use #lightgreenP90
}
}
Logged




Zawmbee
Guest
« Reply #11 on: November 29, 2009, 01:20:08 AM »

Well i think i did it correct, here's what i typed to restrict the P90.

Code:
if (server_var(prohibited_P90) = 7) do
{
if (event_var(weapon) = weapon_P90) do
{
es est_dropweapon event_var(userid) 1
es est_restrict event_va(userid) weapon_P90
es est_playplayer event_var(userid) YourScriptSounds/prohibited.wav
es est_playplayer event_var(attacker) YourSciptSounds/prohibited.wav
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You are#lightgreenNot Allowed #defaultto use #lightgreenP90
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default Youare#lightgreenNot Allowed #defaultto use #lightgreenP90
}
}

Heh, it can be a whole lot more simple with only 1 set of coding... Lookee here:
Code:
event player_attacker
{
if (server_var(dice) <= 20) do
{
es_xset weapon_type event_var(weapon)
es es_delayed .1 est_stripplayer event_var(userid)
es es_delayed .2 est_restrict event_var(userid) server_var(weapon_type)
}
}
« Last Edit: November 29, 2009, 01:21:45 AM by Zawmbee » Logged
DanMister
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« Reply #12 on: November 29, 2009, 05:15:44 AM »

Well i think i did it correct, here's what i typed to restrict the P90.

Code:
if (server_var(prohibited_P90) = 7) do
{
if (event_var(weapon) = weapon_P90) do
{
es est_dropweapon event_var(userid) 1
es est_restrict event_va(userid) weapon_P90
es est_playplayer event_var(userid) YourScriptSounds/prohibited.wav
es est_playplayer event_var(attacker) YourSciptSounds/prohibited.wav
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default You are#lightgreenNot Allowed #defaultto use #lightgreenP90
es_tell event_var(attacker) #multi #lightgreen[#defaultProhibition#lightgreen]#default Youare#lightgreenNot Allowed #defaultto use #lightgreenP90
}
}

Heh, it can be a whole lot more simple with only 1 set of coding... Lookee here:
Code:
event player_attacker
{
if (server_var(dice) <= 20) do
{
es_xset weapon_type event_var(weapon)
es es_delayed .1 est_stripplayer event_var(userid)
es es_delayed .2 est_restrict event_var(userid) server_var(weapon_type)
}
}

wait wait wait wait! so you tell him he can code it easier with less code. but when i tell you that you can code your configuration with less code you get all defensive? whats the deal man?!?!? i mean i'm not angry but honestly?
Logged

Quote
theres a thing called copy and paste. I think someone named Bill Gates made it…. -DanMister

Quote
"Genius may have its limitations, but stupidity is not thus handicapped."   Elbert Hubbard
Zawmbee
Guest
« Reply #13 on: November 29, 2009, 07:14:20 PM »

Your problem was I wasn't coding it like you, making it harder for you to understand...  I did not criticize him or say anything negative, just gave him another solution in which if he wants to take it he can...
Logged
AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 775




doug_tiozao
« Reply #14 on: November 29, 2009, 07:27:55 PM »

Yes zawmbee it can be very simplified, i think he wants to restrict everyting?
Logged

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

Last 7 Shouts:
Today at 03:56:44 PM
wow there only 780 wcs member...in steam group?
February 04, 2010, 10:14:46 PM
Anyone know the if there is a code where if some kills someone with a knife they get hp and speed?
February 04, 2010, 02:33:47 AM
Sup?
February 04, 2010, 02:33:37 AM
hey Ghost
February 04, 2010, 01:44:10 AM
hey dark
February 02, 2010, 10:43:30 AM
Yap, he mean eventscripter xD
February 02, 2010, 01:03:48 AM
Eventscripter. lol
Recent
[Today at 09:31:25 PM]

[Today at 08:05:54 PM]

[Today at 08:00:35 PM]

[Today at 05:06:11 PM]

[Today at 05:01:28 PM]

[February 04, 2010, 09:26:55 PM]

[February 04, 2010, 06:11:26 PM]

[February 04, 2010, 05:54:42 PM]

[February 04, 2010, 03:16:50 PM]

[February 04, 2010, 12:44:51 AM]
Theme switch

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