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-02-04 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
February 04, 2010, 04:14:57 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: WCS2 - wc3:ft races!  (Read 1074 times)
7355608
Level 1 Trained Beginner
*
Offline Offline

Canada Canada

Posts: 20



rsin314159
« on: February 28, 2008, 10:35:54 PM »

Ok guys here is my wcs2, this is basically wcs written in python, with frozen throne races for default.

The help command is "help" in-game.

For ultimates bind a key to !ultimate
For abilities bind a key to !ability

I'll add more spec's to this page shortly.
If you want to see the default values/races/etc. please go here, I don't want to re-write this again.
http://www.ninjaserve.org/forums/forum30-half-life-2-mods/7362-new-mod-skills-items.html

Please note also that this mod requires EST v.420
This mod uses my damage library and a customized popuplib.
The popuplib is GodJonez's, except I have added a command that clears the menu queues. He has flat out refused to add this feature, and so I have added it myself. I had him look at the code, and other then not liking the feature he says it should be fine. It will not conflict with other scripts using popuplib, just clears the players menu queues when a menu from wcs2 is run for them.

Please note there is another team working on a wcs for python. I would invite them to join with me if they so choose to. I have no problems with expanding this mighty team of 1. I could use a break from the headaches.

Future releases will include more documentation. This is just the first beta release. I have tested it on a closed beta with a 32 slot linux server, and a 20 slot windows server. The mod is stable, and fully functional. It allows for adding and removing of races and items. You can add additional item menus as well. As many features as I could think of, and as many as I was asked to add. Please give it a good testing, and let me know what you think.

Be warned, flamers will have their posts removed. Contructive critizism, and positive attitudes please.

[attachment deleted by admin - older than 200 days!]
« Last Edit: February 28, 2008, 11:00:07 PM by 7355608 » Logged

 
kryptonite
<WCS coder>
Administrator
Level 7 Expert
*****
Offline Offline

Germany Germany

Posts: 1110



WWW
sp0nk

myServer 85.190.38.232:27015
(Warning: click connects through Steam)
« Reply #1 on: February 29, 2008, 12:17:45 AM »

to makes things clear, you (Bombcode) should mention that you coded the script in thought of be WC3:FT like.

If its hard to add races and custom stuff, its no real "Warcraft:Source" or whatever you call it.

Anyway, many people like an original gameplay, without bugged and c/p races, so they want WC3:FT.

Jeff and Freddukes did a great job and coded a WCS-like, flexible and customizable script!

Respect to all coders!

I hope all Python coders will understand that there's another mod, which maybe is a bit different.
I don't want you to challenge each other.
Logged
7355608
Level 1 Trained Beginner
*
Offline Offline

Canada Canada

Posts: 20



rsin314159
« Reply #2 on: February 29, 2008, 12:32:16 AM »

Right now this is still a beta release, all the races are added inside the file. You do not code them seperately then import. I will be looking into that option later on.

Basically the race class is what dictates what all the races are capable of, to make new races you simply copy the same format as any of the other races. Then modify it to suit the race. All that stuff you quoted at the bottom of the races is part of them as well. It's mostly for the menus, and tells wcs2 how to call your race instance.

Code
GeSHi (python):
class Human(Race):
"Human Skills"
def __init__(self, wc_userid, wc_race='Human Alliance'):
# all this stuff here is for later reference, the ult_* are for determining what type of ultimate you are using.
global wc_users
wc_steamid = es.getplayersteamid(wc_userid)
self.steamid = wc_steamid
self.uid = wc_userid
wc_race = 'Human Alliance'
self.ln = wc_race
self.sn = 'Human'
self.race = wc_race
self.level = wc_users[wc_steamid][wc_race]['level']
self.ult_viewtarget = 0
self.ult_target = 0
self.ult_coord = 1
self.ult_skill = 0
# This sets up your skills, what values are used at what level
self.skills = {"bash": {1:11,2:22,3:33}, "invisibility": {1:200,2:175,3:135}, "devotion_aura": {1:15,2:30,3:45}, "teleport": {1:1}}
# this is in every race. This just sets all your current skills inside your temporary database entry
self.skill = {}
for wc_tmp in self.skills:
self.skill[wc_tmp] = wc_users[wc_steamid][wc_race][wc_tmp]
 
