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:19:24 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  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: DanMister[RACE] 'NightStalker' (Python)  (Read 55 times)
DanMister
Level 7 Expert
*****
Online Online

United States United States

Posts: 205


no autographs, please.



Danthescam
danmi5ter
« on: November 28, 2009, 11:24:52 PM »

New Race 'NightStalker'
Code
GeSHi (python):
##################
# IMPORT MODULES
import es
import random
import gamethread
 
import wcs
##################
#   PUBLISH INFO
info = es.AddonInfo()
info.name = 'NightStalker'
info.author = 'DanMister'
 
##################
#   RACE INFO
#
RaceName = 'NightStalker'
race = wcs.Race(RaceName)
race.registerWeaponRestriction('allow only',['knife','glock','usp','mp5'])
 
###################
#   SILL INFO
 
race.registerSkill('Weapon of choice',5,1,"Recieve your favorite weapon, the mp5")
race.registerSkill('Sneaky Sneaky',5,1,'Invisibily')
race.registerSkill('Spectacles',3,1,'Nightvision(Required for Specatacle Skill)')
race.registerSkill('Spectactle skill',6,1,'Run faster,do more damage if Nightvision is on')
 
###################
#   ULTIMATE INFO
 
race.registerUltimate('Into the shadows',10,6,1,'Teleport into the shadows')
 
###################
#   CODE
 
 
 
def player_spawn(ev):
   userid = int(ev['userid'])
   chance1 = random.randint(1,5)
   chance2 = random.randint(1,3)
   chance3 = random.randint(1,6)
   effect = wcs.Effect()
   player  = playerlib.getPlayer(ev['userid'])
   weapon = wcs.GetLevel(userid, RaceName, 'Weapon of choice')
   Invis = wcs.GetLevel(userid, RaceName, 'Sneaky Sneaky')
   nvg = wcs.GetLevel(userid, RaceName, 'Spectacles')
   nvgSkills = wcs.GetLevel(userid, RaceName, 'Spectacle skill')
 
   if weapon >= chance1:
       es.server.queuecmd('est_Give %s weapon_mp5' % event_var['userid'])
       effect.Ring1(ev['userid'], 150, 5, 0, 0, 0)
       es.tell(userid, '#multi', text('You have recieved your weapon of choice.', lang = playerlib.getPlayer(userid).get("lang") ) )
 
       if Invis >= chance1:
           player.setcolor(255, 255, 255, 100)
           player.setWeaponColor(255, 255, 255, 100)
           es.tell(userid, '#multi', text('Your Invisibility has been set.', lang = playerlib.getPlayer(userid).get("lang") ) )
 
           if nvg >= chance2:
               player.setNightvision(1)
               player.setNightvisionState(1)
               es.tell(userid, '#multi', text('NightVision set.', lang = playerlib.getPlayer(userid).get("lang") ) )
 
                   if nvgSkills >= chance3 and player.getNightvisionState() < 1:
                       player.setSpeed(1.5)
                       es.tell(userid, '#multi', text('NightVision speed skill set', lang = playerlib.getPlayer(userid).get("lang") ) )
 
 
def player_hurt(ev):
   attacker = int(ev['attacker'])
   userid = int(ev['userid'])
   chance = random.randint(1,15)
   effect = wcs.Effect()
   player1 = wcs.Command(ev['userid'])
   player  = playerlib.getPlayer(ev['userid'])
   nvgSkills = wcs.GetLevel(userid, RaceName, 'spectacle skill')
 
   if nvgSkills >= chance and player.getNightvisionState() < 1:
       player1.damage(2, 2, ev['attacker'])
       effect.Beam1(ev['attacker'], ev['userid'], 2, 0, 70, 0)
 
 
def player_ultimate(ev):
   userid = int(ev['userid'])
   player = playerlib.getPlayer(ev['userid'])
   Teleport = wcs.GetLevel(userid, RaceName, 'Into the shadows')
   effect = wcs.Effect()
 
   if Teleport < 3 and not Teleport == 0 and not wcs.Command(ev['userid']).GetCoolDown('Into the shadows'):
       player.PushTo(player.getViewCoord(), 100)
       effect.Smoke(ev['userid'])
       wcs.Command(ev['userid']).SetCoolDown('Into the shadows',10)
       es.tell(userid, '#multi', text('You teleported into the shadows', lang = playerlib.getPlayer(userid).get("lang") ) )
 
   if Teleport = 3 and not wcs.Command(ev['userid']).GetCoolDown('Into the shadows'):
       player.PushTo(player.getViewCoord(), 100)
       effect.Smoke(ev['userid'])
       wcs.Command(ev['userid']).SetCoolDown('Into the shadows',5)
       es.tell(userid, '#multi', text('You teleported into the shadows', lang = playerlib.getPlayer(userid).get("lang") ) )
 
   if Teleport > 3 and not wcs.Command(ev['userid']).GetCoolDown('Into the shadows'):
       player.PushTo(player.getViewCoord(), 100)
       effect.Smoke(ev['userid'])
       wcs.Command(ev['userid']).SetCoolDown('Into the shadows',2)
       es.tell(userid, '#multi', text('You teleported into the shadows', lang = playerlib.getPlayer(userid).get("lang") ) )
 
# AND THATS IT!
###############################################################################################
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
« Last Edit: November 28, 2009, 11:29:45 PM by DanMister » 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:21 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.305 seconds with 25 queries.