I am trying to create a script that is very funny and troll-ish.
But I keep getting a syntax error. First the error, then the code:
Pyspades wrote:Traceback (most recent call last):
File "run.py", line 1004, in <module>
File "C:\Documents and Settings\Computer user\My Documents\Downloads\Random\dist\Scripts\troll.py
, line 13
if self != killer
SyntaxError: invalid syntax
My code:
- Code: Select all
#Troll players when they die xD
#By HoboHob (my first script xD)
import random
QUOTES = ["Your suckage level is OVER 9000", "PWNED NUB!", "I don't hack, you just suck", "lol xD"]
QUOTES_SUICIDE = ["You killed yourself xD noob", "I can't stop loling at your fail"]
def apply_script(protocol,connection,config):
quote = random.random()*3
class TrollConnection(connection):
def on_kill(self,killer,type):
if self != killer
quote = round(random.random()*3)
self.send_chat(QUOTES[quote] + " -" + killer)
else:
quote = round(random.random())
self.send_chat(QUOTE_SUICIDE[quote])
return return connection.on_kill(self, killer, type)
return TrollConnection