I need a guidance about how to make the npc only allows party members which are between level x ~ y (ex. lv 120-150) to enter the instance.
I tried to create one based on some examples but when the instance already generated, the underlevelled members which joins the party after the instance was generated can enter.
Some player can trick this restriction by adding their underlevelled char to the party when the instance has been generated.
prontera,155,172,6 script Mystic Instance 693,{
.@instance$ = "Mystic Cave";
set .@party_id,getcharid(1);
if (BaseLevel < 120) {
mes "[Worried Woman]";
mes "This is too dangerous, come back when you are level 120...";
close;
}
if (!.@party_id) {
mes "[Worried Woman]";
mes "Don't go there alone.";
mes "Why don't you at least organize a party?";
close;
}
if (instance_id()) { // ignore the console debug message (harmless)
mes "[Worried Woman]";
mes "You are already part of an instance.";
next;
switch(select("Enter Instance.:Cancel.")) {
case 1:
break;
case 2:
mes "[Worried Woman]";
mes "Please help my son?";
emotion e_sob;
close;
}
} else {
mes "[Worried Woman]";
mes "Help me traveler..";
next;
mes "[Worried Woman]";
mes "I beg you..please help me. My son... it's been a week. I am afraid if something bad happened on him.";
switch(select("Create Instance.:Cancel.")) {
case 1:
.@create = instance_create(.@instance$);
if (.@create < 0) {
mes "[Worried Woman]";
switch (.@create) {
case -1: mes "ERROR: Invalid type."; break;
case -2: mes "I think you are not ready for this."; break;
case -3: mes "Instance is on going."; break;
case -4: mes "No free instances."; break;
}
mes " ";
mes "Instance creation ^FF0000failed^000000.";
emotion e_omg;
close;
}
mes "[Worried Woman]";
mes "He went with prontera search party to find out a tree in weird cave. Please.. bring him back to me";
mes " ";
mes "Now entering the instance...";
next;
break;
case 2:
mes "[Worried Woman]";
mes "Okay. Maybe next time!";
close;
}
}
.@enter = instance_enter(.@instance$);
if (.@enter != 0) {
mes "[Worried Woman]";
switch (.@enter) {
case 1: mes "ERROR: Party not found."; break;
case 2: mes "ERROR: Party does not have an instance."; break;
case 3: mes "ERROR: Unknown error."; break;
}
mes " ";
mes "Instance entry ^FF0000failed^000000.";
emotion e_omg;
close;
}
close;
}
Question
Rizz
I have severali ssues:
I need a guidance about how to make the npc only allows party members which are between level x ~ y (ex. lv 120-150) to enter the instance.
I tried to create one based on some examples but when the instance already generated, the underlevelled members which joins the party after the instance was generated can enter.
Some player can trick this restriction by adding their underlevelled char to the party when the instance has been generated.
prontera,155,172,6 script Mystic Instance 693,{ .@instance$ = "Mystic Cave"; set .@party_id,getcharid(1); if (BaseLevel < 120) { mes "[Worried Woman]"; mes "This is too dangerous, come back when you are level 120..."; close; } if (!.@party_id) { mes "[Worried Woman]"; mes "Don't go there alone."; mes "Why don't you at least organize a party?"; close; } if (instance_id()) { // ignore the console debug message (harmless) mes "[Worried Woman]"; mes "You are already part of an instance."; next; switch(select("Enter Instance.:Cancel.")) { case 1: break; case 2: mes "[Worried Woman]"; mes "Please help my son?"; emotion e_sob; close; } } else { mes "[Worried Woman]"; mes "Help me traveler.."; next; mes "[Worried Woman]"; mes "I beg you..please help me. My son... it's been a week. I am afraid if something bad happened on him."; switch(select("Create Instance.:Cancel.")) { case 1: .@create = instance_create(.@instance$); if (.@create < 0) { mes "[Worried Woman]"; switch (.@create) { case -1: mes "ERROR: Invalid type."; break; case -2: mes "I think you are not ready for this."; break; case -3: mes "Instance is on going."; break; case -4: mes "No free instances."; break; } mes " "; mes "Instance creation ^FF0000failed^000000."; emotion e_omg; close; } mes "[Worried Woman]"; mes "He went with prontera search party to find out a tree in weird cave. Please.. bring him back to me"; mes " "; mes "Now entering the instance..."; next; break; case 2: mes "[Worried Woman]"; mes "Okay. Maybe next time!"; close; } } .@enter = instance_enter(.@instance$); if (.@enter != 0) { mes "[Worried Woman]"; switch (.@enter) { case 1: mes "ERROR: Party not found."; break; case 2: mes "ERROR: Party does not have an instance."; break; case 3: mes "ERROR: Unknown error."; break; } mes " "; mes "Instance entry ^FF0000failed^000000."; emotion e_omg; close; } close; }
I hope Rathena shifus can help me
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.