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-09-25 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
September 25, 2009, 05:08:27 AM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Please obey the rules, to achieve a pleasent order in our community.
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
Author Topic: Shadow Hunter  (Read 219 times)
freddukes
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 292



« on: March 01, 2008, 01:44:14 AM »

Okay.. Here is Shadow Hunter... Not fully tested yet, I've only really tested the Heal and Serpent (the serpents still don't work right, but they're cool enough Smiley)... Hmm the Heal command isn't cheap like all the others, it does it exactly like it should...  Fire you aim on who you want to 'heal'.. Then it'll ping from that person to another close team mater, except it'll loose 'healing power' when it pings...

Code
GeSHi (python):
import es, wcs, gamethread, random, popuplib, playerlib
from wcs import wcs
 
name = 'Shadow Hunter'
race = wcs.Race(name)
race.registerSkill('Healing Wave',5,2,'Calls forth a wave of energy that heals a target and bounces to nearby friendlies.')
race.registerSkill('Hex',6,1,'Have a chance to slow down your enemies!')
race.registerSkill('Serpent Ward',6,3,'Summons an immobile serpentine ward to attack the Shadow Hunter\'s enemies')
race.registerUltimate('Big Bad Voodo',6,7,4,'Turns all friendly units invulnerable in an area around the Shadow Hunter.')
race.registerMinLevel(60)
 
def load():
a = popuplib.create('Shadow_Ability')
b = a.addline
b('Shadow Hunters Abilities!')
b('--------------------------')
b('Please select an ability to')
b('do.')
b(' ')
b('->1. Healing Wave')
b(' ')
b('->2. Serpent Ward')
b(' ')
b('--------------------------')
b('0. Cancel')
a.menuselect = AbilityChoice
 
def AbilityChoice(userid, choice, popupid):
if choice < 3:
if choice == 1:
HealingWave(userid)
else:
SerpentWard(userid)
popuplib.send('Shadow_Ability',userid)
 
def round_start(ev):
SerpentWardLoop()
 
def round_end(ev):
gamethread.cancelDelayed('Serpent_loop')
 
def player_ability_on(ev):
uid = ev['userid']
if not wcs.Command(uid).GetCoolDown('Serpent Ward') or not wcs.Command(uid).GetCoolDown('Healing Wave'):
sw = wcs.GetLevel(uid,name,'Serpent Ward')
hw = wcs.GetLevel(uid,name,'Healing Wave')
if sw and not hw:
# Shadow Ward, and not Healing wave
SerpentWard(uid)
elif hw and not sw:
HealingWave(uid)
elif hw and sw:
popuplib.send('Shadow_Ability',uid)
 
def HealingWave(userid):
cooldown = wcs.Command(userid).GetCoolDown('Healing Wave')
if not cooldown:
target = wcs.Command(userid).GetViewPlayer()
if target and es.getplayerteam(target) == es.getplayerteam(userid):
level = wcs.GetLevel(userid,name,'Healing Wave')
if level:
heal = level * 10
wcs.Command(target).Heal(level * 5)
banned_list = [int(userid),target]
x,y,z = es.getplayerlocation(userid)
wcs.Effect().BeamCustom('#a',0,'sprites/halo01.vmt',x,y,z,x,y,z+400,5,80,40,255,0,255,155)
HealingWaveLoop(target, heal, banned_list)
wcs.Command(userid).SetCoolDown('Healing Wave',20)
else:
es.tell(userid,'#multi','#greenHealing Wave #default- #lightgreenYou must be aiming on a team-mate to use Healing Wave.')
else:
es.tell(userid,'#multi','#greenHealing Wave #default- #lightgreenYou cannot use Healing Wave for another %s seconds!'%cooldown)
 
def HealingWaveLoop(target, heal, banned_list):
x,y,z = es.getplayerlocation(target)
allow_list = []
for player in playerlib.getPlayerList('%s'%('#t' if es.getplayerteam(target) == '3' else '#ct')):
if int(player) != target and int(player) not in banned_list:
xx,yy,zz = es.getplayerlocation(int(player))
distance = ((x-xx) ** 2 + (y -yy)**2 + (z-zz) ** 2) ** 0.5
if distance <= 500:
allow_list.append(int(player))
if len(allow_list):
a = wcs.Effect()
random_player = random.choice(allow_list)
a.Beam4(target,random_player,2,255,0,0)
a.Ring4(random_player,150,75,4,60,80,0,255,0)
banned_list.append(random_player)
heal = int(round(heal/0.6))
wcs.Command(random_player).Heal(heal)
gamethread.delayed(0.5,HealingWaveLoop,(random_player,heal,banned_list))
 
serpent_dict = {}
def SerpentWard(userid):
cooldown = wcs.Command(userid).GetCoolDown('Serpent Ward')
if not cooldown:
level = wcs.GetLevel(userid,name,'Serpent Ward')
if level:
x,y,z = es.getplayerlocation(userid)
if not serpent_dict.has_key(int(userid)):
serpent_dict[int(userid)] = {'one':{'x':x,'y':y,'z':z,'timer':20}}
es.tell(userid,'#multi','#greenSerpent Ward #default- #lightgreenYou have just placed a Serpent Ward (1/2).')
elif not serpent_dict[int(userid)].has_key('one'):
serpent_dict[int(userid)]['one'] = {'x':x,'y':y,'z':z,'timer':20}
es.tell(userid,'#multi','#greenSerpent Ward #default- #lightgreenYou have just placed a Serpent Ward (1/2).')
else:
if not serpent_dict.has_key('two'):
serpent_dict[int(userid)]['two'] = {'x':x,'y':y,'z':z,'timer':20}
es.tell(userid,'#multi','#greenSerpent Ward #default- #lightgreenYou have just placed a Serpent Ward (2/2).')
else:
serpent_dict[int(userid)]['%s'%('one' if serpent_dict[int(userid)]['one']['timer'] >= serpent_dict[int(userid)]['two']['timer'] else 'two')] = {'x':x,'y':y,'z':z,'timer':20}
es.tell(userid,'#multi','#greenSerpent Ward #default- #lightgreenYou have just overwrote a Serpant Ward.')
wcs.Command(userid).SetCoolDown('Serpent Ward',10)
else:
es.tell(userid,'#multi','#greenSerpent Ward #default- #lightgreenYou cannot use this skill for another %s seconds.'%cooldown)
 
def player_spawn(ev):
global serpent_dict
if serpent_dict.has_key(int(ev['userid'])):
del serpent_dict[int(ev['userid'])]
wcs.Command(ev['userid']).UpdateDict('Hexed',0)
 
def SerpentWardLoop():
global serpent_dict
if len(serpent_dict):
deleting = []
for player in serpent_dict:
level = wcs.GetLevel(player,name,'Serpent Ward')
for index in serpent_dict[player]:
timer = serpent_dict[player][index]['timer']
if timer:
serpent_dict[player][index]['timer'] = timer - 1
x = serpent_dict[player][index]['x']
y = serpent_dict[player][index]['y']
z = serpent_dict[player][index]['z']
wcs.Effect().RingCustom('#a','0','sprites/lgtning.vmt',x,y,z,20,level*40,1,20,100,1,255,150,70,100,10)
for target in playerlib.getPlayerList('%s'%('#t' if int(es.getplayerteam(player)) == 3 else '#ct')):
xx,yy,zz = es.getplayerlocation(int(target))
distance = ((x-xx) ** 2 + (y -yy)**2 + (z-zz) ** 2) ** 0.5
if distance <= (level*40):
if not int(es.getplayerprop(userid,'CBasePlayer.pl.deadflag')):
wcs.Command(target).Damage(level * random.randint(4,6), 32, player)
wcs.Effect().BeamCustom('#a','0','sprites/lgtning.vmt',x,y,z+30,xx,yy,zz+30,1,10,20,255,150,70,255)
else:
temp_key = '%s:%s'%(player,index)
deleting.append(temp_key)
es.tell(player,'#multi','#greenSerpent Ward #default- #lightgreenA Serpent Ward has dissapeared!')
if len(deleting):
for key in deleting:
args = key.split(':')
del serpent_dict[int(args[0])][args[1]]
gamethread.delayedname(1,'Serpent_loop',SerpentWardLoop)
 
 
def player_disconnect(ev):
global serpent_dict
userid = int(ev['userid'])
if serpent_dict.has_key(userid): del serpent_dict[userid]
 
def est_map_end(ev):
global serpent_dict
serpent_dict.clear()
 
def player_hurt(ev):
userid = int(ev['userid'])
attacker = int(ev['attacker'])
if ev['es_userteam'] != ev['es_attackerteam'] and attacker and not wcs.Command(userid).ReturnDict('Hexed'):
Hex = wcs.GetLevel(attacker,name,'Hex')
if Hex and random.randint(1,100) <= Hex:
wcs.Command(userid).UpdateDict('Hexed',1)
speed = wcs.Command(userid).ReturnDict('Speed')
divider = speed/(1 + (Hex * 0.2))
# This should divide the speed by: 1.2, 1.4, 1.6, 1.8, 2.0, 2.2
wcs.Command(userid).Speed(divider)
es.tell(userid,'#multi','#greenHex #default- #lightgreenPlayer %s has slowed you to %.0f%% of your maximum speed!'%(ev['es_attackername'],(100 * divider  * speed)))
es.tell(attacker,'#multi','#greenHex #default- #lightgreenYou have slowed player %s to %.0f%% of his maximum speed!'%(ev['es_username'],(100 * divider * speed)))
gamethread.delayed(3,wcs.Command(userid).Speed,speed)
gamethread.delayed(3,wcs.Command(userid).UpdateDict,('Hexed',0))
 
def player_ultimate_on(ev):
userid = int(ev['userid'])
level = wcs.GetLevel(userid,name,'Big Bad Voodo')
if level:
wcs.Command(userid).Near(level*50,God,'%s'%('#t' if int(es.getplayerteam(userid)) == 2 else '#ct'))
wcs.Command(userid).SetCoolDown('Big Bad Voodo',30)
x,y,z = es.getplayerlocation(userid)
wcs.Effect().RingCustom('#a','0','sprites/lgtning.vmt',x,y,z,20,level*50,1,20,100,1,255,0,0,100,10)
 
def God(userid, friend_id):
level = wcs.GetLevel(friend_id,name,'Big Bad Voodo')
wcs.Command(userid).God(level)
a = wcs.Effect()
a.Ring4(userid,150,50,level,50,100,255,0,255)
 
« Last Edit: March 01, 2008, 03:56:51 PM by freddukes » Logged

Espeladden
Pwning ultra sexy beastly hot legend
Level 7 Expert
*****
Offline Offline

Norway

Posts: 590



WWW
Gastingor
Mursat

myServer 74.86.98.64:27017
(Warning: click connects through Steam)
« Reply #1 on: March 01, 2008, 02:10:48 AM »

Love the healing <3
Logged

Zero Skillz
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 525




Zero Skillz (<-[SD]->madcow)
madcow767
« Reply #2 on: March 01, 2008, 04:43:08 AM »

woot my fav race!!!! great job guys Cheesy
Logged

Jeff
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 458



WWW
beastrace91
« Reply #3 on: March 01, 2008, 05:09:45 AM »

Good good but here:
Code
GeSHi (python):
b('Shadow Hunters Abilities!')
should be
Code
GeSHi (python):
b('Shadow Hunter\'s Abilities!')
Grammar error Tongue

~J3ff
Logged

freddukes
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 292



« Reply #4 on: March 01, 2008, 03:57:11 PM »

Race is fixed with cooler effects Smiley All skills tested now

-freddukes
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
September 24, 2009, 09:43:13 PM
haha, pink name = spammer Cheesy
September 24, 2009, 09:30:55 PM
can i have a pink name then? Cheesy
September 24, 2009, 01:50:58 PM
I prefer to get paid in onion rings but beer works lol - ps I want my name in red too biatch
September 23, 2009, 08:14:10 PM
LOL !!!!
September 23, 2009, 07:43:10 PM
..
September 23, 2009, 07:15:15 PM
in that case tc's place sounds interesting for a metal fest ^^
September 23, 2009, 05:15:30 PM
Up there where TeacherCreature stay they dont pay in $$$ they pay man in BEER...and there is never enough beer.
Recent
by Kay
[Today at 02:00:05 AM]

[Today at 12:35:14 AM]

[Today at 12:34:11 AM]

[September 24, 2009, 11:09:05 PM]

[September 24, 2009, 10:51:28 PM]

[September 24, 2009, 10:25:13 PM]

[September 24, 2009, 10:23:36 PM]

[September 24, 2009, 10:22:06 PM]

[September 24, 2009, 09:50:01 PM]

[September 24, 2009, 09:47:44 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.438 seconds with 23 queries.