#this is how you define your skills, they should be named the same as above, and the return value from the menus
# any other functions that are run from your skills, can be named whatever you want
def invisibility(self,wc_lvl=0):
if not wc_lvl:
if not self.skill['invisibility']:
return 0
wc_lvl = self.skill['invisibility']
if wc_lvl > 0:
es.server.queuecmd('es_fire ' + str(self.uid) + ' !self addoutput \"rendermode 1\"')
es.server.queuecmd('es_fire ' + str(self.uid) + ' !self alpha ' + str(self.skills['invisibility'][wc_lvl]))
elif wc_lvl < 0:
es.server.queuecmd('es_fire ' + str(self.uid) + ' !self addoutput \"rendermode 1\"')
es.server.queuecmd('es_fire ' + str(self.uid) + ' !self alpha 255')
 
def devotion_aura(self,wc_lvl=0):
global wc_users
if not wc_lvl:
if not self.skill['devotion_aura']:
return 0
wc_lvl = self.skill['devotion_aura']
wc_tmp = playerlib.getPlayer(self.uid)
wc_tmphp = wc_tmp.get('health') + self.skills['devotion_aura'][wc_lvl]
gamethread.delayed(0.3,wc_tmp.set,('health',wc_tmphp))
wc_users[self.steamid]['maxhp'] += self.skills['devotion_aura'][wc_lvl]
 
def bash(self,wc_victim,wc_lvl=0):
if not wc_lvl:
if not self.skill['bash']:
return 0
wc_lvl = self.skill['bash']
wc_rand = random.randint(1,100)
if wc_rand <= self.skills['bash'][wc_lvl]:
wc_tmp = playerlib.getPlayer(wc_victim)
wc_tmp.set('freeze',1)
#es.msg('#green','Froze player: ' + es.getplayername(wc_victim))
gamethread.delayed(0.75,wc_tmp.set,('freeze',0))
 
def teleport(self,wc_viewcoord):
wc_player_coord = vecmath.vector(es.getplayerlocation(self.uid))
wc_tmpvec = wc_viewcoord - wc_player_coord
wc_tmplen = vecmath.length(wc_tmpvec)
if wc_tmplen > 50.0:
wc_tmplen -= 50.0
wc_tmp = vecmath.setlength(wc_tmpvec,wc_tmplen)
wc_teleportvec = wc_player_coord + wc_tmp
wc_blinkcheck = check_blinkcoord(self.uid,wc_teleportvec)
if not wc_blinkcheck:
wc_dir = es.getplayerprop(self.uid,'CBasePlayer.baseclass.baseclass.baseclass.baseclass.baseclass.m_angRotation')
wc_startvec = es.createvectorstring(wc_player_coord['x'],wc_player_coord['y'],wc_player_coord['z'])
wc_startvec2 = es.createvectorstring(wc_player_coord['x'],wc_player_coord['y'],wc_player_coord['z'] + 200.0)
wc_endvec = es.createvectorstring(wc_teleportvec['x'],wc_teleportvec['y'],wc_teleportvec['z'])
wc_endvec2 = es.createvectorstring(wc_teleportvec['x'],wc_teleportvec['y'],wc_teleportvec['z'] + 200.0)
wc_tmpdir = es.splitvectorstring(wc_dir)
wc_newdir = []
for wc_tdir in wc_tmpdir:
wc_newdir.append(wc_tdir * -1)
wc_enddir = es.createvectorstring(wc_newdir[0],wc_newdir[1],wc_newdir[2])
es.server.queuecmd('est_effect_26 #a!b 0.0 ' + wc_startvec + ' ' + wc_dir + ' 10 1')
es.server.queuecmd('est_Effect_06 #a!b 0.0 sprites/plasmabeam.vmt ' + wc_startvec + ' ' + wc_startvec2 + ' 15 1 50 75 10 1 255 255 255 150 50')
es.setpos(self.uid,wc_teleportvec['x'],wc_teleportvec['y'],wc_teleportvec['z'])
es.server.queuecmd('est_effect_26 #a!b 0.0 ' + wc_endvec + ' ' + wc_enddir + ' 10 1')
es.server.queuecmd('est_Effect_06 #a!b 0.0 sprites/plasmabeam.vmt ' + wc_endvec2 + ' ' + wc_endvec + ' 15 1 50 75 10 1 255 255 255 150 50')
es.server.queuecmd('est_fade ' + str(self.uid) + ' 0 0.5 0 255 255 255 126')
gamethread.delayed(0.5,self.check_teleport,wc_player_coord)
else:
es.server.queuecmd('est_csay ' + str(self.uid) + ' Teleport Blocked')
else:
gamethread.cancelDelayed('ult' + str(self.uid))
gamethread.delayedname(0.1,'ult' + str(self.uid),wc_enable_ult,self.uid)
es.server.queuecmd('est_csay ' + str(self.uid) + ' Teleport distance too short')
 
