コード例 #1
0
def wcs_ulti_chain():
	userid = int(es.ServerVar('wcs_userid'))
	count = 0

	if es.getplayerteam(userid) >= 2:
		if playerlib.getUseridList('#alive'):
			usermsg.fade(userid, 0, 2, 1, 240, 240, 240, 100)
			x,y,z = es.getplayerlocation(userid)
			radius = float(es.ServerVar('wcs_radius'))
			es.ServerVar('vector1').set(','.join(map(str, (x,y,z))))

			for user in playerlib.getUseridList('#alive,#'+['ct','t'][es.getplayerteam(userid)-2]):
				x1,y1,z1 = es.getplayerlocation(user)

				if ((x1 - x) ** 2 + (y1 - y) ** 2 + (z1 - z) ** 2) ** 0.5 <= radius:
					#check for wall between...

					if not tools.wcsgroup.wcsgroup.getUser(user, 'ulti_immunity'):
						tools.expand.expand.damage(user, 32, userid)
						count += 1

						if es.ServerVar('wcs_cfg_graphicfx'):
							es.server.insertcmd('es_xset vector2 '+','.join(map(str, (x1,y1,z1)))+';es_xdoblock wcs/addons/effect/ChainLightning')

					else:
						es.tell(user, '#multi', '#lightgreenYour ultimate was blocked, the enemy is #greenimmune.')
						es.tell(userid, '#multi', '#lightgreenYou #greenblocked #lightgreenan ultimate skill.')

	if count:
		es.centertell('Chain Lightning: %s players damaged' % (count))
	else:
		es.tell(userid, '#multi', '#lightgreenChain Lightning #greenfailed#lightgreen, because no enemy is close enough to be damaged.')
		es.server.queuecmd('es wcs_reset_cooldown %s' % (userid))
コード例 #2
0
def wcs_ulti_roots():
	userid = int(es.ServerVar('wcs_userid'))
	count = 0

	if es.getplayerteam(userid) >= 2:
		if playerlib.getUseridList('#alive'):
			usermsg.fade(userid, 0, 1, 1, 10, 55, 5, 200)
			x,y,z = es.getplayerlocation(userid)
			radius = float(es.ServerVar('wcs_radius'))
			time = float(es.ServerVar('wcs_freezetime'))

			for user in playerlib.getUseridList('#alive,#'+['ct','t'][es.getplayerteam(userid)-2]):
				x1,y1,z1 = es.getplayerlocation(user)

				if ((x1 - x) ** 2 + (y1 - y) ** 2 + (z1 - z) ** 2) ** 0.5 <= radius:
					#check for wall between...

					if not tools.wcsgroup.wcsgroup.getUser(user, 'ulti_immunity'):
						playerlib.getPlayer(user).freeze = 1
						gamethread.delayed(time, reset, (user, 'freeze', 0))
						count += 1

					else:
						es.tell(user, '#multi', '#lightgreenYour ultimate was blocked, the enemy is #greenimmune.')
						es.tell(userid, '#multi', '#lightgreenYou #greenblocked #lightgreenan ultimate skill.')

	if count:
		es.centertell('Entangling Roots: %s' % (count))
	else:
		es.tell(userid, '#multi','#lightgreenEntangling Roots #greenfailed#lightgreen, because no enemy is close enough.')
		es.server.queuecmd('es wcs_reset_cooldown %s' % (userid))
