Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # TELL in its final form, made by MazeXD and maintained by TheNinth
- @command # registers as a command
- def tell(script, name = None, *args):
- if name is None or len(args) <= 0: # if either "/tell" or message isn't specified
- script.connection.send_chat('Usage: /tell <player> <message>') # echo 'Usage: /tell <player> <message>' to player
- return # end script
- player = get_player(script.server, name) # grab the player ID proper by name specified as <player>
- if player is script.connection: # if player ID is the initiator's ID
- script.connection.send_chat('Cannot send private messages to yourself!') # complain
- return # end script
- message = '{0} -> {1}: {2}'.format(script.connection.name, player.name, ' '.join(args)) # build message
- player.send_chat(message) # use send_chat on <player>
- script.connection.send_chat(message) # IT WAS SUPER EFFECTIVE (echo message to intitiator)
- print '[whisper] '+message # lol spy
- # EOF
Advertisement
Add Comment
Please, Sign In to add comment