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-09-25 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
September 25, 2009, 05:14:05 AM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Join the new Facebook Warcraft-Source.com Group! It has been currently opened!
Join!
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
Author Topic: Es, est?  (Read 163 times)
Rotgutts
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 303


Krechure Feature



Merzlin
Merzlin
« on: February 28, 2008, 04:52:24 PM »

Is it possible to use est for the ultimate? Cause for my Python race, I'm having a little trouble learning on how to make an ultimate. The ultimate itself will grant you 10% more speed for every 10 Hp you give away. I'm using this for the race Competion, so I was wondering if we could atleast use Es for the ultimate.. that would be awesome!
Logged

freddukes
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 292



« Reply #1 on: February 28, 2008, 04:56:29 PM »

es.server.queucmd('est/es command here')

Although generally coding in python tends to be easier than ESS for me...

for example...

Code
GeSHi (python):
def player_hurt(ev):
   if ev['es_userteam'] != ev['es_attackerteam']:
       level = wcs.GetLevel(ev['userid'],'Race name','Skill name')
       if level:
           wcs.Command(ev['userid']).SpeedAdd(int(ev['dmg_health'])/100.0)
 

That'll do what you want
-freddukes
« Last Edit: February 28, 2008, 04:59:28 PM by freddukes » Logged

Rotgutts
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 303


Krechure Feature



Merzlin
Merzlin
« Reply #2 on: February 28, 2008, 05:10:02 PM »

Is it a Player_hurt event? Cause it's hurting you for 10 Hp for x% more speed?
Logged

Jeff
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 458



WWW
beastrace91
« Reply #3 on: February 28, 2008, 09:42:42 PM »

Is it a Player_hurt event? Cause it's hurting you for 10 Hp for x% more speed?

He was just using that as an example Wink

You can use it in any way you want. There are very few cases in which you will need to call up EST command directly, as Dukes has been wrapping all the important ones(and I have been doing some of the more obscure ones Smiley ) up into our wcs.Command() so race scripters do not have to deal with firing console commands.

~J3ff
Logged

freddukes
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 292



« Reply #4 on: February 28, 2008, 09:43:46 PM »

Ooohhh I get you... You like want to 'kamikaze'... You press the ultimate key, and you are hurt for 10 damage, however, you gain 10% more speed... Sorry, something like this will do it...

Code
GeSHi (python):
def player_ultimate_on(ev):
   uid = ev['userid']
   user = wcs.Command(uid)
   user.SetCoolDown(30) # Set a cooldown of 30 seconds
   level = wcs.GetLevel(uid,'Race Name', 'Skill name')
   if level:
       user.Damage(10)
       user.SpeedAdd(0.1)
 

That should do what you want.... Sorry if I don't understand you more, I'm tired Tongue

-freddukes
Logged

Rotgutts
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 303


Krechure Feature



Merzlin
Merzlin
« Reply #5 on: February 28, 2008, 11:10:05 PM »

Aw, Thanks!
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
September 24, 2009, 09:43:13 PM
haha, pink name = spammer Cheesy
September 24, 2009, 09:30:55 PM
can i have a pink name then? Cheesy
September 24, 2009, 01:50:58 PM
I prefer to get paid in onion rings but beer works lol - ps I want my name in red too biatch
September 23, 2009, 08:14:10 PM
LOL !!!!
September 23, 2009, 07:43:10 PM
..
September 23, 2009, 07:15:15 PM
in that case tc's place sounds interesting for a metal fest ^^
September 23, 2009, 05:15:30 PM
Up there where TeacherCreature stay they dont pay in $$$ they pay man in BEER...and there is never enough beer.
Recent
by Kay
[Today at 02:00:05 AM]

[Today at 12:35:14 AM]

[Today at 12:34:11 AM]

[September 24, 2009, 11:09:05 PM]

[September 24, 2009, 10:51:28 PM]

[September 24, 2009, 10:25:13 PM]

[September 24, 2009, 10:23:36 PM]

[September 24, 2009, 10:22:06 PM]

[September 24, 2009, 09:50:01 PM]

[September 24, 2009, 09:47:44 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.107 seconds with 23 queries.