Jump to content
  • 0

Question

Posted

-	script	Sample	-1,{
	OnPCLoginEvent:
		if ( !#enabled || #pw$ == "" ) end;
		sc_start SC_BERSERK, 1000000000, 1;
		mes .npc$;
		mes "Input your account password";
		next;
		input @pass$;
		if ( @pass$ == #pw$ ) {
			sc_end SC_BERSERK;
			percentheal 100, 100;
			end;
		}
                sc_end SC_BERSERK;
		atcommand "@kick " +strcharinfo(0);
		end;
	OnSecurity:
		mes .npc$;
		mes "Hello " +strcharinfo(0)+ ", What can i do for you?";
		next;
		switch (select("Password Protection ( "+(#enabled?"^009933Enabled":"^FF0000Disabled")+"^000000 ):Setup a password:Delete my password:Nothing")) {
			case 1: if ( #pw$ == "" ) {
						mes .npc$;
						mes "You cannot enable the password protection if you don't have a password.";
						close;
					}
					if ( #enabled ) #enabled = 0;
					else #enabled = 1;
					message strcharinfo(0),"You have " +(#enabled?"enabled":"disabled")+ " the security system on your account";
					break;
			case 2: if ( #pw$ != "" ) {
						mes .npc$;
						mes "You already have a password for your account.";
						close;
					}
					mes .npc$;
					mes "Input your account password";
					next;
					input @pw$;
					if ( @pw$ == "" ) end;
					#pw$ = @pw$;
					message strcharinfo(0),"You have set your account password (" +#pw$+ ")";
					break;
			case 3: if ( #pw$ == "" ) {
						mes .npc$;
						mes "You don't have a password to delete.";
						close;
					}
					#pw$ = "";
					if ( #enabled ) #enabled = 0;
					message strcharinfo(0),"You have deleted your account password";
					break;
			case 4: break;
			default: break;
		}
		end;

	OnInit:
		.npc$ = "[ ^FF0000" +strnpcinfo(1)+ "^000000 ]";
		bindatcmd "security",strnpcinfo(3)+"::OnSecurity";
		end;
}

So as you can see this is working already. Would it be possible that a character in this state (Berserk) couldn't be recalled by a GM or Ecalled by a Guild? Just wondering because I was trying to put a security. If  there's a way please help me :) Thank you guys

Already solved this one w/ another script. I don't know how to delete threads. Sorry.

1 answer to this question

Recommended Posts

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...