Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,158,181,4 script Prontera Test 105,{
- set .@party_id,getcharid(1);
- set .@p_name$,getpartyname(.@party_id);
- set .@md_name$,"Test Inst";
- set .@ebug_timer,checkquest(60500,PLAYTIME); // 1 week
- set .@ebug_timer2,checkquest(60501,PLAYTIME); // 4 hours
- if (!instance_check_party(.@party_id,2)) {
- mes "Make or join a party with more than 1 member and try again.";
- close;
- }
- if (.@ebug_timer == -1) {
- if (getcharid(0) == getpartyleader(.@party_id,2)) {
- mes "Confirmed the party has been made. Would you like to reserve entrance to the Prontera Cleaning?";
- next;
- switch(select("Generate dungeon "+.@md_name$+":Enter the dungeon:Cancel")) {
- case 1:
- if (instance_create(.@md_name$) < 0) {
- mes "Party Name: "+.@p_name$;
- mes "Party Leader: "+strcharinfo(0);
- mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
- close;
- }
- mes "^0000ff"+.@md_name$+"^000000 - Try to reserve";
- mes "After making a reservation, you have to talk to NPC behind and select the menu 'Enter the Dungeon' to enter the dungeon.";
- close;
- case 2:
- callsub L_Enter,0,1;
- case 3:
- close;
- }
- }
- switch(select("Enter the "+.@md_name$+":Return to Alberta:Cancel")) {
- case 1:
- callsub L_Enter,1,1;
- case 2:
- mes "I will move you to Alberta.";
- close2;
- warp "alberta",223,36;
- end;
- case 3:
- end;
- }
- } else if ((.@ebug_timer >= 0) && (.@ebug_timer2 < 2)) {
- mes "If you have the dungeon generated already, you can enter it. ";
- next;
- switch(select("Enter the "+.@md_name$+":Return to Alberta:Cancel")) {
- case 1:
- callsub L_Enter,0,0;
- case 2:
- mes "I will move you to Alberta.";
- close2;
- warp "alberta",223,36;
- end;
- case 3:
- break;
- }
- close;
- } else if ((.@ebug_timer >= 0) && (.@ebug_timer < 2) && (.@ebug_timer2 == 2)) {
- set .@dun_lim_time,ebug_timer+86400; // 1 day
- set .@dun_lim_time2,ebug_timer+1800; // 30 mins
- set .@dun_cur_time,gettimetick(2);
- set .@dun_ent_t,(.@dun_lim_time - .@dun_cur_time);
- set .@dun_h,(.@dun_ent_t / 3600);
- set .@dun_m,(.@dun_ent_t - (.@dun_h * 3600)) / 60;
- set .@dun_s,.@dun_ent_t - ((.@dun_h * 3600) + (.@dun_m * 60));
- mes "Due to the tower's aftereffects, you cannot enter the dungeon right now, " + .@dun_h + "hours " + .@dun_m + "minutes " + .@dun_s + "seconds left to enter the next dungeon.";
- next;
- mes "It is dangerous here. Let me move you to Alberta.";
- close2;
- warp "alberta",223,36;
- end;
- } else {
- set ebug_timer,0;
- erasequest 60500;
- erasequest 60501;
- mes "^0000ffThe records and after effects related to the Test Instancea have been removed. You can generate and enter the Test Instancea again.^000000";
- close;
- }
- L_Enter:
- switch(instance_enter("Test Inst")) {
- case 3:
- mes "An unknown error has occurred.";
- close;
- case 2:
- mes "The memorial dungeon Test Instancea does not exist.";
- mes "The party leader did not generate the dungeon yet.";
- close;
- case 1:
- mes "You can enter the dungeon after making the party.";
- close;
- case 0:
- mapannounce "payon", strcharinfo(0)+" of the party, "+.@p_name$+", is entering the dungeon, Test Instancea.",bc_map,"0x00ff99",FW_NORMAL,12;
- if (getarg(1)) {
- set ebug_timer,gettimetick(2);
- setquest 60500;
- setquest 60501;
- donpcevent instance_npcname("ins_prt_clearing")+"::OnEnable";
- disablenpc instance_npcname("Prontera NPC");
- warp "pvp_y_5-1",0,0;
- }
- if (getarg(0) == 0) close;
- else end;
- }
- }
- / Core Functions
- //============================================================
- pvp_y_5-1,4,2,0 script ins_prt_clearing -1,{
- OnEnable:
- set .@label$, instance_npcname("ins_prt_clearing")+"::OnMyMobDead";
- set .@map$, instance_mapname("pvp_y_5-1");
- monster .@map$,0,0,"Annoying Bug",1608,10,.@label$;
- monster .@map$,0,0,"Annoying Bug",1608,10,.@label$;
- end;
- OnDisable:
- killmonster instance_mapname("pvp_y_5-1"),instance_npcname("ins_prt_clearing")+"::OnMyMobDead";
- end;
- OnMyMobDead:
- set .@map$, instance_mapname("pvp_y_5-1");
- if (mobcount(.@map$,instance_npcname("ins_prt_clearing")+"::OnMyMobDead") < 1) {
- mapannounce .@map$, "All bugs cleared!",bc_map,"0x00ff99";
- enablenpc instance_npcname("Prontera NPC");
- getitem 675,1; //Silver Coin
- }
- //getitem 6002,1; //Token_Of_Apostle
- end;
- }
- pvp_y_5-1,156,186,4 script Prontera NPC 105,{
- cutin "ins_cata_champ_s",2;
- if (checkquest(3041)>=0) erasequest 3041;
- mes "[Prontera NPC]";
- mes "Good job, my descendants... You've finished the long-cherished task that me and my bretheren could not complete.";
- next;
- mes "[Prontera NPC]";
- mes "I really appreciate your help.";
- mes "Our souls can finally rest in peace...";
- next;
- mes "[Prontera NPC]";
- mes "The struggle for peace on this world will never end. But... my role here is finally over because there are brave heroes like you.";
- next;
- switch(select("Let me leave the shrine.:Stop talking.")) {
- case 1:
- mes "[Prontera NPC]";
- mes "Okay. I'll let you and your group leave here safely.";
- next;
- mes "[Prontera NPC]";
- mes "If you leave, please say hello to Patrick for me.";
- if (checkquest(60500)>=0) erasequest 60500;
- if (checkquest(60501)>=0) erasequest 60501;
- warp "payon_in03",173,39;
- close;
- case 2:
- mes "[Prontera NPC]";
- mes "Do you still have something to do here? If you're done I'll let you leave safely...";
- cutin "",255;
- close;
- }
- OnInstanceInit:
- disablenpc instance_npcname(strnpcinfo(0));
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement