import random, es # Great thanks to joey who turned it from 200 lines to 30 lines # I just got the equations for the letters, he wrote the core # /me licks JoeyT2008 rsyntax = 'est_effect 3 #all 0 "sprites/lgtning.vmt" %s %s %s %s %s %s %s 4 3 %s %s %s 255' # the following dict is really big http://www.nomorepasting.com/getpaste.php?pasteid=13408&seen=true&wrap=on&langoverride=python :O rletters = {"a":["0, 0, 0, 10, 0, 30", "20, 0, 0, 10, 0, 30", "5, 0, 15,15, 0, 15"], "b":["0, 0, 0, 0, 0, 30", "0, 0, 30, 10, 0, 25", "10, 0, 25, 12, 0, 20", "12, 0, 20, 12, 0, 17.5", "12, 0, 17.5, 10, 0, 15", "10, 0, 15, 0, 0, 15", "0, 0, 15, 15, 0, 15", "5, 0, 15, 10, 0, 12.5", "10, 0, 12.5, 12.5, 0, 9", "12.5, 0, 9, 12.5, 0, 5", "12.5, 0, 5, 10, 0, 2.5", "10, 0, 2.5, 8, 0, 0", "10, 0, 2.5, 0, 0, 0"], "c":["16, 0, 0, 8, 0, 2", "8, 0, 2, 0, 0, 6", "0, 0, 6, -2, 0, 12", "-2, 0, 12, -2, 0, 20", "-2, 0, 20, 1, 0, 28", "1, 0, 28, 6, 0, 30", "6, 0, 30, 16, 0, 32"], "d":["0, 0, 30, 6, 0, 27", "6, 0, 27, 9, 0, 24", "9, 0, 24, 12, 0, 21", "12, 0, 21, 13.5, 0, 18", "13.5, 0, 18, 13.5, 0, 15", "13.5, 0, 15, 12, 0, 9", "12, 0, 9, 9, 0, 3", "9, 0, 3, 6, 0, 1.5", "6, 0, 1.5, 3, 0, 0", "3, 0, 0, 0, 0, 0", "0, 0, 0, 0, 0, 30"], "e":["0, 0, 0, 0, 0, 30", "0, 0, 30, 15, 0, 30", "0, 0, 15, 15, 0, 15", "0, 0, 0, 15, 0, 0"], "f":["0, 0, 0, 0, 0, 30", "0, 0, 30, 15, 0, 30", "0, 0, 15, 15, 0, 15"], "g":["16, 0, 0, 8, 0, 2", "8, 0, 2, 0, 0, 6", "0, 0, 6, -2, 0, 12", "-2, 0, 12, -2, 0, 20", "-2, 0, 20, 1, 0, 28", "1, 0, 28, 6, 0, 30", "6, 0, 30, 16, 0, 32", "16, 0, 0, 18, 0, 4", "18, 0, 4, 19, 0, 8", "19, 0, 8, 16, 0, 10", "16, 0, 10, 8, 0, 10"], "h":["0, 0, 0, 0, 0, 30", "15, 0, 0, 15, 0, 30", "0, 0, 15, 15, 0, 15"], "i":["7.5, 0, 0, 7.5, 0, 30", "0, 0, 30, 15, 0, 30", "0, 0, 0, 15, 0, 0"], "j":["0, 0, 30, 20, 0, 30", "10, 0, 30, 10, 0, 10", "10, 0, 10, 12, 0, 5", "12, 0, 5, 15, 0, 0", "15, 0, 2, 16, 0, 0", "16, 0, 0, 22, 0, 10"], "k":["0, 0, 0, 0, 0, 30", "0, 0, 15, 15, 0, 30", "0, 0, 15, 15, 0, 0"], "l":["0, 0, 0, 0, 0, 30", "0, 0, 0, 15, 0, 0"], "m":["0, 0, 0, 5, 0, 30", "5, 0, 30, 10, 0, 0", "10, 0, 0, 15, 0, 30", "15, 0, 30, 20, 0, 0"], "n":["0, 0, 0, 5, 0, 30", "5, 0, 30, 10, 0, 0", "10, 0, 0, 15, 0, 30"], "o":["16, 0, 0, 8, 0, 2", "8, 0, 2, 0, 0, 6", "0, 0, 6, -2, 0, 12", "-2, 0, 12, -2, 0, 20", "-2, 0, 20, 1, 0, 28", "1, 0, 28, 6, 0, 30", "6, 0, 30, 16, 0, 32", "16, 0, 30, 22, 0, 27", "22, 0, 27, 25, 0, 24", "25, 0, 24, 28, 0, 21", "28, 0, 21, 29.5, 0, 18", "29.5, 0, 18, 29.5, 0, 15", "29.5, 0, 15, 28, 0, 9", "28, 0, 9, 25, 0, 3", "25, 0, 3, 22, 0, 1.5", "22, 0, 1.5, 19, 0, 0", "19, 0, 0, 0, 0"], "p":["0, 0, 0, 0, 0, 30", "0, 0, 30, 10, 0, 25", "10, 0, 25, 12, 0, 20", "12, 0, 20, 12, 0, 17.5", "12, 0, 17.5, 10, 0, 15", "10, 0, 15, 0, 0, 15"], "q":["16, 0, 0, 8, 0, 2", "8, 0, 2, 0, 0, 6", "0, 0, 6, -2, 0, 12", "-2, 0, 12, -2, 0, 20", "-2, 0, 20, 1, 0, 28", "1, 0, 28, 6, 0, 30", "6, 0, 30, 16, 0, 32", "16, 0, 30, 22, 0, 27", "22, 0, 27, 25, 0, 24", "25, 0, 24, 28, 0, 21", "28, 0, 21, 29.5, 0, 18", "29.5, 0, 18, 29.5, 0, 15", "29.5, 0, 15, 28, 0, 9", "28, 0, 9, 25, 0, 3", "25, 0, 3, 22, 0, 1.5", "22, 0, 1.5, 19, 0, 0", "19, 0, 0, 0, 0, 0", "10, 0, 4, 15, 0, -8"], "r":["0, 0, 0, 0, 0, 13", "0, 0, 30, 10, 0, 25", "10, 0, 25, 12, 0, 20", "12, 0, 20, 12, 0, 17.5", "12, 0, 17.5, 10, 0, 15", "10, 0, 15, 0, 0, 15" "0, 0, 15, 13, 0, 0"], "s":["0, 0, 0, 18, 0, 0", "18, 0, 0, 20, 0, 6", "20, 0, 6, 20, 0, 12", "20, 0, 12, 17, 0, 13", "17, 0, 13, 6, 0, 13", "6, 0, 13, 0, 0, 18", "0, 0, 18, 1, 0, 24", "1, 0, 24, 5, 0, 30", "5, 0, 30, 18, 0, 30"], "t":["10, 0, 0, 10, 0, 30", "0, 0, 30, 20, 0, 30"], "u":["0, 0, 30, 0, 0, 18", "0, 0, 18, 4, 0, 8", "4, 0, 8, 8, 0, 0", "8, 0, 0, 16, 0, 0", "16, 0, 0, 20, 0, 8", "20, 0, 8, 20, 0, 16", "20, 0, 16, 20, 0, 30"], "v":["0, 0, 30, 10, 0, 0", "10, 0, 0, 20, 0, 30"], "w":["0, 0, 30, 5, 0, 0", "5, 0, 0, 10, 0, 30", "10, 0, 30, 15, 0, 0", "15, 0, 0, 20, 0, 30"], "x":["0, 0, 0, 20, 0, 30", "20, 0, 0, 0, 0, 30"], "y":["0, 0, 30, 10, 0, 20", "20, 0, 30, 10, 0, 20", "10, 0, 20, 10, 0, 0"], "z":["0, 0, 30, 20, 0, 30", "20, 0, 30, 0, 0, 0", "0, 0, 0, 20, 0, 0"]} # colors = ((255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 0), (255, 0, 255), (0, 255, 255)) class letters: def __init__(self, letter): self.letter = letter def create(self, *args): if len(args) == 7: self.RunEffect(args) else: return def RunEffect(self, client): for adjust in rletters[self.letter]: adjust = adjust.split(",") es.server.queuecmd(rsyntax % (client[0] + float(adjust[0]), client[1] + float(adjust[1]), client[2] + float(adjust[2]), client[0] + float(adjust[3]), client[1] + float(adjust[4]), client[2] + float(adjust[5]), client[3], client[4], client[5], client[6])) def es_client_command(ev): loc = es.getplayerlocation(ev["userid"]) color = random.choice(colors) if ev["command"].startswith("!"): command = ev["command"].replace("!", "", 1) if command in rletters: letters(command).create(loc[0], loc[1], loc[2] + 100, 25, color[0], color[1], color[2])