def beacon(userid): userid = int(userid) for player in playerlib.getPlayerList('#alive'): if player.team == 2: iRed = 255 iBlue = 0 else: iRed = 0 iBlue = 255 spe_effects.beamRingPoint( userid, #'#all', # users 0., # fDelay player.location, # vOrigin 0., # fStartRadius 600., # fEndRadius 'sprites/lgtning.vmt', # szModelPath 1, # iHaloIndex 0, # iStartFrame 255, # iFrameRate 0.3, # fLife 12, # fWidth 0, # iSpread 2., # fAmplitude iRed, # iRed 0, # iGreen iBlue, # iBlue 255, # iAlpha 0.5, # iSpeed 0, # iFlags ) gamethread.delayedname(2, 'beacon_%i' % userid, beacon, userid)
def regEffect10(args): if len(args) != 17: log.log( 'est_effect 10 <player Filter> <delay> <model> <x> <y> <z> <start radius> <end radius> <life> <width> <spread> <amplitude> <Red> <Green> <Blue> <Alpha> <speed>' ) log.log('est_effect 10: get: ' + ' '.join(args)) return users = str(args[0]) if users == '#a': users = '#all' delay = float(args[1]) model = str(args[2]) start = (args[3], args[4], args[5]) sradius = int(args[6]) eradius = int(args[7]) life = float(args[8]) width = int(args[9]) spread = int(args[10]) # amplitude = int(args[11]) amplitude = float(args[11]) red = int(args[12]) green = int(args[13]) blue = int(args[14]) alpha = int(args[15]) speed = int(args[16]) if amplitude > 60: amplitude = 60 spe_effects.beamRingPoint(users, delay, start, sradius, eradius, model, 0, 0, 255, life, width, spread, amplitude, red, green, blue, alpha, speed, 0)
def __mainloop(self): ''' Creates the beacon, plays the sound and calls the callbacks. ''' if self.duration != 'indefinitely': self.duration -= self.interval if self.duration <= 0: return stop(self.__userid) self.precallback(self.__userid, self) origin = es.getplayerlocation(self.__userid) origin = tuple(origin[x]+self.offset[y] for x, y in enumerate('xyz')) beamRingPoint(self.users, 0, origin, self.startradius, self.endradius, self.model, self.halo, self.startframe, self.framerate, self.interval, self.width, self.spread, self.amplitude, self.r, self.g, self.b, self.a, self.speed, self.flags) if self.soundtype == 'emitsound': es.emitsound('player', self.__userid, self.sound, self.volume, self.attenuation) elif self.soundtype == 'playsound': es.playsound(self.__userid, self.sound, self.volume) self.postcallback(self.__userid, self) gamethread.delayedname(self.interval, self.__name, self.__mainloop)
def regEffect10(args): if len(args) != 17: log.log( "est_effect 10 <player Filter> <delay> <model> <x> <y> <z> <start radius> <end radius> <life> <width> <spread> <amplitude> <Red> <Green> <Blue> <Alpha> <speed>" ) log.log("est_effect 10: get: " + " ".join(args)) return users = str(args[0]) if users == "#a": users = "#all" delay = float(args[1]) model = str(args[2]) start = (args[3], args[4], args[5]) sradius = int(args[6]) eradius = int(args[7]) life = float(args[8]) width = int(args[9]) spread = int(args[10]) # amplitude = int(args[11]) amplitude = float(args[11]) red = int(args[12]) green = int(args[13]) blue = int(args[14]) alpha = int(args[15]) speed = int(args[16]) if amplitude > 60: amplitude = 60 spe_effects.beamRingPoint( users, delay, start, sradius, eradius, model, 0, 0, 255, life, width, spread, amplitude, red, green, blue, alpha, speed, 0, )
def preRegEffect8(args): if len(args) != 19 and len(args) != 17: log.log( 'est_effect_08 <player Filter> <delay> <model> <center "X Y Z"> <Start Radius> <End Radius> <framerate> <life> <width> <spread> <amplitude> <R> <G> <B> <A> <speed> <flags>' ) log.log('est_effect_08: get: ' + ' '.join(args)) return if len(args) == 17: x, y, z = args[3].split(',') preRegEffect8([ args[0], args[1], args[2], x, y, z, args[4], args[5], args[6], args[7], args[8], args[9], args[10], args[11], args[12], args[13], args[14], args[15], args[16] ]) return users = str(args[0]) if users == '#a': users = '#all' delay = float(args[1]) model = str(args[2]) start = (args[3], args[4], args[5]) sradius = int(args[6]) eradius = int(args[7]) rate = int(args[8]) life = float(args[9]) width = int(args[10]) spread = int(args[11]) amplitude = int(args[12]) red = int(args[13]) green = int(args[14]) blue = int(args[15]) alpha = int(args[16]) speed = int(args[17]) flags = int(args[18]) if amplitude > 60: amplitude = 60 spe_effects.beamRingPoint(users, delay, start, sradius, eradius, model, 0, 0, rate, life, width, spread, amplitude, red, green, blue, alpha, speed, flags)
def preRegEffect8(args): if len(args) != 19 and len(args) != 17: log.log( 'est_effect_08 <player Filter> <delay> <model> <center "X Y Z"> <Start Radius> <End Radius> <framerate> <life> <width> <spread> <amplitude> <R> <G> <B> <A> <speed> <flags>' ) log.log("est_effect_08: get: " + " ".join(args)) return if len(args) == 17: x, y, z = args[3].split(",") preRegEffect8( [ args[0], args[1], args[2], x, y, z, args[4], args[5], args[6], args[7], args[8], args[9], args[10], args[11], args[12], args[13], args[14], args[15], args[16], ] ) return users = str(args[0]) if users == "#a": users = "#all" delay = float(args[1]) model = str(args[2]) start = (args[3], args[4], args[5]) sradius = int(args[6]) eradius = int(args[7]) rate = int(args[8]) life = float(args[9]) width = int(args[10]) spread = int(args[11]) amplitude = int(args[12]) red = int(args[13]) green = int(args[14]) blue = int(args[15]) alpha = int(args[16]) speed = int(args[17]) flags = int(args[18]) if amplitude > 60: amplitude = 60 spe_effects.beamRingPoint( users, delay, start, sradius, eradius, model, 0, 0, rate, life, width, spread, amplitude, red, green, blue, alpha, speed, flags, )