Advertisement
Emistry

[RO] Gold Room - PVP

Jan 6th, 2017
2,014
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. // https://rathena.org/board/topic/108888-request-a-gold-room-drop-gold-point/
  2.  
  3.  
  4. prontera,155,181,5 script Sample#goldroom 4_F_KAFRA1,{
  5. doevent "gold_room_main::OnTalk";
  6. }
  7.  
  8. // warp portal back prontera
  9. ordeal_3-2,123,123,0 warp gold_room_back_prt 1,1,prontera,155,181
  10.  
  11. // peco peco summon
  12. ordeal_3-2,0,0,0,0 monster Peco Peco 1019,200,60000,0,"gold_room_main::OnKill"
  13.  
  14.  
  15. - script gold_room_main -1,{
  16.  
  17. OnInit:
  18. // gold room map
  19. .map$ = "ordeal_3-2";
  20. // entrance fee
  21. .zeny_cost = 200000;
  22. // rate to get gold
  23. .rate = 50;
  24. // gold random amount
  25. setarray .gold_amount,1,5;
  26.  
  27. setmapflag .map$,mf_noteleport;
  28. setmapflag .map$,mf_pvp;
  29. setmapflag .map$,mf_pvp_noguild;
  30. setmapflag .map$,mf_pvp_noparty;
  31. setmapflag .map$,mf_nobranch;
  32. setmapflag .map$,mf_nosave;
  33. setmapflag .map$,mf_nomemo;
  34. setmapflag .map$,mf_noreturn;
  35. setmapflag .map$,mf_nowarp;
  36. setmapflag .map$,mf_nowarpto;
  37. end;
  38.  
  39. OnTalk:
  40. mes "Enter Gold Room ?";
  41. if ( .zeny_cost )
  42. mes F_InsertComma( .zeny_cost ) + " Zeny";
  43. switch ( select(
  44. "Enter Gold Room",
  45. "Exchange Gold Point",
  46. "Cancel"
  47. )) {
  48. case 1:
  49. if ( Zeny < .zeny_cost ) {
  50. mes "Not enough Zeny.";
  51. }
  52. else {
  53. Zeny -= .zeny_cost;
  54. warp .map$,0,0;
  55. }
  56. break;
  57. case 2:
  58. mes "You got "+F_InsertComma( #GOLDPOINTS )+" Points";
  59. input .@value,0,#GOLDPOINTS;
  60. if ( checkweight( 969, .@value ) ) {
  61. #GOLDPOINTS -= .@value;
  62. getitem 969,.@value;
  63. mes "Gained "+.@value+" Gold.";
  64. }
  65. else {
  66. mes "You overweight.";
  67. }
  68. default:
  69. break;
  70. }
  71. close;
  72.  
  73. OnKill:
  74. if ( .rate < rand( 100 ) ) {
  75. .@point = rand( .gold_amount[0],.gold_amount[1] );
  76. #GOLDPOINTS += .@point;
  77. dispbottom "Gained "+.@point+" Point. You got "+F_InsertComma( #GOLDPOINTS )+" Points now.";
  78. }
  79. end;
  80.  
  81. OnPCDieEvent:
  82. .@killerrid = killerrid;
  83. if ( strcharinfo(3) == .map$ && .@killerrid != getcharid(3) && getmonsterinfo( .@killerrid,MOB_NAME ) != "null" ) {
  84. #GOLDPOINTS = 0;
  85. dispbottom "You died, you lost all the point.";
  86. }
  87. end;
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement