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-12-05 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
December 05, 2009, 09:17:37 AM *
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]   Go Down
  Print  
Current Topic Rating: ***** You have not rated this topic. Select a rating:
Author Topic: NEW RACE!!! 'Leonardo' [DanMister: PYTHON CODE]  (Read 66 times)
DanMister
Level 5 Trained Intermediate
*****
Offline Offline

United States United States

Posts: 100


DanMister = python coder. python coder = AWESOME!!



Danthescam
danmi5ter
« on: December 04, 2009, 04:08:33 AM »

Leonardo da Vinci


Skills:

Screw Helicopter
Rise smoother and faster, but! landing, not so smooth...
Literal: Less gravity and more speed on the way up, but! on the way down more gravity

Anatomy Master
More health and, regen if health falls below starting health
Literal: Higher starting health, and regen activates when you fall below starting health and stops when you get back to starting health

Vitruvian Man
You size them up, then throw them down!
Literal:You increase speed and grav and push them straight into the air, then after 1 second you increase their gravity! slamming them into the ground!(for you who know a lil' about the Vitruvian Man it was all about proportions which is why you "size them up")

The Last Supper
You feed off your enemy
Vampire/Leach

Ultimate:

Creative Mind
Your creative mind helps you in any situation!
Literal: if you use your ultimate at certain places/situations, diffrent things will happen. here is the list of those things.

Ultimate skill list:

If in bomb zone the ultimate will:
a. if terrorist give you god mode for 6 seconds  
     
 
b. if counter-terrorist give you godmode then give you 3 seconds to begin defusing or else your godmode goes away.

Ammo possible ultimates:
a. if Primary ammo is less then 30 restores to 60.  
b. if Primary clip ammo is less then 30 and primary ammo is greater then or equal to 30 restores clip ammo to 60.
   
c. if secondary ammo is less then 5 and primary and primary clip ammo are greater then or equal to thirty.    
d. if secondary clip ammo is less then 12 and primary and primary clip ammo are greater then or equal to thirty and secondary ammo is greater then or equal to 5.

Health ultimate possibilities:
if health is less then 50 ,and all ammo is above 30 for primaries and 12 clip ammo and 5 main ammo for secondaries, restores to 100

Money ultimate possibilities:
if in buyzone and health is is greater then 50, and all ammo is above 30 for primaries and 12 clip ammo and 5 main ammo for secondaries give you $4000
















Code
GeSHi (python):
#####################################
#   IMPORT MODULE
import es
import random
import gamethread
import playerlib
 
import wcs
 
#####################################
#   PUBLISH INFO
info = es.AddonInfo()
info.name = 'Leonardo'
info.author = 'DanMister'
 
#####################################
#   RACE INFO
 
RaceName = 'Leonardo'
 
race = wcs.Race(RaceName)
 
 
#####################################
#   SKILL INFO
 
 
race.registerSkill('Screw-Helicopter',6,1,'Rise smoother and faster, but! landing, not so smooth')
race.registerSkill('Anatomy Mastery',6,1,'More health and regen if health falls below starting health')
race.registerSkill('Vitruvian Man',6,1,'You size them up, then throw them down!')
race.registerSkill('The Last Supper',6,1,'You feed of your enemy')
 
#####################################
#   ULTIMATE INFO
 
race.registerUltimate('Creative Mind',10,6,1,'Your creative mind helps you in any situation!')
 
#####################################
#   CODE/PT.1 PLAYER SPAWN
 
 
 
def player_spawn(ev):
   userid = ev['userid']
   effect = wcs.effect()
   chance = random.randint(1,6)
   Command = wcs.Command(userid)
   player = playerlib.getPlayer(userid)
   Heli = wcs.GetLevel(userid, RaceName, 'Screw-Helicopter')
   A-Master = wcs.GetLevel(userid, RaceName, 'Anatomy Master')
 
   if Heli < 3 and not Heli == 0 and Heli >= chance:
       Command(userid).ChangeGravity(-.10)
       es.msg('Your helicopter has provided extra lift')
       if player.onGround() == 0:
           gamethread.delayed(.75, Command(userid).ChangeGravity(1.5))
           es.msg('But also extra fall...')
           effect.Follow(userid, 255, 255, 255)
 
   if Heli = 3 and Heli >= chance:
       Command(userid).ChangeGravity(-.20)
       es.msg('Your helicopter has provided extra lift')
       if player.onGround() == 0:
           gamethread.delayed(.75, Command(userid).ChangeGravity(1.4))
           es.msg('But also extra fall...')
           effect.Follow(userid, 255, 255, 255)
 
   if Heli > 3 and Heli >= chance:
       Command(userid).ChangeGravity(-.30)
       es.msg('Your helicopter has provided extra lift')
       if player.onGround() == 0:
           gamethread.delayed(.75, Command(userid).ChangeGravity(1.25))
           es.msg('But also extra fall...')
           effect.Follow(userid, 255, 255, 255)
 
       if A-Master < 3 and not A-Master == 0 and A-Master >= chance:
           player.setHealth(125)
           es.msg('Your "Anatomy Mastery" have increased your health')
           while player.getHealth() < 125:
               Command(userid).Regen(5,3)
 
       if A-Master = 3 and A-Master >= chance:
           player.setHealth(140)
           es.msg('Your "Anatomy Mastery" have increased your health')
           while player.getHealth() < 140:
               Command(userid).Regen(10,3)
 
       if A-Master > 3 and A-Master >= chance:
           player.setHealth(175)
           es.msg('Your "Anatomy Mastery" have increased your health')
           while player.getHealth() < 175:
               Command(userid).Regen(12,3)
 
#####################################
#   CODE/PT.2 PLAYER HURT
 
 
 
 
def player_hurt(ev):
   userid = ev['userid']
   attacker = ev['userid']                              
   player = playerlib.getPlayer(userid)
   player1 = playerlib.getPlayer(attacker)
   effect = wcs.effect()        
   Command = wcs.Command(userid)
   chance1 = random.randint(1,50)
   chance2 = random.randint(1,60)
   V-Man = wcs.GetLevel(userid, RaceName, 'Vitruvian Man')
   Last = wcs.GetLevel(userid, RaceName, 'The Last Supper')
 
   if V-Man < 3 and not V-Man == 0 and V-Man >= chance2:
       Command.PushTo(0, 1, 0, 10)
       es.msg('you have sized up your enemy...')
       if player.onGround() == 0:
           Command.ChangeGravity(-.25)
           gamethread.delayed(1, Command.ChangeGravity(1.5))
           gamethread.delayed(1, es.msg('And you have thrown him down!'))
           effect.Follow(0, 0, 0)
 
   if V-Man = 3 and V-Man >= chance2:
       Command.PushTo(0, 1, 0, 25)
       es.msg('you have sized up your enemy...')
       if player.onGround() == 0:
           Command.ChangeGravity(-.50)
           gamethread.delayed(1, Command.ChangeGravity(1.75))
           gamethread.delayed(1, es.msg('And you have thrown him down!'))
           effect.Follow(0, 0, 0)
 
   if V-Man > 3 and V-Man >= chance2:
       Command.PushTo(0, 1, 0, 40)
       es.msg('you have sized up your enemy...')
       if player.onGround() == 0:
           Command.ChangeGravity(-.60)
           gamethread.delayed(1, Command.ChangeGravity(2))
           gamethread.delayed(1, es.msg('And you have thrown him down!'))
           effect.Follow(0, 0, 0)
 
   if Last < 3 and Last >= chance1 and not Last == 0:
       player1.setHealth(player1.getHealth + (player.getHealth() * 1/50))
       player.setHealth(player.getHealth() - (player.getHealth() * 49/50))
       effect.Beam2(attacker, userid, 5, 0, 0, 0)
       es.msg('You have "fed" off your enemy Leonardo')
 
   if Last = 3 and Last >= chance1:
       player1.setHealth(player1.getHealth + (player.getHealth() * 1/45))
       player.setHealth(player.getHealth() - (player.getHealth() * 44/45))
       effect.Beam2(attacker, userid, 5, 0, 0, 0)
       es.msg('You have "fed" off your enemy Leonardo')
 
   if Last > 3 and Last >= chance1:
       player1.setHealth(player1.getHealth + (player.getHealth() * 1/40))
       player.setHealth(player.getHealth() - (player.getHealth() * 39/40))
       effect.Beam2(attacker, userid, 5, 0, 0, 0)
       es.msg('You have "fed" off your enemy Leonardo')
#####################################
#   CODE/PT.3 PLAYER ULITIMATE
 
 
 
 
def player_ultimate:
   userid = ev['userid']
   player = playerlib.getPlayer(userid)
   effect = wcs.effect()
   Command = wcs.Command(userid)
   Cooldown = wcs.Command(userid).GetCoolDown('Creative Mind')
   C-down = wcs.Command(userid).SetCoolDown('Creative Mind', 20)
   C-Mind = wcs.GetLevel(userid, RaceName, 'Creative Mind')
 
   if CoolDown == 1 and not C-Mind == 0 and player.inBuyZone() == 1 and player.getHealth() > 50 and player.getClip(player.getsecondary()) >= 12 and player.getAmmo(player.getSecondary()) >= 30 and player.getClip(player.getPrimary()) >= 30 and player.getAmmo(player.getPrimary()) >= 30:
       player.setCash((player.getCash) + 4000)
       es.msg('you gain $4000 dollars Leonardo, use it wisely')
       C-down
 
   if CoolDown == 1 and not C-Mind == 0 and player.getAmmo(player.getPrimary()) < 30:
       player.setAmmo(player.getPrimary(), 60)
       es.msg('Your primary ammo has been restored Leonardo')
       C-down
 
   if CoolDown == 1 and not C-Mind == 0 and player.getClip(player.getPrimary()) < 30 and player.getAmmo(player.getPrimary()) >= 30:
       player.setClip(player.getPrimary(), 60)
       es.msg('Your primary clip ammo has been restored Leonardo')
       C-down
 
   if CoolDown == 1 and not C-Mind == 0 and player.getAmmo(player.getSecondary()) <= 5 and player.getAmmo(player.getPrimary()) >= 30 and player.getClip(player.getClip(player.getPrimary()) >= 30:
       player.setAmmo(player.getSecondary(), 6)
       es.msg('Your secondary ammo has been restored Leonardo')
       C-down
 
   if CoolDown == 1 and not C-Mind == 0 and player.getClip(player.getSecondary()) <= 12 and player.getAmmo(player.getSecondary()) >= 30 and player.getClip(player.getPrimary()) >= 30 and player.getAmmo(player.getPrimary()) >= 30:
       player.setClip(player.getSecond(), 15)
       es.msg('Your secondary clip ammo has been restored Leonardo')
       C-down
 
   if CoolDown == 1 and not C-Mind == 0 and player.inBombZone() == 1 and player.attributes['teamid'] == 3:
       player.godmode(1)
       player.setDefuser                                                                                                                                                
       while player.isDefusing() == 0:
           gameserver.delayed(3, player.godmode(0))                                                                                                                                                
       es.msg('you are in god-mode defuse the bomb to keep the god-mode going')
       C-down
 
   if CoolDown == 1 and not C-Mind == 0 and player.getHealth() < 50 and player.getClip(player.getsecondary()) >= 12 and player.getAmmo(player.getSecondary()) >= 30 and player.getClip(player.getPrimary()) >= 30 and player.getAmmo(player.getPrimary()) >= 30:
       player.setHealth(100)
       es.msg('your health has been restored to 100 Leonardo')
       C-down
 
   if CoolDown == 1 and not C-Mind == 0 and player.inBombZone() == 1 and player.attributes['teamid'] == 2:                                                                                                                                                
       player.godmode(1)
       gamethread.delayed(6, player.godmode(0))
       es.msg('you are in god-mode for 6 seconds(use it wisely)')                                                                                                                                                
       C-down                                                                                                                                                
 
########################################      
#   END CODE                          
 
 
 
 
 
 
 
« Last Edit: December 04, 2009, 05:12:11 AM by DanMister » Logged

When life gives'ya lemons, throw em at lifes face and be like "WTF! I hate fuckin' lemons!!!!
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2762


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #1 on: December 04, 2009, 12:09:04 PM »

I suggest you use event player_air from Extended Events.
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice Cheesy
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed
DanMister
Level 5 Trained Intermediate
*****
Offline Offline

United States United States

Posts: 100


DanMister = python coder. python coder = AWESOME!!



Danthescam
danmi5ter
« Reply #2 on: December 04, 2009, 01:57:18 PM »

example?
Logged

When life gives'ya lemons, throw em at lifes face and be like "WTF! I hate fuckin' lemons!!!!
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2762


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #3 on: December 04, 2009, 03:48:02 PM »

example?
Well for gravity you can do cool things with player air Smiley
Like look!
You use player_air, you get the velocity of the player.
If it's positive (you jump), you multiply it by 2 (so you jump higher).
If it's negative (you fall), you divide it by 2.
Or maybe the opposite? What was it? XD
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice Cheesy
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed
DanMister
Level 5 Trained Intermediate
*****
Offline Offline

United States United States

Posts: 100


DanMister = python coder. python coder = AWESOME!!



Danthescam
danmi5ter
« Reply #4 on: December 04, 2009, 10:59:24 PM »

well does the way i do it work?
Logged

When life gives'ya lemons, throw em at lifes face and be like "WTF! I hate fuckin' lemons!!!!
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
December 04, 2009, 11:33:31 PM
lol
December 04, 2009, 10:14:16 PM
I JUST BOUGHT AN IPHONE 3GS :0...ANYONE GOT ONE SO WE CAN PLAY ONLINE TOGETHER
December 04, 2009, 04:20:17 AM
NEW RACE GUYS!!!!
Leonardo! full race is here!

http://warcraft-source.com/board/index.php/topic,8964.0.html
December 02, 2009, 09:04:43 PM
New Mod Available to allow Player Configuration  Settings in Game:

http://warcraft-source.com/board/index.php/topic,8954.0.html
December 02, 2009, 08:31:47 PM
You should waste* some time in school
December 02, 2009, 07:45:33 PM
video games is waisting time....who disagree?
Recent
[Today at 07:11:21 AM]

[Today at 06:06:59 AM]

[Today at 02:27:43 AM]

by breh
[Today at 01:43:32 AM]

[Today at 01:13:25 AM]

[December 04, 2009, 11:03:30 PM]

[December 04, 2009, 10:59:24 PM]

[December 04, 2009, 10:55:20 PM]

[December 04, 2009, 10:50:23 PM]

[December 04, 2009, 09:25:15 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.377 seconds with 24 queries.