コード例 #3
0
def usermsg_cmd(args):
    if len(args) == 1:
        if args[0] == 'list':
            es.dbgmsg(0, "usermsg fade: Syntax: fade <userid> <0 = no fade, 1 = fade Out 2 = fade in> <time to fade (in frames)> <time faded (in frames)> <red> <green> <blue> <alpha>")
            es.dbgmsg(0, "usermsg shake: Syntax: shake <userid> <magnitude> <time>")
            es.dbgmsg(0, "usermsg motd: Syntax: motd <userid> <0 = text, 2 = url> <title> <msg>")
            es.dbgmsg(0, "usermsg hudhint: Syntax: hudhint <userid> <msg>")
            es.dbgmsg(0, "usermsg keyhint: Syntax: keyhint <userid> <msg>")
            es.dbgmsg(0, "usermsg centermsg: Syntax: centermsg <userid> <msg>")
        else:
            es.dbgmsg(0, 'usermsg: Invalid parameters, type "usermsg list" to see a list of valid subcommands')
    elif len(args) > 1:
        subcommand = args[0]
        if subcommand == 'fade':
            if len(args) > 8:
              usermsg.fade(args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8])
            else:
              es.dbgmsg(0, "usermsg fade: Syntax: fade <userid> <0 = no fade, 1 = fade Out 2 = fade in> <time to fade (in frames)> <time faded (in frames)> <red> <green> <blue> <alpha>")
        elif subcommand == 'shake':
            if len(args) > 3:
              usermsg.shake(args[1], args[2], args[3])
            else:
              es.dbgmsg(0, "usermsg shake: Syntax: shake <userid> <magnitude> <time>")
        elif subcommand == 'motd':
            if len(args) > 4:
              usermsg.motd(args[1], args[2], args[3], args[4])
            else:
              es.dbgmsg(0, "usermsg motd: Syntax: motd <userid> <0 = text, 2 = url> <title> <msg>")
        elif subcommand == 'hudhint':
            if len(args) > 2:
              usermsg.hudhint(args[1], args[2])
            else:
              es.dbgmsg(0, "usermsg hudhint: Syntax: hudhint <userid> <msg>")
        elif subcommand == 'keyhint':
            if len(args) > 2:
              usermsg.keyhint(args[1], args[2])
            else:
              es.dbgmsg(0, "usermsg keyhint: Syntax: keyhint <userid> <msg>")
        elif subcommand == 'centermsg':
            if len(args) > 2:
              usermsg.centermsg(args[1], args[2])
            else:
              es.dbgmsg(0, "usermsg centermsg: Syntax: centermsg <userid> <msg>")
        elif subcommand == 'echo':
            if len(args) > 2:
              usermsg.echo(args[1], args[2])
            else:
              es.dbgmsg(0, "usermsg echo: Syntax: echo <userid> <msg>")
        else:
            es.dbgmsg(0, 'usermsg: Invalid subcommand, type "usermsg list" to see a list of valid subcommands')
    else:
        es.dbgmsg(0, 'usermsg: Missing userid and subcommand, type "usermsg list" to see a list of valid subcommands')
コード例 #4
0
def wcs_ulti_suicide():
	userid = int(es.ServerVar('wcs_userid'))

	if es.getplayerteam(userid) >= 2:
		if playerlib.getUseridList('#alive'):
			usermsg.fade(userid, 0, 2, 1, 240, 240, 240, 100)
			x,y,z = es.getplayerlocation(userid)
			radius = float(es.ServerVar('wcs_radius'))
			magnitude = float(es.ServerVar('wcs_magnitude'))
			v = round(radius * magnitude) / 150

			for user in playerlib.getUseridList('#alive,#'+['ct','t'][es.getplayerteam(userid)-2]):
				x1,y1,z1 = es.getplayerlocation(user)

				if ((x1 - x) ** 2 + (y1 - y) ** 2 + (z1 - z) ** 2) ** 0.5 <= radius:
					#check for wall between...

					if not tools.wcsgroup.wcsgroup.getUser(user, 'ulti_immunity'):
						tools.expand.expand.damage(user, v, userid)

					else:
						es.tell(user, '#multi', '#lightgreenYour ultimate was blocked, the enemy is #greenimmune.')
						es.tell(userid, '#multi', '#lightgreenYou #greenblocked #lightgreenan ultimate skill.')
コード例 #5
0
 def blind(self):
     '''
     The actual blind
     '''
     usermsg.fade(self.userid,2,500,1000,0,0,0,255)
