Advertisement
Guest User

Untitled

a guest
Nov 20th, 2013
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.44 KB | None | 0 0
  1. prontera,158,181,4 script Prontera Test 105,{
  2. set .@party_id,getcharid(1);
  3. set .@p_name$,getpartyname(.@party_id);
  4. set .@md_name$,"Test Inst";
  5.  
  6. set .@ebug_timer,checkquest(60500,PLAYTIME); // 1 week
  7. set .@ebug_timer2,checkquest(60501,PLAYTIME); // 4 hours
  8.  
  9. if (!instance_check_party(.@party_id,2)) {
  10. mes "Make or join a party with more than 1 member and try again.";
  11. close;
  12. }
  13. if (.@ebug_timer == -1) {
  14. if (getcharid(0) == getpartyleader(.@party_id,2)) {
  15. mes "Confirmed the party has been made. Would you like to reserve entrance to the Prontera Cleaning?";
  16. next;
  17. switch(select("Generate dungeon "+.@md_name$+":Enter the dungeon:Cancel")) {
  18. case 1:
  19. if (instance_create(.@md_name$) < 0) {
  20. mes "Party Name: "+.@p_name$;
  21. mes "Party Leader: "+strcharinfo(0);
  22. mes "^0000ff"+.@md_name$+" ^000000- Reservation Failed!";
  23. close;
  24. }
  25. mes "^0000ff"+.@md_name$+"^000000 - Try to reserve";
  26. mes "After making a reservation, you have to talk to NPC behind and select the menu 'Enter the Dungeon' to enter the dungeon.";
  27. close;
  28. case 2:
  29. callsub L_Enter,0,1;
  30. case 3:
  31. close;
  32. }
  33. }
  34. switch(select("Enter the "+.@md_name$+":Return to Alberta:Cancel")) {
  35. case 1:
  36. callsub L_Enter,1,1;
  37. case 2:
  38. mes "I will move you to Alberta.";
  39. close2;
  40. warp "alberta",223,36;
  41. end;
  42. case 3:
  43. end;
  44. }
  45. } else if ((.@ebug_timer >= 0) && (.@ebug_timer2 < 2)) {
  46. mes "If you have the dungeon generated already, you can enter it. ";
  47. next;
  48. switch(select("Enter the "+.@md_name$+":Return to Alberta:Cancel")) {
  49. case 1:
  50. callsub L_Enter,0,0;
  51. case 2:
  52. mes "I will move you to Alberta.";
  53. close2;
  54. warp "alberta",223,36;
  55. end;
  56. case 3:
  57. break;
  58. }
  59. close;
  60. } else if ((.@ebug_timer >= 0) && (.@ebug_timer < 2) && (.@ebug_timer2 == 2)) {
  61.  
  62. set .@dun_lim_time,ebug_timer+86400; // 1 day
  63. set .@dun_lim_time2,ebug_timer+1800; // 30 mins
  64. set .@dun_cur_time,gettimetick(2);
  65. set .@dun_ent_t,(.@dun_lim_time - .@dun_cur_time);
  66. set .@dun_h,(.@dun_ent_t / 3600);
  67. set .@dun_m,(.@dun_ent_t - (.@dun_h * 3600)) / 60;
  68. set .@dun_s,.@dun_ent_t - ((.@dun_h * 3600) + (.@dun_m * 60));
  69.  
  70. 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.";
  71. next;
  72. mes "It is dangerous here. Let me move you to Alberta.";
  73. close2;
  74. warp "alberta",223,36;
  75. end;
  76. } else {
  77. set ebug_timer,0;
  78. erasequest 60500;
  79. erasequest 60501;
  80. mes "^0000ffThe records and after effects related to the Test Instancea have been removed. You can generate and enter the Test Instancea again.^000000";
  81. close;
  82. }
  83.  
  84. L_Enter:
  85. switch(instance_enter("Test Inst")) {
  86. case 3:
  87. mes "An unknown error has occurred.";
  88. close;
  89. case 2:
  90. mes "The memorial dungeon Test Instancea does not exist.";
  91. mes "The party leader did not generate the dungeon yet.";
  92. close;
  93. case 1:
  94. mes "You can enter the dungeon after making the party.";
  95. close;
  96. case 0:
  97. mapannounce "payon", strcharinfo(0)+" of the party, "+.@p_name$+", is entering the dungeon, Test Instancea.",bc_map,"0x00ff99",FW_NORMAL,12;
  98. if (getarg(1)) {
  99. set ebug_timer,gettimetick(2);
  100. setquest 60500;
  101. setquest 60501;
  102. donpcevent instance_npcname("ins_prt_clearing")+"::OnEnable";
  103. disablenpc instance_npcname("Prontera NPC");
  104. warp "pvp_y_5-1",0,0;
  105. }
  106. if (getarg(0) == 0) close;
  107. else end;
  108. }
  109.  
  110. }
  111.  
  112. / Core Functions
  113. //============================================================
  114. pvp_y_5-1,4,2,0 script ins_prt_clearing -1,{
  115. OnEnable:
  116. set .@label$, instance_npcname("ins_prt_clearing")+"::OnMyMobDead";
  117. set .@map$, instance_mapname("pvp_y_5-1");
  118. monster .@map$,0,0,"Annoying Bug",1608,10,.@label$;
  119. monster .@map$,0,0,"Annoying Bug",1608,10,.@label$;
  120. end;
  121.  
  122. OnDisable:
  123. killmonster instance_mapname("pvp_y_5-1"),instance_npcname("ins_prt_clearing")+"::OnMyMobDead";
  124. end;
  125.  
  126. OnMyMobDead:
  127. set .@map$, instance_mapname("pvp_y_5-1");
  128. if (mobcount(.@map$,instance_npcname("ins_prt_clearing")+"::OnMyMobDead") < 1) {
  129. mapannounce .@map$, "All bugs cleared!",bc_map,"0x00ff99";
  130. enablenpc instance_npcname("Prontera NPC");
  131. getitem 675,1; //Silver Coin
  132. }
  133. //getitem 6002,1; //Token_Of_Apostle
  134. end;
  135. }
  136.  
  137. pvp_y_5-1,156,186,4 script Prontera NPC 105,{
  138. cutin "ins_cata_champ_s",2;
  139. if (checkquest(3041)>=0) erasequest 3041;
  140. mes "[Prontera NPC]";
  141. mes "Good job, my descendants... You've finished the long-cherished task that me and my bretheren could not complete.";
  142. next;
  143. mes "[Prontera NPC]";
  144. mes "I really appreciate your help.";
  145. mes "Our souls can finally rest in peace...";
  146. next;
  147. mes "[Prontera NPC]";
  148. 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.";
  149. next;
  150. switch(select("Let me leave the shrine.:Stop talking.")) {
  151. case 1:
  152. mes "[Prontera NPC]";
  153. mes "Okay. I'll let you and your group leave here safely.";
  154. next;
  155. mes "[Prontera NPC]";
  156. mes "If you leave, please say hello to Patrick for me.";
  157. if (checkquest(60500)>=0) erasequest 60500;
  158. if (checkquest(60501)>=0) erasequest 60501;
  159. warp "payon_in03",173,39;
  160. close;
  161. case 2:
  162. mes "[Prontera NPC]";
  163. mes "Do you still have something to do here? If you're done I'll let you leave safely...";
  164. cutin "",255;
  165. close;
  166. }
  167.  
  168. OnInstanceInit:
  169. disablenpc instance_npcname(strnpcinfo(0));
  170. end;
  171. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement