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 2008-04-10 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
April 10, 2008, 11:54:58 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

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: First Race  (Read 77 times)
Dr Stank
Level 0 Beginner

Offline Offline

United States United States

Posts: 1



« on: March 13, 2008, 11:19:45 AM »

Aight so i aint no advanced coder so i "Leeched" sum codes but not much so tell me what ya think.

Code
GeSHi (python):
'''
Straite G WCS:Python Race Coded By: Sv | Dr Stank
'
''
import wcs, es, random, playerlib, gamethread
from wcs import wcs
RaceName = 'Straite G'
allowed_weapons = ('knife','deagle','ak47','awp')
wcs.Race(RaceName).registerWeaponRestriction('allow only',allowed_weapons)
wcs.Race(RaceName).registerSkill('G Knife', 5, 2, 'Stab like a real motherfuckin G!')
wcs.Race(RaceName).registerSkill('G Punch', 4, 1, 'Knock out Dat bitch')
wcs.Race(RaceName).registerSkill('G Jump', 4, 1, 'Saw sum hot girls N ya can now jump longer cuz of your Boner')
wcs.Race(RaceName).registerUltimate('G Code', 7, 3, 2, 'Use +ultimate to Become A real G')
wcs.Race(RaceName).registerMinLevel(222)
 
def player_hurt(event_var):
   userid = event_var['userid']
   attacker = event_var['attacker']
   weapon = event_var['weapon']
   Sharp_claws = wcs.GetLevel(attacker, RaceName, 'G Knife')
   if Sharp_claws:
       if weapon == "knife":
           wcs.Command(userid).Damage(Sharp_claws*2)
           es.tell(attacker, '#green', 'Ya just got stabbed by a real G')  
           if random.randint(1,2) <= Sharp_claws:
               wcs.Command(userid).Drain(1,1,250)
               es.tell(attacker, '#green', 'Ya jsut got stabbed by a real G')
               wcs.Effect().Follow(userid, 175, 200 , 15)
   Up_blast = wcs.GetLevel(attacker, RaceName, 'G Punch')
   if Up_blast:
       if random.randint(1,2) <= Up_blast:
           wcs.Command(userid).Push(0,0,600)
 
def player_jump(event_var):
   userid = event_var['userid']
   LongJump = wcs.GetLevel(userid, RaceName, 'G Jump')
   if LongJump:
       wcs.Effect().Ring1(userid, 200, 2, 125, 200, 180)
       temp_multiplier = LongJump / 400
       es.setplayerprop(userid, 'CBasePlayer.localdata.m_vecBaseVelocity', '%s,%s,%s' % tuple([es.getplayerprop(userid, 'CBasePlayer.localdata.m_vecVelocity[%s]' % x) * temp_multiplier for x in range(3)]))
       gamethread.delayed(0.2, Cool, userid)
       gamethread.delayed(0.4, Cool, userid)
       gamethread.delayed(0.6, Cool, userid)
       gamethread.delayed(0.8, Cool, userid)
       gamethread.delayed(1.0, Cool, userid)
       gamethread.delayed(1.2, Cool, userid)  
       gamethread.delayed(1.4, Cool, userid)  
       gamethread.delayed(1.6, Cool, userid)  
       gamethread.delayed(1.8, Cool, userid)      
 
def Cool(userid):
   wcs.Effect().Ring1(userid, 500, 2, 125, 200, 180)
 
def player_ultimate_on(event_var):
userid = int(event_var['userid'])
if wcs.GetLevel(userid, RaceName, 'Tornado'):
point = wcs.Command(userid).GetViewCoord()
wcs.Command(userid).UpdateDict('torn location', point)
es.server.queuecmd('est_freeze %s 1'%userid)
gamethread.delayed(15,ultiOut,userid)
wcs.Command(userid).UpdateDict('torn',1)
torn_loop(userid, point)
def player_ultimate_off(event_var):
userid = int(event_var['userid'])
if not wcs.Command(userid).GetCoolDown('Tornado'):
ultiOut(userid)
def torn_loop(userid, coord):
if wcs.Command(userid).ReturnDict('torn'):
gamethread.delayed(1, torn_loop, (userid, coord))
wcs.Command(userid).NearCoord(coord[0],coord[1],coord[2],500,500,500,torn_target)
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2],30,50,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+10,40,60,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+20,50,70,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+30,60,80,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+40,70,90,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+50,80,100,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+60,90,110,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+70,100,120,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+80,110,130,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+90,120,140,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+100,130,150,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+110,140,160,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+120,150,170,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+130,160,180,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+140,170,190,1.5,0,125,255))
es.server.queuecmd('est_effect 10 #a 0 sprites/lgtning.vmt %s %s %s %s %s %s 5 0 2 %s %s %s 128 10'%(coord[0],coord[1],coord[2]+150,180,200,1.5,0,125,255))
def torn_target(userid, attacker):
wcs.Effect().Beam1(attacker,userid,1.5,200,0,204)
wcs.Command(userid).Damage(150,320,attacker)
pull_place = wcs.Command(attacker).ReturnDict('torn location')
es.server.queuecmd('est_pushto %s %s %s %s 5'%(userid, pull_place[0], pull_place[1], pull_place[2]+40))
def ultiOut(userid):
wcs.Command(userid).UpdateDict('torn',0)
es.server.queuecmd('est_freeze %s 0'%userid)
wcs.Command(userid).SetCoolDown('Tornado',1)
[Code]
[/code]
« Last Edit: March 21, 2008, 11:19:28 PM by Legend » Logged
Jeff
WCS ESP Dev Team
Level 7 Expert

Online Online

United States United States

Posts: 295



WWW
beastrace91
« Reply #1 on: March 13, 2008, 09:43:21 PM »

You forgot to change the names of the ulti when you use wcs.GetLevel

~J3ff
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 08:23:54 PM
not really power, there are bad people and there are people who are killing other people, and there are people who are destroying other people.
Today at 05:07:31 PM
Who's happy ? ^^
Today at 04:45:28 PM
Yea, well be happy that there is still some people whom behave like me... without... the world would be a boring(better) place.... wich sucks...
Today at 02:43:59 PM
i'm not serious, i'm just pointing how do you behave (always)
Today at 10:16:51 AM
all im doing is keeping an uppy attitude... im trying to look a bit positive at this... you arez teh ones always being negative... yo uguys shouldnt be so F*kin Serious...
April 09, 2008, 08:11:39 PM
thats not positive feedback at all, it is just making that guy more frustrated
April 09, 2008, 04:52:39 PM
you mean "postive feedback"?
Recent
by Jeff
[Today at 11:50:15 PM]

[Today at 10:48:04 PM]

by Jeff
[Today at 08:55:56 PM]

by Jeff
[Today at 08:48:07 PM]

[Today at 08:10:58 PM]

[Today at 07:21:15 PM]

by Jeff
[Today at 06:24:17 PM]

[Today at 05:37:32 PM]

[Today at 05:27:50 PM]

[Today at 05:24:58 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.164 seconds with 24 queries.