Jump to content
  • 0

Simple Password activated NPC


Question

Posted

Hey guys, I'm looking for a simple password activated NPC. For example, my password is "donkey"  and when someone enters the password donkey in the NPC, they will be given an Apple.

Is that possible?

healthydude

 

4 answers to this question

Recommended Posts

Posted
input @code$;
if(@code$ != "1234") {

 

change the variable type to STRING ....since you are comparing with a STRING and not NUMERIC characters.

 

or...

input @code;
if( @code != 1234 ) {
Posted
-	script	Sample	-1,{
OnWhisperGlobal:
	if( @whispervar0$ == "donkey" ){
		getitem 512,1;
	}
	end;
}

A script something like this bro: 

    mes "enter your password";
    set @code_,0;
    input @code_;
    if(@code_ != "1234") {
    mes "this is wrong";}
    mes "password is correct";
    mes "joke, its wrong";
    close;
    end;

but that doesn't work T_T

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...