UltiTool 0.2 Beta Documentation

UltiTool is like ESTool, but without too much complications. You can burn, extiguish, freeze etc (full list see below) players from console directly.

The reason I wrote this script is so I don't have to type es playerset everytime I want to do something, nor do I want all those admin plugins.

UltiTool also contains a module that can be imported and used by other plugins (Documentation see below).

Console Commands

There are 10 console commands, 10 say commands, and 3 variable in this plugin.

Command: ut_burn userid
Example: ut_burn 2
Explain: Burns player with the userid of 2

Command: ut_extinguish userid
Example: ut_extinguish 2
Explain: Extinguish the player with the userid of 2, if the player is on fire.

Command: ut_freeze userid
Example: ut_freeze 2
Explain: Prevent the player with the userid of 2 to move.

Command: ut_unfreeze userid
Example: ut_unfreeze 2
Explain: Allow the player with the userid of 2 to move.

Command: ut_slay userid
Example: ut_slay 2
Explain: Slay the player with the userid of 2.

Command: ut_blind userid alpha duration(seconds)
Example: ut_blind 2 255 5
Explain: Flash the player with the userid of 2 for 5 second. The white color is totally opaque. (alpha can be with in 0 - 255. 255 is opaque, 0 is transparent)

Command: ut_noclip userid
Example: ut_noclip 2
Explain: Noclips the player with the userid 2 without sv_cheats being 1

Command: ut_unnoclip userid
Example: ut_unnoclip 2
Explain: Unnoclip the player with the userid of 2.

Command: ut_slap userid damage
Example: ut_slap 2 20
Explain: Damage the player with the userid of 2 by 20 health.

Say Commands

The say commands are the exactly the same as the console commands. However, instead of having ut_command, you can use !command. You also have to be in the admin list to be able to trigger the command. (See below)

So you would have !burn, !freeze, !extinguish, !name and so on.

Example: !burn 2
Explanation: If you are identified, the player with the userid of 2 will be burned.

Example 2: !slap 2 20
Explanation: Damage the player with the userid of 2 by 20 health.

Server Variables

Variable: ut_announce 0/1
Example: ut_announce 1
Explain: If set to 1, every time you execute the command listed above, it will announce it in the chatbox. If set to anything other than 1, it will not announce.
Default: 1

Variable: ut_16k 0/1
Example: ut_16k 1
Explain: If set to 1, it will give 16k to all player when they spawn
Default: 0

Variable: ut_displaydmg 0/1
Example: ut_displaydmg 1
Explain: If set to 1, it will use a small message box down the bottom of the HUD.
Default: 0

To change the default settings for the variables above, the admins, and the identification method, go into:

<Root CSS Server Directory>/cstrike/addons/eventscripts/ultitool/

Open up a file named ultitool.py with notepad (or other text editor). Find a section like this:

# Config #
announcing = 1 # 1 will announce. 0 will disable announcing
enableDmgDisplay = 0 # 1 will display damage, 0 will disable damage display
enable16k = 0 # 1 will give you 16k at start of the round, 0 will disable that

 

identifyMethod = "ip" # "ip" will identify using IP address. "id" will identify using Steam ID.
adminList = "127.0.0.1" # List of admins, seperated by ;
# Config Ends Here #

These instructions should be simple enough. Once these are changed, restart your server.


UltiToolModule 0.2 Beta Documentation

This section is for developers only. If you want an easy way to perform command on people while you are coding in python, you can use the UltiToolModule. This module provides you with some really easy way to perform operations on people. There is also a couple shortcuts for some functions.

Simply copy the file named ut.py from /cstrike/addons/eventscripts/ultitool to your desired scripting folder and add import ut in your python script, then you have access to all the command above.

Just an reminder that this tool is released under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Feel free to distribute ut.py with your plugin. I would appreciate if you message me or something. All I really want is to see what you have created with this module. Also, feel free to just copy and paste codes to your own plugin instead of using ut.py. Just remember to give me a little credit. Thanks!

Here is how to use the module, function by function, example by example:

ut.burn(userid[, varAnnounce])

Burns the player with the userid. Returns nothing. varAnnounce is optional, if you set 0 at where varAnnounce is, it will not announce anything.

import ut # Remember always to do this.

 

def player_hurt(event_var):

if event_var["weapon"] == "hegrenade":

ut.burn(event_var["userid"], 0)

# Burns the player without announcement when they get hit by an HE Grenade

ut.extinguish(userid[, varAnnounce])

Extinguishes the player with the userid. Returns nothing. varAnnounce is optional, if you set 0 at where varAnnounce is, it will not announce anything.

import ut

 

def player_say(event_var):

if "!extinguish" in event_var["text"]:

ut.extinguish(event_var["userid"], 0)

# Extinguish the player when they say !extinguish

ut.freeze(userid[, varAnnounce])

Freezes the player with the userid. Returns a nothing. varAnnounce is optional, if you set 0 at where varAnnounce is, it will not announce anything.

import ut

 

def player_death(event_var):

if event_var["es_userteam"] == event_var["es_attackerteam"]:

ut.freeze(event_var["attacker"], 0)

# Freeze the team killer

ut.unfreeze(userid[, varAnnounce])

Unfreezes the player with the userid. Returns a nothing. varAnnounce is optional, if you set 0 at where varAnnounce is, it will not announce anything.

import ut

 

def player_death(event_var):

if event_var["es_userteam"] != event_var["es_attackerteam"]:

ut.unfreeze(event_var["attacker"], 0)

# unfreeze you if you killed someone

ut.slay(userid[, varAnnounce])

Slays the player with the userid. Returns a nothing. varAnnounce is optional, if you set 0 at where varAnnounce is, it will not announce anything.

import ut

 

def player_death(event_var):

if event_var["es_userteam"] == event_var["es_attackerteam"]:

ut.slay(event_var["attacker"], 0)

# Slayed the team killer

ut.blind(userid, alpha, duration[, varAnnounce])

Blinds the player with the userid. alpha is the transparency of how blinded you are. 255 is fully opaque, and 0 is fully transparent. Duration is in seconds. Returns a nothing. varAnnounce is optional, if you set 0 at where varAnnounce is, it will not announce anything.

import ut

 

def player_hurt(event_var):

if event_var["weapon"] == "hegrenade":

ut.blind(event_var["userid"], 255, 5, 0)

# Completely flashes the player who got hit by a grenade by 5 seconds.

ut.noclip(userid[, varAnnounce])

Noclips the player with the userid. Returns a nothing. varAnnounce is optional, if you set 0 at where varAnnounce is, it will not announce anything.

import ut

 

def player_hurt(event_var):

if int(event_var["armor"]) == 0 and int(event_var["health"]) == 1:

ut.noclip(event_var["userid"], 0)

# Noclips the user with 0 armor and 1 health.

ut.unnoclip(userid[, varAnnounce])

Unnoclips the player with the userid. Returns a nothing. varAnnounce is optional, if you set 0 at where varAnnounce is, it will not announce anything.

import ut

 

def player_hurt(event_var):

ut.unnoclip(event_var["attacker"], 0)

# Unnoclips the user who attacked someone

ut.slap(userid, dmg[, varAnnounce])

Slaps the player with the userid. dmg is the damage you want to slap the person with. Returns a nothing. varAnnounce is optional, if you set 0 at where varAnnounce is, it will not announce anything.

import ut

 

def player_say(event_var):

if "bitch" in event_var["text"]:

ut.slap(userid, 20, 0)

# slaps the player by 20 health if they say bitch.

ut.changename(userid, newName)

Slaps the player with the userid. newName is the new name you want to change the person's name to. Returns a nothing. This function don't have varAnnounce.

import ut

 

def player_activate(event_var):

if "unnamed" in event_var["es_username"]:

ut.changename(event_var["userid"], "n00b")

# Change then name of the player who is "unnamed" to "n00b"

ut.echo(msg)

This is a shortcut for es.server.queuecmd("echo %s" % string). msg is your message.

import ut

 

def load():

echo("Plugin Loaded")

# This will display "Plugin Loaded" in console, without the quotes

ut.strListConv(string)

This converts a string to a list, items seperated with ";". Here is an example. It kicks the people who swears. Returns a list.

import ut

 

# Configuration - Change the words from here #

swearWords = "shit;gay;ass" # Remember to use ; to seperate each words

# Configuration Ends #

 

swearList = []

 

def load():

global swearList

swearList = ut.strListConv(swearWords)

# Converts the string to a list. This will generate ["shit", "gay", "ass"]

 

def player_say(event_var):

for word in swearList:

if word in event_var["text"]:

es.server.queuecmd("kickid %s Swearing" % event_var["userid"])

ut.authorize(userid, method, adminList)

This is a way to check if any player is admin. It works on both LAN games and Internet games. This returns true or false. True as in the person is an admin, and false as in the person is not an admin. userid is the userid of the player you want to identify. method is the method you want to identify with.It accepts either "id" or "ip". "id" will use STEAMID to identify while "ip" will use IP address to identify (useful in LAN games)

import ut

 

admins = "127.0.0.1;192.168.0.2" # Set localhost and another comp on the LAN network as admin

method = "ip"

 

al = []

 

def load():

global al

al = ut.strListConv(admins)

 

def player_say():

if event_var["text"].find("!admin") == 0:

if ut.authorize(event_var["userid"]):

es.centermsg("%s is an admin." % event_var["username"])

I hope this is able to clear everything up. If you have any suggestions/bug reports, please email me at:

admin [at] thekks [dot] net

 

Back to KKSNetwork