Пример #1
0
# Imports

# ES-Imports
import playerlib
import gamethread

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Regeneration'

# Load config values
rpgRegenerationValue = config.GetInt('rpgRegenerationValue')
rpgRegenerationInterval = config.GetFloat('rpgRegenerationInterval')


# Events
def unload():
    gamethread.cancelDelayed('rpg_regeneration')


def round_start(ev):
    gamethread.delayedname(rpgRegenerationInterval, 'rpg_regeneration',
                           rpg_regeneration, ())


def round_end(ev):
    gamethread.cancelDelayed('rpg_regeneration')
Пример #2
0
# Imports

# ES-Imports
import es

# RPG-Imports
from meowrpg import playerlist, config



# Script
skillname = 'Gravity'


# Load config values
rpgGravityValue = config.GetFloat('rpgGravityValue') 


# Events
def unload():
    for i in playerlist.GetPlayerlist():
        es.server.queuecmd('es_fire %s !self addoutput "gravity 1"' %(i.userid))   
        
        
def rpg_player_spawn(ev):
    player = playerlist[ev['userid']]
    es.server.queuecmd('es_fire %s !self addoutput "gravity %s"' %(player.userid, 1 - player.GetSkillLevel(skillname) * rpgGravityValue))   
    

def rpg_skill_level_changed(ev):
    if ev['skill'] == skillname:
Пример #3
0
# Version 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']) !=
Пример #4
0
# Imports

# ES-Imports
import es
import gamethread

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Frostpistol'

# Load config values
rpgFrostpistolTime = config.GetInt('rpgFrostpistolTime')
rpgFrostpistolEffect = {
    'usp': config.GetFloat('rpgFrostpistolUsp'),
    'glock': config.GetFloat('rpgFrostpistolGlock'),
    'p228': config.GetFloat('rpgFrostpistolP228'),
    'deagle': config.GetFloat('rpgFrostpistolDeagle'),
    'fiveseven': config.GetFloat('rpgFrostpistolFiveseven'),
    'elite': config.GetFloat('rpgFrostpistolElite')
}


# Events
def unload():
    for i in playerlist.GetPlayerlist():
        gamethread.cancelDelayed('rpg_frostpistol_%s' % (i.userid))
        rpg_unfrost(i.userid)

Пример #5
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))
Пример #6
0
# Imports

# ES-Imports
import es

# RPG-Imports
from meowrpg import playerlist, config



# Script
skillname = 'Longjump'


# Load config values
rpgLongjumpValue = config.GetFloat('rpgLongjumpValue') 


# Events         
def player_jump(ev):
    # Get userid and level for that skill
    userid = int(ev['userid'])
    level = playerlist[userid].GetSkillLevel(skillname) 
    
    # Calculate jump vector and set it       
    horizontalVector = es.getplayerprop(userid, 'CBasePlayer.localdata.m_vecVelocity[0]')
    verticalVector   = es.getplayerprop(userid, 'CBasePlayer.localdata.m_vecVelocity[1]')       
    horizontalVector = (level * horizontalVector) * rpgLongjumpValue
    verticalVector   = (level * verticalVector)   * rpgLongjumpValue
    vector = '%s,%s,0' % (horizontalVector, verticalVector)        
    es.setplayerprop(userid, 'CBasePlayer.localdata.m_vecBaseVelocity', vector) 
Пример #7
0
import playerlib
import gamethread

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



# Script
skillname = 'Medic'


# Load config values
rpgMedicValueHealth = config.GetInt('rpgMedicValueHealth')
rpgMedicValueArmor  = config.GetInt('rpgMedicValueArmor')
rpgMedicInterval = config.GetFloat('rpgMedicInterval')
rpgMedicDistance = config.GetInt('rpgMedicDistance')


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


def round_start(ev):
    gamethread.delayedname(rpgMedicInterval, 'rpg_%s' %(skillname), rpg_medic, ())
    
    
def round_end(ev):
    gamethread.cancelDelayed('rpg_%s' %(skillname)) 
Пример #8
0
import time

# 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
Пример #9
0
# Version 1.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
Пример #10
0
import math

# ES-Imports
import es
import playerlib
import gamethread

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Poisonnade'

# Load config values
rpgPoisonnadeValue = config.GetInt('rpgPoisonnadeValue')
rpgPoisonnadeInterval = config.GetFloat('rpgPoisonnadeInterval')

# Global variables
nades = []


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


def round_start(ev):
    gamethread.delayedname(rpgPoisonnadeInterval, 'rpg_%s' % (skillname),
                           rpg_poison, ())

Пример #11
0
#
# Version 1.0

# Imports

# ES-Imports
import es

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Stealth'

# Load config values
rpgStealthValue = config.GetFloat('rpgStealthValue')


# Events
def unload():
    for i in playerlist.GetPlayerlist():
        i.player.setColor(255, 255, 255, 255)
        try:
            del i.properties['color']
        except:
            pass


def rpg_player_spawn(ev):
    player = playerlist[ev['userid']]
    alpha = (1 - player.GetSkillLevel(skillname) * rpgStealthValue) * 255
Пример #12
0
# Version 1.0

# Imports

# ES-Imports
import es
import gamethread

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Icestab'

# Load config values
rpgIcestabTime = config.GetFloat('rpgIcestabTime')


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


def player_hurt(ev):
    if ev['weapon'] == 'knife' and int(ev['dmg_health']) >= 35:
        player = playerlist[ev['attacker']]
        level = player.GetSkillLevel(skillname)
        if level > 0 and es.getplayerprop(player.userid,
                                          'CBaseEntity.movetype') != 0:
Пример #13
0
# Version 1.0


# Imports

# RPG-Imports
from meowrpg import playerlist, config



# Script
skillname = 'Vampire'


# Load config values
rpgVampireValue = config.GetFloat('rpgVampireValue')


# Events            
def player_hurt(ev):
    # Get userid, level, maxHealth and plyerlib instance
    userid = int(ev['attacker']) 
    player = playerlist[userid] 
    maxHealth = player.properties['maxHealth']     
    level = player.GetSkillLevel(skillname)
    player = player.player
    # Calculate and set hp
    hp = player.getHealth() + int(int(ev['dmg_health']) * rpgVampireValue * level)
    if hp < maxHealth: 
        player.setHealth(hp) 
    else:
Пример #14
0
#
# Version 1.0

# Imports

# ES-Imports
import es

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Speed'

# Load config values
rpgSpeedValue = config.GetFloat('rpgSpeedValue')


# Events
def unload():
    for i in playerlist.GetPlayerlist():
        i.player.setSpeed(1.0)
        try:
            del i.properties['speed']
        except:
            pass


def rpg_player_spawn(ev):
    player = playerlist[ev['userid']]
    speed = 1 + player.GetSkillLevel(skillname) * rpgSpeedValue