• 0
Sign in to follow this  
Rizta

R> simple first 99 rewarder

Question

well, as tittle says i want a npc that give a prize for the first player of each trans job(sniper, lord knight, high priest etc...).

Rules:

1. Only the FIRST 99/70 of each class.

2. Do not need to be account restricted, so, if a player reach 99/70 with different class he wll be able to collect the different prize.

3. Since every job will get a different weapon or whatever, every job will receive a set of the same prizes and one different.

[PLUS] - by equipment, it will be good if get with getnameditem and enchantend in 5 slots with random option, pre-defined. 

Thats all, i know this isnt hard but i really do not remember how to do the rule 1 and 2.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
-	script	maxlevelrewards	-1,{
OnPCBaseLvUpEvent:
OnPCJobLvUpEvent:
	if(BaseLevel == 99 && JobLevel == 70){
		[email protected]$ = Class;
		if(getd("#" + [email protected]$) == 0){
			for([email protected] = 0; [email protected] < getarraysize(.class_id); [email protected]++){
				if(Class != .class_id[[email protected]]){
					continue;
				}
				getitem .weapon_id[[email protected]],1;
				break;	
			}
			for([email protected] = 0; [email protected] < getarraysize(.item_reward); [email protected] += 2){
				getitem .item_reward[[email protected]],.item_reward[[email protected] + 1];
			}
			setd("#" + [email protected]$,1);
			dispbottom "Here is your rewards for the " + jobname(Class) + " job.";
		}
	}
	end;
		
OnInit:
	setarray .class_id,4008,4009,4010,4011,4012,4013,4015,4016,4017,4018,4019,4020,4021; //= Trans Class ID
	setarray .weapon_id,501,502,503,504,505,506,507,508,509,510,511,512,513; //= Weapon ID For Class
	setarray .item_reward,501,20,502,20; //= Item ID , Amount
	end;
}

Just add your plus things I don't know just copy in the doc or somewhere

Edited by Riel
  • Like 1

Share this post


Link to post
Share on other sites
  • 0
30 minutes ago, Riel said:
-	script	maxlevelrewards	-1,{
OnPCBaseLvUpEvent:
OnPCJobLvUpEvent:
	if(BaseLevel == 99 && JobLevel == 70){
		[email protected]$ = Class;
		if(getd("#" + [email protected]$) == 0){
			for([email protected] = 0; [email protected] < getarraysize(.class_id); [email protected]++){
				if(Class != .class_id[[email protected]]){
					continue;
				}
				getitem .weapon_id[[email protected]],1;
				break;	
			}
			for([email protected] = 0; [email protected] < getarraysize(.item_reward); [email protected] += 2){
				getitem .item_reward[[email protected]],.item_reward[[email protected] + 1];
			}
			setd("#" + [email protected]$,1);
			dispbottom "Here is your rewards for the " + jobname(Class) + " job.";
		}
	}
	end;
		
OnInit:
	setarray .class_id,4008,4009,4010,4011,4012,4013,4015,4016,4017,4018,4019,4020,4021; //= Trans Class ID
	setarray .weapon_id,501,502,503,504,505,506,507,508,509,510,511,512,513; //= Weapon ID For Class
	setarray .item_reward,501,20,502,20; //= Item ID , Amount
	end;
}

 

Thank you a lot. With this only the first one by class will receive the rewards, right? Awesome.

Do you know about my plus request? 😄

Edit: sorry i asked and didnt see you edited your asnwer XD ill try to do that 😉 

Edited by Rizta

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this