Ejemplo n.º 1
0
# Version 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')
Ejemplo n.º 2
0
import es

# Source-Python-Extensions
import spe

# RPG-Imports
from meowrpg import playerlist, config



# Script
skillname = 'Parachute'


# Load config values
rpgParachuteValue = config.GetInt('rpgParachuteValue')
rpgParachuteModels = config.GetList('rpgParachuteModels')
rpgParachuteDownloads = config.GetList('rpgParachuteDownloads')


# Global variables
parachuted = {}
amounts = {}
buttonPressedOffset = 2648
if spe.platform != "nt":
    buttonPressedOffset += 20


# Events
def load():    
    es.addons.registerTickListener(OnTick)
Ejemplo n.º 3
0
# Antifall-Skill by *meow*
#
# Version 1.0

# Imports

# Python-Imports
import random

# ES-Imports
import es

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Antifall'

# Load config values
rpgAntifallChance = config.GetInt('rpgAntifallChance')


# Events
def player_falldamage(ev):
    player = playerlist[ev['userid']]
    level = player.GetSkillLevel(skillname)
    if level > 0:
        if random.randint(1, 100) <= level * rpgAntifallChance:
            player = player.player
            player.setHealth(player.getHealth() + int(float(ev['damage'])))
Ejemplo n.º 4
0
#
# Version 1.0

# Imports

# ES-Imports
import es

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Health'

# Load config values
rpgHealthValue = config.GetInt('rpgHealthValue')


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


def rpg_player_spawn(ev):
    # Get player and his maximal health
    player = playerlist[ev['userid']]
    maxHealth = 100 + player.GetSkillLevel(skillname) * rpgHealthValue
Ejemplo n.º 5
0
# Version 1.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):
Ejemplo n.º 6
0
# Version 1.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)
Ejemplo n.º 7
0
# Imports

# ES-Imports
import es

# RPG-Imports
from meowrpg import playerlist, config



# Script
skillname = 'Stunnade'


# Load config values
rpgStunnadeTime = config.GetInt('rpgStunnadeTime')
rpgStunnadePower = config.GetInt('rpgStunnadePower')


# Global variables
stun = []


# Events
def player_blind(ev):
    stun.append(ev['userid'])
   
   
def flashbang_detonate(ev):    
    level = playerlist[ev['userid']].GetSkillLevel(skillname)
    team = 5 - int(ev['es_userteam'])      
Ejemplo n.º 8
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
Ejemplo n.º 9
0
# ES-Imports
import es
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):
Ejemplo n.º 10
0
# Python-Imports
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):
Ejemplo n.º 11
0
#Python-Imports
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, ())
Ejemplo n.º 12
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))
Ejemplo n.º 13
0
# Python-Imports
import random

# ES-Imports
import es
import gamethread

# RPG-Imports
from meowrpg import playerlist, config

# Script
skillname = 'Respawn'

# Load config values
rpgRespawnChance = config.GetInt('rpgRespawnChance')


# Events
def load():
    global allowed
    allowed = False


def round_start(ev):
    global allowed
    allowed = True


def round_end(ev):
    global allowed
Ejemplo n.º 14
0
#
# Version 1.0


# Imports

# ES-Imports
import es

# RPG-Imports
from meowrpg import playerlist, config



# Script
skillname = 'Armor'


# Load config values
rpgArmorValue = config.GetInt('rpgArmorValue') 


# Events 
def rpg_player_spawn(ev):  
    player = playerlist[ev['userid']]
    level = player.GetSkillLevel(skillname)
    player = player.player
    if level > 0:
        armor = level * rpgArmorValue
        if player.getArmor() < armor:
            player.setArmor(armor)