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:13:24 AM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Remember to check on the FAQ before start posting.
It may save you time and effort.
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] ((My first race))  (Read 77 times)
DanMister
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« on: November 27, 2009, 08:40:13 PM »

Code
GeSHi (python):
#########################
#   Import module
 
import es
import random
import gamethread
 
import wcs
 
#########################
#   PUBLISH INFO
 
info = es.AddonInfo()
info.name = 'DanMister'
info.author = 'DanMister'
 
#########################
#   RACE INFO
 
RaceName = "DanMister"
   # Name the mod
race = wcs.Race(RaceName)
race.registerWeaponRestriction('allow only',['AWP','knife','deagle'])
 
 
#########################
#   SKILL INFO
 
race.registerSkill('Dan destroy you!',1,5,'Critical shot!')
race.registerSkill('Sneaky Dan',1,5,'Hey, where did Dan go?')
race.registerSkill('Vroom Vroom Dan',1,5,'vvvvvrrrooooommmm!!!!')
race.registerSkill("Haha... I came back!",1,8,"HE'S BACK!! RUN!!!")
race.registerSkill("Dan gets his favorite weapon!",1,3,"Give's Dan an Awp")
 
 
#########################
#   ULTIMATE INFO
 
race.registerUltimate("Aderal Dan...",8,5,1'Calms down others around dan to the point of paralysis')
 
#########################
 
 
 
 
def player_spawn(ev):    
   userid       = ev['userid']
   userteam     = ev['es_userteam']
   player       = wcs.Command(userid)
 
Invisibility = wcs.GetLevel(userid, raceName, 'Sneaky Dan')
Speedy = wcs.GetLevel(userid, raceName, 'Vroom Vroom Dan')
Weapon = wcs.GetLevel(userid, raceName, 'Dan gets his favorite weapon!')
chance2 = random.randint(1,7)
chance3 = random.randint(1,5)
   # Chooses a random number
 
                       if Invisibility >= chance2:    
                           wcs.Command(userid.Color(alpha=400)
                                   # And thats invisibility! : D
 
                                   if Speedy >= chance:    
                                       plevel = Speedy * int(unholyPercent) * .01
                                       player.SpeedAdd(plevel)
                                       es.tell(userid, '#multi', text('Man, Dan is fast!', {'speed': plevel * 100}, playerlib.getPlayer(userid).get("lang") ) )
                                           # And thats speed boost! : D
 
                                       if Weapon >=chance3:    
                                           es.server.queuecmd('est_Give %s weapon_AWP'%event_var['userid'])
                                           wcs.effect().Misc2(userid,3,3)
 
def player_hurt(ev):    
   userid = ev['userid']
   userteam = ev['es_userteam']
   attacker = ev['attacker']
   attackerteam = ev['es_attackerteam']
   CritStrke = wcs.GetLevel(userid, raceName, 'Dan destroy you!')
   chance = random.randint(1,10)
 
   if CritStrike >= chance and if userteam ! = attacker and attackerteam:    
                     # user's are on opposite teams and the critstrike happened, so we can do the crit strike.
       damage = critStrike * int(critStrikeDamage)
       wcs.Command(userid).Damage(damage, 32, attacker)
               tokens             = {}
               tokens['victim']   = ev['es_username']
               tokens['attacker'] = ev['es_attackername']
               tokens['damage']   = damage
               es.tell(userid,     '#multi', text('critical strike victim',  tokens, playerlib.getPlayer(userid).get("lang"))
               es.tell(attacker,   '#multi', text('critcal strike attacker', tokens, playerlib.getPlayer(attacker).get("lang"))
               wcs.effect.Beam2(attacker, userid, 3, 100, 255, 0)
                       # And that is Crit strike! : D
 
 
 
 
 
 
 
 
def player_death(ev):    
   userid = ev['userid']
   rein   = wcs.GetLevel(userid, raceName, 'Haha... I came back!')
   if rein:    
       rand = rand.randint(1,7)
       if rand <= rein * int(reinPercent):    
           wcs.Command(userid).Delayed(1, spawnUserid, userid)
 
def spawnUserid(userid):    
   if len(filter(lambda x: not es.getplayerprop(x, 'CBasePlayer.pl.deadflag') and es.getplayerteam(x) == es.getplayerteam(userid),es.getUseridList() ) ):
       # If team-mate is alive...
   wcs.Command(userid.Spawn()
   wcs.effect.Smoke(userid)
   es.tell(userid, '#multi', text('DAN IS BACK!', lang = playerlib.getPlayer(userid).get("lang") ) )
               # And thats respawn! : D
 
 
def player_ultimate_on(ev):    
               userid = int(ev['userid'])
               freeze = wcs.GetLevel(userid, raceName, "Aderal Dan...")
               if freeze:    
                   filter = '#ct' if ev['es_userteam'] == '2' else '#t'
                   wcs.Command(userid).Near(1000, stun, filter)
                   wcs.Command(userid).SetCoolDown('freeze', int(entangleCoolDown) )
 
def stun(userid, attacker):    
   wcs.Command(userid.Freeze(wcs.GetLevel(attacker, raceName, 'Freeze') * int(entangeDuration) )
   wcs.effect.Beam2(attacker, userid, 1.5, 255, 255, 255)
   es.tell(userid, '#lightgreen', text('Time to take your medicine...', lang = playerlib.getPlayer(userid).get("lang") ) )
               # And thats Freeze ultimate! : D
 
 
 
               # AND I'M DONE! W00T!!!
 
#############################################################################################################################              
 
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
[Oddity]TeacherCreature
Moderator
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 1412



WWW
bonggged

myServer 72.5.102.44:27015
(Warning: click connects through Steam)
« Reply #1 on: November 28, 2009, 05:33:02 PM »

I dont know python so I can not review this race, someone else will have to but please keep the format correct.
Logged

DanMister
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« Reply #2 on: November 28, 2009, 06:19:34 PM »

oddity, you should learn python! lol but no i've already had this race reviewed and the what not its been revised, editied, and double edit'd, so its all good.
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
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.321 seconds with 25 queries.