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-01-03 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
January 03, 2010, 10:38:05 AM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: WCS Tournament being opened for applications!

Post here for signups!
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: Need someone to check my code.  (Read 118 times)
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 187



« on: November 29, 2009, 08:37:50 PM »

I'm trying to make a ability where when you attack an enemy, you have 5-25% chance to give you and your whole team 25-100$.

Here's what my attempt, its only partially done, if im not doing it correctly please fix.

Code:
"skill1_setting" "es_xset wcs_chance 5|es_xset wcs_chance 10|es_xset wcs_chance 15|es_xset wcs_chance 20|es_xset wcs_chance 25"
    "racealias_cash" "es est_setcash(userid)) 25;es est_teamcash 25|

  

For the racealias_cash thats just for the first level, let me know if thats how i have to set it up.
Logged




Zawmbee
Guest
« Reply #1 on: November 29, 2009, 10:35:05 PM »

swing and a miss... sorry, but better luck next time.
Logged
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 187



« Reply #2 on: November 29, 2009, 10:56:58 PM »

That didn't really help me much, I'm just starting out so I'm doing the best i can. Can you show me how its supposed to be?
Logged




AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 723




doug_tiozao
« Reply #3 on: November 29, 2009, 11:09:42 PM »

In the setting set a chance for the skill and set the amount of cash that you want to be stealed, in the cmd use a check for the attacking team use a then and load the racealias, create 2 aliases, one ctsteals, and the other is tsteals, use a est_setcash #t for tsteals and #ct for ctsteals and set the amount. May i code it for you when i get at my home, im not in my house atm! but i'll try to code here xD

*EDIT, dont use a setcash, use cashadd, use a get to get the victims cash, use a xmath to subtract the cash that have been stole for the cash that the victims already have, and use the cashadd.
« Last Edit: November 29, 2009, 11:14:46 PM by AvasT » Logged

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

United States United States

Posts: 187



« Reply #4 on: November 29, 2009, 11:24:58 PM »

I want to give my team mates the cash aswell, how could you do that?
Logged




‹––тєxησ––›
Level 7 Expert
*****
Offline Offline

Posts: 955


< Need Help ? >


WWW
texno755
gameren755

myServer 83.142.49.95:27015
(Warning: click connects through Steam)
« Reply #5 on: November 29, 2009, 11:35:00 PM »

I want to give my team mates the cash aswell, how could you do that?
Using Wcsadmin
Logged

gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 187



« Reply #6 on: November 29, 2009, 11:38:33 PM »

Haha thats not what i meant.
Logged




AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 723




doug_tiozao
« Reply #7 on: November 29, 2009, 11:45:08 PM »

You don't want to steal right you just want to give cash ?

I want to give my team mates the cash aswell, how could you do that?
Using Wcsadmin

What a fucking idiot answer Sorry. But he asked for a skill.
Logged

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

United States United States

Posts: 187



« Reply #8 on: November 29, 2009, 11:48:25 PM »

It doesn't have to steal no, just give cash to me and my team. If you wish to make it steal go ahead, i don't really mind.
Logged




AvasT
Level 7 Expert
*****
Offline Offline

Brazil Brazil

Posts: 723




doug_tiozao
« Reply #9 on: November 30, 2009, 12:20:04 AM »

Well, so wait. I think the est_command for cash is est_cashadd! just use a check for teams then use a if for the team and use a then again and use the est_cashadd #team amount!
Logged

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

United States United States

Posts: 187



« Reply #10 on: December 02, 2009, 12:11:15 AM »

How do you do a team check? I'm not sure how to do this skill yet.
Logged




Zawmbee
Guest
« Reply #11 on: December 02, 2009, 12:48:22 AM »

How do you do a team check? I'm not sure how to do this skill yet.

es est_getteam VARIABLE TARGET
Logged
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 187



« Reply #12 on: December 02, 2009, 12:51:02 AM »

so in this particular case, es est_getteam #ct cash? or do i not need to specify which team?
Logged




xpxdoo
Level 0 Beginner

Offline Offline

United States United States

Posts: 19



« Reply #13 on: December 02, 2009, 12:52:08 AM »

You should be able to skip a team check. It does it automatically whenever a skill is executed.

You just need something like "if (server_var(wcs_team) = 2) then est_cashadd #t server_var(cash)" and 3 then #ct
Logged
gimik
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 187



« Reply #14 on: December 02, 2009, 12:57:16 AM »

Could anyone code this skill for me? So i can look at the parts, cause i don't quite understand what you guys are trying to explain. Once i see the whole think completed ill be able to look at what you were saying Cheesy If you cant its no problem ill poke around with it.
Logged




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

Last 7 Shouts:
Today at 07:37:39 AM
who will be running this site... since most admin will be on other site
January 02, 2010, 11:33:33 PM
i mean if you start 100 cmd instances and type ping google.com in all, after a while it will show timeout, but site will still be only for everyone but you Tongue
January 02, 2010, 11:33:01 PM
no you don't Tongue
a site can barely "crash"
though, it can have a timeout, and in this case it's in most case your i-net connection which has the timeout with the site
January 02, 2010, 11:24:47 PM
i think i crash the http://www.fpsbanana.com/ site.... after spamming logging...lol
January 02, 2010, 10:10:49 PM
Well thank you Smiley fucker. Tongue
January 02, 2010, 10:09:16 PM
Welcome back Pietro Tongue
January 02, 2010, 10:06:04 PM
Welcome back Eric Tongue
Recent
[Today at 07:30:40 AM]

[Today at 07:24:28 AM]

[Today at 02:55:13 AM]

[Today at 12:24:21 AM]

[Today at 12:05:09 AM]

[January 02, 2010, 11:26:04 PM]

[January 02, 2010, 10:59:30 PM]

[January 02, 2010, 10:26:02 PM]

[January 02, 2010, 10:24:45 PM]

[January 02, 2010, 09:32:57 PM]
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.104 seconds with 23 queries.