Jump to content
  • 0

(Request)Max level rewards npc


Question

Posted (edited)

Need your help!

I need a Max level rewards NPC.

1 account can redeem once and its only for the 50 players. An announcement will be made when a player redeem the rewards.

 

Edited by ahloi007

7 answers to this question

Recommended Posts

  • 0
Posted (edited)
prontera,0,0,0	script	npc_name	444,{
	if($MAX_LEVEL_REWARDS_50 < 50){
		if(!#MAX_LEVEL_REWARDS_50){
			if(BaseLevel == 99){
				mes "you can redeem the reward once per account!";
				if(select("redeem with this char:close") == 2)
					end;
				#MAX_LEVEL_REWARDS_50 = true;
				$MAX_LEVEL_REWARDS_50++;
				mes "you got the reward!";
				announce "Player '" + strcharinfo(0) + "' has redeemed his max level reward!",0;
				//===========================
				getitem 502,1;//add what you want to give like this.
				
				//===========================
				close;
			}else{
				mes "you are not at the max level!";
				close;
			}
		}else{
			mes "you alewady redeemed the reward with another char!";
			close;
		}
		
	}else{
		mes "All the rewards has been redeemed!";
		close;
	}
}

 

Edited by sader1992
  • 0
Posted
prontera,0,0,0	script	npc_name	444,{
	if($MAX_LEVEL_REWARDS_50 < 50){
		if(!#MAX_LEVEL_REWARDS_50){
			if(BaseLevel == MAX_LEVEL){
				mes "you can redeem the reward once per account!";
				if(select("redeem with this char:close") == 2)
					end;
				#MAX_LEVEL_REWARDS_50 = true;
				$MAX_LEVEL_REWARDS_50++;
				mes "you got the reward!";
				announce "Player '" + strcharinfo(0) + "' has redeemed his max level reward!",0;
				//===========================
				getitem 502,1;//add what you want to give like this.
				
				//===========================
			}else{
				mes "you are not at the max level!";
				close;
			}
		}else{
			mes "you alewady redeemed the reward with another char!";
			close;
		}
		
	}else{
		mes "All the rewards has been redeemed!";
		close;
	}
}

 

  • 0
Posted
1 hour ago, sader1992 said:

prontera,0,0,0	script	npc_name	444,{
	if($MAX_LEVEL_REWARDS_50 < 50){
		if(!#MAX_LEVEL_REWARDS_50){
			if(BaseLevel == MAX_LEVEL){
				mes "you can redeem the reward once per account!";
				if(select("redeem with this char:close") == 2)
					end;
				#MAX_LEVEL_REWARDS_50 = true;
				$MAX_LEVEL_REWARDS_50++;
				mes "you got the reward!";
				announce "Player '" + strcharinfo(0) + "' has redeemed his max level reward!",0;
				//===========================
				getitem 502,1;//add what you want to give like this.
				
				//===========================
			}else{
				mes "you are not at the max level!";
				close;
			}
		}else{
			mes "you alewady redeemed the reward with another char!";
			close;
		}
		
	}else{
		mes "All the rewards has been redeemed!";
		close;
	}
}

 

Hi sader, thanks for your reply.

This script doesn't work when I was redeem with my max level character,

it said that "you are not at the max level!"

What should I do?

Sorry Im still in learning stage.

  • 0
Posted

replace 

MAX_LEVEL

with a number , the max level you have 

for example if 99

prontera,0,0,0	script	npc_name	444,{
	if($MAX_LEVEL_REWARDS_50 < 50){
		if(!#MAX_LEVEL_REWARDS_50){
			if(BaseLevel == 99){
				mes "you can redeem the reward once per account!";
				if(select("redeem with this char:close") == 2)
					end;
				#MAX_LEVEL_REWARDS_50 = true;
				$MAX_LEVEL_REWARDS_50++;
				mes "you got the reward!";
				announce "Player '" + strcharinfo(0) + "' has redeemed his max level reward!",0;
				//===========================
				getitem 502,1;//add what you want to give like this.
				
				//===========================
			}else{
				mes "you are not at the max level!";
				close;
			}
		}else{
			mes "you alewady redeemed the reward with another char!";
			close;
		}
		
	}else{
		mes "All the rewards has been redeemed!";
		close;
	}
}

 

  • 0
Posted (edited)
11 minutes ago, sader1992 said:

replace 


MAX_LEVEL

with a number , the max level you have 

for example if 99


prontera,0,0,0	script	npc_name	444,{
	if($MAX_LEVEL_REWARDS_50 < 50){
		if(!#MAX_LEVEL_REWARDS_50){
			if(BaseLevel == 99){
				mes "you can redeem the reward once per account!";
				if(select("redeem with this char:close") == 2)
					end;
				#MAX_LEVEL_REWARDS_50 = true;
				$MAX_LEVEL_REWARDS_50++;
				mes "you got the reward!";
				announce "Player '" + strcharinfo(0) + "' has redeemed his max level reward!",0;
				//===========================
				getitem 502,1;//add what you want to give like this.
				
				//===========================
			}else{
				mes "you are not at the max level!";
				close;
			}
		}else{
			mes "you alewady redeemed the reward with another char!";
			close;
		}
		
	}else{
		mes "All the rewards has been redeemed!";
		close;
	}
}

 

The npc works! thanks!

but I found a bug, when I was succeed to redeem, it stuck at the npc chat box there without a "close" button.

Should I add on 

				mes "you got the reward!";
				announce "Player '" + strcharinfo(0) + "' has redeemed his max level reward!",0;
				//===========================
				getitem 502,1;//add what you want to give like this.
				close;

 

Edited by ahloi007
Add on words
  • 0
Posted
2 minutes ago, sader1992 said:

prontera,0,0,0	script	npc_name	444,{
	if($MAX_LEVEL_REWARDS_50 < 50){
		if(!#MAX_LEVEL_REWARDS_50){
			if(BaseLevel == 99){
				mes "you can redeem the reward once per account!";
				if(select("redeem with this char:close") == 2)
					end;
				#MAX_LEVEL_REWARDS_50 = true;
				$MAX_LEVEL_REWARDS_50++;
				mes "you got the reward!";
				announce "Player '" + strcharinfo(0) + "' has redeemed his max level reward!",0;
				//===========================
				getitem 502,1;//add what you want to give like this.
				
				//===========================
				close;
			}else{
				mes "you are not at the max level!";
				close;
			}
		}else{
			mes "you alewady redeemed the reward with another char!";
			close;
		}
		
	}else{
		mes "All the rewards has been redeemed!";
		close;
	}
}

 

Okay Got it xD 

TQVM!!

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