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-16 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
January 16, 2010, 07:26:24 AM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Races and Items added into Download section from our great Race Coders!
Such as... HOLLIDAY|NovaKiller|Stinkyfax|Frodo|TeacherCreature|Phat_Wizard
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: DanMister[RACE] 'Mario' (Python)  (Read 46 times)
DanMister
Level 7 Expert
*****
Online Online

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« on: November 28, 2009, 11:27:31 PM »

New Race 'Mario' enjoy!

Code
GeSHi (python):
########################
#   IMPORT MODULE
 
import es
import random
import gamethread
 
import wcs
########################
#   PUBLISH INFO
 
info = es.AddonInfo()
info.name = 'Mario'
info.author = 'DanMister'
 
########################
#   RACE INFO
 
RaceName = 'Mario'
race = wcs.Race(RaceName)
 
 
########################
#   SKILL INFO
 
race.registerSkill('Red Mushroom',1,5,'Extra health')
race.registerSkill('Green Mushroom',1,5,'Chance to respawn')
race.registerSkill('Purple Mushroom',1,5'Chance to drug enemy and extra damage')
race.registerSkill('Super Jump',1,5,'Marios famous super jump!(plus you will swim faster!)')
 
#######################
#   ULTIMATE INFO
 
race.registerUltimate('Star Power!',8,6,1,'add extra health,Speed')
 
#######################
#   CODE/PT.1 PLAYER_SPAWN
 
 
 
 
def player_spawn(ev):
   userid = int(ev['userid'])
   chance = random.randint(1,15)
   chance1 = random.randint(1,5)
   effect = wcs.Effect()
   player = playerlib.getPlayer(ev['userid'])
   Red = wcs.GetLevel(userid, RaceName, 'Red Mushroom')
   S-Jump = wcs.GetLevel(userid, RaceName, 'Super Jump')
 
   if Red < 3 and not Red == 0:
       player.SetHealth(125)
       effect.Misc3(ev['userid'],5,2)
 
   if Red = 3:
       player.SetHealth(150)
       effect.Misc3(ev['userid'],5,3)
 
   if Red > 3:
       player.SetHealth(175)
       effect.Misc3(ev['userid'],5,4])
 
           if S-Jump > 3 and not S-Jump == 0 and not player.onGround() == 0:
               wcs.Command(ev['userid']).ChangeGravity(.75)
               player.setSpeed(1.5)
 
           if S-Jump = 3 and player.onGround() = 0:
               wcs.Command(ev['userid']).ChangeGravity(.50)
               player.setSpeed(1.5)
 
           if S-Jump < 3 and player.onGround() = 0:
               wcs.Command(ev['userid']).ChangeGravity(.25)
               player.setSpeed(1.5)
 
#########################
#   CODE/PT.2 PLAYER_HURT
 
 
 
 
def player_hurt(ev):
   attacker = int(ev['attacker'])
   userid = int(ev['userid'])
   chance2 = random.randint(1,15)
   effect = wcs.Effect()
   player1 = wcs.Command(ev['userid'])
   player  = playerlib.getPlayer(ev['userid'])
   Purple = wcs.GetLevel(userid, RaceName, 'Purple Mushroom')
 
   if Purple >= chance2:
       player1.damage(5, 131072, ev['attacker'])
       player1.Drug(5)
       effect.Follow(ev['userid'], 125, 0, 125)
       effect.Beam2(ev['attacker'], ev['userid'], 5, 125, 0, 125)
 
#########################
#   CODE/PT.3 PLAYER_DEATH
 
 
 
 
def player_death(ev):
   userid = ev['userid']
   chance3 = random.randint(1,6)
   effect = wcs.effect()
 Green  = wcs.GetLevel(userid, raceName, 'Green Mushroom')  
       if Green >= chance3:
           wcs.Command(userid).Delayed(1, spawnUserid, userid)
           effect.Misc3(ev['userid']5,1)
 
##########################
#   CODE/PT.4 PLAYER_ULTIMATE
 
 
 
def player_ultimate(ev):
   userid = int(ev['userid'])
   player = playerlib.getPlayer(ev['userid'])
   S-Power = wcs.GetLevel(userid, RaceName, 'Star Power!')
   effect = wcs.effect()
 
   if S-Power < 3 and not S-Power == 0 and not wcs.Command(ev['userid']).GetCoolDown('Star Power!'):
       player.setSpeed(player.getSpeed()+.15)
       player.setHealth(player.getHealth()+50)
       effect.Misc5(ev['userid'], 5, 2)
       wcs.Command(ev['userid']).SetCoolDown('Star Power!',180)
 
   if S-Power = 3 and not wcs.Command(ev['userid']).GetCoolDown('Star Power!'):
       player.setSpeed(player.getSpeed()+.20)
       player.setHealth(player.getHealth()+75)
       effect.Misc5(ev['userid'], 5, 3)
       wcs.Command(ev['userid']).SetCoolDown('Star Power!',150)
 
   if S-Power > 3 and not wcs.Command(ev['userid']).GetCoolDown('Star Power!'):
       player.setSpeed(player.getSpeed()+.30)
       player.setHealth(player.getHealth()+100)
       effect.Misc5(ev['userid'], 5, 4)
       wcs.Command(ev['userid']).SetCoolDown('Star Power!',120)
 
############################
#   END OF CODE. FINISH WITH RACE! :D
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 #1 on: November 29, 2009, 12:54:07 AM »

Stop posting repeats... warned.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
January 14, 2010, 06:18:58 PM
here is the topic i created... please put the skills in there: http://warcraft-source.com/board/index.php/topic,9315.0.html
January 14, 2010, 06:15:26 PM
O.K. I started now the project for a new RaceCreator... I will programm it and upload it then.... would be nice if you could make a topic with all skills texno and all others (sepretated in "player_attacker" etc. )
January 14, 2010, 05:30:29 PM
yeah..
January 14, 2010, 04:11:46 PM
Oh i see... not very much skills / ultimates... and just maximum 4 lvl for the skills lol....
January 14, 2010, 04:08:57 PM
thanks, are there any bugs ?? I can't fix it because first : don't have the programm code and second : don't know if he wrote it in C#...^^
January 14, 2010, 11:37:50 AM
Here's the link... maby you can update it Termi ? "http://warcraft-source.com/board/index.php/topic,6199.0.html"

http://warcraft-source.com/board/index.php/topic,6199.0.html
January 13, 2010, 07:26:02 PM
No prob dude
Recent
[Today at 02:12:10 AM]

[Today at 12:02:45 AM]

[January 15, 2010, 11:58:57 PM]

[January 15, 2010, 11:42:07 PM]

[January 15, 2010, 11:25:21 PM]

[January 15, 2010, 11:04:53 PM]

[January 15, 2010, 10:44:43 PM]

by NeSo
[January 15, 2010, 07:20:35 PM]

[January 15, 2010, 06:07:34 PM]

[January 15, 2010, 05:01:54 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.23 seconds with 25 queries.