Jump to content
  • 0

level and class check on freebies script


celeron0134

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   1
  • Joined:  12/13/16
  • Last Seen:  

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 .@maxbase, 99;
	set .@maxjob, 50;
	setarray .@rewardablejobs[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

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

try

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

	if (.@i >= .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;

 

  • Upvote 1
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...