Security System (Imcomplete)

08/17/2014 12:52 oceanusPT#1
Hi there,

i trie to make one Security System. The ideia is, when u login for the first time u have to create one PIN. Then when u login u have to put de same PIN. If u can,t do it u will be logout or u will be ban for 24Hours.


i belive i have create one big part of it, but i realy cant make it all.... cuz i realy dont know :\

If any one can Complete it, i belive we all say tks!

Code:
quest security begin
    state start begin
		when login or levelup with pc.level >= 20 and pc.getqf("security_make") == 0 begin
			timer("security_timer1", 2)
		end
		
		when security_timer1.timer begin
			say("Oceanus Security System")
			say("")
			say("Por favor escolhe um PIN.")
			say("Sempre que logares a tua conta este PIN irá ser-te")
			say("pedido. Tens 5 tentativas para colocar o PIN")
			say("correcto. Caso falhes as 5 tentativas, a tua conta")
			say("irá ficar Bloqueada 24 horas.")
			say("")
			say_reward("Oceanus Security System was made by:")
			say_reward("[ADM]Oceanus")
			say("")
			local a = select("Escolher PIN","Não escolher PIN")
			if a == 2 then
			say("Oceanus Security System")
			say("")
			say("Felizmente para ti vais ter mesmo de usar um.")
			say("Caso não escolhas o PIN esta mensagem não")
			say("irá desaparecer. ")
			say("Teleporta-te ou reloga a conta para escolheres")
			say("o PIN de segurança.")
			say("")
			return
			end
			say_reward("Máximo 9 números.")
			if a == 1 then 
			say("Oceanus Security System")
			say("")
			say("")
			say_reward("Máximo 9 números.")
			say("um PIN maior que 9 digitos poderá não ficar")
			say("registado e ao logares a tua conta esta")
			say("poderá ficar Bloqueada!")
			say("")
				local t = input() 
				local securitya = mysql_query("SELECT security from player.player WHERE id='"..pc.get_player_id().."' LIMIT 1")  
				local lotarityb = mysql_query("UPDATE player.player SET security ='"..(t).."' WHERE id ='"..pc.get_player_id().."' LIMIT 9")
				syschat("PIN escolhido: "..(t).." por favor não o esqueças.")
				pc.setqf("security_make", 2)
			end
		end
	end
	
	state start begin
		when login or levelup with pc.level >= 20 and pc.getqf("security_make") == 2 begin
			timer("security_timer2", 1)
		end
		
		when security_timer2.timer begin
			say("Oceanus Security System")
			say("")
			say("Por favor introduz o PIN.")
			say("")
			local p = input()
			if p == securitya then
			say("Oceanus Security System")
			say("")
			say("acho que esta certo")
			say("")
			end
			
		end
	end
end
08/17/2014 13:47 DasSchwarzeT#2
If it's working it's really useful. Thanks
08/17/2014 13:53 Lord iRemix#3
Quote:
Originally Posted by DasSchwarzeT View Post
If it's working it's really useful. Thanks
That won't secure the accounts.
If you have to input the pin you just can press ESC and you don't need to input it anymore.
08/17/2014 13:55 lollo_9_1#4
Quote:
Originally Posted by oceanusPT View Post
Code:
				local t = input()
				local lotarityb = mysql_query("UPDATE player.player SET security ='"..(t).."' WHERE id ='"..pc.get_player_id().."' LIMIT 9")
>dat sql injection
That "limit 9" has no sense. (at the very least, "limit 4" should be appropriate)
08/17/2014 14:23 oceanusPT#5
Like i say, the quest is incomplete. I'm a noob in quest making. But i trie!
the first part, ask one pin and save it in msql player is 100% complete.

but then we need to check PIN, and i dont know how to make it.
the first part may have one or two errors, but im no perfect xD

lets do it work.

Quote:
Originally Posted by [iRemix] View Post
That won't secure the accounts.
If you have to input the pin you just can press ESC and you don't need to input it anymore.
when u login, it will ask one pin again. If u press ESQ, it will return.
this will loop until u put some pin.
08/17/2014 14:33 DasSchwarzeT#6
Quote:
Originally Posted by [iRemix] View Post
That won't secure the accounts.
If you have to input the pin you just can press ESC and you don't need to input it anymore.
I think a fitting GUI in e.g. charselect might be useful
08/17/2014 14:40 oceanusPT#7
Quote:
Originally Posted by DasSchwarzeT View Post
I think a fitting GUI in e.g. charselect might be useful
yes, it will! But .... How to make it xD
All this kind of system i have found it's pay. So i trie to make one for free xD
08/17/2014 14:46 Lord iRemix#8
Quote:
Originally Posted by oceanusPT View Post
when u login, it will ask one pin again. If u press ESQ, it will return.
this will loop until u put some pin.
No.
The check is called once.
But even if the typed pin is wrong nothing will happen.
08/17/2014 15:00 oceanusPT#9
My inglish is bad, and i know it. But i belive u understand me. Like i say, the quest is INCOMPLETE. The first part us ok. But i dont know how to make it to check the PIN. Do u understand this? Lol!
08/17/2014 15:18 aok96boom#10
Then i think there is no point to post it, when it will be full completed post it.
08/17/2014 15:22 lollo_9_1#11
Quote:
Originally Posted by oceanusPT View Post
If any one can Complete it, i belive we all say tks!
Quote:
Originally Posted by oceanusPT View Post
My inglish is bad, and i know it. But i belive u understand me. Like i say, the quest is INCOMPLETE. The first part us ok. But i dont know how to make it to check the PIN. Do u understand this? Lol!
I reported bugs and stuff. If you can't even accept such comments, why are you here?
Will you blame us for helping who will try to fix that thing?
08/17/2014 15:47 oceanusPT#12
Quote:
Originally Posted by lollo_9_1 View Post
I reported bugs and stuff. If you can't even accept such comments, why are you here?
Will you blame us for helping who will try to fix that thing?

i can't acept comments? wtf! lol. He only say "dont work".... dam, i have told that -.-

lols. Nevermind... and btw i made it working.


#Closerequest.

Quote:
Originally Posted by lollo_9_1 View Post
I reported bugs and stuff. If you can't even accept such comments, why are you here?
Will you blame us for helping who will try to fix that thing?

i can't acept comments? wtf! lol. He only say "dont work".... dam, i have told that -.-

lols. Nevermind... and btw i made it working.


Quote:
Originally Posted by lollo_9_1 View Post
who will try to fix that thing?
do u have better made by u?

#Closerequest.
08/17/2014 15:56 Lord iRemix#13
The check won't work because the variable securitya doesn't exist.
You've declared it as a local variable in another if block so it doesn't exist at the check.
08/17/2014 16:33 Metin2 Team#14
what is the point ? if you give someone your password or if you register with a lousy so it's your problem not mine .. I won't use something annoying like that :|
08/17/2014 16:37 Chikyou#15
Quote:
Originally Posted by oceanusPT View Post
do u have better made by u?
Well, he definitely can do it better than you (that's not even hard). No offense, however, by reading your comments you only show us how ignorant you are and 'cause of that, these are the kind of comments you're looking for.

Hope you learn more, and someday, you can do a better crap. :D