Guest User

Untitled

a guest
Apr 16th, 2017
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 158.52 KB | None | 0 0
  1. #coding: utf-8
  2. import re, base64, hashlib, urllib2, random
  3.  
  4. from ByteArray import ByteArray
  5. from Identifiers import Identifiers
  6.  
  7. class ParseCommands:
  8. def __init__(this, client, server):
  9. this.client = client
  10. this.server = client.server
  11. this.Cursor = client.Cursor
  12. this.currentArgsCount = 0
  13.  
  14. def requireNoSouris(this, playerName):
  15. if playerName.startswith("*"):
  16. pass
  17. else:
  18. return True
  19.  
  20. def requireArgs(this, argsCount):
  21. if this.currentArgsCount < argsCount:
  22. this.client.sendMessage("Invalid arguments.")
  23. return False
  24.  
  25. return True
  26.  
  27. def requireTribe(this, canUse=False):
  28. if not this.client.tribeName == "" and this.client.room.isTribeHouse:
  29. tribeRankings = this.client.tribeData[3]
  30. perm = tribeRankings[this.client.tribeRank].split("|")[2]
  31. if perm.split(",")[8] == "1":
  32. canUse = True
  33.  
  34. def parseCommand(this, command):
  35. values = command.split(" ")
  36. command = values[0].lower()
  37. args = values[1:]
  38. argsCount = len(args)
  39. argsNotSplited = " ".join(args)
  40. this.currentArgsCount = argsCount
  41.  
  42. try:
  43. if command in ["profil", "perfil", "profile"]:
  44. this.client.sendProfile(this.client.Username if argsCount == 0 else this.client.TFMUtils.parsePlayerName(args[0]))
  45.  
  46. elif command in ["editeur", "editor"]:
  47. if this.client.privLevel >= 1:
  48. this.client.enterRoom(chr(3) + "[Editeur] " + this.client.Username)
  49. this.client.sendPacket(Identifiers.old.send.Map_Editor, [])
  50. this.client.sendPacket(Identifiers.send.Room_Type, chr(1))
  51.  
  52. elif command in ["totem"]:
  53. if this.client.privLevel >= 1:
  54. if this.client.privLevel != 0 and this.client.shamanSaves >= 500:
  55. this.client.enterRoom(chr(3) + "[Totem] " + this.client.Username)
  56.  
  57. elif command in ["sauvertotem"]:
  58. if this.client.room.isTotemEditeur:
  59. this.client.STotem[0] = this.client.Totem[0]
  60. this.client.STotem[1] = this.client.Totem[1]
  61. this.client.sendPlayerDied()
  62. this.client.enterRoom(this.server.recommendRoom(this.client.Langue))
  63.  
  64. elif command in ["resettotem"]:
  65. if this.client.room.isTotemEditeur:
  66. this.client.Totem = [0, ""]
  67. this.client.RTotem = True
  68. this.client.isDead = True
  69. this.client.sendPlayerDied()
  70. this.client.room.checkShouldChangeMap()
  71.  
  72. elif command in ["ban", "iban"]:
  73. if this.client.privLevel >= 5:
  74. if (args[0] == "help"):
  75. message = "\n<J>Ban help:\n"
  76. message += "<ROSE>0<J> - <CH>360 <J> - <N>Hack (last warning before account deletion)</N>\n"
  77. message += "<ROSE>1<J> - <CH>360 <J> - <N>Hack</N>\n"
  78. message += "<ROSE>2<J> - <CH>24 <J> - <N>Activité suspecte</N>\n"
  79. message += "<ROSE>3<J> - <CH>900 <J> - <N>Disclosure</N>\n"
  80. message += "<ROSE>4<J> - <CH>48 <J> - <N>Disrespect</N>\n"
  81. message += "<J>Using <N>/ban playerName <CH>time <ROSE>argument</ROSE>"
  82. this.client.sendMessage(message)
  83. else:
  84. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  85. time = args[1] if (argsCount >= 2) else "1"
  86. reason = ("Hack (last warning before account deletion)" if args[2] == "0" else "Hack" if args[2] == "1" else "Activité suspecte" if args[2] == "2" else "Disclosure" if args[2] == "3" else "Disrespect" if args[2] == "4" else "Another motive") if (argsCount >= 3) else "Why not set"
  87. silent = command == "iban"
  88. hours = int(time) if (time.isdigit()) else 1
  89. hours = 100000 if (hours > 100000) else hours
  90. hours = 24 if (this.client.privLevel <= 6 and hours > 24) else hours
  91. if (reason in ["Why not set", "Another motive"]):
  92. this.client.sendMessage("<ROSE>Need help? Type <J>/ban help</J>")
  93. elif playerName in this.server.adminAllow:
  94. this.server.sendStaffMessage(7, "%s tried to ban an administrator." %(this.client.Username))
  95. else:
  96. if this.server.banPlayer(playerName, hours, reason, this.client.Username, silent):
  97. this.server.sendStaffMessage(5, "<V>%s</V> banned <V>%s</V> for <V>%s</V> %s the reason: <V>%s</V>" %(this.client.Username, playerName, hours, "hora" if hours == 1 else "horas", reason))
  98. else:
  99. this.client.sendMessage("The player [%s] does not exist." % (playerName))
  100. else:
  101. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  102. this.server.voteBanPopulaire(playerName, this.client.ipAddress)
  103. this.client.sendBanConsideration()
  104.  
  105. elif command in ["banl", "ibanl"]:
  106. if this.client.privLevel >= 5:
  107. if (args[0] == "help"):
  108. message = "\n<J>Ban help:\n"
  109. message += "<ROSE>0<J> - <CH>360 <J> - <N>Hack (last warning before account deletion)</N>\n"
  110. message += "<ROSE>1<J> - <CH>360 <J> - <N>Hack</N>\n"
  111. message += "<ROSE>2<J> - <CH>24 <J> - <N>Activité suspecte</N>\n"
  112. message += "<ROSE>3<J> - <CH>900 <J> - <N>Disclosure</N>\n"
  113. message += "<ROSE>4<J> - <CH>48 <J> - <N>Disrespect</N>\n"
  114. message += "<J>Using <N>/ban playerName <CH>time <ROSE>argument</ROSE>"
  115. this.client.sendMessage(message)
  116. else:
  117. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  118. time = args[1] if (argsCount >= 2) else "1"
  119. reason = argsNotSplited.split(" ", 2)[2] if (argsCount >= 2) else ""
  120. #reason = ("Hack (last warning before account deletion)" if args[2] == "0" else "Hack" if args[2] == "1" else "Activité suspecte" if args[2] == "2" else "Disclosure" if args[2] == "3" else "Disrespect" if args[2] == "4" else "Another motive") if (argsCount >= 3) else "Why not set"
  121. silent = command == "iban"
  122. hours = int(time) if (time.isdigit()) else 1
  123. hours = 100000 if (hours > 100000) else hours
  124. hours = 24 if (this.client.privLevel <= 6 and hours > 24) else hours
  125. #if (reason in ["Why not set", "Another motive"]):
  126. #this.client.sendMessage("<ROSE>Need help? Type <J>/ban help</J>")
  127. if playerName in this.server.adminAllow:
  128. this.server.sendStaffMessage(7, "%s tried to ban an administrator." %(this.client.Username))
  129. else:
  130. if this.server.banPlayer(playerName, hours, reason, this.client.Username, silent):
  131. this.server.sendStaffMessage(5, "<V>%s</V> banned <V>%s</V> for <V>%s</V> %s the reason: <V>%s</V>" %(this.client.Username, playerName, hours, "hora" if hours == 1 else "horas", reason))
  132. else:
  133. this.client.sendMessage("The player [%s] does not exist." % (playerName))
  134. else:
  135. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  136. this.server.voteBanPopulaire(playerName, this.client.ipAddress)
  137. this.client.sendBanConsideration()
  138.  
  139. elif command in ["unban"]:
  140. if this.client.privLevel >= 10:
  141. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  142. this.requireNoSouris(playerName)
  143. found = False
  144.  
  145. if this.server.checkExistingUser(playerName):
  146. if this.server.checkTempBan(playerName):
  147. this.server.removeTempBan(playerName)
  148. found = True
  149.  
  150. if this.server.checkPermaBan(playerName):
  151. this.server.removePermaBan(playerName)
  152. found = True
  153.  
  154. if found:
  155. import time
  156. this.Cursor.execute("insert into BanLog values (?, ?, '', '', ?, 'Unban', '', '')", [playerName, this.client.Username, int(str(time.time())[:9])])
  157. this.server.sendStaffMessage(5, "<V>%s</V> unbanned <V>%s</V>." %(this.client.Username, playerName))
  158.  
  159. elif command in ["unbanip"]:
  160. if this.client.privLevel >= 7:
  161. ip = args[0]
  162. if ip in this.server.ipPermaBanCache:
  163. this.server.ipPermaBanCache.remove(ip)
  164. this.Cursor.execute("delete from ippermaban where IP = ?", [ip])
  165. this.server.sendStaffMessage(7, "<V>%s</V> unbanned the IP <V>%S</V>." %(this.client.Username, ip))
  166. else:
  167. this.client.sendMessage("This IP is not banned.")
  168.  
  169.  
  170. elif command in ["mute"]:
  171. if this.client.privLevel >= 5:
  172. if (args[0] == "help"):
  173. message = "\n<J>Mute help:\n"
  174. message += "<ROSE>0<J> - <CH>2 <J> - <N>Flood</N>\n"
  175. message += "<ROSE>1<J> - <CH>1 <J> - <N>Disrespect to a player</N>\n"
  176. message += "<ROSE>2<J> - <CH>24 <J> - <N>Disrespect to staff</N>\n"
  177. message += "<J>Using <N>/mute playerName <CH>time <ROSE>argument</ROSE>"
  178. this.client.sendMessage(message)
  179. else:
  180. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  181. time = args[1] if (argsCount >= 2) else "1"
  182. reason = ("Flood" if args[2] == "0" else "Disrespect to a player" if args[2] == "1" else "Disrespect to staff" if args[2] == "2" else "Another motive") if (argsCount >= 3) else "Why not set"
  183. hours = int(time) if (time.isdigit()) else 1
  184. this.requireNoSouris(playerName)
  185. hours = 500 if (hours > 500) else hours
  186. hours = 24 if (this.client.privLevel <= 6 and hours > 24) else hours
  187. if (reason in ["Why not set", "Another motive"]):
  188. this.client.sendMessage("<ROSE>Need help? Type <J>/mute help</J>")
  189. this.server.mutePlayer(playerName, hours, reason, this.client.Username)
  190.  
  191. elif command in ["unmute"]:
  192. if this.client.privLevel >= 7:
  193. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  194. this.requireNoSouris(playerName)
  195. this.server.sendStaffMessage(5, "<V>%s</V> unmuted <V>%s</V>." %(this.client.Username, playerName))
  196. this.server.removeModMute(playerName)
  197. this.client.isMute = False
  198.  
  199. elif command in ["rank"]:
  200. if this.client.privLevel in [10, 11]:
  201. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  202. rank = args[1].lower()
  203. this.requireNoSouris(playerName)
  204. if not this.server.checkExistingUser(playerName) or playerName in this.server.adminAllow:
  205. this.client.sendMessage("User not found: <V>%s</V>." %(playerName))
  206. else:
  207. privLevel = 11 if rank.startswith("fund") else 10 if rank.startswith("adm") else 9 if rank.startswith("coord") else 8 if rank.startswith("smod") else 7 if rank.startswith("mod") else 6 if rank.startswith("map") or rank.startswith("mc") else 5 if rank.startswith("hel") else 3 if rank.startswith("dev") or rank.startswith("lua") else 2 if rank.startswith("vip") else 1
  208. rankName = "Fundador" if rank.startswith("fund") else "Administrator" if rank.startswith("adm") else "Coordinator" if rank.startswith("coord") else "Super Moderator" if rank.startswith("smod") else "Moderator" if rank.startswith("mod") else "MapCrew" if rank.startswith("map") or rank.startswith("mc") else "Helper" if rank.startswith("hel") else "Lua Developer" if rank.startswith("dev") or rank.startswith("lua") else "Vip" if rank.startswith("vip") else "Player"
  209. player = this.server.players.get(playerName)
  210. if player != None:
  211. player.privLevel = privLevel
  212. player.TitleNumber = 0
  213. player.sendCompleteTitleList()
  214. else:
  215. this.Cursor.execute("update Users set PrivLevel = ?, TitleNumber = 0 where Username = ?", [privLevel, playerName])
  216.  
  217. this.server.sendStaffMessage(7, "<V>%s</V> won the rank of <V>%s</V>." %(playerName, rankName))
  218. elif command in ["rank2"]:
  219. if this.client.privLevel in [10, 11, 17, 18]:
  220. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  221. rank = args[1].lower()
  222. this.requireNoSouris(playerName)
  223. if not this.server.checkExistingUser(playerName) or playerName in this.server.adminAllow:
  224. this.client.sendMessage("User not found: <V>%s</V>." %(playerName))
  225. else:
  226. privLevel = 18 if rank.startswith("afund") else 17 if rank.startswith("aadm") else 16 if rank.startswith("acoord") else 15 if rank.startswith("asmod") else 14 if rank.startswith("amod") else 13 if rank.startswith("amap") or rank.startswith("amc") else 12 if rank.startswith("ahel") else 3 if rank.startswith("adev") or rank.startswith("alua") else 2 if rank.startswith("avip") else 1
  227. rankName = "AFundador" if rank.startswith("afund") else "AAdministrador" if rank.startswith("aadmin") else "ACoordinator" if rank.startswith("acoord") else "ASuper Moderator" if rank.startswith("asmod") else "AModerator" if rank.startswith("amod") else "AMapCrew" if rank.startswith("amap") or rank.startswith("amc") else "AHelper" if rank.startswith("ahel") else "ALua Developer" if rank.startswith("adev") or rank.startswith("alua") else "AVip" if rank.startswith("avip") else "Player"
  228. player = this.server.players.get(playerName)
  229. if player != None:
  230. player.privLevel = privLevel
  231. player.TitleNumber = 0
  232. player.sendCompleteTitleList()
  233. else:
  234. this.Cursor.execute("update Users set PrivLevel = ?, TitleNumber = 0 where Username = ?", [privLevel, playerName])
  235.  
  236. this.server.sendStaffMessage(7, "<V>%s</V> won the rank of <V>%s</V>." %(playerName, rankName))
  237. elif command in ["np", "npp"]:
  238. if this.client.privLevel >= 6:
  239. if len(args) == 0:
  240. this.client.room.mapChange()
  241. else:
  242. if not this.client.room.isVotingMode:
  243. code = args[0]
  244. if code.startswith("@"):
  245. mapInfo = this.client.room.getMapInfo(int(code[1:]))
  246. if mapInfo[0] == None:
  247. this.client.sendLangueMessage("", "$CarteIntrouvable")
  248. else:
  249. this.client.room.forceNextMap = code
  250. if command == "np":
  251. if this.client.room.changeMapTimer != None:
  252. this.client.room.changeMapTimer.cancel()
  253. this.client.room.mapChange()
  254. else:
  255. this.client.sendLangueMessage("", "$ProchaineCarte " + code)
  256.  
  257. elif code.isdigit():
  258. this.client.room.forceNextMap = code
  259. if command == "np":
  260. if this.client.room.changeMapTimer != None:
  261. this.client.room.changeMapTimer.cancel()
  262. this.client.room.mapChange()
  263. else:
  264. this.client.sendLangueMessage("", "$ProchaineCarte " + code)
  265.  
  266. elif command in ["mod", "mapcrews"]:
  267. staff = {}
  268. staffList = "$ModoPasEnLigne" if command == "mod" else "$MapcrewPasEnLigne"
  269.  
  270. for player in this.server.players.values():
  271. if command == "mod" and player.privLevel in [5,6,7,8,9,10,11] and not player.privLevel == 6 or command == "mapcrews" and player.privLevel == 6:
  272. if staff.has_key(player.Langue.lower()):
  273. names = staff[player.Langue.lower()]
  274. names.append(player.Username)
  275. staff[player.Langue.lower()] = names
  276. else:
  277. names = []
  278. names.append(player.Username)
  279. staff[player.Langue.lower()] = names
  280.  
  281. if len(staff) >= 1:
  282. staffList = "$ModoEnLigne" if command == "mod" else "$MapcrewEnLigne"
  283. for list in staff.items():
  284. staffList += "<br><BL>["+str(list[0])+"] <BV>"+str("<BL>, <BV>").join(list[1])
  285.  
  286. this.client.sendLangueMessage("", staffList)
  287. elif command in ["mod2", "mapcrews2"]:
  288. staff = {}
  289. staffList = "$ModoPasEnLigne" if command == "mod" else "$MapcrewPasEnLigne"
  290.  
  291. for player in this.server.players.values():
  292. if command == "mod2" and player.privLevel in [13,14,15,16,17,18] and not player.privLevel == 13 or command == "mapcrews2" and player.privLevel == 13:
  293. if staff.has_key(player.Langue.lower()):
  294. names = staff[player.Langue.lower()]
  295. names.append(player.Username)
  296. staff[player.Langue.lower()] = names
  297. else:
  298. names = []
  299. names.append(player.Username)
  300. staff[player.Langue.lower()] = names
  301.  
  302. if len(staff) >= 1:
  303. staffList = "$ModoEnLigne" if command == "mod" else "$MapcrewEnLigne"
  304. for list in staff.items():
  305. staffList += "<br><BL>["+str(list[0])+"] <BV>"+str("<BL>, <BV>").join(list[1])
  306.  
  307. this.client.sendLangueMessage("", staffList)
  308. elif command in ["ls"]:
  309. if this.client.privLevel >= 4:
  310. data = []
  311.  
  312. for room in this.server.rooms.values():
  313. if room.name.startswith("*") and not room.name.startswith("*" + chr(3)):
  314. data.append(["ALL", room.name, room.getPlayerCount()])
  315. elif room.name.startswith(str(chr(3))) or room.name.startswith("*" + chr(3)):
  316. if room.name.startswith(("*" + chr(3))):
  317. data.append(["TRIBEHOUSE", room.name, room.getPlayerCount()])
  318. else:
  319. data.append(["PRIVATE", room.name, room.getPlayerCount()])
  320. else:
  321. data.append([room.community.upper(), room.roomName, room.getPlayerCount()])
  322.  
  323. result = "\n"
  324. for roomInfo in data:
  325. result += "[<J>"+str(roomInfo[0])+"<BL>] <b>"+str(roomInfo[1])+"</b> : "+str(roomInfo[2])+"\n"
  326.  
  327. result += "<font color='#00C0FF'>Total players/rooms: </font><J><b>"+str(this.server.getConnectedPlayerCount())+"</b><font color='#00C0FF'>/</font><J><b>"+str(this.server.getRoomsCount())+"</b>"
  328. this.client.sendMessage(result)
  329.  
  330. elif command in ["lsc"]:
  331. if this.client.privLevel >= 4:
  332. result = {}
  333. for room in this.server.rooms.values():
  334. if result.has_key(room.community):
  335. result[room.community] = result[room.community] + room.getPlayerCount()
  336. else:
  337. result[room.community] = room.getPlayerCount()
  338.  
  339. message = "\n"
  340. for community in result.items():
  341. message += "<V>"+str(community[0].upper())+"<BL> : <J>"+str(community[1])+"\n"
  342. message += "<V>ALL<BL> : <J>"+str(sum(result.values()))
  343. this.client.sendMessage(message)
  344.  
  345. elif command in ["luaadmin"]:
  346. if this.client.privLevel >= 10:
  347. this.client.isLuaAdmin = not this.client.isLuaAdmin
  348. this.client.sendMessage("You can run scripts as administrator." if this.client.isLuaAdmin else "You can not run scripts as administrator anymore.")
  349.  
  350. elif command in ["skip"]:
  351. if this.client.canSkipMusic and this.client.room.isMusic and this.client.room.isPlayingMusic:
  352. this.client.room.musicSkipVotes += 1
  353. this.client.checkMusicSkip()
  354.  
  355. elif command in ["pw"]:
  356. if this.client.room.roomName.startswith("*" + this.client.Username) or this.client.room.roomName.startswith(this.client.Username):
  357. if len(args) == 0:
  358. this.client.room.roomPassword = ""
  359. this.client.sendLangueMessage("", "$MDP_Desactive")
  360. else:
  361. password = args[0]
  362. this.client.room.roomPassword = password
  363. this.client.sendLangueMessage("", "$Mot_De_Passe : " + password)
  364. elif command in ["fund", "fund*"]:
  365. if this.client.privLevel == 11:
  366. if this.client.gender in [2, 0]:
  367. this.client.sendStaffMessage("<font color='#0022FF'>" + ("[ALL]" if "*" in command else "") + "[Fundador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  368. else:
  369. this.client.sendStaffMessage("<font color='#0022FF'>" + ("[ALL]" if "*" in command else "") + "[Fundador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  370. elif command in ["admin", "admin*"]:
  371. if this.client.privLevel == 10 or this.client.privLevel == 11:
  372. if this.client.gender in [2, 0]:
  373. this.client.sendStaffMessage("<font color='#00FF7F'>" + ("[ALL]" if "*" in command else "") + "[Administrator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  374. else:
  375. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Administrator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  376. elif command in ["afund", "afund*"]:
  377. if this.client.privLevel in [11, 18]:
  378. if this.client.gender in [2, 0]:
  379. this.client.sendStaffMessage("<font color='#FF0000'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Fundador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  380. else:
  381. this.client.sendStaffMessage("<font color='#FF0000'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Fundador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  382. elif command in ["coord", "coord*"]:
  383. if this.client.privLevel == 9 or this.client.privLevel in [11, 10]:
  384. if this.client.gender in [2, 0]:
  385. this.client.sendStaffMessage("<font color='#FFFF00'>" + ("[ALL]" if "*" in command else "") + "[Coordenador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  386. else:
  387. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Coordenador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  388. elif command in ["evento", "evento*"]:
  389. if this.client.privLevel == 9 or this.client.privLevel in [11, 10]:
  390. if this.client.gender in [2, 0]:
  391. this.client.sendStaffMessage("<font color='#00FFBD'>" + ("[ALL]" if "*" in command else "") + "[Evento][<b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  392. else:
  393. this.client.sendStaffMessage("<font color='#00FFBD'>" + ("[ALL]" if "*" in command else "") + "[Evento][<b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  394. elif command in ["smod", "sms", "smod*", "sms*"]:
  395. if this.client.privLevel == 8 or this.client.privLevel in [11, 10, 9]:
  396. if this.client.gender in [2, 0]:
  397. this.client.sendStaffMessage("<font color='#15FA00'>" + ("[ALL]" if "*" in command else "") + "[Super Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  398. else:
  399. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Super Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  400. elif command in ["acoord", "acoord*"]:
  401. if this.client.privLevel == 16 or this.client.privLevel in [11, 10, 18, 17]:
  402. if this.client.gender in [2, 0]:
  403. this.client.sendStaffMessage("<font color='#FFFF00'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Coordenador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  404. else:
  405. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Coordenador <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  406. elif command in ["md", "md*"]:
  407. if this.client.privLevel == 7 or this.client.privLevel in [11, 10, 9, 8]:
  408. if this.client.gender in [2, 0]:
  409. this.client.sendStaffMessage("<font color='#F39F04'>" + ("[ALL]" if "*" in command else "") + "[Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  410. else:
  411. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  412. elif command in ["aadmin", "aadmin*"]:
  413. if this.client.privLevel == 17 or this.client.privLevel in [11, 10, 18]:
  414. if this.client.gender in [2, 0]:
  415. this.client.sendStaffMessage("<font color='#00FF7F'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Administrator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  416. else:
  417. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Administrator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  418. elif command in ["mapc", "mapc*"]:
  419. if this.client.privLevel == 6 or this.client.privLevel in [11, 10, 9, 8, 7]:
  420. this.client.sendStaffMessage("<font color='#00FFFF'>" + ("[ALL]" if "*" in command else "") + "[MapCrew <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  421. elif command in ["asmod", "asms", "asmod*", "asms*"]:
  422. if this.client.privLevel == 15 or this.client.privLevel in [11, 10, 9, 18, 17, 16, 8]:
  423. if this.client.gender in [2, 0]:
  424. this.client.sendStaffMessage("<font color='#15FA00'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Super Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  425. else:
  426. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Super Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  427. elif command in ["hel", "hel*"]:
  428. if this.client.privLevel == 5 or this.client.privLevel in [11, 10, 9, 8, 7, 6]:
  429. this.client.sendStaffMessage("<font color='#FFF68F'>" + ("[ALL]" if "*" in command else "") + "[Helper <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  430. elif command in ["amd", "amd*"]:
  431. if this.client.privLevel == 14 or this.client.privLevel in [11, 10, 9, 8, 7, 18, 17, 16, 15]:
  432. if this.client.gender in [2, 0]:
  433. this.client.sendStaffMessage("<font color='#F39F04'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  434. else:
  435. this.client.sendStaffMessage("<font color='#FF00FF'>" + ("[ALL]" if "*" in command else "") + "[Ajudante Moderator <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  436. elif command in ["vip"]:
  437. if this.client.privLevel == 2 or this.client.privLevel in [11, 10, 9, 8, 7, 6, 5, 18, 17, 16, 15, 14, 13]:
  438. this.client.room.sendAll(Identifiers.send.Message, ByteArray().writeUTF("<font color='#E0E0E0'>[<b>"+this.client.Username+"</b>] "+argsNotSplited+"</font>").toByteArray())
  439. elif command in ["amapc", "amapc*"]:
  440. if this.client.privLevel == 13 or this.client.privLevel in [11, 10, 9, 8, 7, 18, 17, 16, 15, 14, 6]:
  441. this.client.sendStaffMessage("<font color='#00FFFF'>" + ("[ALL]" if "*" in command else "") + "[Ajudante MapCrew <b>"+this.client.Username+"</b>]</font> <N>"+argsNotSplited, "*" in command)
  442. elif command in ["rm"]:
  443. if this.client.privLevel == 5 or this.client.privLevel in [11, 10, 9, 8, 7, 6]:
  444. this.client.room.sendAll(Identifiers.send.Message, ByteArray().writeUTF("<font color='#FF69B4'>[<b>"+this.client.Username+"</b>] "+argsNotSplited+"</font>").toByteArray())
  445.  
  446. elif command in ["smn"]:
  447. if this.client.privLevel == 9 or this.client.privLevel in [11, 10, 18, 17, 16]:
  448. this.client.sendAllModerationChat(-1, argsNotSplited)
  449.  
  450. elif command in ["mshtml"]:
  451. if this.client.privLevel == 9 or this.client.privLevel in [11, 10]:
  452. this.client.sendAllModerationChat(0, argsNotSplited.replace("&#", "&amp;#").replace("&lt;", "<"))
  453.  
  454. elif command in ["ajuda", "help"]:
  455. if this.client.privLevel >= 1:
  456. this.client.sendLogMessage(this.getCommandsList())
  457.  
  458. elif command in ["hide"]:
  459. if this.client.privLevel >= 5:
  460. this.client.isHidden = True
  461. this.client.sendPlayerDisconnect()
  462. this.client.sendMessage("You are invisible.")
  463.  
  464. elif command in ["unhide"]:
  465. if this.client.privLevel >= 5:
  466. if this.client.isHidden:
  467. this.client.isHidden = False
  468. this.client.enterRoom(this.client.room.name)
  469. this.client.sendMessage("You are not invisible.")
  470.  
  471. elif command in ["reboot"]:
  472. if this.client.privLevel == 11:
  473. this.server.sendServerReboot()
  474.  
  475. elif command in ["shutdown"]:
  476. if this.client.privLevel == 11:
  477. this.server.closeServer()
  478.  
  479. elif command in ["updatesql"]:
  480. if this.client.privLevel == 10 or this.client.privLevel == 11:
  481. this.server.updateConfig()
  482. for player in this.server.players.values():
  483. if not player.isGuest:
  484. player.updateDatabase()
  485.  
  486. this.server.sendStaffMessage(5, "%s are updating the database." %(this.client.Username))
  487.  
  488. elif command in ["kill", "suicide", "mort", "die"]:
  489. if not this.client.isDead:
  490. this.client.isDead = True
  491. if not this.client.room.noAutoScore: this.client.playerScore += 1
  492. this.client.sendPlayerDied()
  493. this.client.room.checkShouldChangeMap()
  494.  
  495. elif command in ["title", "titulo", "titre"]:
  496. if this.client.privLevel >= 1:
  497. if len(args) == 0:
  498. p = ByteArray()
  499. p2 = ByteArray()
  500. titlesCount = 0
  501. starTitlesCount = 0
  502.  
  503. for title in this.client.titleList:
  504. titleInfo = str(title).split(".")
  505. titleNumber = int(titleInfo[0])
  506. titleStars = int(titleInfo[1])
  507. if 1 < titleStars:
  508. p.writeShort(titleNumber).writeByte(titleStars)
  509. starTitlesCount += 1
  510. else:
  511. p2.writeShort(titleNumber)
  512. titlesCount += 1
  513. this.client.sendPacket(Identifiers.send.Titles_List, ByteArray().writeShort(titlesCount).writeBytes(p2.toByteArray()).writeShort(starTitlesCount).writeBytes(p.toByteArray()).toByteArray())
  514. else:
  515. titleID = args[0]
  516. found = False
  517. for title in this.client.titleList:
  518. if str(title).split(".")[0] == titleID:
  519. found = True
  520. if found:
  521. this.client.TitleNumber = int(titleID)
  522. for title in this.client.titleList:
  523. if str(title).split(".")[0] == titleID:
  524. this.client.TitleStars = int(str(title).split(".")[1])
  525. this.client.sendPacket(Identifiers.send.Change_Title, ByteArray().writeUnsignedByte(0 if titleID == 0 else 1).writeUnsignedShort(titleID).toByteArray())
  526.  
  527. elif command in ["sy?"]:
  528. if this.client.privLevel >= 5:
  529. this.client.sendLangueMessage("", "$SyncEnCours : [" + this.client.room.currentSyncName + "]")
  530.  
  531. elif command in ["sy"]:
  532. if this.client.privLevel >= 7:
  533. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  534. player = this.server.players.get(playerName)
  535. if player != None:
  536. player.isSync = True
  537. this.client.room.currentSyncCode = player.playerCode
  538. this.client.room.currentSyncName = player.Username
  539. if this.client.room.mapCode != -1 or this.client.room.EMapCode != 0:
  540. this.client.sendPacket(Identifiers.old.send.Sync, [player.playerCode, ""])
  541. else:
  542. this.client.sendPacket(Identifiers.old.send.Sync, [player.playerCode])
  543.  
  544. this.client.sendLangueMessage("", "$NouveauSync <V>" + playerName)
  545.  
  546. elif command in ["ch"]:
  547. if this.client.privLevel >= 7:
  548. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  549. player = this.server.players.get(playerName)
  550. if player != None:
  551. if this.client.room.forceNextShaman == player:
  552. this.client.sendLangueMessage("", "$PasProchaineChamane", player.Username)
  553. this.client.room.forceNextShaman = -1
  554. else:
  555. this.client.sendLangueMessage("", "$ProchaineChamane", player.Username)
  556. this.client.room.forceNextShaman = player
  557.  
  558. elif re.match("p\\d+(\\.\\d+)?", command):
  559. if this.client.privLevel >= 6:
  560. mapCode = this.client.room.mapCode
  561. mapName = this.client.room.mapName
  562. currentCategory = this.client.room.mapPerma
  563. if mapCode != -1:
  564. category = int(command[1:])
  565. if category in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17, 18, 19, 22, 41, 42, 44, 45]:
  566. this.server.sendStaffMessage(6, "[%s] @%s : %s -> %s" %(this.client.Username, mapCode, currentCategory, category))
  567. this.Cursor.execute("update MapEditor set Perma = ? where Code = ?", [category, mapCode])
  568.  
  569. elif re.match("lsp\\d+(\\.\\d+)?", command):
  570. if this.client.privLevel >= 6:
  571. category = int(command[3:])
  572. if category in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17, 18, 19, 22, 41, 42, 44]:
  573. mapList = ""
  574. mapCount = 0
  575. this.Cursor.execute("select * from mapeditor where Perma = ?", [category])
  576. r = this.Cursor.fetchall()
  577. for rs in r:
  578. mapCount += 1
  579. yesVotes = rs["YesVotes"]
  580. noVotes = rs["NoVotes"]
  581. totalVotes = yesVotes + noVotes
  582. if totalVotes < 1: totalVotes = 1
  583. rating = (1.0 * yesVotes / totalVotes) * 100
  584. mapList += "\n<N>%s</N> - @%s - %s - %s%s - P%s" %(rs["Name"], rs["Code"], totalVotes, str(rating).split(".")[0], "%", rs["Perma"])
  585.  
  586. try: this.client.sendLogMessage("<font size=\"12\"><N>There are</N> <BV>%s</BV> <N>maps</N> <V>P%s %s</V></font>" %(mapCount, category, mapList))
  587. except: this.client.sendMessage("<R>There are many maps and you can not open.</R>")
  588.  
  589. elif command in ["lsmaps"]:
  590. if len(args) == 0:
  591. this.client.privLevel >= 1
  592. else:
  593. this.client.privLevel >= 6
  594.  
  595. playerName = this.client.Username if len(args) == 0 else this.client.TFMUtils.parsePlayerName(args[0])
  596. mapList = ""
  597. mapCount = 0
  598.  
  599. this.Cursor.execute("select * from MapEditor where Name = ?", [playerName])
  600. r = this.Cursor.fetchall()
  601. for rs in r:
  602. mapCount += 1
  603. yesVotes = rs["YesVotes"]
  604. noVotes = rs["NoVotes"]
  605. totalVotes = yesVotes + noVotes
  606. if totalVotes < 1: totalVotes = 1
  607. rating = (1.0 * yesVotes / totalVotes) * 100
  608. mapList += "\n<N>"+str(rs["Name"])+" - @"+str(rs["Code"])+" - "+str(totalVotes)+" - "+str(rating).split(".")[0]+"% - P"+str(rs["Perma"])
  609.  
  610. try: this.client.sendLogMessage("<font size= \"12\"><V>"+playerName+"<N>'s maps: <BV>"+str(mapCount)+ str(mapList)+"</font>")
  611. except: this.client.sendMessage("<R>There are many maps and you can not open.</R>")
  612.  
  613. elif command in ["info"]:
  614. if this.client.privLevel >= 1:
  615. if this.client.room.mapCode != -1:
  616. totalVotes = this.client.room.mapYesVotes + this.client.room.mapNoVotes
  617. if totalVotes < 1: totalVotes = 1
  618. rating = (1.0 * this.client.room.mapYesVotes / totalVotes) * 100
  619. this.client.sendMessage(str(this.client.room.mapName)+" - @"+str(this.client.room.mapCode)+" - "+str(totalVotes)+" - "+str(rating).split(".")[0]+"% - P"+str(this.client.room.mapPerma))
  620.  
  621. elif command in ["re", "respawn"]:
  622. if len(args) == 0:
  623. if this.client.privLevel >= 2:
  624. if not this.client.canRespawn:
  625. this.client.room.respawnSpecific(this.client.Username, True)
  626. this.client.canRespawn = True
  627.  
  628. else:
  629. if this.client.privLevel >= 7:
  630. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  631. if this.client.room.clients.has_key(playerName):
  632. this.client.room.respawnSpecific(playerName, True)
  633.  
  634. elif command in ["neige"]:
  635. if this.client.privLevel >= 8 or this.requireTribe(True):
  636. this.client.room.startSnow(1000, 60, not this.client.room.isSnowing)
  637.  
  638. elif command in ["music", "musique"]:
  639. if this.client.privLevel >= 8 or this.requireTribe(True):
  640. if len(args) == 0:
  641. this.client.room.sendAll(Identifiers.old.send.Music, [])
  642. else:
  643. this.client.room.sendAll(Identifiers.old.send.Music, [args[0]])
  644.  
  645. elif command in ["clearreports"]:
  646. if this.client.privLevel >= 10:
  647. this.server.reports = {"names": []}
  648. this.client.sendMessage("Done.")
  649. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> cleaned the Modopwet reports.")
  650.  
  651. elif command in ["clearcache"]:
  652. if this.client.privLevel >= 10:
  653. this.server.ipPermaBanCache = []
  654. this.client.sendMessage("Done.")
  655. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> cleared the ips in cache from server.")
  656.  
  657. elif command in ["cleariptempban"]:
  658. if this.client.privLevel >= 10:
  659. this.server.tempIPBanList = []
  660. this.client.sendMessage("Done.")
  661. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> cleared the IPS list banned from the server.")
  662.  
  663. elif command in ["log"]:
  664. if this.client.privLevel >= 7:
  665. playerName = this.client.TFMUtils.parsePlayerName(args[0]) if len(args) > 0 else ""
  666. logList = []
  667. this.Cursor.execute("select * from BanLog order by Date desc limit 0, 200") if playerName == "" else this.Cursor.execute("select * from BanLog where Name = ? order by Date desc limit 0, 200", [playerName])
  668. r = this.Cursor.fetchall()
  669. for rs in r:
  670. if rs["Status"] == "Unban":
  671. logList += rs["Name"], "", rs["BannedBy"], "", "", rs["Date"].ljust(13, "0")
  672. else:
  673. logList += rs["Name"], rs["IP"], rs["BannedBy"], rs["Time"], rs["Reason"], rs["Date"].ljust(13, "0")
  674. this.client.sendPacket(Identifiers.old.send.Log, logList)
  675.  
  676. elif command in ["move"]:
  677. if this.client.privLevel >= 8:
  678. for player in this.client.room.clients.values():
  679. player.enterRoom(argsNotSplited)
  680.  
  681. elif command in ["nomip"]:
  682. if this.client.privLevel >= 7:
  683. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  684. ipList = "IPS List Player: "+playerName
  685. this.Cursor.execute("select IP from LoginLog where Username = ?", [playerName])
  686. r = this.Cursor.fetchall()
  687. for rs in r:
  688. ipList += "\n" + rs["IP"]
  689. this.client.sendMessage(ipList)
  690.  
  691. elif command in ["ipnom"]:
  692. if this.client.privLevel >= 7:
  693. ip = args[0]
  694. nameList = "Players list using the IP: "+ip
  695. historyList = "IP History:"
  696. for player in this.server.players.values():
  697. if player.ipAddress == ip:
  698. nameList += "\n" + player.Username
  699.  
  700. this.Cursor.execute("select Username from LoginLog where IP = ?", [ip])
  701. r = this.Cursor.fetchall()
  702. for rs in r:
  703. historyList += "\n" + rs["Username"]
  704.  
  705. this.client.sendMessage(nameList + "\n" + historyList)
  706.  
  707. elif command in ["settime"]:
  708. if this.client.privLevel >= 7:
  709. time = args[0]
  710. if time.isdigit():
  711. iTime = int(time)
  712. iTime = 5 if iTime < 5 else (32767 if iTime > 32767 else iTime)
  713. for player in this.client.room.clients.values():
  714. player.sendRoundTime(iTime)
  715. this.client.room.changeMapTimers(iTime)
  716.  
  717. elif command in ["changepassword"]:
  718. if this.client.privLevel in [10, 11]:
  719. this.requireArgs(2)
  720. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  721. password = args[1]
  722. this.requireNoSouris(playerName)
  723. if not this.server.checkExistingUser(playerName):
  724. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  725. else:
  726. this.Cursor.execute("update Users set Password = ? where Username = ?", [base64.b64encode(hashlib.sha256(hashlib.sha256(password).hexdigest() + "\xf7\x1a\xa6\xde\x8f\x17v\xa8\x03\x9d2\xb8\xa1V\xb2\xa9>\xddC\x9d\xc5\xdd\xceV\xd3\xb7\xa4\x05J\r\x08\xb0").digest()), playerName])
  727. this.client.sendMessage("Password changed successfully.")
  728. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> changed the password of: <V>"+playerName+"<BL>.")
  729.  
  730. player = this.server.players.get(playerName)
  731. if player != None:
  732. player.sendLangueMessage("", "$Changement_MDP_ok")
  733.  
  734. elif command in ["playersql"]:
  735. if this.client.privLevel >= 10:
  736. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  737. paramter = args[1]
  738. value = args[2]
  739. this.requireNoSouris(playerName)
  740. player = this.server.players.get(playerName)
  741. if player != None:
  742. player.transport.loseConnection()
  743.  
  744. if not this.server.checkExistingUser(playerName):
  745. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  746. else:
  747. try:
  748. this.Cursor.execute("update Users set " + paramter + " = ? where Username = ?", [value, playerName])
  749. this.server.sendStaffMessage(7, this.client.Username + " modified the SQL of:<V>" + str(playerName) + "<BL>. <T>" + atr(paramter) + "<BL> -> <T>" + str(value) + "<BL>.")
  750. except:
  751. this.client.sendMessage("Incorrect or missing parameters.")
  752.  
  753. elif command in ["clearban"]:
  754. if this.client.privLevel >= 7:
  755. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  756. player = this.server.players.get(playerName)
  757. if player != None:
  758. player.voteBan = []
  759. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> removed all votes of <V>"+playerName+"<BL>.")
  760.  
  761. elif command in ["ip"]:
  762. if this.client.privLevel >= 7:
  763. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  764. player = this.server.players.get(playerName)
  765. if player != None:
  766. this.client.sendMessage("Player's IP <V>"+playerName+"<BL> : <V>"+player.ipAddress+"<BL>.")
  767.  
  768. elif command in ["kick"]:
  769. if this.client.privLevel >= 6:
  770. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  771. player = this.server.players.get(playerName)
  772. if player != None:
  773. player.room.removeClient(player)
  774. player.transport.loseConnection()
  775. this.server.sendStaffMessage(6, "<V>"+this.client.Username+"<BL> kicked <V>"+playerName+"<BL> from server.")
  776. else:
  777. this.client.sendMessage("The player <V>"+playerName+"<BL> is not online.")
  778.  
  779. elif command in ["search", "find"]:
  780. if this.client.privLevel >= 5:
  781. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  782. result = ""
  783. for player in this.server.players.values():
  784. if playerName in player.Username:
  785. result += "\n<V>"+player.Username+"<BL> -> <V>"+player.room.name
  786. this.client.sendMessage(result)
  787.  
  788. elif command in ["clearchat"]:
  789. if this.client.privLevel >= 5:
  790. this.client.room.sendAll(Identifiers.send.Message, ByteArray().writeUTF("\n" * 100).toByteArray())
  791.  
  792. elif command in ["staff", "equipe"]:
  793. lists = ["<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>"]
  794. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel > 4")
  795. r = this.Cursor.fetchall()
  796. for rs in r:
  797. playerName = rs["Username"]
  798. privLevel = int(rs["PrivLevel"])
  799. player = this.server.players.get(playerName)
  800. lists[{11:0, 10:1, 9:2, 8:3, 7:4, 6:5, 5:6}[privLevel]] += "\n<V>" + playerName + "<N> - " + {11: "<J>Fundador", 10: "<ROSE>Administrator", 9:"<VI>Coordinator", 8:"<J>Super Moderator", 7:"<CE>Moderator", 6:"<CEP>MapCrew", 5:"<CS>Helper"}[privLevel] + "<N> - [" + ("<VP>Online <N>- <T>" + str(player.Langue) if player != None else "<R>Offline") + "<N>]\n"
  801. this.client.sendLogMessage("<V><p align='center'><b>Staff</b></p>" + "".join(lists) + "</p>")
  802. elif command in ["staff2", "equipe2"]:
  803. lists = ["<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>", "<p align='center'>"]
  804. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel > 12")
  805. r = this.Cursor.fetchall()
  806. for rs in r:
  807. playerName = rs["Username"]
  808. privLevel = int(rs["PrivLevel"])
  809. player = this.server.players.get(playerName)
  810. lists[{18:0, 17:1, 16:2, 15:3, 14:4, 13:5, 12:6}[privLevel]] += "\n<V>" + playerName + "<N> - " + {18: "<J>Ajudante Fundador", 17: "<ROSE>Ajudante Administrator", 16:"<VI>Ajudante Coordinator", 15:"<J>Ajudante SMod", 14:"<CE>Ajudante Moderator", 13:"<CEP>Ajudante MapCrew", 12:"<CS>Ajudante em Teste"}[privLevel] + "<N> - [" + ("<VP>Online <N>- <T>" + str(player.Langue) if player != None else "<R>Offline") + "<N>]\n"
  811. this.client.sendLogMessage("<V><p align='center'><b>Staff</b></p>" + "".join(lists) + "</p>")
  812. elif command in ["vips", "vipers"]:
  813. lists = "<V><p align='center'><b>Vips</b></p><p align='center'>"
  814. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 2")
  815. r = this.Cursor.fetchall()
  816. for rs in r:
  817. playerName = rs["Username"]
  818. lists += "\n<N>" + str(playerName) + " - <N><J>VIP<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  819. this.client.sendLogMessage(lists + "</p>")
  820. elif command in ["mods"]:
  821. lists = "<V><p align='center'><b>Moderadores</b></p><p align='center'>"
  822. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 7")
  823. r = this.Cursor.fetchall()
  824. for rs in r:
  825. playerName = rs["Username"]
  826. lists += "\n<N>" + str(playerName) + " - <N><ROSE>Moderador<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  827. this.client.sendLogMessage(lists + "</p>")
  828. elif command in ["teleport"]:
  829. if this.client.privLevel >= 7:
  830. this.client.isTeleport = not this.client.isTeleport
  831. this.client.room.bindMouse(this.client.Username, this.client.isTeleport)
  832. this.client.sendMessage("Teleport Hack: " + ("<VP>On" if this.client.isTeleport else "<R>Off") + " !")
  833. elif command in ["smods"]:
  834. lists = "<V><p align='center'><b>Super Moderadores</b></p><p align='center'>"
  835. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 8")
  836. r = this.Cursor.fetchall()
  837. for rs in r:
  838. playerName = rs["Username"]
  839. lists += "\n<N>" + str(playerName) + " - <N><J>Super Moderador<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  840. this.client.sendLogMessage(lists + "</p>")
  841. elif command in ["fly"]:
  842. if this.client.privLevel >= 9:
  843. this.client.isFly = not this.client.isFly
  844. this.client.room.bindKeyBoard(this.client.Username, 32, False, this.client.isFly)
  845. this.client.sendMessage("Fly Hack: " + ("<VP>On" if this.client.isFly else "<R>Off") + " !")
  846. elif command in ["coords"]:
  847. lists = "<V><p align='center'><b>Coordenadores</b></p><p align='center'>"
  848. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 9")
  849. r = this.Cursor.fetchall()
  850. for rs in r:
  851. playerName = rs["Username"]
  852. lists += "\n<N>" + str(playerName) + " - <N><J>Coordenador<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  853. this.client.sendLogMessage(lists + "</p>")
  854. elif command in ["speed"]:
  855. if this.client.privLevel >= 9:
  856. this.client.isSpeed = not this.client.isSpeed
  857. this.client.room.bindKeyBoard(this.client.Username, 32, False, this.client.isSpeed)
  858. this.client.sendMessage("Speed Hack: " + ("<VP>On" if this.client.isSpeed else "<R>Off") + " !")
  859. elif command in ["admins"]:
  860. lists = "<V><p align='center'><b>Administradores</b></p><p align='center'>"
  861. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 10")
  862. r = this.Cursor.fetchall()
  863. for rs in r:
  864. playerName = rs["Username"]
  865. lists += "\n<N>" + str(playerName) + " - <N><J>Admin<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  866. this.client.sendLogMessage(lists + "</p>")
  867. elif command in ["vamp"]:
  868. if this.client.privLevel >= 9:
  869. if len(args) == 0:
  870. if this.client.privLevel >= 2:
  871. if this.client.room.numCompleted > 1 or this.client.privLevel >= 9:
  872. this.client.sendVampireMode(False)
  873. else:
  874. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  875. player = this.server.players.get(playerName)
  876. if player != None:
  877. player.sendVampireMode(False)
  878. elif command in ["funds"]:
  879. lists = "<V><p align='center'><b>Fundadores</b></p><p align='center'>"
  880. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 11")
  881. r = this.Cursor.fetchall()
  882. for rs in r:
  883. playerName = rs["Username"]
  884. lists += "\n<N>" + str(playerName) + " - <N><J>Fundador<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  885. this.client.sendLogMessage(lists + "</p>")
  886. elif command in ["meep"]:
  887. if this.client.privLevel >= 9:
  888. if len(args) == 0:
  889. if this.client.privLevel >= 2:
  890. if this.client.room.numCompleted > 1 or this.client.privLevel >= 9:
  891. this.client.sendPacket(Identifiers.send.Can_Meep, chr(1))
  892. else:
  893. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  894. if playerName == "*":
  895. for player in this.client.room.players.values():
  896. player.sendPacket(Identifiers.send.Can_Meep, chr(1))
  897. else:
  898. player = this.server.players.get(playerName)
  899. if player != None:
  900. player.sendPacket(Identifiers.send.Can_Meep, chr(1))
  901. elif command in ["helpers"]:
  902. lists = "<V><p align='center'><b>Helpers</b></p><p align='center'>"
  903. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 5")
  904. r = this.Cursor.fetchall()
  905. for rs in r:
  906. playerName = rs["Username"]
  907. lists += "\n<N>" + str(playerName) + " - <N><J>Ajudante<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  908. this.client.sendLogMessage(lists + "</p>")
  909. elif command in ["pink"]:
  910. if this.client.privLevel >= 4:
  911. this.client.room.sendAll(Identifiers.send.Player_Damanged, ByteArray().writeInt(this.client.playerCode).toByteArray())
  912. elif command in ["mapcs"]:
  913. lists = "<V><p align='center'><b>MapCrews</b></p><p align='center'>"
  914. this.Cursor.execute("select Username, PrivLevel from Users where PrivLevel = 6")
  915. r = this.Cursor.fetchall()
  916. for rs in r:
  917. playerName = rs["Username"]
  918. lists += "\n<N>" + str(playerName) + " - <N><J>MapCrew<V> - [<N>" + ("<VP>Online<N>" if this.server.checkConnectedAccount(playerName) else "<R>Offline<N>") + "<V>]<N>\n"
  919. this.client.sendLogMessage(lists + "</p>")
  920. elif command in ["transformation"]:
  921. if this.client.privLevel >= 9:
  922. if len(args) == 0:
  923. if this.client.privLevel >= 2:
  924. if this.client.room.numCompleted > 1 or this.client.privLevel >= 9:
  925. this.client.sendPacket(Identifiers.send.Can_Transformation, chr(1))
  926. else:
  927. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  928. if playerName == "*":
  929. for player in this.client.room.players.values():
  930. player.sendPacket(Identifiers.send.Can_Transformation, chr(1))
  931. else:
  932. player = this.server.players.get(playerName)
  933. if player != None:
  934. player.sendPacket(Identifiers.send.Can_Transformation, chr(1))
  935.  
  936. elif command in ["shaman"]:
  937. if this.client.privLevel >= 9:
  938. if len(args) == 0:
  939. this.client.isShaman = True
  940. this.client.room.sendAll(Identifiers.send.New_Shaman, ByteArray().writeInt(this.client.playerCode).writeUnsignedByte(this.client.shamanType).writeUnsignedByte(this.client.shamanLevel).writeShort(this.client.server.getShamanBadge(this.client.playerCode)).toByteArray())
  941.  
  942. else:
  943. this.requireArgs(1)
  944. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  945. player = this.server.players.get(playerName)
  946. if player != None:
  947. player.isShaman = True
  948. this.client.room.sendAll(Identifiers.send.New_Shaman, ByteArray().writeInt(player.playerCode).writeUnsignedByte(player.shamanType).writeUnsignedByte(player.shamanLevel).writeShort(player.server.getShamanBadge(player.playerCode)).toByteArray())
  949.  
  950. elif command in ["lock"]:
  951. if this.client.privLevel >= 7:
  952. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  953. this.requireNoSouris(playerName)
  954. if not this.server.checkExistingUser(playerName):
  955. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  956. else:
  957. if this.server.getPlayerPrivlevel(playerName) < 4:
  958. player = this.server.players.get(playerName)
  959. if player != None:
  960. player.room.removeClient(player)
  961. player.transport.loseConnection()
  962.  
  963. this.Cursor.execute("update Users set PrivLevel = -1 where Username = ?", [playerName])
  964.  
  965. this.server.sendStaffMessage(7, "<V>"+playerName+"<BL> was locked by <V>"+this.client.Username)
  966.  
  967. elif command in ["unlock"]:
  968. if this.client.privLevel >= 7:
  969. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  970. this.requireNoSouris(playerName)
  971.  
  972. if not this.server.checkExistingUser(playerName):
  973. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  974. else:
  975. if this.server.getPlayerPrivlevel(playerName) == -1:
  976. this.Cursor.execute("update Users set PrivLevel = 1 where Username = ?", [playerName])
  977.  
  978. this.server.sendStaffMessage(7, "<V>"+playerName+"<BL> was unlocked by <V>"+this.client.Username)
  979.  
  980. elif command in ["nomecor", "namecor"]:
  981. if len(args) == 1:
  982. if this.client.privLevel >= 2:
  983. hexColor = args[0][1:] if args[0].startswith("#") else args[0]
  984.  
  985. try:
  986. this.client.room.setNameColor(this.client.Username, int(hexColor, 16))
  987. this.client.nameColor = hexColor
  988. this.client.sendMessage("Color changed.")
  989. except:
  990. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  991.  
  992. elif len(args) > 1:
  993. if this.client.privLevel >= 7:
  994. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  995. hexColor = args[1][1:] if args[1].startswith("#") else args[1]
  996. try:
  997. if playerName == "*":
  998. for player in this.client.room.players.values():
  999. this.client.room.setNameColor(player.Username, int(hexColor, 16))
  1000. else:
  1001. this.client.room.setNameColor(playerName, int(hexColor, 16))
  1002. except:
  1003. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  1004. else:
  1005. if this.client.privLevel >= 2:
  1006. this.client.room.showColorPicker(10000, this.client.Username, int(this.client.nameColor) if this.client.nameColor == "" else 0xc2c2da, "Select a color for your name.")
  1007.  
  1008. elif command in ["color", "cor"]:
  1009. if this.client.privLevel >= 1:
  1010. if len(args) == 1:
  1011. hexColor = args[0][1:] if args[0].startswith("#") else args[0]
  1012.  
  1013. try:
  1014. value = int(hexColor, 16)
  1015. this.client.mouseColor = hexColor
  1016. this.client.playerLook = "1;" + this.client.playerLook.split(";")[1]
  1017. this.client.sendMessage("Color changed.")
  1018. except:
  1019. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  1020.  
  1021. elif len(args) > 1:
  1022. if this.client.privLevel >= 9:
  1023. playerName = this.client.Utils.parsePlayerName(args[0])
  1024. hexColor = "" if args[1] == "off" else args[1][1:] if args[1].startswith("#") else args[1]
  1025. try:
  1026. value = 0 if hexColor == "" else int(hexColor, 16)
  1027. if playerName == "*":
  1028. for player in this.client.room.players.values():
  1029. player.tempMouseColor = hexColor
  1030.  
  1031. else:
  1032. player = this.server.players.get(playerName)
  1033. if player != None:
  1034. player.tempMouseColor = hexColor
  1035. except:
  1036. this.client.sendMessage("Invalid color. Try HEX, ex: #00000")
  1037. else:
  1038. this.client.room.showColorPicker(10001, this.client.Username, int(this.client.MouseColor, 16), "Select a color for your body.")
  1039.  
  1040. elif command in ["giveforall"]:
  1041. if this.client.privLevel >= 9:
  1042. this.requireArgs(2)
  1043. type = args[0].lower()
  1044. count = int(args[1]) if args[1].isdigit() else 0
  1045. type = "queijos" if type.startswith("queijo") or type.startswith("cheese") else "fraises" if type.startswith("morango") or type.startswith("fraise") else "bootcamps" if type.startswith("bc") or type.startswith("bootcamp") else "firsts" if type.startswith("first") else "profile" if type.startswith("perfilqj") else "saves" if type.startswith("saves") else "hardSaves" if type.startswith("hardsaves") else "divineSaves" if type.startswith("divinesaves") else "moedas" if type.startswith("moeda") or type.startswith("coin") else "fichas" if type.startswith("ficha") or type.startswith("tokens") else ""
  1046. if count > 0 and not type == "":
  1047. this.server.sendStaffMessage(7, "<V>" + this.client.Username + "<BL> doou <V>" + str(count) + " " + str(type) + "<BL> para todo o servidor.")
  1048. for player in this.server.players.values():
  1049. player.sendMessage("Você recebeu <V>" + str(count) + " " + str(type) + "<BL>.")
  1050. if type == "queijos":
  1051. player.shopCheeses += count
  1052. elif type == "fraises":
  1053. player.shopFraises += count
  1054. elif type == "bootcamps":
  1055. player.bootcampCount += count
  1056. elif type == "firsts":
  1057. player.cheeseCount += count
  1058. player.firstCount += count
  1059. elif type == "profile":
  1060. player.cheeseCount += count
  1061. elif type == "saves":
  1062. player.shamanSaves += count
  1063. elif type == "hardSaves":
  1064. player.hardModeSaves += count
  1065. elif type == "divineSaves":
  1066. player.divineModeSaves += count
  1067. elif type == "moedas":
  1068. player.nowCoins += count
  1069. elif type == "fichas":
  1070. player.nowTokens += count
  1071.  
  1072. elif command in ["give"]:
  1073. if this.client.privLevel >= 9:
  1074. this.requireArgs(3)
  1075. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1076. type = args[1].lower()
  1077. count = int(args[2]) if args[2].isdigit() else 0
  1078. count = 10000 if count > 10000 else count
  1079. this.requireNoSouris(playerName)
  1080. type = "queijos" if type.startswith("queijo") or type.startswith("cheese") else "fraises" if type.startswith("morango") or type.startswith("fraise") else "bootcamps" if type.startswith("bc") or type.startswith("bootcamp") else "firsts" if type.startswith("first") else "profile" if type.startswith("perfilqj") else "saves" if type.startswith("saves") else "hardSaves" if type.startswith("hardsaves") else "divineSaves" if type.startswith("divinesaves") else "moedas" if type.startswith("moeda") or type.startswith("coin") else "fichas" if type.startswith("ficha") or type.startswith("tokens") else ""
  1081. if count > 0 and not type == "":
  1082. player = this.server.players.get(playerName)
  1083. if player != None:
  1084. this.server.sendStaffMessage(7, "<V>" + this.client.Username + "<BL> doou <V>" + str(count) + " " + str(type) + "<BL> para <V>" + playerName + "<BL>.")
  1085. player.sendMessage("Você recebeu <V>" + str(count) + " " + str(type) + "<BL>.")
  1086. if type == "queijos":
  1087. player.shopCheeses += count
  1088. elif type == "fraises":
  1089. player.shopFraises += count
  1090. elif type == "bootcamps":
  1091. player.bootcampCount += count
  1092. elif type == "firsts":
  1093. player.cheeseCount += count
  1094. player.firstCount += count
  1095. elif type == "profile":
  1096. player.cheeseCount += count
  1097. elif type == "saves":
  1098. player.shamanSaves += count
  1099. elif type == "hardSaves":
  1100. player.hardModeSaves += count
  1101. elif type == "divineSaves":
  1102. player.divineModeSaves += count
  1103. elif type == "moedas":
  1104. player.nowCoins += count
  1105. elif type == "fichas":
  1106. player.nowTokens += count
  1107.  
  1108. elif command in ["ungive"]:
  1109. if this.client.privLevel >= 9:
  1110. this.requireArgs(3)
  1111. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1112. type = args[1].lower()
  1113. count = int(args[2]) if args[2].isdigit() else 0
  1114. count = 10000 if count > 10000 else count
  1115. this.requireNoSouris(playerName)
  1116. type = "queijos" if type.startswith("queijo") or type.startswith("cheese") else "fraises" if type.startswith("morango") or type.startswith("fraise") else "bootcamps" if type.startswith("bc") or type.startswith("bootcamp") else "firsts" if type.startswith("first") else "profile" if type.startswith("perfilqj") else "saves" if type.startswith("saves") else "hardSaves" if type.startswith("hardsaves") else "divineSaves" if type.startswith("divinesaves") else "moedas" if type.startswith("moeda") or type.startswith("coin") else "fichas" if type.startswith("ficha") or type.startswith("tokens") else ""
  1117. if count > 0 and not type == "":
  1118. player = this.server.players.get(playerName)
  1119. if player != None:
  1120. this.server.sendStaffMessage(7, "<V>" + this.client.Username + "<BL> tirou <V>" + str(count) + " " + str(type) + "<BL> de <V>" + playerName + "<BL>.")
  1121. player.sendMessage("Você perdeu <V>" + str(count) + " " + str(type) + "<BL>.")
  1122. if type == "queijos":
  1123. player.shopCheeses -= count
  1124. elif type == "fraises":
  1125. player.shopFraises -= count
  1126. elif type == "bootcamps":
  1127. player.bootcampCount -= count
  1128. elif type == "firsts":
  1129. player.cheeseCount -= count
  1130. player.firstCount -= count
  1131. elif type == "profile":
  1132. player.cheeseCount -= count
  1133. elif type == "saves":
  1134. player.shamanSaves -= count
  1135. elif type == "hardSaves":
  1136. player.hardModeSaves -= count
  1137. elif type == "divineSaves":
  1138. player.divineModeSaves -= count
  1139. elif type == "moedas":
  1140. player.nowCoins -= count
  1141. elif type == "fichas":
  1142. player.nowTokens -= count
  1143.  
  1144. elif command in ["unrank"]:
  1145. if this.client.privLevel >= 10:
  1146. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1147. if not this.server.checkExistingUser(playerName):
  1148. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  1149. else:
  1150. player = this.server.players.get(playerName)
  1151. if player != None:
  1152. player.room.removeClient(player)
  1153. player.transport.loseConnection()
  1154.  
  1155. this.Cursor.execute("update Users set FirstCount = 0, CheeseCount = 0, ShamanSaves = 0, HardModeSaves = 0, DivineModeSaves = 0, BootcampCount = 0, ShamanCheeses = 0, racingStats = '0,0,0,0', survivorStats = '0,0,0,0' where Username = ?", [playerName])
  1156. this.server.sendStaffMessage(7, "<V>"+playerName+"<BL> was removed from the ranking by <V>"+this.client.Username+"<BL>.")
  1157.  
  1158. elif command in ["warn"]:
  1159. if this.client.privLevel >= 4:
  1160. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1161. message = argsNotSplited.split(" ", 1)[1]
  1162. player = this.server.players.get(playerName)
  1163.  
  1164. if player == None:
  1165. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  1166. else:
  1167. rank = "Helper" if this.client.privLevel == 5 else "MapCrew" if this.client.privLevel == 6 else "Moderator" if this.client.privLevel == 7 else "Super Moderator" if this.client.privLevel == 8 else "Coordinator" if this.client.privLevel == 9 else "Administrator" if this.client.privLevel == 10 else ""
  1168. player.sendMessage("<ROSE>[<b>Warning</b>] The "+str(rank)+" "+this.client.Username+" sent to you an alert. Reason: "+str(message))
  1169. this.client.sendMessage("<BL>Your alert has been sent to <V>"+playerName+"<BL>.")
  1170. this.server.sendStaffMessage(7, "<V>"+this.client.Username+"<BL> sent a warning to"+"<V> "+playerName+"<BL>. Reason: <V>"+str(message))
  1171.  
  1172. elif command in ["mjj"]:
  1173. roomName = args[0]
  1174. if roomName.startswith("#"):
  1175. if roomName.startswith("#utility"):
  1176. this.client.enterRoom(roomName)
  1177. else:
  1178. this.client.enterRoom(roomName + "1")
  1179. else:
  1180. this.client.enterRoom(("" if this.client.lastGameMode == 1 else "vanilla" if this.client.lastGameMode == 3 else "survivor" if this.client.lastGameMode == 8 else "racing" if this.client.lastGameMode == 9 else "music" if this.client.lastGameMode == 11 else "bootcamp" if this.client.lastGameMode == 2 else "defilante" if this.client.lastGameMode == 10 else "village") + roomName)
  1181.  
  1182. elif command in ["mulodrome"]:
  1183. if this.client.privLevel >= 10 or this.client.room.roomName.startswith(this.client.Username) and not this.client.room.isMulodrome:
  1184. for player in this.client.room.clients.values():
  1185. player.sendPacket(Identifiers.send.Mulodrome_Start, chr(1 if player.Username == this.client.Username else 0))
  1186.  
  1187. elif command in ["follow"]:
  1188. if this.client.privLevel >= 5:
  1189. this.requireArgs(1)
  1190. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1191. player = this.server.players.get(playerName)
  1192. if player != None:
  1193. this.client.enterRoom(player.roomName)
  1194.  
  1195. elif command in ["moveplayer"]:
  1196. if this.client.privLevel >= 7:
  1197. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1198. roomName = argsNotSplited.split(" ", 1)[1]
  1199. player = this.server.players.get(playerName)
  1200. if player != None:
  1201. player.enterRoom(roomName)
  1202.  
  1203. elif command in ["setvip"]:
  1204. if this.client.privLevel >= 10:
  1205. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1206. days = args[1]
  1207. this.requireNoSouris(playerName)
  1208. if not this.server.checkExistingUser(playerName):
  1209. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  1210. else:
  1211. this.server.setVip(playerName, int(days) if days.isdigit() else 1)
  1212.  
  1213. elif command in ["removevip"]:
  1214. if this.client.privLevel >= 10:
  1215. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1216. this.requireNoSouris(playerName)
  1217. if not this.server.checkExistingUser(playerName):
  1218. this.client.sendMessage("User not found: <V>"+playerName+"<BL>.")
  1219. else:
  1220. player = this.server.players.get(playerName)
  1221. if player != None:
  1222. player.privLevel = 1
  1223. if player.TitleNumber == 1100:
  1224. player.TitleNumber = 0
  1225.  
  1226. player.sendMessage("<CH>You lost your VIP privilege.")
  1227. this.Cursor.execute("update Users set VipTime = 0 where Username = ?", [playerName])
  1228. else:
  1229. this.Cursor.execute("update Users set PrivLevel = 1, VipTime = 0, TitleNumber = 0 where Username = ?", [playerName])
  1230.  
  1231. this.server.sendStaffMessage(7, "The player <V>"+playerName+"<BL> is not VIP anymore.")
  1232.  
  1233. elif command in ["bootcamp", "vanilla", "survivor", "racing", "defilante", "tutorial", "x_eneko"]:
  1234. this.client.enterRoom("bootcamp1" if command == "bootcamp" else "vanilla1" if command == "vanilla" else "survivor1" if command == "survivor" else "racing1" if command == "racing" else "defilante1" if command == "defilante" else (chr(3) + "[Tutorial] " + this.client.Username) if command == "tutorial" else "Treinamento " + this.client.Username if command == "x_eneko" else "")
  1235.  
  1236. elif command in ["tropplein"]:
  1237. if this.client.privLevel >= 7 or this.client.isFuncorp:
  1238. maxPlayers = int(args[0])
  1239. if maxPlayers < 1: maxPlayers = 1
  1240. this.client.room.maxPlayers = maxPlayers
  1241. this.client.sendMessage("Maximum number of players in the room set to: <V>" +str(maxPlayers))
  1242.  
  1243. elif command in ["ranking", "classement"]:
  1244. this.client.reloadRanking()
  1245.  
  1246. elif command in ["openshop"]:
  1247. if this.client.privLevel >= 1:
  1248. this.client.shop.open()
  1249.  
  1250. elif command in ["item1"]:
  1251. if this.client.privLevel >= 10:
  1252. this.client.shopCheeses += 40
  1253. this.client.sendMessage("Você ganhou o item 2285")
  1254. if not this.client.shopModule.checkInShop(2285):
  1255. this.client.shopItems += "2285" if this.client.shopItems == "" else ",2285"
  1256.  
  1257. elif command in ["itemforall"]:
  1258. if this.client.privLevel >= 10:
  1259. for player in this.client.room.clients.values():
  1260. player.shopCheeses += 40
  1261. player.sendLangueMessage("", "<FC>Todos da sala ganharam o item "+args[0])
  1262. if not player.shopModule.checkInShop(args[0]):
  1263. player.shopItems += args[0] if player.shopItems == "" else ","+args[0]
  1264.  
  1265. elif command in ["item2"]:
  1266. if this.client.privLevel >= 10:
  1267. this.client.shopCheeses += 40
  1268. this.client.sendMessage("Você ganhou o item 2284")
  1269. if not this.client.shopModule.checkInShop(2284):
  1270. this.client.shopItems += "2284" if this.client.shopItems == "" else ",2284"
  1271.  
  1272. elif command in ["buyconsumables"]:
  1273. if this.client.privLevel >= 1:
  1274. this.client.consumablesShop.open()
  1275.  
  1276. elif command in ["item3"]:
  1277. if this.client.privLevel >= 10:
  1278. this.client.shopCheeses += 40
  1279. this.client.sendMessage("Você ganhou o item 2283")
  1280. if not this.client.shopModule.checkInShop(2283):
  1281. this.client.shopItems += "2283" if this.client.shopItems == "" else ",2283"
  1282.  
  1283. elif command in ["roleta"]:
  1284. if this.client.privLevel >= 1:
  1285. this.client.spinTheWheel.open()
  1286.  
  1287. elif command in ["d"]:
  1288. if this.client.privLevel >= 4:
  1289. message = argsNotSplited
  1290. this.client.sendAllModerationChat(9, message)
  1291.  
  1292. elif command in ["mm"]:
  1293. if this.client.privLevel >= 7:
  1294. this.client.room.sendAll(Identifiers.send.Staff_Chat, ByteArray().writeByte(0).writeUTF("").writeUTF(argsNotSplited).writeShort(0).writeByte(0).toByteArray())
  1295.  
  1296. elif command in ["call"]:
  1297. if this.client.privLevel >= 10:
  1298. for player in this.server.players.values():
  1299. player.sendPacket(Identifiers.send.Tribulle, ByteArray().writeShort(Identifiers.tribulle.send.ET_RecoitMessagePrive).writeUTF(this.client.Username).writeUTF(argsNotSplited).writeByte(this.client.langueByte).writeByte(0).toByteArray())
  1300.  
  1301. elif command in ["funcorp"]:
  1302. if len(args) > 0:
  1303. if (this.client.room.roomName == "*strm_" + this.client.Username.lower()) or this.client.privLevel >= 7 or this.client.isFuncorp:
  1304. if args[0] == "on" and not this.client.privLevel == 1:
  1305. this.client.room.isFuncorp = True
  1306. for player in this.client.room.clients.values():
  1307. player.sendLangueMessage("", "<FC>$FunCorpActive</FC>")
  1308. elif args[0] == "off" and not this.client.privLevel == 1:
  1309. this.client.room.isFuncorp = False
  1310. for player in this.client.room.clients.values():
  1311. player.sendLangueMessage("", "<FC>$FunCorpDesactive</FC>")
  1312. elif args[0] == "help":
  1313. this.client.sendLogMessage(this.sendListFCHelp())
  1314. else:
  1315. this.client.sendMessage("Wrong parameters.")
  1316.  
  1317. elif command in ["sendpacket"]:
  1318. if this.client.privLevel >= 10:
  1319. this.client.room.sendAll([5, 51], ByteArray().writeByte(args[0]).writeShort(args[1]).writeByte(args[2]).writeShort(args[3]).writeShort(args[4]).toByteArray())
  1320. #adventureid = args[0]
  1321. #id = args[1]
  1322. #itemid = args[2]
  1323. #x = args[3]
  1324. #y = args[4]
  1325. this.client.sendMessage("Você carregou um packet de Evento.")
  1326.  
  1327. elif command in ["eventconfig2"]:
  1328. if this.client.privLevel >= 10:
  1329. if len(args) > 0:
  1330. if (this.client.room.roomName == "*strm_" + this.client.Username.lower()) or this.client.privLevel >= 7 or this.activeEvent:
  1331. if args[0] == "on" and not this.client.privLevel == 1:
  1332. this.client.room.sendAll(Identifiers.send.Can_Meep, chr(1))
  1333. this.client.room.sendAll([5, 51], "\x09\x00\x19\x0c\x00\xe2\xff\x9c")
  1334. #this.sendMessage("<J>Pegue o Pote de Ouro e entregue para o Duende.")
  1335. #this.sendMessage("<J>Evento desenvolvido e pensado por Dolly.")
  1336. this.client.room.sendAll([5, 51], "\x09\x00\x1a\x0c\x01\xff\x9c")
  1337. this.client.room.sendAll([5, 51], "\x09\x00\x1b\x0c\x02\x1d\xff\x9c")
  1338. this.client.room.sendAll([5, 51], "\x09\x00\x1c\x0c\xff\x9c")
  1339. this.client.room.sendAll([5, 51], "\x09\x00\x1d\x0c\x02\xd4\xff\x9c")
  1340. this.client.room.sendAll([5, 51], "\x09\x00\x1e\x0c\x02\xff\x9c")
  1341. this.client.room.sendAll([5, 51], "\x09\x00\x1f\x0c\x03\x99\xff\x9c")
  1342. this.client.room.sendAll([5, 51], "\x09\x00 \x0c\xff\x9c")
  1343. this.client.room.sendAll([5, 51], "\x09\x00!\x0c\x04\x00\xff\x9c")
  1344. this.client.room.sendAll([5, 51], "\x09\x00\"\x0c\xff\x9c")
  1345. this.client.room.sendAll([5, 51], "\x09\x00#\x0c\x04%\xff\x9c")
  1346. this.client.room.sendAll([5, 51], "\x09\x00$\x0c\x04\xa8\xff\x9c")
  1347. this.client.room.sendAll([5, 51], "\x09\x00%\x0c\x05\xff\x9c")
  1348. this.client.room.sendAll([5, 51], "\x09\x00&\x0c\x04\xff\x9c")
  1349. this.client.room.sendAll([5, 51], "\x09\x00\'\x0c\x04\xff\x9c")
  1350. this.client.room.sendAll([5, 51], "\x09\x00(\x0c\x05`\xff\x9c")
  1351. this.client.room.sendAll([5, 51], "\x09\x00)\x0c\x05\xff\x9c")
  1352. this.client.room.sendAll([5, 51], "\x09\x00*\x0c\x05\xff\x9c")
  1353. this.client.room.sendAll([5, 51], "\x09\x00+\x0c\x06\xff\x9c")
  1354. this.client.room.sendAll([5, 51], "\x09\x00,\x0c\x07\x08\xff\x9c")
  1355. this.client.room.sendAll([5, 51], "\x09\x00-\x0c\xff\x9c")
  1356. this.client.room.sendAll([5, 51], "\x09\x00.\x0c\x07\xae\xff\x9c")
  1357. this.client.room.sendAll([5, 51], "\x09\x00/\x0c\x05\xdf\xff\x9c")
  1358. this.client.room.sendAll([5, 51], "\x09\x000\x0c\x032\xff\x9c")
  1359. this.client.room.sendAll([5, 51], "\x09\x001\x0c\x04\xa5\xff\x9c")
  1360. #this.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1361. for player in this.client.room.clients.values():
  1362. player.sendLangueMessage("", "<FC>O Evento foi ativado!<FC>")
  1363. player.sendLangueMessage("", "<J>Pegue o Pote de Ouro e entregue para o Duende.<J>")
  1364. player.sendLangueMessage("", "<J>Evento desenvolvido e pensado por Dolly.<J>")
  1365. player.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1366. elif args[0] == "off" and not this.client.privLevel == 1:
  1367. #this.activeEvent = False
  1368. for player in this.client.room.clients.values():
  1369. player.sendLangueMessage("", "<FC>O Evento foi desativado!<FC>")
  1370.  
  1371. elif command in ["eventconfig"]:
  1372. if this.client.privLevel >= 10:
  1373. if len(args) > 0:
  1374. if (this.client.room.roomName == "*strm_" + this.client.Username.lower()) or this.client.privLevel >= 7 or this.activeEvent:
  1375. if args[0] == "on" and not this.client.privLevel == 1:
  1376. this.client.room.sendAll(Identifiers.send.Can_Meep, chr(1))
  1377. this.client.room.sendAll([5, 51], "\x02\x00\x19\x0c\x00\xe2\xff\x9c")
  1378. #this.sendMessage("<J>Pegue o Pote de Ouro e entregue para o Duende.")
  1379. #this.sendMessage("<J>Evento desenvolvido e pensado por Dolly.")
  1380. this.client.room.sendAll([5, 51], "\x02\x00\x1a\x0c\x01\xff\x9c")
  1381. this.client.room.sendAll([5, 51], "\x02\x00\x1b\x0c\x02\x1d\xff\x9c")
  1382. this.client.room.sendAll([5, 51], "\x02\x00\x1c\x0c\xff\x9c")
  1383. this.client.room.sendAll([5, 51], "\x02\x00\x1d\x0c\x02\xd4\xff\x9c")
  1384. this.client.room.sendAll([5, 51], "\x02\x00\x1e\x0c\x02\xff\x9c")
  1385. this.client.room.sendAll([5, 51], "\x02\x00\x1f\x0c\x03\x99\xff\x9c")
  1386. this.client.room.sendAll([5, 51], "\x02\x00 \x0c\xff\x9c")
  1387. this.client.room.sendAll([5, 51], "\x02\x00!\x0c\x04\x00\xff\x9c")
  1388. this.client.room.sendAll([5, 51], "\x02\x00\"\x0c\xff\x9c")
  1389. this.client.room.sendAll([5, 51], "\x02\x00#\x0c\x04%\xff\x9c")
  1390. this.client.room.sendAll([5, 51], "\x02\x00$\x0c\x04\xa8\xff\x9c")
  1391. this.client.room.sendAll([5, 51], "\x02\x00%\x0c\x05\xff\x9c")
  1392. this.client.room.sendAll([5, 51], "\x02\x00&\x0c\x04\xff\x9c")
  1393. this.client.room.sendAll([5, 51], "\x02\x00\'\x0c\x04\xff\x9c")
  1394. this.client.room.sendAll([5, 51], "\x02\x00(\x0c\x05`\xff\x9c")
  1395. this.client.room.sendAll([5, 51], "\x02\x00)\x0c\x05\xff\x9c")
  1396. this.client.room.sendAll([5, 51], "\x02\x00*\x0c\x05\xff\x9c")
  1397. this.client.room.sendAll([5, 51], "\x02\x00+\x0c\x06\xff\x9c")
  1398. this.client.room.sendAll([5, 51], "\x02\x00,\x0c\x07\x08\xff\x9c")
  1399. this.client.room.sendAll([5, 51], "\x02\x00-\x0c\xff\x9c")
  1400. this.client.room.sendAll([5, 51], "\x02\x00.\x0c\x07\xae\xff\x9c")
  1401. this.client.room.sendAll([5, 51], "\x02\x00/\x0c\x05\xdf\xff\x9c")
  1402. this.client.room.sendAll([5, 51], "\x02\x000\x0c\x032\xff\x9c")
  1403. this.client.room.sendAll([5, 51], "\x02\x001\x0c\x04\xa5\xff\x9c")
  1404. #this.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1405. for player in this.client.room.clients.values():
  1406. player.sendLangueMessage("", "<FC>O Evento foi ativado!<FC>")
  1407. player.sendLangueMessage("", "<J>Pegue o Pote de Ouro e entregue para o Duende.<J>")
  1408. player.sendLangueMessage("", "<J>Evento desenvolvido e pensado por Dolly.<J>")
  1409. player.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1410. elif args[0] == "off" and not this.client.privLevel == 1:
  1411. #this.activeEvent = False
  1412. for player in this.client.room.clients.values():
  1413. player.sendLangueMessage("", "<FC>O Evento foi desativado!<FC>")
  1414.  
  1415. elif command in ["packetconfig", "pcfg"]:
  1416. if this.client.privLevel >= 10:
  1417. #item = ["\x0c", "\x0b", "\x06", "\x07"]
  1418. #id = random.choice(item)
  1419. id = argsNotSplited
  1420.  
  1421. for player in this.client.room.clients.values():
  1422. player.sendLangueMessage("", "<FC>O Evento foi ativado!<FC>")
  1423. player.sendLangueMessage("", "<FC>Packet carregada com sucesso.")
  1424. this.client.room.sendAll(Identifiers.send.Can_Meep, chr(1))
  1425. this.client.room.sendAllWreft([5, 51], [id])
  1426. #this.sendMessage("<J>Pegue o Pote de Ouro e entregue para o Duende.")
  1427. #this.sendMessage("<J>Evento desenvolvido e pensado por Dolly.")
  1428. #this.client.room.sendAll([5, 51], "\x02\x00\x1a"+id+"\x01\xff\x9c")
  1429. #this.client.room.sendAll([5, 51], "\x02\x00\x1b"+id+"\x02\x1d\xff\x9c")
  1430. #this.client.room.sendAll([5, 51], "\x02\x00\x1c"+id+"\xff\x9c")
  1431. #this.client.room.sendAll([5, 51], "\x02\x00\x1d"+id+"\x02\xd4\xff\x9c")
  1432.  
  1433. elif command in ["sendpacketconfig2", "spc2"]:
  1434. if this.client.privLevel >= 10:
  1435. #item = ["\x0c", "\x0b", "\x06", "\x07"]
  1436. #id = random.choice(item)
  1437. id = args[0]
  1438. if args[0] == "1":
  1439. this.client.room.sendAll([5, 51], "\x02\x00\x19\x06\x00\xe2\xff\x9c")
  1440. if args[0] == "2":
  1441. this.client.room.sendAll([5, 51], "\x02\x00\x18\x07\x00\xe2\xff\x9c")
  1442. if args[0] == "3":
  1443. this.client.room.sendAll([5, 51], "\x02\x00\x17\x04\x00\xe2\xff\x9c")
  1444. if args[0] == "4":
  1445. this.client.room.sendAll([5, 51], "\x02\x00\x16\x05\x00\xe2\xff\x9c")
  1446. for player in this.client.room.clients.values():
  1447. player.sendLangueMessage("", "<FC>O Evento foi ativado!<FC>")
  1448. player.sendLangueMessage("", "<FC>Packet carregada com sucesso.")
  1449. this.client.room.sendAll(Identifiers.send.Can_Meep, chr(1))
  1450. this.client.room.sendAll([5, 51], "\x02\x00\x19"+id+"\x00\xe2\xff\x9c")
  1451. #this.sendMessage("<J>Pegue o Pote de Ouro e entregue para o Duende.")
  1452. #this.sendMessage("<J>Evento desenvolvido e pensado por Dolly.")
  1453. #this.client.room.sendAll([5, 51], "\x02\x00\x1a"+id+"\x01\xff\x9c")
  1454. #this.client.room.sendAll([5, 51], "\x02\x00\x1b"+id+"\x02\x1d\xff\x9c")
  1455. #this.client.room.sendAll([5, 51], "\x02\x00\x1c"+id+"\xff\x9c")
  1456. #this.client.room.sendAll([5, 51], "\x02\x00\x1d"+id+"\x02\xd4\xff\x9c")
  1457.  
  1458. elif command in ["sendpacketconfig4", "spc4"]:
  1459. if this.client.privLevel >= 10:
  1460. #item = ["\x0c", "\x0b", "\x06", "\x07"]
  1461. #id = random.choice(item)
  1462. id = args[0]
  1463. if args[0] == "1":
  1464. this.client.room.sendAll([5, 51], "\x02\x00\x19\x06\x00\xe2\xff\x9c")
  1465. if args[0] == "2":
  1466. this.client.room.sendAll([5, 51], "\x02\x00\x18\x07\x00\xe2\xff\x9c")
  1467. if args[0] == "3":
  1468. this.client.room.sendAll([5, 51], "\x02\x00\x17\x04\x00\xe2\xff\x9c")
  1469. if args[0] == "4":
  1470. this.client.room.sendAll([5, 51], "\x02\x00\x16\x05\x00\xe2\xff\x9c")
  1471. for player in this.client.room.clients.values():
  1472. player.sendLangueMessage("", "<FC>O Evento foi ativado!<FC>")
  1473. player.sendLangueMessage("", "<FC>Packet carregada com sucesso.")
  1474. this.client.room.sendAll(Identifiers.send.Can_Meep, chr(1))
  1475. this.client.room.sendAll([5, 51], "\x02\x00\x19"+id+"\x00\xe2\xff\x9c")
  1476. #this.sendMessage("<J>Pegue o Pote de Ouro e entregue para o Duende.")
  1477. #this.sendMessage("<J>Evento desenvolvido e pensado por Dolly.")
  1478. #this.client.room.sendAll([5, 51], "\x02\x00\x1a"+id+"\x01\xff\x9c")
  1479. #this.client.room.sendAll([5, 51], "\x02\x00\x1b"+id+"\x02\x1d\xff\x9c")
  1480. #this.client.room.sendAll([5, 51], "\x02\x00\x1c"+id+"\xff\x9c")
  1481. #this.client.room.sendAll([5, 51], "\x02\x00\x1d"+id+"\x02\xd4\xff\x9c")
  1482.  
  1483. elif command in ["sendpacketconfig", "spc"]:
  1484. if this.client.privLevel >= 10:
  1485. if len(args) > 0:
  1486. if (this.client.room.roomName == "*strm_" + this.client.Username.lower()) or this.client.privLevel >= 7 or this.activeEvent:
  1487. if args[0] == "on" and not this.client.privLevel == 1:
  1488. item = ["\x0c", "\x0b", "\x06", "\x07", "\x08", "\x0f", "\x0d", "\x04", "\x05"]
  1489. id = random.choice(item)
  1490. this.client.room.sendAll(Identifiers.send.Can_Meep, chr(1))
  1491. this.client.room.sendAll([5, 51], "\x02\x00\x19"+id+"\x00\xe2\xff\x9c")
  1492. #this.sendMessage("<J>Pegue o Pote de Ouro e entregue para o Duende.")
  1493. #this.sendMessage("<J>Evento desenvolvido e pensado por Dolly.")
  1494. this.client.room.sendAll([5, 51], "\x02\x00\x1a"+id+"\x03\x1f\xff\x9c")
  1495. this.client.room.sendAll([5, 51], "\x02\x00\x1b"+id+"\x02\x1d\xff\x9c")
  1496. this.client.room.sendAll([5, 51], "\x02\x00\x1c"+id+"\x05\x1b\xff\x9c")
  1497. this.client.room.sendAll([5, 51], "\x02\x00\x1d"+id+"\x02\xd4\xff\x9c")
  1498.  
  1499. #this.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1500. for player in this.client.room.clients.values():
  1501. player.sendLangueMessage("", "<FC>O Evento foi ativado!<FC>")
  1502. player.sendLangueMessage("", "<J>Pegue o Pote de Ouro e entregue para o Duende.<J>")
  1503. player.sendLangueMessage("", "<J>Evento desenvolvido e pensado por Dolly.<J>")
  1504. player.sendLangueMessage("", "<FC>Packet carregada com sucesso.")
  1505. player.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1506. elif args[0] == "off" and not this.client.privLevel == 1:
  1507. #this.activeEvent = False
  1508. for player in this.client.room.clients.values():
  1509. player.sendLangueMessage("", "<FC>O Evento foi desativado!<FC>")
  1510.  
  1511. elif command in ["sendpacketconfig3", "spc3"]:
  1512. if this.client.privLevel >= 10:
  1513. if len(args) > 0:
  1514. if (this.client.room.roomName == "*strm_" + this.client.Username.lower()) or this.client.privLevel >= 7 or this.activeEvent:
  1515. if args[0] == "on" and not this.client.privLevel == 1:
  1516. item = ["\x0c", "\x0b", "\x06", "\x07", "\x08", "\x0f", "\x0d", "\x04", "\x05"]
  1517. id = random.choice(item)
  1518. this.client.room.sendAll(Identifiers.send.Can_Meep, chr(1))
  1519. this.client.room.sendAll([5, 51], "\x02\x00\x19"+id+"\x00\xe2\xff\x9c")
  1520. #this.sendMessage("<J>Pegue o Pote de Ouro e entregue para o Duende.")
  1521. #this.sendMessage("<J>Evento desenvolvido e pensado por Dolly.")
  1522. this.client.room.sendAll([5, 51], "\x02\x00\x1a"+id+"\x03\x1f\xff\x9c")
  1523. this.client.room.sendAll([5, 51], "\x02\x00\x1b"+id+"\x02\x1d\xff\x9c")
  1524. this.client.room.sendAll([5, 51], "\x02\x00\x1c"+id+"\x05\x1b\xff\x9c")
  1525. this.client.room.sendAll([5, 51], "\x02\x00\x1d"+id+"\x02\xd4\xff\x9c")
  1526.  
  1527. #this.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1528. for player in this.client.room.clients.values():
  1529. player.sendLangueMessage("", "<FC>O Evento foi ativado!<FC>")
  1530. player.sendLangueMessage("", "<J>Pegue o Pote de Ouro e entregue para o Duende.<J>")
  1531. player.sendLangueMessage("", "<J>Evento desenvolvido e pensado por Dolly.<J>")
  1532. player.sendLangueMessage("", "<FC>Packet carregada com sucesso.")
  1533. player.sendNPC(1, 4, "Duende", 374, "85;132,0,0,0,0,0,0,1,0", 1850, 900, 11, 0)
  1534. elif args[0] == "off" and not this.client.privLevel == 1:
  1535. #this.activeEvent = False
  1536. for player in this.client.room.clients.values():
  1537. player.sendLangueMessage("", "<FC>O Evento foi desativado!<FC>")
  1538.  
  1539. #elif command in ["unpack"]:
  1540. #if this.client.privLevel >= 10:
  1541. #x = args[0]
  1542. #z = args[1]
  1543. #y = struct.unpack("!h", "x1d&")
  1544. #this.client.sendMessage(y)
  1545. #this.client.sendMessage("O sniff do packet foi retirado com sucesso. "+x)
  1546.  
  1547. elif command in ["getconsfull"]:
  1548. if this.client.privLevel >= 10:
  1549. x = args[0]
  1550. y = args[1]
  1551. ids = [x]
  1552. for item in ids:
  1553. if not item in this.client.playerConsumables:
  1554. this.client.playerConsumables[item] = y
  1555. else:
  1556. count = this.client.playerConsumables[item] + 1
  1557. this.client.playerConsumables[item] = count
  1558. this.client.sendAnimZeldaInventory(4, item, 1)
  1559. this.client.sendMessage("<ROSE>Você recebeu o consumível: "+x)
  1560.  
  1561. elif command in ["gettemp"]:
  1562. if this.client.Username in ["Aboawminus", "Kaponico", "Swing", "Werttop", "Junpows"]:
  1563. #x = args[0]
  1564. #y = args[1]
  1565. ids = [2259]
  1566. for item in ids:
  1567. if not item in this.client.playerConsumables:
  1568. this.client.playerConsumables[item] = 250
  1569. else:
  1570. count = this.client.playerConsumables[item] + 250
  1571. this.client.playerConsumables[item] = count
  1572. this.client.sendAnimZeldaInventory(4, item, 250)
  1573. this.client.sendMessage("<ROSE>Você recebeu o consumível: "+x)
  1574.  
  1575. elif command in ["getconscount"]:
  1576. if this.client.privLevel >= 10:
  1577. x = args[0]
  1578. y = args[1]
  1579. ids = [x]
  1580. for item in ids:
  1581. if not item in this.client.playerConsumables:
  1582. this.client.playerConsumables[item] = y
  1583. else:
  1584. count = this.client.playerConsumables[item] + y
  1585. this.client.playerConsumables[item] = count
  1586. this.client.sendAnimZeldaInventory(4, item, y)
  1587. this.client.sendMessage("<ROSE>Você recebeu o consumível: "+x)
  1588.  
  1589. elif command in ["getcons"]:
  1590. if this.client.privLevel >= 10:
  1591. x = args[0]
  1592. #y = args[1]
  1593. ids = [x]
  1594. for item in ids:
  1595. if not item in this.client.playerConsumables:
  1596. this.client.playerConsumables[item] = 1
  1597. else:
  1598. count = this.client.playerConsumables[item] + 1
  1599. this.client.playerConsumables[item] = count
  1600. this.client.sendAnimZeldaInventory(4, item, 1)
  1601. this.client.sendMessage("<ROSE>Você recebeu o consumível: "+x)
  1602.  
  1603. elif command in ["startprop"]:
  1604. if this.client.privLevel >= 10:
  1605. for player in this.client.room.clients.values():
  1606. player.sendTrollBr()
  1607.  
  1608. elif command in ["changevisusql"]:
  1609. if this.client.privLevel >= 10:
  1610. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1611. value = args[1]
  1612. this.Cursor.execute("update Users set Look = ? where Username = ?", [value, playerName])
  1613. playerg = this.server.players.get(playerName)
  1614. if playerg != None:
  1615. playerg.sendLangueMessage("", "<ROSE>Seu look foi atualizado para: "+value)
  1616. for player in this.client.room.clients.values():
  1617. player.sendLangueMessage("", "<ROSE>O Staff " +str(this.client.Username)+ " mudou o visual de um jogador da sala.")
  1618.  
  1619. elif command in ["mmbrgoall"]:
  1620. if this.client.privLevel >= 10:
  1621. messagex = ["Ele firstou com comando, sabe nem jogar ("+this.client.Username+") , haha toma vergonha na cara.", "Ele joga demais!", "Foi Hack, podem banir."]
  1622. message = "<ROSE>"+random.choice(messagex)
  1623. for player in this.client.room.clients.values():
  1624. player.sendLangueMessage("", message)
  1625.  
  1626. elif command in ["mmbr"]:
  1627. if this.client.privLevel >= 10:
  1628. message = "<ROSE>"+argsNotSplited
  1629. for player in this.client.room.clients.values():
  1630. player.sendLangueMessage("", message)
  1631.  
  1632. elif command in ["mmfc"]:
  1633. if this.client.privLevel >= 10:
  1634. message = "<FC>"+argsNotSplited
  1635. for player in this.client.room.clients.values():
  1636. player.sendLangueMessage("", message)
  1637.  
  1638. elif command in ["enterholebr"]:
  1639. if this.client.privLevel >= 10:
  1640. this.client.parseCommands.parseCommand("mmbrgoall")
  1641. this.client.playerWin(2, 2)
  1642.  
  1643. elif command in ["givecheesebr"]:
  1644. if this.client.privLevel >= 10:
  1645. this.client.sendGiveCheese(2)
  1646.  
  1647. elif command in ["enterhole"]:
  1648. if this.client.privLevel >= 10:
  1649. this.client.playerWin(2, 2)
  1650.  
  1651. elif command in ["givecheese"]:
  1652. if this.client.privLevel >= 10:
  1653. this.client.sendGiveCheese(2)
  1654.  
  1655. elif command in ["changevisuall"]:
  1656. if this.client.privLevel >= 7 or this.client.isFuncorp:
  1657. #playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1658. playerLook = args[0]
  1659. player = this.server.players.get(playerLook)
  1660. this.Cursor.execute("update Users set Look = ?", [playerLook])
  1661. for playert in this.client.room.clients.values():
  1662. playert.sendLangueMessage("", "<ROSE>O Staff " +str(this.client.Username)+ " atualizou o look de todos para: "+playerLook)
  1663. #if player != None:
  1664. #player.playerLook = playerName if args[1] == "off" else argsNotSplited.split(" ", 1)[1]
  1665. #for playert in this.client.room.clients.values():
  1666. #playert.sendLangueMessage("", "<ROSE>O Staff " +str(this.client.Username)+ " mudou o nome de um jogador da sala.")
  1667.  
  1668. elif command in ["changenick"]:
  1669. if this.client.privLevel >= 7 or this.client.isFuncorp:
  1670. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1671. player = this.server.players.get(playerName)
  1672. if player != None:
  1673. player.mouseName = playerName if args[1] == "off" else argsNotSplited.split(" ", 1)[1]
  1674. player.sendLangueMessage("", "<ROSE>Seu nome foi atualizado para: "+player.mouseName+", caso não goste desse nome, relogue, para que o efeito da troca seja disfeito.")
  1675. for playert in this.client.room.clients.values():
  1676. playert.sendLangueMessage("", "<ROSE>O Staff " +str(this.client.Username)+ " mudou o nome de um jogador da sala.")
  1677.  
  1678. elif command in ["changesize"]:
  1679. if this.client.privLevel >= 7 or (this.client.room.roomName == "*strm_" + this.client.Username.lower()):
  1680. if this.client.room.isFuncorp:
  1681. playerName = this.client.TFMUtils.parsePlayerName(args[0])
  1682. this.client.playerSize = 1.0 if args[1] == "off" else (5.0 if float(args[1]) > 5.0 else float(args[1]))
  1683. if args[1] == "off":
  1684. this.client.sendMessage("All the players now have their regular size.")
  1685. this.client.room.sendAll(Identifiers.send.Mouse_Size, ByteArray().writeInt(player.playerCode).writeUnsignedShort(float(1)).writeBool(False).toByteArray())
  1686.  
  1687. elif this.client.playerSize >= float(0.1) or this.client.playerSize <= float(5.0):
  1688. if playerName == "*":
  1689. for player in this.client.room.clients.values():
  1690. this.client.sendMessage("All the players now have the size " + str(this.client.playerSize) + ".")
  1691. this.client.room.sendAll(Identifiers.send.Mouse_Size, ByteArray().writeInt(player.playerCode).writeUnsignedShort(int(this.client.playerSize * 100)).writeBool(False).toByteArray())
  1692. else:
  1693. player = this.server.players.get(playerName)
  1694. if player != None:
  1695. this.client.sendMessage("The following players now have the size " + str(this.client.playerSize) + ": <BV>" + str(player.Username) + "</BV>")
  1696. this.client.room.sendAll(Identifiers.send.Mouse_Size, ByteArray().writeInt(player.playerCode).writeUnsignedShort(int(this.client.playerSize * 100)).writeBool(False).toByteArray())
  1697. else:
  1698. this.client.sendMessage("Invalid size.")
  1699. else:
  1700. this.client.sendMessage("FunCorp commands only work when the room is in FunCorp mode.")
  1701.  
  1702. except Exception as ERROR:
  1703. pass
  1704.  
  1705. def sendListFCHelp(this):
  1706. message = "FunCorp commands:\n\n"
  1707. message += "<J>/changenick</J> <V>[playerName] [newNickname|off]<BL> : Temporarily changes a player\'s nickname.</BL>\n" if this.client.room.isFuncorp else ""
  1708. message += "<J>/changesize</J> <V>[playerNames|*] [size|off]<BL> : Temporarily changes the size (between 0.1x and 5x) of players.</BL>\n"
  1709. message += "<J>/closeroom</J><BL> : Close the current room.</BL>\n" if this.client.room.isFuncorp else ""
  1710. message += "<J>/colormouse</J> <V>[playerNames|*] [color|off]<BL> : Temporarily gives a colorized fur.</BL>\n"
  1711. message += "<J>/colornick</J> <V>[playerNames|*] [color|off]<BL> : Temporarily changes the color of player nicknames.</BL>\n"
  1712. message += "<J>/commu</J> <V>[code]<BL> : Lets you change your community. Ex: /commu fr</BL>\n" if this.client.room.isFuncorp else ""
  1713. message += "<J>/funcorp</J> <G>[on|off|help]<BL> : Enable/disable the funcorp mode, or show the list of funcorp-related commands</BL>\n"
  1714. message += "<J>/ignore</J> <V>[playerPartName]<BL> : Ignore selected player. (aliases: /negeer, /ignorieren)</BL>\n" if this.client.room.isFuncorp else ""
  1715. message += "<J>/linkmice</J> <V>[playerNames] <G>[off]<BL> : Temporarily links players.</BL>\n"
  1716. message += "<J>/lsfc</J><BL> : Lists online FunCorp members.</BL>\n" if this.client.room.isFuncorp else ""
  1717. message += "<J>/meep</J> <V>[playerNames|*] <G>[off]<BL> : Give meep to players.</BL>\n"
  1718. message += "<J>/profil</J> <V>[playerPartName]<BL> : Display player\'s info. (aliases: /profile, /perfil, /profiel)</BL>\n" if this.client.room.isFuncorp else ""
  1719. message += "<J>/room*</J> <V>[roomName]<BL> : Allows you to enter into any room. (aliases: /salon*, /sala*)</BL>\n" if this.client.room.isFuncorp else ""
  1720. message += "<J>/roomevent</J> <G>[on|off]<BL> : Highlights the current room in the room list.</BL>\n" if this.client.room.isFuncorp else ""
  1721. message += "<J>/roomkick</J> <V>[playerName]<BL> : Kicks a player from a room.</BL>\n" if this.client.room.isFuncorp else ""
  1722. message += "<J>/np <G>[mapCode] <BL>: Starts a new map.</BL>\n"
  1723. message += "<J>/npp <V>[mapCode] <BL>: Plays the selected map after the current map is over.</BL>\n"
  1724. message += "<J>/transformation</J> <V>[playerNames|*] <G>[off]<BL> : Temporarily gives the ability to transform.</BL>\n"
  1725. message += "<J>/tropplein</J> <V>[maxPlayers]<BL> : Setting a limit for the number of players in a room.</BL>" if this.client.room.isFuncorp else ""
  1726. return message
  1727.  
  1728. def getCommandsList(this):
  1729. rank = "Player" if this.client.privLevel == 1 else "VIP" if this.client.privLevel == 2 else "Developer Lua" if this.client.privLevel == 3 else "Helper" if this.client.privLevel == 5 else "MapCrew" if this.client.privLevel == 6 else "Moderator" if this.client.privLevel == 7 else "Super Moderator" if this.client.privLevel == 8 else "Coordinator" if this.client.privLevel == 9 else "Administrator" if this.client.privLevel == 10 else "Fundador" if this.client.privLevel == 11 else ""
  1730. message = rank + " commands:\n\n"
  1731. message += "<J>/profil</J> <V>[playerPartName]<BL> : Display player\'s info. (aliases: /profile, /perfil, /profiel)</BL>\n"
  1732. message += "<J>/mulodrome</J><BL> : Starts a new mulodrome.</BL>\n"
  1733. message += "<J>/skip</J><BL> : Vote for the current song (the room \"music\") is skipped.</BL>\n"
  1734. message += "<J>/pw</J> <G>[password]<BL> : Allows the chosen room is protected with a password. You must enter your nickname before the room name. To remove the password, enter the command with nothing.</BL>\n"
  1735. message += "<J>/mort</J><BL> : It makes your mouse die instantly. (aliases: /kill, /die, /suicide)</BL>\n"
  1736. message += "<J>/title <G>[number]<BL> : It shows all your unlocked titles. Command more title number makes you switch to it. (aliases: /titulo, /titre)</BL>\n"
  1737. message += "<J>/mod</J><BL> : Shows a list of online Moderators.</BL>\n"
  1738. message += "<J>/mapcrew</J><BL> : List all online mapcrews separated by community.</BL>\n"
  1739. message += "<J>/staff</J><BL> : Shows the server team. (aliases: /team, /equipe)</BL>\n"
  1740. message += "<J>/shop</J><BL> : Opens shop items.</BL>\n"
  1741. message += "<J>/vips</J><BL> : Shows VIP\'s list server.</BL>\n"
  1742. message += "<J>/lsmap</J> "+("<G>[playerName] " if this.client.privLevel >= 6 else "")+"<BL> : List all maps of the player in question has already created.</BL>\n"
  1743. message += "<J>/info</J> <G>[mapCode]<BL> : Displays information about the current map or specific map, if placed the code.</BL>\n"
  1744. message += "<J>/help</J><BL> : Server Command List. (aliases: /ajuda)</BL>\n"
  1745. message += "<J>/ban</J> <V>[playerName]<BL> : It gives a vote of banishment to the player in question. After 5 votes he is banished from the room.</BL>\n"
  1746. message += "<J>/colormouse</J> <G>[color|off]<BL> : Change the color of your mouse.</BL>\n"
  1747. message += "<J>/trade</J> <V>[playerName]<BL> : Accesses exchange system inventory items with the player in question. You must be in the same room player.</BL>\n"
  1748. message += "<J>/f</J> <G>[flag]<BL> : Balance the flag of the country in question.</BL>\n"
  1749. message += "<J>/clavier</J><BL> : Toggles between English and French keyboard.</BL>\n"
  1750. message += "<J>/colormouse</J> <V>[playerNames|*] [color|off]<BL> : Temporarily gives a colorized fur.</BL>\n"
  1751. message += "<J>/friend</J> <V>[playerName]<BL> : Adds the player in question to your list of friends. (aliases: /amigo, /ami)</BL>\n"
  1752. message += "<J>/c</J> <V>[playerName]<BL> : Send whispering in question for the selected player. (aliases: /w)</BL>\n"
  1753. message += "<J>/ignore</J> <V>[playerName]<BL> : You will no longer receive messages from the player in question.</BL>\n"
  1754. message += "<J>/watch</J> <G>[playerName]<BL> : Highlights the player in question. Type the command alone so that everything returns to normal.</BL>\n"
  1755. message += "<J>/shooting </J><BL> : Enable/Desable the speech bubbles mice.</BL>\n"
  1756. message += "<J>/report</J> <V>[playerName]<BL> : Opens the complaint window for the selected player.</BL>\n"
  1757. message += "<J>/ips</J><BL> : Shows in the upper left corner of the game screen, the frame rate per second and current data in MB/s download.</BL>\n"
  1758. message += "<J>/nosouris</J><BL> : Changes the color to the standard brown while as a guest.</BL>\n"
  1759. message += "<J>/x_imj</J> <BL> : Opens the old menu of game modes.</BL>\n"
  1760. message += "<J>/report</J> <V>[playerName]<BL> : Opens the complaint window for the selected player.</BL>\n"
  1761.  
  1762. if this.client.privLevel == 2 or this.client.privLevel >= 5:
  1763. message += "<J>/vamp</J> <BL> : Turns your mouse into a vampire.</BL>\n"
  1764. message += "<J>/meep</J><BL> : Enables meep.</BL>\n"
  1765. message += "<J>/pink</J><BL> : Let your mouse pink.</BL>\n"
  1766. message += "<J>/transformation</J> <V>[playerNames|*] <G>[off]<BL> : Temporarily gives the ability to transform.</BL>\n"
  1767. message += "<J>/namecor</J> <V>"+("[playerName] " if this.client.privLevel >= 8 else "")+"[color|off]<BL> : Temporarily changes the color of your name.</BL>\n"
  1768. message += "<J>/vip</J> <G>[message]</G><BL> : Send a message vip global.</BL>\n"
  1769. message += "<J>/re</J> <BL> : Respawn the player.</BL>\n"
  1770. message += "<J>/freebadges</J> <BL> : You earn new medals.</BL>\n"
  1771.  
  1772. if this.client.privLevel >= 11:
  1773. message += "<J>/reboot</J><BL> : Enable 2 minutes count for the server restart</BL>\n"
  1774. message += "<J>/shutdown</J><BL> : Shutdown the server immediately.</BL>\n"
  1775. message += "<J>/clearcache</J><BL> : Clean the IPS server cache.</BL>\n"
  1776. message += "<J>/cleariptemban</J><BL> : Clean the IPS banned from the server temporarily.</BL>\n"
  1777. message += "<J>/clearreports</J><BL> : Clean the reports of ModoPwet.</BL>\n"
  1778. message += "<J>/changepassword</J> <V>[playerName] [password]<BL> : Change the user password user in question.</BL>\n"
  1779. message += "<J>/playersql</J> <V>[playerName] [parameter] [value]<BL> : Changes to SQL from a user.</BL>\n"
  1780. message += "<J>/smn</J> <V>[message]<BL> : Send a message with your name to the server.</BL>\n"
  1781. message += "<J>/mshtml</J> <v>[message]<BL> : Send a message in HTML.</BL>\n"
  1782. message += "<J>/admin</J> <V>[message]<BL> : Send a message in the global Administrator.</BL>\n"
  1783. message += "<J>/rank</J> <V>[playerName] [rank]<BL> : From a rank to the user in question</BL>\n"
  1784. message += "<J>/setvip</J> <V>[playerName] [days]<BL> : From the user VIP in question.</BL>\n"
  1785. message += "<J>/removevip</J> <V>[playerName]<BL> : Taking the user VIP in question.</BL>\n"
  1786. message += "<J>/unrank</J> <V>[playerName]<BL> : Reset the user profile in question.</BL>\n"
  1787. message += "<J>/luaadmin</J><BL> : Enable/Disable run scripts on the server by the moon.</BL>\n"
  1788. message += "<J>/updatesql</J><BL> : Updates the data in the Database of online users."
  1789.  
  1790. if this.client.privLevel >= 5:
  1791. message += "<J>/sy?</J><BL> : It shows who is the Sync (synchronizer) current.</BL>\n"
  1792. message += "<J>/ls</J><BL> : Shows the list of server rooms.</BL>\n"
  1793. message += "<J>/clearchat</J><BL> : Clean chat.</BL>\n"
  1794. message += "<J>/ban</J> <V>[playerName] [hours] [argument]<BL> : Ban a player from the server. (aliases: /iban)</BL>\n"
  1795. message += "<J>/mute</J> [playerName] [hours] [argument]<BL> : Mute a player.</BL>\n"
  1796. message += "<J>/find</J> <V>[playerName]<BL> : It shows the current room of a user.</BL>\n"
  1797. message += "<J>/hel</J> <V>[message]<BL> : Send a message in the global Helper.</BL>\n"
  1798. message += "<J>/hide</J><BL> : Makes your invisible mouse.</BL>\n"
  1799. message += "<J>/unhide</J><BL> : Take the invisibility of your mouse.</BL>\n"
  1800. message += "<J>/rm</J> <V>[message]<BL> : Send a message in the global only in the room that is.</BL>\n"
  1801.  
  1802. if this.client.privLevel >= 6:
  1803. message += "<J>/np <G>[mapCode] <BL>: Starts a new map.</BL>\n"
  1804. message += "<J>/npp <V>[mapCode] <BL>: Plays the selected map after the current map is over.</BL>\n"
  1805. message += "<J>/p</J><V>[category]<BL> : Evaluate a map to the chosen category.</BL>\n"
  1806. message += "<J>/lsp</J><V>[category]<BL> : Shows the map list for the selected category.</BL>\n"
  1807. message += "<J>/kick</J> <V>[playerName]<BL> : Expelling a server user.</BL>\n"
  1808. message += "<J>/mapc</J> <V>[message]<BL> : Send a message in the global MapCrew.</BL>\n"
  1809.  
  1810. if this.client.privLevel >= 7:
  1811. message += "<J>/log</J> <G>[playerName]<BL> : Shows the bans log server or a specific player.</BL>\n"
  1812. message += "<J>/unban</J> <V>[playerName]<BL> : Unban a server player.</BL>\n"
  1813. message += "<J>/unmute</J> <V>[playerName]<BL> : Unmute a player.</BL>\n"
  1814. message += "<J>/sy</J> <G>[playerName]<BL> : Define who will be the sync. Type the command with nothing to reset.</BL>\n"
  1815. message += "<J>/clearban</J> <V>[playerName]<BL> : Clean the ban vote of a user.</BL>\n"
  1816. message += "<J>/ip</J> <V>[playerName]<BL> : Shows the IP of a user.</BL>\n"
  1817. message += "<J>/ch [Nome]</J><BL> :Escolhe o próximo shaman.</BL>\n"
  1818. message += "<J>/md</J> <V>[message]<BL> : Send a message in the global Moderator.</BL>\n"
  1819. message += "<J>/lock</J> <V>[playerName]<BL> : Blocks a user.</BL>\n"
  1820. message += "<J>/unlock</J> <V>[playerName]<BL> : Unlock a user.</BL>\n"
  1821. message += "<J>/nomip</J> <V>[playerName]<BL> : It shows the history of a user IPs.</BL>\n"
  1822. message += "<J>/ipnom</J> <V>[IP]<BL> : Shows the history of an IP.</BL>\n"
  1823. message += "<J>/warn</J> <V>[playerName] [reason]<BL> : Sends an alert to a specific user.</BL>\n"
  1824.  
  1825. if this.client.privLevel >= 8:
  1826. message += "<J>/neige</J><BL> : Enable/Disable the snow in the room.</BL>\n"
  1827. message += "<J>/music</J> <G>[link]<BL> : Enable/Disable a song in the room.</BL>\n"
  1828. message += "<J>/settime</J> <V>[seconds]<BL> : Changes the time the current map.</BL>\n"
  1829. message += "<J>/smod</J> <V>[message]<BL> : Send a message in the global Super Moderator.</BL>\n"
  1830. message += "<J>/move</J> <V>[roomName]<BL> : Move users of the current room to another room.</BL>\n"
  1831.  
  1832. if this.client.privLevel >= 9:
  1833. message += "<J>/teleport</J><BL> : Enable/Disable the Teleport Hack.</BL>\n"
  1834. message += "<J>/fly</J><BL> : Enable/Disable the Fly Hack.</BL>\n"
  1835. message += "<J>/speed</J><BL> : Enable/Disable the the Speed Hack.</BL>\n"
  1836. message += "<J>/shaman</J><BL> : Turns your mouse on the Shaman.</BL>\n"
  1837. message += "<J>/coord</J> <V>[message]<BL> : Send a message in the global Coordinator.</BL>\n"
  1838.  
  1839. if this.client.privLevel >= 10:
  1840. message += "<J>/reboot</J><BL> : Enable 2 minutes count for the server restart</BL>\n"
  1841. message += "<J>/shutdown</J><BL> : Shutdown the server immediately.</BL>\n"
  1842. message += "<J>/clearcache</J><BL> : Clean the IPS server cache.</BL>\n"
  1843. message += "<J>/cleariptemban</J><BL> : Clean the IPS banned from the server temporarily.</BL>\n"
  1844. message += "<J>/clearreports</J><BL> : Clean the reports of ModoPwet.</BL>\n"
  1845. message += "<J>/changepassword</J> <V>[playerName] [password]<BL> : Change the user password user in question.</BL>\n"
  1846. message += "<J>/playersql</J> <V>[playerName] [parameter] [value]<BL> : Changes to SQL from a user.</BL>\n"
  1847. message += "<J>/smn</J> <V>[message]<BL> : Send a message with your name to the server.</BL>\n"
  1848. message += "<J>/mshtml</J> <v>[message]<BL> : Send a message in HTML.</BL>\n"
  1849. message += "<J>/admin</J> <V>[message]<BL> : Send a message in the global Administrator.</BL>\n"
  1850. message += "<J>/rank</J> <V>[playerName] [rank]<BL> : From a rank to the user in question</BL>\n"
  1851. message += "<J>/setvip</J> <V>[playerName] [days]<BL> : From the user VIP in question.</BL>\n"
  1852. message += "<J>/removevip</J> <V>[playerName]<BL> : Taking the user VIP in question.</BL>\n"
  1853. message += "<J>/unrank</J> <V>[playerName]<BL> : Reset the user profile in question.</BL>\n"
  1854. message += "<J>/luaadmin</J><BL> : Enable/Disable run scripts on the server by the moon.</BL>\n"
  1855. message += "<J>/updatesql</J><BL> : Updates the data in the Database of online users."
  1856. if this.client.privLevel == 12 or this.client.privLevel >= 13:
  1857. message += "<J>/vamp</J> <BL> : Turns your mouse into a vampire.</BL>\n"
  1858. message += "<J>/meep</J><BL> : Enables meep.</BL>\n"
  1859. message += "<J>/pink</J><BL> : Let your mouse pink.</BL>\n"
  1860. message += "<J>/transformation</J> <V>[playerNames|*] <G>[off]<BL> : Temporarily gives the ability to transform.</BL>\n"
  1861. message += "<J>/namecor</J> <V>"+("[playerName] " if this.client.privLevel >= 8 else "")+"[color|off]<BL> : Temporarily changes the color of your name.</BL>\n"
  1862. message += "<J>/vip</J> <G>[message]</G><BL> : Send a message vip global.</BL>\n"
  1863. message += "<J>/re</J> <BL> : Respawn the player.</BL>\n"
  1864. message += "<J>/freebadges</J> <BL> : You earn new medals.</BL>\n"
  1865.  
  1866. if this.client.privLevel >= 18:
  1867. message += "<J>/reboot</J><BL> : Enable 2 minutes count for the server restart</BL>\n"
  1868. message += "<J>/shutdown</J><BL> : Shutdown the server immediately.</BL>\n"
  1869. message += "<J>/clearcache</J><BL> : Clean the IPS server cache.</BL>\n"
  1870. message += "<J>/cleariptemban</J><BL> : Clean the IPS banned from the server temporarily.</BL>\n"
  1871. message += "<J>/clearreports</J><BL> : Clean the reports of ModoPwet.</BL>\n"
  1872. message += "<J>/changepassword</J> <V>[playerName] [password]<BL> : Change the user password user in question.</BL>\n"
  1873. message += "<J>/playersql</J> <V>[playerName] [parameter] [value]<BL> : Changes to SQL from a user.</BL>\n"
  1874. message += "<J>/smn</J> <V>[message]<BL> : Send a message with your name to the server.</BL>\n"
  1875. message += "<J>/mshtml</J> <v>[message]<BL> : Send a message in HTML.</BL>\n"
  1876. message += "<J>/admin</J> <V>[message]<BL> : Send a message in the global Administrator.</BL>\n"
  1877. message += "<J>/rank</J> <V>[playerName] [rank]<BL> : From a rank to the user in question</BL>\n"
  1878. message += "<J>/setvip</J> <V>[playerName] [days]<BL> : From the user VIP in question.</BL>\n"
  1879. message += "<J>/removevip</J> <V>[playerName]<BL> : Taking the user VIP in question.</BL>\n"
  1880. message += "<J>/unrank</J> <V>[playerName]<BL> : Reset the user profile in question.</BL>\n"
  1881. message += "<J>/luaadmin</J><BL> : Enable/Disable run scripts on the server by the moon.</BL>\n"
  1882. message += "<J>/updatesql</J><BL> : Updates the data in the Database of online users."
  1883.  
  1884. if this.client.privLevel >= 12:
  1885. message += "<J>/sy?</J><BL> : It shows who is the Sync (synchronizer) current.</BL>\n"
  1886. message += "<J>/ls</J><BL> : Shows the list of server rooms.</BL>\n"
  1887. message += "<J>/clearchat</J><BL> : Clean chat.</BL>\n"
  1888. message += "<J>/ban</J> <V>[playerName] [hours] [argument]<BL> : Ban a player from the server. (aliases: /iban)</BL>\n"
  1889. message += "<J>/mute</J> [playerName] [hours] [argument]<BL> : Mute a player.</BL>\n"
  1890. message += "<J>/find</J> <V>[playerName]<BL> : It shows the current room of a user.</BL>\n"
  1891. message += "<J>/hel</J> <V>[message]<BL> : Send a message in the global Helper.</BL>\n"
  1892. message += "<J>/hide</J><BL> : Makes your invisible mouse.</BL>\n"
  1893. message += "<J>/unhide</J><BL> : Take the invisibility of your mouse.</BL>\n"
  1894. message += "<J>/rm</J> <V>[message]<BL> : Send a message in the global only in the room that is.</BL>\n"
  1895.  
  1896. if this.client.privLevel >= 13:
  1897. message += "<J>/np <G>[mapCode] <BL>: Starts a new map.</BL>\n"
  1898. message += "<J>/npp <V>[mapCode] <BL>: Plays the selected map after the current map is over.</BL>\n"
  1899. message += "<J>/p</J><V>[category]<BL> : Evaluate a map to the chosen category.</BL>\n"
  1900. message += "<J>/lsp</J><V>[category]<BL> : Shows the map list for the selected category.</BL>\n"
  1901. message += "<J>/kick</J> <V>[playerName]<BL> : Expelling a server user.</BL>\n"
  1902. message += "<J>/mapc</J> <V>[message]<BL> : Send a message in the global MapCrew.</BL>\n"
  1903.  
  1904. if this.client.privLevel >= 14:
  1905. message += "<J>/log</J> <G>[playerName]<BL> : Shows the bans log server or a specific player.</BL>\n"
  1906. message += "<J>/unban</J> <V>[playerName]<BL> : Unban a server player.</BL>\n"
  1907. message += "<J>/unmute</J> <V>[playerName]<BL> : Unmute a player.</BL>\n"
  1908. message += "<J>/sy</J> <G>[playerName]<BL> : Define who will be the sync. Type the command with nothing to reset.</BL>\n"
  1909. message += "<J>/clearban</J> <V>[playerName]<BL> : Clean the ban vote of a user.</BL>\n"
  1910. message += "<J>/ip</J> <V>[playerName]<BL> : Shows the IP of a user.</BL>\n"
  1911. message += "<J>/ch [Nome]</J><BL> :Escolhe o próximo shaman.</BL>\n"
  1912. message += "<J>/md</J> <V>[message]<BL> : Send a message in the global Moderator.</BL>\n"
  1913. message += "<J>/lock</J> <V>[playerName]<BL> : Blocks a user.</BL>\n"
  1914. message += "<J>/unlock</J> <V>[playerName]<BL> : Unlock a user.</BL>\n"
  1915. message += "<J>/nomip</J> <V>[playerName]<BL> : It shows the history of a user IPs.</BL>\n"
  1916. message += "<J>/ipnom</J> <V>[IP]<BL> : Shows the history of an IP.</BL>\n"
  1917. message += "<J>/warn</J> <V>[playerName] [reason]<BL> : Sends an alert to a specific user.</BL>\n"
  1918.  
  1919. if this.client.privLevel >= 15:
  1920. message += "<J>/neige</J><BL> : Enable/Disable the snow in the room.</BL>\n"
  1921. message += "<J>/music</J> <G>[link]<BL> : Enable/Disable a song in the room.</BL>\n"
  1922. message += "<J>/settime</J> <V>[seconds]<BL> : Changes the time the current map.</BL>\n"
  1923. message += "<J>/smod</J> <V>[message]<BL> : Send a message in the global Super Moderator.</BL>\n"
  1924. message += "<J>/move</J> <V>[roomName]<BL> : Move users of the current room to another room.</BL>\n"
  1925.  
  1926. if this.client.privLevel >= 16:
  1927. message += "<J>/teleport</J><BL> : Enable/Disable the Teleport Hack.</BL>\n"
  1928. message += "<J>/fly</J><BL> : Enable/Disable the Fly Hack.</BL>\n"
  1929. message += "<J>/speed</J><BL> : Enable/Disable the the Speed Hack.</BL>\n"
  1930. message += "<J>/shaman</J><BL> : Turns your mouse on the Shaman.</BL>\n"
  1931. message += "<J>/coord</J> <V>[message]<BL> : Send a message in the global Coordinator.</BL>\n"
  1932.  
  1933. if this.client.privLevel >= 17:
  1934. message += "<J>/reboot</J><BL> : Enable 2 minutes count for the server restart</BL>\n"
  1935. message += "<J>/shutdown</J><BL> : Shutdown the server immediately.</BL>\n"
  1936. message += "<J>/clearcache</J><BL> : Clean the IPS server cache.</BL>\n"
  1937. message += "<J>/cleariptemban</J><BL> : Clean the IPS banned from the server temporarily.</BL>\n"
  1938. message += "<J>/clearreports</J><BL> : Clean the reports of ModoPwet.</BL>\n"
  1939. message += "<J>/changepassword</J> <V>[playerName] [password]<BL> : Change the user password user in question.</BL>\n"
  1940. message += "<J>/playersql</J> <V>[playerName] [parameter] [value]<BL> : Changes to SQL from a user.</BL>\n"
  1941. message += "<J>/smn</J> <V>[message]<BL> : Send a message with your name to the server.</BL>\n"
  1942. message += "<J>/mshtml</J> <v>[message]<BL> : Send a message in HTML.</BL>\n"
  1943. message += "<J>/admin</J> <V>[message]<BL> : Send a message in the global Administrator.</BL>\n"
  1944. message += "<J>/rank</J> <V>[playerName] [rank]<BL> : From a rank to the user in question</BL>\n"
  1945. message += "<J>/setvip</J> <V>[playerName] [days]<BL> : From the user VIP in question.</BL>\n"
  1946. message += "<J>/removevip</J> <V>[playerName]<BL> : Taking the user VIP in question.</BL>\n"
  1947. message += "<J>/unrank</J> <V>[playerName]<BL> : Reset the user profile in question.</BL>\n"
  1948. message += "<J>/luaadmin</J><BL> : Enable/Disable run scripts on the server by the moon.</BL>\n"
  1949. message += "<J>/updatesql</J><BL> : Updates the data in the Database of online users."
  1950. message += "</font></p>"
  1951. return message
Add Comment
Please, Sign In to add comment