コード例 #6
0
def usermsg_cmd(args):
    if len(args) == 1:
        if args[0] == 'list':
            es.dbgmsg(
                0,
                "usermsg fade: Syntax: fade <userid> <0 = no fade, 1 = fade Out 2 = fade in> <time to fade (in frames)> <time faded (in frames)> <red> <green> <blue> <alpha>"
            )
            es.dbgmsg(
                0, "usermsg shake: Syntax: shake <userid> <magnitude> <time>")
            es.dbgmsg(
                0,
                "usermsg motd: Syntax: motd <userid> <0 = text, 2 = url> <title> <msg>"
            )
            es.dbgmsg(0, "usermsg hudhint: Syntax: hudhint <userid> <msg>")
            es.dbgmsg(0, "usermsg keyhint: Syntax: keyhint <userid> <msg>")
            es.dbgmsg(0, "usermsg centermsg: Syntax: centermsg <userid> <msg>")
        else:
            es.dbgmsg(
                0,
                'usermsg: Invalid parameters, type "usermsg list" to see a list of valid subcommands'
            )
    elif len(args) > 1:
        subcommand = args[0]
        if subcommand == 'fade':
            if len(args) > 8:
                usermsg.fade(args[1], args[2], args[3], args[4], args[5],
                             args[6], args[7], args[8])
            else:
                es.dbgmsg(
                    0,
                    "usermsg fade: Syntax: fade <userid> <0 = no fade, 1 = fade Out 2 = fade in> <time to fade (in frames)> <time faded (in frames)> <red> <green> <blue> <alpha>"
                )
        elif subcommand == 'shake':
            if len(args) > 3:
                usermsg.shake(args[1], args[2], args[3])
            else:
                es.dbgmsg(
                    0,
                    "usermsg shake: Syntax: shake <userid> <magnitude> <time>")
        elif subcommand == 'motd':
            if len(args) > 4:
                usermsg.motd(args[1], args[2], args[3], args[4])
            else:
                es.dbgmsg(
                    0,
                    "usermsg motd: Syntax: motd <userid> <0 = text, 2 = url> <title> <msg>"
                )
        elif subcommand == 'hudhint':
            if len(args) > 2:
                usermsg.hudhint(args[1], args[2])
            else:
                es.dbgmsg(0, "usermsg hudhint: Syntax: hudhint <userid> <msg>")
        elif subcommand == 'keyhint':
            if len(args) > 2:
                usermsg.keyhint(args[1], args[2])
            else:
                es.dbgmsg(0, "usermsg keyhint: Syntax: keyhint <userid> <msg>")
        elif subcommand == 'centermsg':
            if len(args) > 2:
                usermsg.centermsg(args[1], args[2])
            else:
                es.dbgmsg(
                    0, "usermsg centermsg: Syntax: centermsg <userid> <msg>")
        elif subcommand == 'echo':
            if len(args) > 2:
                usermsg.echo(args[1], args[2])
            else:
                es.dbgmsg(0, "usermsg echo: Syntax: echo <userid> <msg>")
        else:
            es.dbgmsg(
                0,
                'usermsg: Invalid subcommand, type "usermsg list" to see a list of valid subcommands'
            )
    else:
        es.dbgmsg(
            0,
            'usermsg: Missing userid and subcommand, type "usermsg list" to see a list of valid subcommands'
        )
コード例 #7
0
 def blind(self):
     '''
     The actual blind
     '''
     usermsg.fade(self.userid, 2, 500, 1000, 0, 0, 0, 255)
コード例 #8
0
def BlindLoop():
    Players = playerlib.getUseridList('#alive,#t')
    if (Players):
        for Blindie in Players:
            usermsg.fade(Blindie, 2, 250, 300, 255, 0, 0, 50)
    gamethread.delayedname(0.25, "BlindDelayName", BlindLoop)