Jump to content
  • 0

NPC reward constantly given need help


Question

Posted

hello

i have a race to 99 event reward npc , but it keeps giving the reward.
i get no errors on map server
can someone help me out

It supposed to give the reward 1 time when you reached base 99 and job 50
but now it keeps giving it regardless

 

payo2,75,115,5	script	Race to 99 Reward NPC	99,{

if(BaseLevel < 99 && LReward= 1) goto OnDeny;
else
if( JobLevel == 50 && BaseLevel == 99 && LReward == 0 ) goto OnAllow;



OnDeny:
mes "You don't have the required level yet.";
mes "Come back when you reached it - Base Level 99 - Job Level 50!";
close;


OnAllow:
set .@MaxBLevel,99; //Set your servers max base level here.
set .@MaxJLevel,50;  //Set your servers max job level here.
set .@item,6046;      //Set your reward item here.
set .@item2,7539;
set .@item3,23025;
set .@item4,23034;
set LReward,1;

mes "Congratulations, you've reached the max level in the server, here's your reward!";
getitem .@item,3;
getitem .@item2,25;
getitem .@item3,1;
getitem .@item4,1;
set LReward,1;
end;

}

 

5 answers to this question

Recommended Posts

  • 0
Posted (edited)
payo2,75,115,5	script	Race to 99 Reward NPC	99,{
.@MaxBLevel = 99; //Set your servers max base level here.
.@MaxJLevel = 50;  //Set your servers max job level here.
setarray .@item, // set rewards
	6046, 3, // <ID>, <AMT>
	7539, 25,
	23025, 1,
	23034, 1;
if ( LReward ) { // checks if you already get the reward.
	mes "No more rewards.";
	close;
}
if(BaseLevel < .@MaxBLevel &&  JobLevel < .@MaxJLevel ) {
	mes "You don't have the required level yet.";
	mes "Come back when you reached it - Base Level "+.@MaxBLevel+" - Job Level "+.@MaxJLevel+"!";
	close;
}
mes "Congratulations, you've reached the max level in the server, here's your reward!";
close2;
LReward = true; // sets LReward to true which means you already get your item.
for(.@i=0;.@i<getarraysize(.@item);.@i+=2)
	getitem .@item[.@i], .@item[.@i+1];
end;
}

 

Edited by pajodex
  • 0
Posted
21 hours ago, pajodex said:

payo2,75,115,5	script	Race to 99 Reward NPC	99,{
.@MaxBLeve = 99; //Set your servers max base level here.
.@MaxJLevel = 50;  //Set your servers max job level here.
setarray .@item, // set rewards
	6046, 3, // <ID>, <AMT>
	7539, 25,
	23025, 1,
	23034, 1;
if ( LReward ) { // checks if you already get the reward.
	mes "No more rewards.";
	close;
}
if(BaseLevel < .@MaxBLevel &&  JobLevel < .@MaxJLevel ) {
	mes "You don't have the required level yet.";
	mes "Come back when you reached it - Base Level "+.@MaxBLevel+" - Job Level "+.@MaxJLevel+"!";
	close;
}
mes "Congratulations, you've reached the max level in the server, here's your reward!";
close2;
LReward = true; // sets LReward to true which means you already get your item.
for(.@i=0;.@i<getarraysize(.@item);.@i+=2)
	getitem .@item[.@i], .@item[.@i+1];
end;
}

 

Thanks for the help, but the script gives it to players below 99/50 as well.

 

  • 0
Posted (edited)
12 minutes ago, BFPkiller said:

Thanks for the help, but the script gives it to players below 99/50 as well.

Edited my first post.. I accidentally put ".@MaxBLeve" instead of ".@MaxBLevel"

Edited by pajodex
  • 0
Posted (edited)
if(BaseLevel < .@MaxBLevel &&  JobLevel < .@MaxJLevel ) {
	mes "You don't have the required level yet.";
	mes "Come back when you reached it - Base Level "+.@MaxBLevel+" - Job Level "+.@MaxJLevel+"!";
	close;
}

to

if(BaseLevel < .@MaxBLevel ||  JobLevel < .@MaxJLevel ) {
	mes "You don't have the required level yet.";
	mes "Come back when you reached it - Base Level "+.@MaxBLevel+" - Job Level "+.@MaxJLevel+"!";
	close;
}

 

Edited by Hijirikawa
  • 0
Posted

Thanks Both of you !

Little stupid i didnt see it myself :S

Again Big Thanks !!

HI

i found a bug still
it gives the reward also when lvl 87/50 , supposed to be 99/50. 

payo2,65,154,5	script	Race to 99 Reward NPC	99,{
.@MaxBLevel = 99; //Set your servers max base level here.
.@MaxJLevel = 50;  //Set your servers max job level here.
setarray .@item, // set rewards
	6046, 3, // <ID>, <AMT>
	7539, 25,
	23025, 1,
	23034, 1;
if ( LReward ) { // checks if you already get the reward.
	mes "No more rewards.";
	close;
}
if(BaseLevel < .@MaxBLevel &&  JobLevel < .@MaxJLevel ) {
	mes "You don't have the required level yet.";
	mes "Come back when you reached it - Base Level "+.@MaxBLevel+" - Job Level "+.@MaxJLevel+"!";
	close;
}
mes "Congratulations, you've reached the maximum level in the server!!, here's your reward!";
close2;
LReward = true; // sets LReward to true which means you already get your item.
for(.@i=0;.@i<getarraysize(.@item);.@i+=2)
	getitem .@item[.@i], .@item[.@i+1];
end;
}

hope you can help

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