Skip to content

Commit

Permalink
Corrected the doc instancing sample (rathena#4671)
Browse files Browse the repository at this point in the history
  • Loading branch information
Atemo authored Feb 28, 2020
1 parent 968b43c commit 3ddf8c5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doc/sample/instancing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
prontera,151,190,6 script Sample Instance 101,{
.@instance$ = "Abyss Lake Instance";

if (instance_id()) { // ignore the console debug message (harmless)
if (instance_live_info(ILI_NAME, instance_id(IM_PARTY)) == .@instance$) { // the instance "Abyss Lake Instance" is running
mes "[Sample Instance]";
mes "You are already part of an instance.";
next;
Expand All @@ -30,7 +30,13 @@ prontera,151,190,6 script Sample Instance 101,{
emotion ET_CRY;
close;
}
} else {
}
else if (instance_id(IM_PARTY)) { // another instance is running
mes "[Sample Instance]";
mes "You are part of the instance " + instance_live_info(ILI_NAME, instance_id(IM_PARTY)) + ".";
close;
}
else {
mes "[Sample Instance]";
mes "Would you like to try the sample instance in Abyss Lake 3?";
next;
Expand Down

0 comments on commit 3ddf8c5

Please sign in to comment.