def check_teleport(self,wc_oldpos):
if int(es.getplayerprop(self.uid,"CBasePlayer.localdata.m_hGroundEntity")) == -1:
es.server.queuecmd('est_csay ' + str(self.uid) + ' Bad Teleport')
es.setpos(self.uid,wc_oldpos['x'],wc_oldpos['y'],wc_oldpos['z'])
gamethread.cancelDelayed('ult' + str(self.uid))
gamethread.delayedname(3.0,'ult' + str(self.uid),wc_enable_ult,self.uid)
 
# this is where the fun begins, This is what determines what to do on this event.
# the list of events are in the main Race class, any events you don't use, don't worry about the default class will take care of it
# as you can see here, humans only have 1 skill that's passed to an offensive attack, the wc_kill tells it wether the player is dead or not so you can determine whether to fire the skill or not
# no point in freezing them if they're already dead
# note that the inputs are default, you cannot change it, that is why this is here
# this allows you to pass the specific values that are needed for the skills
def offensive(self,wc_eventvars,wc_kill):
if not wc_kill:
self.bash(int(wc_eventvars['userid']))
 
# this determines the ultimate to use when they use the !ultimate command
# in this case we're passing a "victim" but it's not actually a userid, it's a vector for where they're looking
# python doesn't care what is in there, only that you pass it something, or in this case it can pass nothing since it defaults to 0
def ultimate(self,wc_victim=0):
self.teleport(wc_victim)
 
# this determines what skills are run on spawn, so nothing is needed to be passed
# the wc_users is the temporary db that stores the current players that are on the server
def spawn(self):
global wc_users
self.invisibility()
self.devotion_aura()
if self.skill['teleport']:
wc_users[self.steamid]['ultimate'] = 1
 
# now all of this below is mostly for the menus, and calling the instance of the race
# for the sake of having your menus come up in a specific order I have created a seperate list for just the race names
# wc_races_list stores all the menu info, the 'instance' is what is used to call the instance of your race, it has to be the same as the name of the race class you made
# Ultimates have 1 level, so they are defined as ultimates aka 'ult', they also are not accessible until the specified level (default 6)
wc_races_list['Human Alliance'] = {'instance':Human, 'skills': {"bash": 'skill', "invisibility": 'skill', "devotion_aura": 'skill', "teleport": 'ult'}}
wc_races_list['Human Alliance']['display'] = ['Invisibility','Devotion Aura','Bash','Teleport']
wc_races_list['Human Alliance']['return'] = ['invisibility','devotion_aura','bash','teleport']
wc_races_list['Human Alliance']['info'] = ['Partial Invisibility','Increases Your Max HP','Chance to Freeze Enemies for 1 sec','Teleport to Where You Look']
# this is where you add to the menu, w/o this you will not be able to see the race in the menu
wc_racelist.append('Human Alliance')
 

so where you place this race in the file, determines the order in which it will be displayed. Alternatively you could just make the list and take it out of the bottom of every race. I did it this way to make it easy.
Logged

Jeff
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 458



WWW
beastrace91
« Reply #3 on: February 29, 2008, 12:54:58 AM »

*hugs bombtimer*

Peace and Love Man Smiley

~J3ff
Logged

fanggaming
Level 0 Beginner

Offline Offline

United Kingdom

Posts: 8



« Reply #4 on: February 29, 2008, 09:40:17 AM »

Well hopefully all the politics will be sorted Wink

This looks awesome we are still playing the old style WC3FT on 1.6 would be great to have a CS:S server along side it thanks a lot mate Smiley

I have put up a test server will let you know if we see any bugs etc Cheesy

81.19.219.150:27035 Warcraft3 FT CS:S + Saved EXP *Testing* - www.fang-gaming.co.uk - #FaNg

thanks again

ferret (eagerly awaiting the new python WCS version too Wink )
Logged
Zero Skillz
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 525




Zero Skillz (<-[SD]->madcow)
madcow767
« Reply #5 on: March 01, 2008, 02:34:15 PM »

this works with source?
Logged

7355608
Level 1 Trained Beginner
*
Offline Offline

Canada Canada

Posts: 20



rsin314159
« Reply #6 on: March 02, 2008, 01:41:32 PM »

Yes this is an EventScripts 2.0 + EST v.420 mod. This most definately works with source Tongue
Logged

Koshy
Level 7 Expert
*****
Offline Offline

Canada Canada

Posts: 566



WWW
koshyy
koshy

myServer 72.5.102.44:27015
(Warning: click connects through Steam)
« Reply #7 on: March 06, 2008, 01:31:10 AM »

Damn, I did it again.
« Last Edit: March 06, 2008, 02:08:57 AM by Koshy » Logged


<-- WCS Mod Server 100 Tick
Jeff
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 458



WWW
beastrace91
« Reply #8 on: March 06, 2008, 04:12:11 AM »

The EST rebuy bug is fixable... go browse the mattie boards for it...

EST also does alot of thing ES itself is unable to do. I understand not wanting to install extra crap... but still it is like 2 extra clicks to upload...

~J3ff
Logged

Diraiba
not not telling you why im not no amdin cause i am
Moderator
Level 7 Expert
*****
Offline Offline

Netherlands Netherlands

Posts: 398


Koekjen?


WWW
diraiba
sodpower001

myServer 83.223.105.18:27015
(Warning: click connects through Steam)
« Reply #9 on: March 06, 2008, 08:30:23 AM »

Same lol
Logged


freddukes
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 292



« Reply #10 on: March 06, 2008, 08:37:08 AM »

Becasue the latest version of EST comes default with that option turned off.. It was never a bug, just a default option in the config that annoyed everyone

-freddukes
Logged

Koshy
Level 7 Expert
*****
Offline Offline

Canada Canada

Posts: 566



WWW
koshyy
koshy

myServer 72.5.102.44:27015
(Warning: click connects through Steam)
« Reply #11 on: March 06, 2008, 02:09:58 PM »

Damn, I did it again.
Logged


<-- WCS Mod Server 100 Tick
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 02:33:47 AM
Sup?
Today at 02:33:37 AM
hey Ghost
Today at 01:44:10 AM
hey dark
February 02, 2010, 10:43:30 AM
Yap, he mean eventscripter xD
February 02, 2010, 01:03:48 AM
Eventscripter. lol
February 02, 2010, 12:23:17 AM
A WCS scripter?
February 01, 2010, 06:12:18 PM
izh lookeh for 1 scripter to supp0t me
Recent
[Today at 01:30:33 AM]

[Today at 12:44:51 AM]

[February 03, 2010, 11:57:35 PM]

[February 03, 2010, 11:17:14 PM]

[February 03, 2010, 10:05:11 PM]

[February 03, 2010, 09:50:54 PM]

[February 03, 2010, 06:40:35 PM]

[February 03, 2010, 05:37:57 PM]

[February 03, 2010, 04:33:23 PM]

[February 03, 2010, 02:30:39 PM]
Theme switch

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