Jump to content
  • 0
celeron0134

level and class check on freebies script

Question

prontera,244,55,4	script	Freebies	718,{
if( !#Freebies ){
set #Freebies,1;
mes "Welcome to MyServerNameHere, Here are your start items!";
mes "You only get this once for each account!";
getitembound 31957,2,1;
end;
}else{
mes "You have claimed the Reward already.";
end;

OnInit:
waitingroom "Freebies",0;
end;
}
}

hello kindly help me adding class check and level check on this NPC

	set [email protected], 99;
	set [email protected], 50;
	setarray [email protected][0], Job_Knight, Job_Alchemist, Job_Assassin, Job_Bard, Job_Blacksmith, Job_Crusader, Job_Dancer, Job_Hunter, Job_Monk, Job_Priest, Job_Rogue, Job_Sage, Job_Wizard;

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

try

prontera,244,55,4	script	Freebies	718,{
	while (.rewardable_jobs[[email protected]] != Class && [email protected] < .rewardable_jobs_size) [email protected]++;

	if ([email protected] >= .rewardable_jobs_size) {
		mes "Your job class aren't eligible.";
	}
	else if (BaseLevel < .max_base || JobLevel < .max_job) {
		mes "Required "+.max_base+"/"+.max_job+".";
	}
	else if (#Freebies) {
		mes "You have claimed the Reward already.";
	}
	else {
		#Freebies = 1;
		mes "Welcome to MyServerNameHere, Here are your start items!";
		mes "You only get this once for each account!";
		getitembound 31957,2,1;
	}
	close;

OnInit:
	.max_base = 99;
	.max_job = 50;
	setarray .rewardable_jobs, Job_Knight, Job_Alchemist, Job_Assassin, Job_Bard, Job_Blacksmith, Job_Crusader, Job_Dancer, Job_Hunter, Job_Monk, Job_Priest, Job_Rogue, Job_Sage, Job_Wizard;
	.rewardable_jobs_size = getarraysize(.rewardable_jobs);
	end;

 

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.