import random, es, gamethread # 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, 8, 0, 5", "8, 0, 5, 7, 0, 0", "7, 0, 2, 6, 0, 0", "4, 0, 0, -2, 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, 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, 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, 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"], "!":["0, 0, 0, 0, 0, 3", "0, 0, 6, 0, 0, 30"], ":":["0, 0, 0, 0, 0, 3", "0, 0, 27, 0, 0, 30"], ")":["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"], "(":["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"], "=":["0, 0, 10, 20, 0, 10", "0, 0, 20, 20, 0, 20"]} # colors = ((255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 0), (255, 0, 255), (0, 255, 255)) def load(): if not es.exists('clientcommand', '!ll'): es.regclientcmd('!ll', 'laserletters/make_letters', 'Make a letter or word above your head!') def unload(): if es.exists('clientcommand', '!ll'): es.unregclientcmd('!ll') class letters: def __init__(self, letter): self.letter = letter def create(self, *args): if len(args) == 7: self.RunEffect(args) 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 make_letters(): userid = es.getcmduserid() loc = es.getplayerlocation(userid) command = es.getargs().lower() a = 0 b = 1 while a < len(command): color = random.choice(colors) if command[a] == 'o' or command[a] == 'q': gamethread.delayed(b / 200.0, letters(command[a]).create, args=(loc[0] + b + 8, loc[1], loc[2] + 100, 45, color[0], color[1], color[2])) b += 25 elif command[a] == 'm': gamethread.delayed(b / 200.0, letters(command[a]).create, args=(loc[0] + b, loc[1], loc[2] + 100, 45, color[0], color[1], color[2])) b += 5 elif command[a] != " ": gamethread.delayed(b / 200.0, letters(command[a]).create, args=(loc[0] + b, loc[1], loc[2] + 100, 45, color[0], color[1], color[2])) a += 1 b += 20