Register for your free account! | Forgot your password?

You last visited: Today at 07:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



PYTHON Anti Flood (Client)

Discussion on PYTHON Anti Flood (Client) within the Metin2 Hacks, Bots, Cheats, Exploits & Macros forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2010
Posts: 43
Received Thanks: 14
PYTHON Anti Flood (Client)

Antiflood code for uichat.py

Code:
#----------------- MAIN CLASS -----------------------------------------------

	def __init__(self):
		ui.EditLine.__init__(self)
		self.SetWindowName("Chat Line")
		self.lastShoutTime = 0
		self.eventEscape = lambda *arg: None
		self.eventReturn = lambda *arg: None
		self.eventTab = None
		self.chatMode = chat.CHAT_TYPE_TALKING
		self.bCodePage = TRUE

		self.overTextLine = ui.TextLine()
		self.overTextLine.SetParent(self)
		self.overTextLine.SetPosition(-1, 0)
		self.overTextLine.SetFontColor(1.0, 1.0, 0.0)
		self.overTextLine.SetOutline()
		self.overTextLine.Hide()

		self.lastSentenceStack = []
		self.lastSentencePos = 0
		
		self.tempo = 0
		self.volte = 0

#--------------------------------------- OTHER FUNCTIONS -----------------

	def SendChat(self, text, type):
		import time
		net.SendChatPacket(text, type)
		self.tempo=int(time.clock())+15
		
	def __SendChatPacket(self, text, type):
		import player
		pg=player.GetName()
		if text[0] == '/':
			if pg.find("[") == -1:
				return
			
		if net.IsChatInsultIn(text):
			chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)
		else:
			if self.volte > 100:
				import time
				if int(time.clock()) > self.tempo:
					self.SendChat(text, type)
				else:
					chat.AppendChat(chat.CHAT_TYPE_INFO, "[Anti-Spam] Devi aspettare 15 secondi. Oppure riavvia il client.")
			else:
				self.volte=self.volte+1
				net.SendChatPacket(text, type)

uiinventory.py

Code:
#----------------- MAIN CLASS -----------------------------------------------

	def __init__(self):
		ui.ScriptWindow.__init__(self)
		self.questionDialog = None
		self.tooltipItem = None
		self.sellingSlotNumber = -1
		self.isLoaded = 0
		
		self.volte = 0
		self.tempo = 0


#--------------------------------------- OTHER FUNCTIONS -----------------

	def __SendUseItemToItemPacket(self, srcSlotPos, dstSlotPos):
		import time
		if int(time.clock()) > self.tempo:
			if uiPrivateShopBuilder.IsBuildingPrivateShop():
				chat.AppendChat(chat.CHAT_TYPE_INFO, locale.USE_ITEM_FAILURE_PRIVATE_SHOP)
			else:
				self.volte = self.volte + 1
				self.tempo = int(time.clock())+int(self.volte)/50
				net.SendItemUseToItemPacket(srcSlotPos, dstSlotPos)
		else:
			chat.AppendChat(chat.CHAT_TYPE_INFO, "[Anti-Switch] Devi aspettare " + str(int(self.volte) / 50) + " secondi! Oppure riavvia il client.")

Paride Spa...no aka The Lamer who use these tools to hack any server, say: goodbye!!!
WarXWar is offline  
Old 11/08/2014, 19:46   #2
 
elite*gold: 726
Join Date: Jul 2010
Posts: 14,233
Received Thanks: 7,915
In my opinion this flooding is usefull because of getting kicked when you have got a black screen.
noahrmal is offline  
Reply


Similar Threads Similar Threads
Anti Flood
10/14/2014 - Technical Support - 23 Replies
Hallo epvp, zwar habe ich eine Frage, wie man ein anti flooding script auf einen vServer installier kann. Kurz und knapp, habe ein Teamspeak 3 Server drauf laufen und der Support wo ich Ihn gemietet habe sagte mir nur er wird gefloodet und ich soll den serverlogs nach schauen. Hoffe auf hilfe Regards
Metin2 Pserver Client say flood protection ?
02/06/2013 - Metin2 Private Server - 1 Replies
Hi users i have the problem. All players write a continuous texts and floods. This problem is fixes ? please help me :) Sorry bad eng turkish: inşallah derdimi anlatabilmişimdir.
[SEARCH/HELP] Anti Flood Script [PHP]
01/02/2012 - Metin2 Private Server - 3 Replies
Hey Ich suche ein Anti Flooder Script für die Homepage, wer eins hat bitte posten, die die ich in google gefunden habe bringen alle nichts :s



All times are GMT +1. The time now is 07:30.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.