PDA

View Full Version : State of WCS



ZERO
06-12-2010, 09:06 PM
So as you all know when the beta goes live the WCS server is going to die. This is becuase the entire mod is not compatible with the new engine becuase it requires ES_tools to work which will very likely not be updated. As a result we have the following options with regard to the wcs server:


Remove WCS
Run another version that only allows 3 abilities and 1 ultimate per race
Pray that es_tools is updated
cry :violin:
Develop out own wcs mod from scratch
Reprogram all races and current WCS code to work without es_tools
Pay off developer of war3 to allow for more than 3 abilities and 1 ultimate so we can just use that.

This list is organized from what I believe to be least likely to most likely options for dealing with this problem. Note that everything below option 4 will require large investments as I can not program that amount of data on my own.

Personally I think the best option is to get the developers of war3 source to allow for the variety of abilities that our current wcs server supports. This way when we convert everything over not only do we get something that works on the new engine but also becuase it is running on sourcemod it will not lag or crash!

I want to know what all of your thoughts are on this issue. This week I plan to really crack down on finding a solution to this impending update of doom.

maynard
06-12-2010, 09:37 PM
well I'm quite sad 2 hear we're gonna lose WCS and all that many have put into it for the past year, but at least we will get WCS back.

- how long do you figure we wont have WCS

- when does the beta go live again?



Reprogram all races and current WCS code to work without es_tools


so when it's reprogrammed, will we have the existing races and get 2 keep our lvls? or will it be new races and starting over again?

ZERO
06-12-2010, 10:01 PM
Yea, also if we switch to war3 our levels will convert.

maynard
06-12-2010, 10:03 PM
very nice.

XX0wnsXY
06-12-2010, 10:06 PM
I dont wanna lose wcs for any extended period. if we only have 3 abilities for a short time until other alternatives arise, id be ok with that. it may add some interesting dynamics to wcs lol.

maynard
06-12-2010, 10:20 PM
well my main concern was starting all over from scratch. if we had 2 start all over with new races, and then figure them all out again and make new rules based on the new classes again, that would be kind of a pain. not fully cause it's just a long drawn out process, but cause it would also mean everything zero, myself, all the admins and regulars had done in the last year would have been completly pointless. wouldn't be horrible, but I love what we got <3. I'm real glad that we get 2 keep everything the same.

Jeimuzu
06-13-2010, 02:46 AM
This was destined to happen when Maynard wished ill upon ZM..

Just sayin'.. <.<''

maynard
06-13-2010, 02:53 AM
This was destined to happen when Maynard wished ill upon ZM..

Just sayin'.. <.<''

lmfao... screw you james!:smirk:

Kavinsky
06-13-2010, 03:17 AM
Any idea when this fuckovers going to happen so we can have one last blast on all the servers before the update of fail and doom?

acolyte_to_jippity
06-13-2010, 01:43 PM
Any idea when this fuckovers going to happen so we can have one last blast on all the servers before the update of fail and doom?

you don't play wcs.

i know because you haven't bitched about it yet.


and zero, i'd actually say look into both making our own as well as contacting war3 and looking into the extended abilities.

mastercheff
06-13-2010, 04:43 PM
Any idea when this fuckovers going to happen so we can have one last blast on all the servers before the update of fail and doom?



Zero might as well password the servers the day before the update and let all the forumers in to party hard.

ZERO
06-13-2010, 05:13 PM
Today I contacted the developer asking if he can update war3 to support more abilities per race. I also told him that I am willing to pay him in order to get these features implemented. Hopefully we will get a favorable response.

diablo
06-13-2010, 06:42 PM
Why dont you sell shares of ibis to the people who are buying admin? You can ask them 50 buck per share? Im a finance engineer I can make the contracts to be signed we can make a
ibis a virtual business and a community as well. If 10 peple buy shares it will be 500 bucks i think it is enough for the work isnt it? If you dont want any unknown admin you can select them and sell shares for invite only. It would give the idea of ownership, but you zero are still the general manager you have the final word. The shares could be transfered among ibis members prior your conscent.

I wont mind to start over i leveled 400 levels on 1 month just playing 10 hours a week. It will be fun if we start over and it will be nice to have new races as well.

acolyte_to_jippity
06-13-2010, 07:08 PM
restart me no likey!!1

and, no, IBIS is not going to become a publicly traded company.

Wolfenstinger
06-13-2010, 07:47 PM
Well.... BRB gonna go pick cry :violin:


But yea, if we end up restarting, a lot of people will be upset at that. A temporary conversion to keep our levels but limit our abilities and still have one ultimate will kill some classes in the process but still allows us to progress, if this is what I am understanding.

Solution (from my point of view on that...) : we make a :priest: that updates es_tools for us with holy pow-ah! Ok now I'm just letting my imagination run loose... umm... *starts praying*

Kavinsky
06-13-2010, 10:20 PM
Jippy I did play wcs twice, once with mag and didnt care for it.

I'm wondering when its going to happen because its going to screw up the shooting tecniques for atleast the desert eagle and the ak 47.

the online hit detections going to be modified and there going to tf2 it, it seems. hence why I want to know when so I can enjoy gg before judging by all the past accounts of there updates this year they fuck us over and god help us if they apply the new tf2 menu to css.

Schnacky
06-14-2010, 06:02 PM
So as you all know when the beta goes live the WCS server is going to die. This is becuase the entire mod is not compatible with the new engine becuase it requires ES_tools to work which will very likely not be updated. As a result we have the following options with regard to the wcs server:


Remove WCS
Run another version that only allows 3 abilities and 1 ultimate per race
Pray that es_tools is updated
cry :violin:
Develop out own wcs mod from scratch
Reprogram all races and current WCS code to work without es_tools
Pay off developer of war3 to allow for more than 3 abilities and 1 ultimate so we can just use that.

This list is organized from what I believe to be least likely to most likely options for dealing with this problem. Note that everything below option 4 will require large investments as I can not program that amount of data on my own.

Personally I think the best option is to get the developers of war3 source to allow for the variety of abilities that our current wcs server supports. This way when we convert everything over not only do we get something that works on the new engine but also becuase it is running on sourcemod it will not lag or crash!

I want to know what all of your thoughts are on this issue. This week I plan to really crack down on finding a solution to this impending update of doom.

I like 2,3,5,6,7

acolyte_to_jippity
06-14-2010, 06:04 PM
I like 2,3,5,6,7

2 is pretty much out of the question. maybe as a temp fix to retain levels, but that'd fuck so many races over it wouldn't be funny.

how long have you played it anyway?

Schnacky
06-14-2010, 06:08 PM
2 is pretty much out of the question. maybe as a temp fix to retain levels, but that'd fuck so many races over it wouldn't be funny.

how long have you played it anyway?

well, 2 would be more of a last resort. The IBIS server, like 2 months. Random WarCraft/Superheroes servers since 1.6 had a beta of it before it was cancelled and moved to CSS.

ZERO
06-16-2010, 12:57 AM
I have sent another pm to the creator of war3 on the source mod forum so hopefully he will get this one. All other servers will be prepped for the conversion before the end of this week. This weekend I will be in emergency programing mode to fix as much of wcs as I can given the situation at the time. This will either be programing stuff for conversion to war3 or recreating all of the races from scratch without es_tools.

Schnacky
06-16-2010, 01:02 AM
I have sent another pm to the creator of war3 on the source mod forum so hopefully he will get this one. All other servers will be prepped for the conversion before the end of this week. This weekend I will be in emergency programing mode to fix as much of wcs as I can given the situation at the time. This will either be programing stuff for conversion to war3 or recreating all of the races from scratch without es_tools.

good luck to you if you have to do that latter.

acolyte_to_jippity
06-16-2010, 09:20 AM
I have sent another pm to the creator of war3 on the source mod forum so hopefully he will get this one. All other servers will be prepped for the conversion before the end of this week. This weekend I will be in emergency programing mode to fix as much of wcs as I can given the situation at the time. This will either be programing stuff for conversion to war3 or recreating all of the races from scratch without es_tools.

Oh captain my captain.

godspeed zero. and good luck

maynard
06-16-2010, 01:28 PM
Oh captain my captain.


clifford?

acolyte_to_jippity
06-16-2010, 01:38 PM
clifford?

:shrug:

no clue. it was an old joke at my high school's improv troup. i seem to remember us saying that to our leader when he went off to try and find us a place to have a pizza party...we were slightly dramatic back then

maynard
06-16-2010, 01:45 PM
:shrug:

no clue. it was an old joke at my high school's improv troup. i seem to remember us saying that to our leader when he went off to try and find us a place to have a pizza party...we were slightly dramatic back then

as far as I know that's from the movie clifford, which came out in like 94. and no, not clifford the dog.

ZERO
06-16-2010, 01:50 PM
Ok so here is what I got:


import es
import playerlib
import vecmath
import random
import cmdlib

import spe

class ESTManager(object):
"""
This object is here to store all ESTCommand objects. It acts as a customized
container allowing us to access the individual stored objects by a given
name. This will be the manager for all the EST commands themselves and
provide a global interface.
"""
def __init__(self):
"""
Default constructor, initalize variables.
"""
self.commands = {}

def __del__(self):
"""
Default destructor, clear all the commands in turn executing the
desctructor of that object which unregisters that command object.
"""
self.commands.clear()

def __getitem__(self, name):
"""
Returns the EST command object specified by the name.

@param str name The name of the EST command
@return ESTCommand The object designated by the name
"""
return self.commands[name]

def __delitem__(self, name):
"""
Removes the EST command object which will unregister it.

@param str name The name of the EST command
"""
self.commands.__delitem__(name)

def __contains__(self, name):
"""
Test to see if the EST command is currently in use

@param str name The name of the EST command
@return bool Whether or not the EST command exists
"""
return name in self.commands

def registerESTCommand(name, description, callback, argCount):
"""
Registers a new EST command by the given parameters. This will register
it with cmdlib.

@param str name The name of the EST command
@param str description The help message of the command; contains paramter list
@param function callback The callback executed when the command is used
@param int|tuple argCount The amount of arguments which are valid for the command
"""
self.commands[name] = ESTCommand(name, description, callback, argCount)

def unregisterESTCommand(name):
"""
Unregisters an EST command.

@param str name The name of the EST command
"""
del self.commands[name]

def dumpCommands(self):
"""
Dumps the entire command list to
"""
es.dbgmsg(0, "\n\nEST Command list:")
es.dbgmsg(0, "-" * 50)
for commandName in sorted(self.commands):
commandObj = self.commands[commandName]
commandObj.displayHelp()
es.dbgmsg(0, "-" * 50)
es.dbgmsg(0, "\n\n")


class ESTCommand(object):
"""
This is an individual command object. This object will be created for all
EST commands. This wraps the cmdlib object in a specific API which is very
EST related. This enables us to have consistency throughout all of our
objects as it is handled automatically.
"""
def __init__(self, name, description, callback, argCount):
"""
Default constructor, intialise all variables and register the command.
We need to check if the command is lowercase, if not, register 2 commands
(one for the lowercase alternative as well.)

@param str name The name of the EST command
@param str description The help message of the command; contains paramter list
@param function callback The callback executed when the command is used
@param int|tuple argCount The amount of arguments which are valid for the command
"""
if not name.startswith("est_"):
name = "est_%s" % name
self.callback = callback
self.name = name
if not self.name.islower():
self.lowerName = name.lower()
self.description = description
if not hasattr(argCount, "__iter__"):
argCount = (argCount, )
self.argCount = argCount
cmdlib.registerServerCommand(name, description, self._callback)
if not self.name.islower():
cmdlib.registerServerCommand(lowerName, description, self._callback)

def __del__(self):
"""
Default destructor. Unregister the server commands.
"""
cmdlib.unregisterServerCommand(name)
if not self.name.islower():
cmdlib.unregisterServerCommand(self.name.lower())

def displayHelp(self):
"""
Display a help message about how to use this command. This will also
display the expected arg count.
"""
if len(self.argCount) == 1:
argCount = self.argCount[0]
else:
argCount = self.argCount
es.dbgmsg(0, "%s %s : expects %s args" % (self.name, self.description, argCount) )

def _callback(self, args):
"""
Executed when this command is executed. Test the argument length, if we
have any conflicts, display an error message and return early. Otherwise
we need to follow to the actuall callback function.

@param args A list of arguments after the command
"""
if len(args) not in self.argCount:
es.dbgmsg(0, "EST ERROR: Incorrect argument usaged, the correct usage is - %s %s" % (self.name, self.description) )
return
self.callback(args)


est = ESTManager()

def load():
"""
Executed when this addon loads, registers all the EST commands.
"""
est.registerESTCommand("AddDownload", "<path>", addDownload, 1)

est.registerESTCommand("Armor", "<est filter> <operator> <amount>", armor, 3)
est.registerESTCommand("ArmorAdd", "<est filter> <amount>", armorAdd, 2)
est.registerESTCommand("SetArmor", "<est filter> <amount>", armorSet, 2)
est.registerESTCommand("GetArmor", "<variable> <est player>", armorGet, 2)

est.registerESTCommand("Ban", '<est filter> <time> ["reason"]', ban, (2, 3))

def unload():
"""
Executed when this addon unloads, explicitly delete the est object from memory.
"""
del est

def getPlayersFromFilters(filterList):
"""
Return a list of players as playerlib filters from a given filter list. The
filter list supports EST filter list selections (or playerlib selections)
which accept either the filter tags (e.g. #c #t) or any valid user ident
such as partial names, steamid's or user ids.

@param string filterList A list of filters to search for the playerlib players
@return tuple|playerlib.Player A list of players for the given filter list
"""
playerTest = es.getuserid(filterList)
if es.exists('userid', playerTest):
return (playerlib.getPlayer(playerTest), )
if not isinstance(filterList, basestring):
return tuple()
addPlayers = True
players = set()
estToPlayerlibFilters = {
"c":"ct",
"t":"t",
"a":"all",
"l":"alive",
"s":"spec",
"h":"human",
"b":"bot",
"d":"dead",
"u":"un",
"0":"un",
"1":"spec",
"2":"t",
"3":"ct"
}
for filterLetter in filterList:
if filterLetter == "#":
addPlayers = True
elif filterLetter == "!":
addPlayers = False
else:
if filterLetter in estToPlayerlibFilters:
playerlibFilterLetter = estToPlayerlibFilters[filterLetter]
else:
playerlibFilterLetter = filterLetter
playerlibFilterLetter = "#" + playerlibFilterLetter
playerList = set(playerlib.getPlayerList(playerlibFilterLetter) )
if addPlayers:
players.update(playerList)
else:
players = players.difference(playerList)
return players

def getUseridsFromFilters(filterList):
"""
Return a list of userids from a given filter list. The
filter list supports EST filter list selections (or playerlib selections)
which accept either the filter tags (e.g. #c #t) or any valid user ident
such as partial names, steamid's or user ids.

@param string filterList A list of filters to search for the playerlib players
@return tuple|int A list of userids for the given filter list
"""
return map(index, getPlayersFromFilters(filterList))

def applyOperatorToAttribute(player, attribute, operator, amount):
"""
Applies an operator to a certain player. This will use the playerlib
attributes so 'armor' will affect the player's armor etc. The only
operators supported are +, - and = to increment, decrement and assign
respectively as those are the operators supported by EST.

@param playerlib.Player player The playerlib object of the user
@param str attribute The playerlib attribute to apply the operator to
@param str operator The operator type to apply
@param int|float The amount to affect the value by.
"""
if operator == "+":
player[attribute] += amount
elif operator == "-":
player[attribute] -= amount
elif operator == "=":
player[attribute] = amount
else:
es.dbgmsg(0, "EST ERROR: est_%s cannot apply the operator %s. Only +, - and = are supported" % (attribute, operator))

def addDownload(args):
"""
Registers a file for download

@param str args[0] The path of the download file
"""
es.stringtable("downloadbles", args[0])

def armor(args):
"""
Applies an operator to a player's armor value.

@param str args[0] EST Player filter
@param str args[1] operator "+", "-" or "=" to reassign the armor
@param int args[2] amount The amount to alter the armor by
"""
for player in getPlayersFromFilter(args[0]):
applyOperatorToAttribute(player, "armor", args[1], int(args[2]))

def armorAdd(args):
"""
Adds a value to the player's current armor value

@param str args[0] EST player filter
@param int args[1] amount The amount to add to the armor
"""
for player in getPlayersFromFilter(args[0]):
applyOperatorToAttribute(player, "armor", "+", int(args[1]))

def armorSet(args):
"""
Assigns a value to the player's armor value

@param str args[0] EST player filter
@param int args[1] amount The amount to assign to the armor
"""
for player in getPlayersFromFilter(args[0]):
applyOperatorToAttribute(player, "armor", "=", int(args[1]))

def armorGet(args):
"""
Assigns a variable to hold the value of a player's current armor

@param str args[0] variablename The name of the variable to use
@param int args[1] EST Player An individual player to retrieve the armor
"""
userid = es.getuserid(args[1])
if es.exists('userid', userid):
player = playerlib.getPlayer(userid)
es.ServerVar(args[0]).set(int(player.armor))

def ban(args):
"""
Bans a list of players via their IP and ID.

@param str args[0] EST player filter
@param int args[1] time Amount of time to ban for (seconds, 0=permanent)
@param optional str args[2] reason The reason they were banned
"""
for player in getPlayersFromFilter(args[0]):
userid = int(player)
address = int(player.address)
reason = "Banned by admin"
if len(args) > 2:
reason = args[2]
es.server.queuecmd("kickid %s %s" % (userid, reason)
es.server.queuecmd("banid %s %s; addip %s %s" % (args[1], player.steamid, args[1], address))
es.server.queuecmd("writeid; writeip")



This when modified could replicate est functions. Worst case perhaps I can hire the guy who made this to just extend it for all the est functions I use...

acolyte_to_jippity
06-16-2010, 03:16 PM
Ok so here is what I got:


import es
import playerlib
import vecmath
import random
import cmdlib

import spe

class ESTManager(object):
"""
This object is here to store all ESTCommand objects. It acts as a customized
container allowing us to access the individual stored objects by a given
name. This will be the manager for all the EST commands themselves and
provide a global interface.
"""
def __init__(self):
"""
Default constructor, initalize variables.
"""
self.commands = {}

def __del__(self):
"""
Default destructor, clear all the commands in turn executing the
desctructor of that object which unregisters that command object.
"""
self.commands.clear()

def __getitem__(self, name):
"""
Returns the EST command object specified by the name.

@param str name The name of the EST command
@return ESTCommand The object designated by the name
"""
return self.commands[name]

def __delitem__(self, name):
"""
Removes the EST command object which will unregister it.

@param str name The name of the EST command
"""
self.commands.__delitem__(name)

def __contains__(self, name):
"""
Test to see if the EST command is currently in use

@param str name The name of the EST command
@return bool Whether or not the EST command exists
"""
return name in self.commands

def registerESTCommand(name, description, callback, argCount):
"""
Registers a new EST command by the given parameters. This will register
it with cmdlib.

@param str name The name of the EST command
@param str description The help message of the command; contains paramter list
@param function callback The callback executed when the command is used
@param int|tuple argCount The amount of arguments which are valid for the command
"""
self.commands[name] = ESTCommand(name, description, callback, argCount)

def unregisterESTCommand(name):
"""
Unregisters an EST command.

@param str name The name of the EST command
"""
del self.commands[name]

def dumpCommands(self):
"""
Dumps the entire command list to
"""
es.dbgmsg(0, "\n\nEST Command list:")
es.dbgmsg(0, "-" * 50)
for commandName in sorted(self.commands):
commandObj = self.commands[commandName]
commandObj.displayHelp()
es.dbgmsg(0, "-" * 50)
es.dbgmsg(0, "\n\n")


class ESTCommand(object):
"""
This is an individual command object. This object will be created for all
EST commands. This wraps the cmdlib object in a specific API which is very
EST related. This enables us to have consistency throughout all of our
objects as it is handled automatically.
"""
def __init__(self, name, description, callback, argCount):
"""
Default constructor, intialise all variables and register the command.
We need to check if the command is lowercase, if not, register 2 commands
(one for the lowercase alternative as well.)

@param str name The name of the EST command
@param str description The help message of the command; contains paramter list
@param function callback The callback executed when the command is used
@param int|tuple argCount The amount of arguments which are valid for the command
"""
if not name.startswith("est_"):
name = "est_%s" % name
self.callback = callback
self.name = name
if not self.name.islower():
self.lowerName = name.lower()
self.description = description
if not hasattr(argCount, "__iter__"):
argCount = (argCount, )
self.argCount = argCount
cmdlib.registerServerCommand(name, description, self._callback)
if not self.name.islower():
cmdlib.registerServerCommand(lowerName, description, self._callback)

def __del__(self):
"""
Default destructor. Unregister the server commands.
"""
cmdlib.unregisterServerCommand(name)
if not self.name.islower():
cmdlib.unregisterServerCommand(self.name.lower())

def displayHelp(self):
"""
Display a help message about how to use this command. This will also
display the expected arg count.
"""
if len(self.argCount) == 1:
argCount = self.argCount[0]
else:
argCount = self.argCount
es.dbgmsg(0, "%s %s : expects %s args" % (self.name, self.description, argCount) )

def _callback(self, args):
"""
Executed when this command is executed. Test the argument length, if we
have any conflicts, display an error message and return early. Otherwise
we need to follow to the actuall callback function.

@param args A list of arguments after the command
"""
if len(args) not in self.argCount:
es.dbgmsg(0, "EST ERROR: Incorrect argument usaged, the correct usage is - %s %s" % (self.name, self.description) )
return
self.callback(args)


est = ESTManager()

def load():
"""
Executed when this addon loads, registers all the EST commands.
"""
est.registerESTCommand("AddDownload", "<path>", addDownload, 1)

est.registerESTCommand("Armor", "<est filter> <operator> <amount>", armor, 3)
est.registerESTCommand("ArmorAdd", "<est filter> <amount>", armorAdd, 2)
est.registerESTCommand("SetArmor", "<est filter> <amount>", armorSet, 2)
est.registerESTCommand("GetArmor", "<variable> <est player>", armorGet, 2)

est.registerESTCommand("Ban", '<est filter> <time> ["reason"]', ban, (2, 3))

def unload():
"""
Executed when this addon unloads, explicitly delete the est object from memory.
"""
del est

def getPlayersFromFilters(filterList):
"""
Return a list of players as playerlib filters from a given filter list. The
filter list supports EST filter list selections (or playerlib selections)
which accept either the filter tags (e.g. #c #t) or any valid user ident
such as partial names, steamid's or user ids.

@param string filterList A list of filters to search for the playerlib players
@return tuple|playerlib.Player A list of players for the given filter list
"""
playerTest = es.getuserid(filterList)
if es.exists('userid', playerTest):
return (playerlib.getPlayer(playerTest), )
if not isinstance(filterList, basestring):
return tuple()
addPlayers = True
players = set()
estToPlayerlibFilters = {
"c":"ct",
"t":"t",
"a":"all",
"l":"alive",
"s":"spec",
"h":"human",
"b":"bot",
"d":"dead",
"u":"un",
"0":"un",
"1":"spec",
"2":"t",
"3":"ct"
}
for filterLetter in filterList:
if filterLetter == "#":
addPlayers = True
elif filterLetter == "!":
addPlayers = False
else:
if filterLetter in estToPlayerlibFilters:
playerlibFilterLetter = estToPlayerlibFilters[filterLetter]
else:
playerlibFilterLetter = filterLetter
playerlibFilterLetter = "#" + playerlibFilterLetter
playerList = set(playerlib.getPlayerList(playerlibFilterLetter) )
if addPlayers:
players.update(playerList)
else:
players = players.difference(playerList)
return players

def getUseridsFromFilters(filterList):
"""
Return a list of userids from a given filter list. The
filter list supports EST filter list selections (or playerlib selections)
which accept either the filter tags (e.g. #c #t) or any valid user ident
such as partial names, steamid's or user ids.

@param string filterList A list of filters to search for the playerlib players
@return tuple|int A list of userids for the given filter list
"""
return map(index, getPlayersFromFilters(filterList))

def applyOperatorToAttribute(player, attribute, operator, amount):
"""
Applies an operator to a certain player. This will use the playerlib
attributes so 'armor' will affect the player's armor etc. The only
operators supported are +, - and = to increment, decrement and assign
respectively as those are the operators supported by EST.

@param playerlib.Player player The playerlib object of the user
@param str attribute The playerlib attribute to apply the operator to
@param str operator The operator type to apply
@param int|float The amount to affect the value by.
"""
if operator == "+":
player[attribute] += amount
elif operator == "-":
player[attribute] -= amount
elif operator == "=":
player[attribute] = amount
else:
es.dbgmsg(0, "EST ERROR: est_%s cannot apply the operator %s. Only +, - and = are supported" % (attribute, operator))

def addDownload(args):
"""
Registers a file for download

@param str args[0] The path of the download file
"""
es.stringtable("downloadbles", args[0])

def armor(args):
"""
Applies an operator to a player's armor value.

@param str args[0] EST Player filter
@param str args[1] operator "+", "-" or "=" to reassign the armor
@param int args[2] amount The amount to alter the armor by
"""
for player in getPlayersFromFilter(args[0]):
applyOperatorToAttribute(player, "armor", args[1], int(args[2]))

def armorAdd(args):
"""
Adds a value to the player's current armor value

@param str args[0] EST player filter
@param int args[1] amount The amount to add to the armor
"""
for player in getPlayersFromFilter(args[0]):
applyOperatorToAttribute(player, "armor", "+", int(args[1]))

def armorSet(args):
"""
Assigns a value to the player's armor value

@param str args[0] EST player filter
@param int args[1] amount The amount to assign to the armor
"""
for player in getPlayersFromFilter(args[0]):
applyOperatorToAttribute(player, "armor", "=", int(args[1]))

def armorGet(args):
"""
Assigns a variable to hold the value of a player's current armor

@param str args[0] variablename The name of the variable to use
@param int args[1] EST Player An individual player to retrieve the armor
"""
userid = es.getuserid(args[1])
if es.exists('userid', userid):
player = playerlib.getPlayer(userid)
es.ServerVar(args[0]).set(int(player.armor))

def ban(args):
"""
Bans a list of players via their IP and ID.

@param str args[0] EST player filter
@param int args[1] time Amount of time to ban for (seconds, 0=permanent)
@param optional str args[2] reason The reason they were banned
"""
for player in getPlayersFromFilter(args[0]):
userid = int(player)
address = int(player.address)
reason = "Banned by admin"
if len(args) > 2:
reason = args[2]
es.server.queuecmd("kickid %s %s" % (userid, reason)
es.server.queuecmd("banid %s %s; addip %s %s" % (args[1], player.steamid, args[1], address))
es.server.queuecmd("writeid; writeip")



This when modified could replicate est functions. Worst case perhaps I can hire the guy who made this to just extend it for all the est functions I use...

is that lua?

it looks extremely similar to c++ or java, but a lot less formatting. almost python actually.

ZERO
06-16-2010, 04:01 PM
It is python...

acolyte_to_jippity
06-16-2010, 04:04 PM
It is python...

thought so. the lack of {} gave it away.

ZERO
06-16-2010, 04:14 PM
The fact that it makes me want to slit my throat reading it gave it away...

acolyte_to_jippity
06-16-2010, 04:45 PM
The fact that it makes me want to slit my throat reading it gave it away...

yeah, the formatting seems crappy.

c++ is so much easier to read