Esempio n. 1
0
# Imports

# ES-Imports
import es
import playerlib

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Damage'

# Load config values
rpgDamageValue = config.GetFloat('rpgDamageValue')
rpgDamageTeam = config.GetBool('rpgDamageTeam')

# Global variables
block = set()


# Events
def player_hurt(ev):
    # Get level of that skill
    level = playerlist[ev['attacker']].GetSkillLevel(skillname)
    userid = int(ev['userid'])
    if userid in block:
        block.remove(userid)
    else:
        if level > 0 and (rpgDamageTeam or es.getplayerteam(ev['attacker']) !=
                          es.getplayerteam(ev['userid'])):
Esempio n. 2
0
# Imports

# ES-Imports
import playerlib
import gamethread

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Resupply'

# Load config values
rpgResupplyAmmo = config.GetInt('rpgResupplyAmmo')
rpgResupplyActiveOnly = config.GetBool('rpgResupplyActiveOnly')
rpgResupplyInterval = config.GetFloat('rpgResupplyInterval')


# Events
def unload():
    gamethread.cancelDelayed('rpg_%s' % (skillname))


def round_start(ev):
    gamethread.delayedname(rpgResupplyInterval, 'rpg_%s' % (skillname),
                           rpg_resupply, ())


def round_end(ev):
    gamethread.cancelDelayed('rpg_%s' % (skillname))
Esempio n. 3
0
# ES-Imports
import es
import gamethread
import effectlib

# RPG-Imports
from meowrpg import playerlist, config, tell

# Script
skillname = 'Teleport'

# Load config values
rpgTeleportValue = config.GetInt('rpgTeleportValue')
rpgTeleportTime = config.GetFloat('rpgTeleportTime')
rpgTeleportInterval = config.GetInt('rpgTeleportInterval')
rpgTeleportEffects = config.GetBool('rpgTeleportEffects')
rpgTeleportSetcommand = config.GetList('rpgTeleportSetcommand')
rpgTeleportCommand = config.GetList('rpgTeleportCommand')

# Global variables
teleportStore = {}
teleporting = set()
teleportingAllowed = False


# Classes
class TeleportStore(object):
    def __init__(self):
        self.last = 0
        self.amount = 0
        self.pos = None
Esempio n. 4
0
# Imports

# ES-Imports
import weaponlib
import gamethread

# RPG-Imports
from meowrpg import playerlist, skillhandler, config

# Script
skillname = 'Impulse'

# Load config values
rpgImpulseSpeed = config.GetFloat('rpgImpulseSpeed')
rpgImpulseAmmo = config.GetInt('rpgImpulseAmmo')
rpgImpulseActiveOnly = config.GetBool('rpgImpulseActiveOnly')


# Events
def unload():
    for i in playerlist.GetPlayerlist():
        gamethread.cancelDelayed('rpg_%s_%s' % (skillname, i.userid))
        rpg_repulse(i.userid)


def player_hurt(ev):
    if (ev['weapon']
            not in ('usp', 'glock', 'p228', 'deagle', 'fiveseven', 'elite')
            or not skillhandler.IsLoaded('Frostpistol') or
        (ev['weapon'] in
         ('usp', 'glock', 'p228', 'deagle', 'fiveseven', 'elite')
Esempio n. 5
0
# Firegrenade-Skill by *meow*
#
# Version 1.0

# Imports

# ES-Imports
import es

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Firegrenade'

# Load config values
rpgFiregrenadeTime = config.GetInt('rpgFiregrenadeTime')
rpgFiregrenadeTeamignite = config.GetBool('rpgFiregrenadeTeamignite')


# Events
def player_hurt(ev):
    # Get level of that skill
    level = playerlist[ev['attacker']].GetSkillLevel(skillname)
    if ev['weapon'] == 'hegrenade' and level > 0 and (
            rpgFiregrenadeTeamignite or es.getplayerteam(
                ev['attacker']) != es.getplayerteam(ev['userid'])):
        es.server.queuecmd('es_fire %s !self IgniteLifetime %s' %
                           (ev['userid'], level * rpgFiregrenadeTime))