Jump to content
  • 0

password in game


youtube

Question


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

let say security for normal player.

 

login to Ragnarok online
password to Ragnarok online

 

character select to Ragnarok online

 

Password in game .. before go to play ..

 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   11
  • Joined:  02/20/13
  • Last Seen:  

Should be a way for it to work. Why not just use the PIN system that was recently developed.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

PIN systeM??

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

http://code.google.com/p/ea-addicts/downloads/detail?name=gmprotect.txt&can=2&q=

I made a system for GM account like that awhile back. I've been asked to make it more friendly with an sql database which won't be hard then you could use it as a secondary ingame password.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

this is work?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

//Skorm
//Gm Protection v2
//SQL

/* Run this Query before installing this script!
CREATE TABLE IF NOT EXISTS `gmprotect` (
  `account_id` int(11) unsigned NOT NULL default '0',
  `password` varchar(24) NOT NULL default '',
  `gm_level` int(11) unsigned NOT NULL default '0',
  `switch` BOOLEAN NOT NULL default '0',
  PRIMARY KEY  (`account_id`)
) ENGINE=MyISAM;
*/

-	script	GMPROTECT	-1,{
	OnPCLoginEvent:
		set .@p, query_sql("SELECT `password`,`switch` FROM `gmprotect` WHERE `account_id` = "+getcharid(3)+";",.@pass$,.@a);
		if( getgmlevel() <= .bypass && .@a ) {
			if( !.norm && !getgmlevel() ) end;
			if(!.@p) {
				mes "I see it's your first time logging in!";
				mes "Would you like to set a login password?";
				next;
				if(select("Yes:No")&2) {
					query_sql "INSERT INTO `gmprotect` (`account_id`,`gm_level`) VALUES ('"+getcharid(3)+"',"+getgmlevel()+");";
					mes "Alright, maybe next time.";
					close;
				}
				pass:
				mes "Please input your password.";
				input(.@pass$);
				while(.@pass$!=.@pass2$) {
					mes "Again.";	input(.@pass2$);	set .@z,.@z+1;
					if(.@z>1){
						mes "I'm sorry, but your passwords didn't match, try again?";
						next;
						if(select("Yes:No")&2) {
							mes "Alright, maybe next time.";
							query_sql "INSERT INTO `gmprotect` (`account_id`,`gm_level`) VALUES ('"+getcharid(3)+"',"+getgmlevel()+");";
							close;
						}
						set .@z,0;
						goto pass;
					}
				}
				query_sql "INSERT INTO `gmprotect` (`account_id`,`password`,`gm_level`,`switch`) VALUES ('"+getcharid(3)+"','"+escape_sql(((.md5)?md5(.@pass$):.@pass$))+"',"+getgmlevel()+",1);";
				mes "Don't forget your password has been set to ["+.@pass$+"].";
				close;
			}
			setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer;
			atcommand "@mute 100 "+strcharinfo(0);
			mes "Please input your password, before 60 seconds are up.";
			next;
			input(.@input$);
			if(((.md5)?md5(.@input$):.@input$) == .@pass$) {
				mes "Welcome back!";
				close2;
				stopnpctimer;
				if(playerattached()){
					set .@g,1; callfunc "unlocker",strcharinfo(0),getcharid(3),.@g;
				}
			} else {
				mes "Incorrect!";
				close2;
				if(playerattached()){
					callfunc "unlocker",strcharinfo(0),getcharid(3),.@g;
				}
			}
			
		}
	end;
	OnTimer10000:
		if(playerattached()){
			callfunc "unlocker",strcharinfo(0),getcharid(3),.@g;
		}
	end;
	OnInit:
		set .bypass, 100; //GMs this level or greater don't need passwords.
		set .md5, 0; //MD5 Passwords this is for added security (1=on:0=off) rAthena Only!
		set .norm, 1; //Enable Passwords for normal players (1=on:0=off)
		end;
}

//Example Changing Password NPC
prontera,162,191,3	script	Pass Setting	100,{
begin:
	query_sql("SELECT `password`,`switch` FROM `gmprotect` WHERE `account_id` = "+getcharid(3)+";",.@pass$,.@a);
	mes "Would you like to change or set a login password?";
	next;
	select("Change Password:Online Pass["+((.@a)?"On":"Off")+"]:Cancel");
	if(@menu==3) {
		mes "Alright, maybe next time.";
		close;
	}
	if(@menu==1){
		mes "Please input your old password.";
		next;
		input(.@pass1$);
		if(((.md5)?md5(.@pass1$):.@pass1$)==.@pass$){
			pass:
				mes "Please input your new password.";
				next;
				input(.@pass$);
				while(.@pass$!=.@pass2$) {
					mes "Again.";	input(.@pass2$);	set .@z,.@z+1;
					if(.@z>1){
						mes "I'm sorry, but your passwords didn't match, try again?";
						next;
						if(select("Yes:No")&2) {
							mes "Alright, maybe next time.";
							close;
						}
						set .@z,0;
						goto pass;
					}
				}
				query_sql "UPDATE `gmprotect` SET `password`='"+((.md5)?md5(.@pass$):.@pass$)+"', `switch`=1 WHERE `account_id`="+getcharid(3)+";";
				mes "Don't forget your password has been set to ["+.@pass$+"].";
				close;
		} else {
			mes "Sorry that's not your old password!";
			close;
		}
	} else {
		query_sql "UPDATE `gmprotect` SET `switch`="+((.@a)?0:1)+" WHERE `account_id`="+getcharid(3)+";";
		goto begin;
	}
	end;
	
	OnInit:
		set .md5, 0; //MD5 Passwords this is for added security (1=on:0=off) rAthena Only!
		end;
}

function	script	unlocker	{
	detachrid;
	if(getarg(2)){
		atcommand "@unmute "+getarg(0);
		end;
	}
	atcommand "@unmute "+getarg(0);
	attachrid(getarg(1));
	atcommand "@kick "+getarg(0);
	end;
}
It works but for some reason if I get the password wrong my map server crash. Can you test it and tell me if you get the same problem. tytyty

My map server is unstable it's hard to compare with others.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

is work madam but i want for normal player onli if i change gm level 99 to 1?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

is work madam but i want for normal player onli if i change gm level 99 to 1?

Change:
set .bypass, 100;
To:
set .bypass, 0;
Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

i think need SQL table but i dont know how to create a table

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

CREATE TABLE IF NOT EXISTS `gmprotect` (
`account_id` int(11) unsigned NOT NULL default '0',
`password` varchar(24) NOT NULL default '',
`gm_level` int(11) unsigned NOT NULL default '0',
`switch` BOOLEAN NOT NULL default '0',
PRIMARY KEY (`account_id`)
) ENGINE=MyISAM;

 

Run that like you would run an SQL script it will create the table you need, but make sure your main database (ragnarok not logs) is selected.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

i use SNV on my PC only madam

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...