Jump to content

Spam System Python


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Hello guys im here to release my spam-system, that i made a long time ago, is not the best spam system but is what i can make :D.
 
So i hope you guys enjoy and here is a video that i made to show the system:
 
 
 http://www.youtube.com/watch?v=Ko8qpfS5yTI
 
 
Tutorial:
 
Go to uichat.py
 
Search ChatModeButton class, and in the __init__ function add:
 

constInfo.counterspam = 6

then you go to ChatLine class, and in the __init__ function add:
 

constInfo.spama = 1
constInfo.spamb = 2
constInfo.textone = ''
constInfo.texttwo = ''

then you search __SendTalkingChatPacket function and replace:
 

if constInfo.spama == 1:
			constInfo.textone = text
			constInfo.spama = 2
		elif constInfo.spama == 2:
			constInfo.texttwo = text
			constInfo.spama = 1
		if constInfo.counterspam >= 1:
			if constInfo.textone == constInfo.textotwo:
				constInfo.counterspam = constInfo.counterspam - 1
				if constInfo.counterspam == 5:
					chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_SPAM_UM)
				elif constInfo.counterspam == 4:
					chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_SPAM_DOIS)
				elif constInfo.counterspam == 3:
					chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_SPAM_TRES)
				elif constInfo.counterspam == 2:
					chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_SPAM_QUATRO)
				elif constInfo.counterspam == 1:
					chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_SPAM_CINCO)
			else:
				constInfo.counterspam = 6
			self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING)
		elif constInfo.counterspam == 0:
			if app.GetTime() < self.lastShoutTime + 60:
				chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_SPAM_LIMIT)
				return
			else:
				constInfo.counterspam = 6
		
			
		self.__ResetChat()
		self.lastShoutTime = app.GetTime()

Save the files.
 
Open locale_game in your locale folder and add:
 

CHAT_SPAM_LIMIT	Your chat has been blocked! Reason:SPAM.
CHAT_SPAM_UM	[WARNING]SPAM is not permited [1/5]
CHAT_SPAM_DOIS	[WARNING]SPAM is not permited [2/5]
CHAT_SPAM_TRES	[WARNING]SPAM is not permited [3/5]
CHAT_SPAM_QUATRO	[WARNING]SPAM is not permited [4/5]
CHAT_SPAM_CINCO	[WARNING]SPAM is not permited [5/5]

Save. Done
 
Thx,
and if you like please tell me and i will try to bring more releases.

  • Metin2 Dev 5
  • Think 1
  • Good 3
  • Love 3
Link to comment
Share on other sites

  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

  • Developer

Don't do this kind of things on the client, since everyone is able to modify it. Instead, do it on the game core, and log everything into a MySQL table.

 

Edit: And btw, since you are using variables, closing the client and opening it again would bypass that.

when you return 0 and server doesn't boot:

unknown.png

Link to comment
Share on other sites

  • 2 weeks later...

 

 Tutorial:

 

Go to uichat.py

 

Search ChatModeButton class, and in the __init__ function add:

 

constInfo.counterspam = 6

then you go to ChatLine class, and in the __init__ function add:

 

constInfo.spama = 1
constInfo.spamb = 2
constInfo.textone = ''
constInfo.texttwo = ''

 

I do not understand the above. . . Explain me better, you can make a broader picture to you in uichat to see how GRT show. . Thanks

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.