Jump to content
  • 0

Array's Valid Code


Question

Posted
prontera,154,139,4	script	Freebies	642,{

if( !#NEWBIE ) goto L_NEWBIE;
	mes "[ ^0000FF Freebies^000000 ]";	
	mes "Your @newbie command is : ^008800Available^000000";
	close;
OnInit:
	bindatcmd "newbie",strnpcinfo(3)+"::OnNewbie";
	setarray .@FREEBIESCODE$[0],
	"tJEPmtSoTDKC2C",
	"huHopok46L2vCw",
	"fhjyw5GwVBtqBS",
	"ZHsWP58YjFcfea",
	"VafHWrqZxrXXac";

L_NEWBIE:
	mes "[ ^0000FF  Freebies^000000 ]";
	mes "Please input the the code that our staff gave you, it is the proof that you acquire all the need conditions before getting our freebies";
	next;
	input .@freebiecode$;
	if (.@freebiecode$ != .@FREEBIESCODE$) {
	mes "[ ^0000FF Freebies^000000 ]";
	mes "It's either you mistype it or you really don't have the code";	
	close;
}
	mes "[ ^0000FF Freebies^000000 ]";
	mes "Congratulations!";
	mes "your @newbie command is now activated";
	set #NEWBIE,1;
	close;

OnNewbie:
if( !#NEWBIE ) goto L_NEWBIEDEACT;
if( #NEWBIE == 2 ) goto L_NEWBIEUSED;
	dispbottom "@newbie command used";
	getitem 2357,1;
	getitem 2524,1;
	getitem 2421,1;
	getitem 2115,1;
	getitem 20381,1;
	getitem 14545,5;
	rentitem 2741,604800;
	set #NEWBIE,2;

L_NEWBIEUSED:
	dispbottom "You already used the @newbie command";
	end;
	
L_NEWBIEDEACT:
	dispbottom "Your @newbie command is still deactivated";
	end;
}


}

im having problem with the array  and to this 

if (.@freebiecode$ != .@FREEBIESCODE$) {

well, i want the players to enter a valid code on the input, the possible codes are on the array to activate the newbie command..

the problem is i dunno how it can work...xD

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