The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades.
×
- 0
Instance with multiple Instance names
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
Eross
Hi ! I would like to ask if is it possible to have an array of Instance names (.@instance_name$)??
For example :
//prontera,155,181,5 script Guild Instance Officer 418,{ moc_para01,52,32,4 script Guild Instance Officer 418,{ .@InstanceCooldown = 28800; .@name$ = "["+strnpcinfo(0)+"]"; setarray .@instance_name$[0] = "gld_dun01","gld_dun02","gld_dun03","gld_dun04"; //if (!is_party_leader()) { mes .@name$; mes "You must be a party leader"; end;}; mes .@name$; mes "Today's featured instance guild dungeon is [^000088"+.@instance_name$+"^000000]!"; mes "What would you like to do?"; next; switch(select( "~ ^FF6900Create Instance^000000 -> 1,000,000 Z", "~ ^000088Enter Instance^000000 [^777777"+.@instance_name$+"^000000] -> 200,000 Z", "~ ^FF0000Destroy Current Instance^000000")) { case 1: if (#CD > gettimetick(2)) { mes .@name$; mes "You can create new instance after " + Time2Str(CD) + "."; end; } if (!is_party_leader()) { mes .@name$; mes "Only party leader can create an instance."; end;}; if (instance_picker > 0) { mes .@name$; mes "You have already created one. Kindly destroy instance before getting new one."; end; } callsub(OnCheckZenyCreate); #CD = gettimetick(2) + .@InstanceCooldown; instance_create(.@instance_name$, IM_PARTY); instance_picker = 1; specialeffect2 75; break; case 2: mes .@name$; mes "^FF0000Please note that Token of^000000"; mes "^FF0000Siegfried, Kafra Card^000000"; mes "^FF0000infinite fly wing and any teleport^000000"; mes "^FF0000skills are not allowed inside.^000000"; next; mes .@name$; mes "Ah! I almost Forgot, all guild"; mes "dungeons have two Bow and Sword Guardians."; next; if (select("Enter now","Cancel")==2) end; if ((countitem(40036) || countitem(12887) || countitem(40014) || countitem(12323) || countitem(40028) || countitem(6293) || countitem(40114) || countitem(12211) || countitem(40114) || countitem(40029) || countitem(13602) || countitem(14211) || countitem(13603) || countitem(14212) || countitem(12909) || countitem(14165) || countitem(7621) || countitem(13601) || countitem(14210) || countitem(13600) || countitem(14209) || countitem(12922) || countitem(14178)) > 0 ) { mes .@name$; mes "Kafra Card, Token of Siegfried or Flywing item or boxes on your inventory."; end; } switch(instance_enter(.@instance_name$)) { case IE_NOMEMBER: mes .@name$; mes "ERROR: Party not found."; break; case IE_NOINSTANCE: mes .@name$; mes "ERROR: Party does not have an instance."; break; case IE_OTHER: mes .@name$; mes "ERROR: Unknown error."; break; default: callsub(OnCheckZenyEntry); #CD = gettimetick(2) + .@InstanceCooldown; //announce "Player ["+strcharinfo(0)+"] has entered Guild Dungeon ["+.@instance_name$+"]!",BC_ALL; break; } break; case 3: if (instance_picker <= 0) { mes .@name$; mes "No current instance available to destroy."; end; } mes .@name$; mes "Are you sure you want to destroy ["+.@instance_name$+"] instance?"; switch (select("I'm 100% sure!","No, cancel it!")) { case 1: dispbottom "["+.@instance_name$+"] instance has been destroyed."; instance_destroy(instance_id(IM_PARTY)); specialeffect2 677; instance_picker = 0; break; case 2: end; } } close; OnCheckZenyCreate: .@name$ = "["+strnpcinfo(0)+"]"; if (Zeny < 1000000) { mes .@name$; mes "You don't have enough zeny to enter this instance."; end; } Zeny -= 1000000; return; OnCheckZenyEntry: .@name$ = "["+strnpcinfo(0)+"]"; if (Zeny < 200000) { mes .@name$; mes "You don't have enough zeny to enter this instance."; end; } Zeny -= 200000; return; //OnPCLogoutEvent: //OnPCLoginEvent: //OnPCDieEvent: //if (!IE_NOINSTANCE) end; //if (strcharinfo(3) != "gld_dun01" || strcharinfo(3) != "gld_dun02" || strcharinfo(3) != "gld_dun03" || strcharinfo(3) != "gld_dun04" || strcharinfo(3) != "schg_dun01" || strcharinfo(3) != "arug_dun01") end; //instance_announce('instance_id,"A party member has died! You have 5 minutes to resurect or the instance will be destroyed.",0); //instance_destroy(instance_id(IM_PARTY)); //instance_picker = 0; //end; }
If yes, how does the NPC recognize your chosen instance after creating instance and leaving npc ???
This post is related to my last topic ..
I hope someone help me agan. thanks
Edited by ErossLink to comment
Share on other sites
5 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.