Advertisement
ThyroDree

Gold Room

Jun 3rd, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. // https://rathena.org/board/topic/108888-request-a-gold-room-drop-gold-point/
  2.  
  3. warcraft,196,158,5 script Gold Room#goldroom 4_M_EINMINER,{
  4. doevent "gold_room_main::OnTalk";
  5. }
  6.  
  7. // warp portal back prontera
  8. ordeal_3-2,155,153,4 script Exit Mo 'to 4_M_EINMINER,{
  9. mes "[ Lagusan ng Buhay ]";
  10. mes "Hello, I am expert at running away!";
  11. mes "You want to leave?";
  12. while (1) {
  13. switch(select("Yes, I'm Scared!", "Dqf? No!")) {
  14. case 1:
  15. warp "warcraft" ,206,155;
  16. end;
  17. case 2:
  18. mes "[ Lagusan ng Buhay ]";
  19. mes "Okay, Brave man!~";
  20. close;
  21. }
  22. }
  23. }
  24. // Duplicados Warps v1.0
  25. ordeal_3-2.gat,130,193,0 warp goldroomwrp#1 3,3,ordeal_3-2.gat,154,154
  26. ordeal_3-2.gat,106,154,0 warp goldroomwrp#2 3,3,ordeal_3-2.gat,154,154
  27. ordeal_3-2.gat,201,129,0 warp goldroomwrp#3 3,3,ordeal_3-2.gat,154,154
  28. ordeal_3-2.gat,177,193,0 warp goldroomwrp#4 3,3,ordeal_3-2.gat,154,154
  29.  
  30. // peco peco summon
  31. ordeal_3-2,0,0,0,0 monster Golden Peco Peco 3180,800,60000,0,"gold_room_main::OnKill"
  32. // GUARDIAN
  33. //ordeal_3-2,0,0,0,0 monster Bantay sa Pasko 3181,100,60000,0,"gold_room_main::OnKill"
  34.  
  35. - script gold_room_main FAKE_NPC,{
  36.  
  37. OnInit:
  38. // gold room map
  39. .Map$ = "ordeal_3-2";
  40. // entrance fee
  41. .zeny_cost = 1000000;
  42. // rate to get gold
  43. // .rate = 90;
  44. // gold random amount
  45. setarray .gold_amount,1;
  46.  
  47. setmapflag .Map$,mf_noteleport;
  48. setmapflag .Map$,mf_pvp;
  49. setmapflag .Map$,mf_pvp_noguild;
  50. setmapflag .Map$,mf_pvp_noparty;
  51. setmapflag .Map$,mf_nobranch;
  52. setmapflag .Map$,mf_nosave;
  53. setmapflag .Map$,mf_nomemo;
  54. setmapflag .Map$,mf_noreturn;
  55. setmapflag .Map$,mf_nowarp;
  56. setmapflag .Map$,mf_nowarpto;
  57. end;
  58.  
  59. OnTalk:
  60. mes "[ Gold Room Manager ]";
  61. mes "How may I serve for you ?";
  62. mes "I can warp you to a Gold Mine.";
  63. next;
  64. mes "[ Gold Room Manager ]";
  65. mes "I need you to give me";
  66. if ( .zeny_cost )
  67. mes F_InsertComma( .zeny_cost ) + " Zeny to enter.";
  68. switch ( select(
  69. "Enter Gold Room",
  70. "Exchange Gold Point(s)",
  71. "Cancel"
  72. )) {
  73. case 1:
  74. if ( Zeny < .zeny_cost ) {
  75. mes "Not enough Zeny.";
  76. }
  77. else {
  78. next;
  79. set .@a,rand(50);
  80. set .@b,rand(50);
  81. mes "[Gold Room]";
  82. mes "Before you enter, you need to answer the question ";
  83. mes "for security check.";
  84. mes "If A = "+.@a+" B = "+.@b;
  85. switch( rand(1) ){
  86. set .@answer,.@a + .@b;
  87. mes "How many is A + B ?";
  88. next;
  89. input .@input;
  90. next;
  91. if( .@input!=.@answer ) {
  92. atcommand "@kick " + strcharinfo(0);
  93. close;
  94. break;
  95. }
  96. else if (.@input==.@answer) {
  97. Zeny -= .zeny_cost;
  98. warp .Map$,153,154;
  99. close;
  100. }
  101. end;
  102. }
  103. }
  104. break;
  105. case 2:
  106. mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points";
  107. input .@value,0,#GOLDPOINTS;
  108. if ( checkweight( 969, .@value ) ) {
  109. #GOLDPOINTS -= .@value;
  110. getitem 969,.@value;
  111. mes "Gained "+.@value+" Gold.";
  112. }
  113. else {
  114. mes "Sorry your transaction failed.";
  115. next;
  116. mes "You have to farm gold to exchange.";
  117. mes "Please input Gold you wanted to exchange.";
  118. }
  119. default:
  120. break;
  121. }
  122. close;
  123.  
  124. OnKill:
  125. .@point = .gold_amount[0];
  126. #GOLDPOINTS += .@point;
  127. dispbottom "Gained "+.@point+" Gold Point. You got "+F_InsertComma( #GOLDPOINTS )+" Gold Points now.";
  128. end;
  129.  
  130. OnPCDieEvent:
  131. if (strcharinfo(3) != "ordeal_3-2") end;
  132. #GOLDPOINTS = 0;
  133. dispbottom "You died, you lost all the Gold point(s).";
  134. end;
  135. }
  136.  
  137.  
  138. // Map Flags v1.0
  139. ordeal_3-2 mapflag nowarp
  140. ordeal_3-2 mapflag nobranch
  141. ordeal_3-2 mapflag nomemo
  142. ordeal_3-2 mapflag nowarpto
  143. ordeal_3-2 mapflag nopenalty
  144. ordeal_3-2 mapflag pvp_noparty
  145. ordeal_3-2 mapflag noskill
  146. ordeal_3-2 mapflag nosave
  147. ordeal_3-2 mapflag novending
  148. ordeal_3-2 mapflag noteleport
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement