Ejemplo n.º 1
0
from config.manager import ConfigManager
from cvars.flags import ConVarFlags

from .info import info

config_manager = ConfigManager(info.basename, cvar_prefix="killerinfo_")

config_manager.header = 'KillerInfo Configuration File'

killerinfo_enabled = config_manager.cvar('enabled',
                                         '1',
                                         'Enable/Disable the plugin\'s functionality (0 = disabled, 1 = enabled)',
                                         ConVarFlags.NONE)

config_manager.write()
config_manager.execute()
Ejemplo n.º 2
0
keyinfo = core_config.cvar('wcs_activate_keymenu', 0)

categories = core_config.cvar('wcs_activate_categories', 0)

unassigned_cat = core_config.cvar('wcs_unassigned_category', 1)

changerace_racename = core_config.cvar('wcs_changerace_racename', 1)

race_in_tag = core_config.cvar('wcs_activate_clantag_races', 1)

logging = core_config.cvar('wcs_logging', 1)

default_races = core_config.cvar('wcs_use_default_race_file', 1)

core_config.write()
core_config.execute()

coredata = {
    'saving': saving.get_int(),
    'save_time': save_time.get_int(),
    'xpsaver': xpsaver.get_int(),
    'racecategories': racecategories.get_int(),
    'defaultcategory': defaultcategory.get_string(),
    'showracelevel': showracelevel.get_int(),
    'keyinfo': keyinfo.get_int(),
    'categories': categories.get_int(),
    'unassigned_cat': unassigned_cat.get_int(),
    'changerace_racename': changerace_racename.get_int(),
    'race_in_tag': race_in_tag.get_int(),
    'logging': logging.get_int(),
Ejemplo n.º 3
0
from menus import PagedMenu
from menus import PagedOption
from menus import SimpleMenu
from menus import SimpleOption
from menus import Text

import wcs

addon_config = ConfigManager('restedxp')
toggle = addon_config.cvar("wcs_restedexp_cfg_toggle", 1)
timer = addon_config.cvar("wcs_restedexp_cfg_timer", 60)
tickaxp = addon_config.cvar("wcs_restedexp_cfg_a_tickxp", 1)
tickoxp = addon_config.cvar("wcs_restedexp_cfg_o_tickxp", 0)
gainxp = addon_config.cvar("wcs_restedexp_cfg_gainxp", 5)
addon_config.write()

db = pickle.getDict()

joined = set()


def exptick():
    for player in PlayerIter():
        steamid = player.steamid
        if steamid == 'BOT':
            steamid = 'BOT_' + player.name.upper()
        if tickoxp.get_int():
            db[steamid]["exp"] += int(tickoxp)
        db[steamid]["left"] = time()
Ejemplo n.º 4
0
from config.manager import ConfigManager
from wcs import wcsgroup
import wcs
from events import Event
from players.entity import Player
from filters.players import PlayerIter

cfg = ConfigManager('xpbounty')
streakvar = cfg.cvar("wcs_xpbounty_cfg_streak", 5)
teambountyvar = cfg.cvar("wcs_xpbounty_cfg_team_bounty", 0)
telltypevar = cfg.cvar("wcs_xpbounty_cfg_tell_type", 0)
xpstartvar = cfg.cvar("wcs_xpbounty_cfg_xp_start", 5)
xpincreasevar = cfg.cvar("wcs_xpbounty_cfg_xp_increase", 5)
cfg.write()

streak = streakvar.get_int()
teambounty = teambountyvar.get_int()
telltype = telltypevar.get_int()
xpstart = xpstartvar.get_int()
xpincrease = xpincreasevar.get_int()


@Event('player_activate')
def player_activate(ev):
    wcsgroup.setUser(ev["userid"], "wcs_bounty_kills", 0)
    wcsgroup.setUser(ev["userid"], "wcs_bounty_bounty", 0)


@Event('player_death')
def player_death(ev):
    atk_play = Player.from_userid(ev['attacker'])