Register for your free account! | Forgot your password?

You last visited: Today at 13:31

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

Advertisement



[Release] Verwarnsystem [Extended]

Discussion on [Release] Verwarnsystem [Extended] within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1

 
elite*gold: 0
Join Date: Mar 2013
Posts: 2,449
Received Thanks: 6,448
[Release] Verwarnsystem [Extended]

Guten Abend,

hatte mal etwas Langeweile und habe das Verwarnsystem von QuickFlameZ etwas automatisiert.
Sprich: man bekommt automatisch Verwarnpunkte bei einem von (mehreren) festgelegten Wörtern und erhält auch einen temporären Bann, sofern eine gewisse Punktezahl erreicht wurde.


Einbau:

game.py

serverCommandList={ suchen und das am Ende anhängen:

Code:
"vw_index"				: self.__VWIndex,
"send_words"			: self.__SendWords,
"exit"					: self.__MetinExit,
(Bitte bei den Pythoncodes immer auf die Tabs achten)

Über die Funktion BINARY_ServerCommand_Run folgendes:

Code:
def __MetinExit(self):
	app.Close()

def __VWIndex(self, idx):
	constInfo.vw_index = int(idx)
	
def __SendWords(self):
	net.SendQuestInputStringPacket(str(constInfo.word))

constinfo.py

Das einfach irgendwo hinklatschen:

Code:
vw_index = 0
word = ""

uichat.py

Die Funktion def __SendChatPacket(self, text, type): suchen und folgendes ganz am Anfang einfügen:

Code:
import event
black_list = ["huso","blödmann","metin2 spieler"]
for k in black_list:
	if k in ''.join(text):
		constInfo.word = k
		event.QuestButtonClick(int(constInfo.vw_index))
		return

Dann noch die Quest:

Code:
quest vw_extended begin
	state start begin
		function get_points()
			return tonumber(mysql_query("select points from player.vw where pid = ".. pc.get_player_id() ..";")[1][1]) or 0
		end
		when login begin
			if pc.getqf("first") == 1 then
				mysql_query("insert into player.vw values (".. pc.get_player_id() ..",0);")
				pc.setqf("first", 1)
			end
			cmdchat("vw_index ".. q.getcurrentquestindex())
		end
		when button or info begin
			local word = input(cmdchat("send_words"))
			local points = {
				["huso"] = 1,
				["blödmann"] = 2,
				["metin2 spieler"] = 99,
			}
			local sanktion = {
			-- points              hours
				{10,				3},
				{20,				6},
				{30,				12},
				{40,				24},
			}
			if points[word] ~= nil then
				mysql_query("update player.vw set points = points + ".. points[word] .." where pid = ".. pc.get_player_id() ..";")
				local p = vw_extended.get_points()
				syschat("Du hast ".. points[word] .." Warnpunkt(e) erhalten")
				syschat("Du hast nun ".. p .." Warnpunkt(e)")
				table.foreach(sanktion, function(i)
					if sanktion[i][1] <= p and pc.getqf(sanktion[i][1]) ~= 0 then
						mysql_query("UPDATE account.account SET availDt = NOW() + INTERVAL ".. sanktion[i][2] .." HOUR WHERE id = ".. pc.get_account_id() ..";")
						cmdchat("exit")
						if i == table.getn(sanktion) then
							table.foreach(sanktion, function(k)
								pc.setqf(sanktion[k][1], 0)
							end)
						end
						return
					end
				end)
			end
		end
	end
end

Ich hoffe, konnte einigen damit etwas gutes tun.
Falls Fragen offen bleiben, stellt sie mir.


MfG [iRemix]
Lord iRemix is offline  
Thanks
30 Users
Old 03/19/2014, 23:06   #2
 
elite*gold: 16
Join Date: Mar 2014
Posts: 1,076
Received Thanks: 664
Richtig geil.

Vielen Dank
`ɴolαɴ´ is offline  
Old 03/19/2014, 23:12   #3


 
.Marcel''s Avatar
 
elite*gold: 100
Join Date: Sep 2009
Posts: 8,136
Received Thanks: 2,760
Schöne Sache, und gute Umsetzung - Können sicher einige gebrauchen - Danke.
.Marcel' is online now  
Old 03/19/2014, 23:23   #4
 
.Risan.'s Avatar
 
elite*gold: 30
Join Date: Jul 2010
Posts: 1,627
Received Thanks: 1,450
constInfo.word = k
event.QuestButtonClick(int(constInfo.vw_index))
return

in

net.SendQuestPacket(value)

ist viiil geiler ;D
.Risan. is offline  
Thanks
1 User
Old 03/19/2014, 23:25   #5

 
elite*gold: 0
Join Date: Mar 2013
Posts: 2,449
Received Thanks: 6,448
Quote:
Originally Posted by .Risan. View Post
constInfo.word = k
event.QuestButtonClick(int(constInfo.vw_index))
return

in

net.SendQuestPacket(value)

ist viiil geiler ;D
Mein Python ist nicht grad das beste
Kann nur die basics, deswegen.
Lord iRemix is offline  
Old 03/19/2014, 23:30   #6
 
qarezz01's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 56
Received Thanks: 23
Thanks bro
qarezz01 is offline  
Old 03/20/2014, 00:09   #7
 
NaOiZ's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 738
Received Thanks: 499
Super Arbeit wie immer (:
NaOiZ is offline  
Old 03/20/2014, 09:03   #8
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,356
Code:
syschat("Du hast " .. (points[word] == 1 and "einen Warnpunkt" or points[word] .. " Warnpunkte") .. " erhalten")
syschat("Du hast nun " .. (p == 1 and "einen Warnpunkt" or p .. " Warnpunkte"))
Just for the lulz
Not sure if it works tho, never programmed in LUA
Mi4uric3 is offline  
Old 03/20/2014, 09:07   #9
 
elite*gold: 2
Join Date: Jun 2013
Posts: 1,063
Received Thanks: 1,725
Sehr geile Idee !
ProfessorEnte is offline  
Old 03/20/2014, 09:54   #10

 
Aze /..'s Avatar
 
elite*gold: 220
Join Date: Oct 2011
Posts: 7,369
Received Thanks: 7,610
Sieht interessant aus. Gute Arbeit.
Aze /.. is offline  
Old 03/20/2014, 12:32   #11
 
elite*gold: 0
Join Date: Sep 2013
Posts: 491
Received Thanks: 675
Code:
mysql_query("update player.vw set points = points + ".. points[word] .." where pid = ".. pc.get_player_id() ..";"
Warum keine Questflags?
.Kibito is offline  
Old 03/20/2014, 12:35   #12
 
elite*gold: 2
Join Date: Jun 2013
Posts: 1,063
Received Thanks: 1,725
Quote:
Originally Posted by .Kibito View Post
Code:
mysql_query("update player.vw set points = points + ".. points[word] .." where pid = ".. pc.get_player_id() ..";"
Warum keine Questflags?
Naja das macht da jetzt nicht grade nen großen Unterschied.

Vorallem koenntest du so sogar noch auf der HP anzeigen lassen wer wieviel Punkte schon hat.
ProfessorEnte is offline  
Thanks
2 Users
Old 03/20/2014, 13:51   #13

 
elite*gold: 0
Join Date: Mar 2013
Posts: 2,449
Received Thanks: 6,448
Quote:
Originally Posted by .Kibito View Post
Code:
mysql_query("update player.vw set points = points + ".. points[word] .." where pid = ".. pc.get_player_id() ..";"
Warum keine Questflags?

Man kann es so besser verwalten
Lord iRemix is offline  
Old 03/20/2014, 14:13   #14

 
elite*gold: 1143
Join Date: Jun 2012
Posts: 800
Received Thanks: 399
1:1 nach dem Thread gegangen jedoch gehts natürlich nicht

Client geht nach der Einlogg meldung direkt zu.
x'Kyubi is offline  
Old 03/20/2014, 14:17   #15
 
Coniesan's Avatar
 
elite*gold: 1000
Join Date: Mar 2009
Posts: 1,407
Received Thanks: 1,005
Quote:
Originally Posted by ProfessorEnte View Post
Naja das macht da jetzt nicht grade nen großen Unterschied.

Vorallem koenntest du so sogar noch auf der HP anzeigen lassen wer wieviel Punkte schon hat.
NAJA player.quest *hust* ... prinzipiell genau so einfach ...! Aber jedem das Seine
Coniesan is offline  
Reply

Tags
verwarnsystem


Similar Threads Similar Threads
[SUCHE]Ticketsystem u. Verwarnsystem für hen!s CMS
02/01/2011 - Metin2 Trading - 4 Replies
Hey Leute, ich suche ein Ticketsystem für hen!s CMS Sowie ein Verwarnungssystem! Würde es entweder kostenlos nehmen, oder ne PSc dazugeben mfg Zander
[Release] FTool Extended
04/28/2010 - Flyff Hacks, Bots, Cheats, Exploits & Macros - 94 Replies
English: If you have questions, suggestions, hints or found any bugs it would be nice to post it here. There is a Readme file describing every feature of FTool Extended. You can edit the entries listed in the config.ini, the use of them are commented German: Falls jemand Fragen, Vorschläge, Tipps oder einen Bug gefunden hat, wäre es nett wenn ihr es hier postet. Es gibt eine Readme.txt Datei welche alle Features von Ftool Extended beschreibt.



All times are GMT +2. The time now is 13:31.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.