Advertisement
Emistry

[RO] KOE

Dec 11th, 2016
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. - script KoE -1,{
  2. OnInit:
  3. disablenpc "The King#KoE";
  4. disablenpc "Exit#KoE";
  5. bindatcmd "koe", strnpcinfo(0)+"::Oncommand", 99,99;
  6. end;
  7.  
  8. Oncommand:
  9. if ( compare( .@atcmd_parameters$, "on" ) ) goto L_start;
  10. else if ( compare( .@atcmd_parameters$, "off" ) ) goto L_end;
  11. else {
  12. dispbottom "type - '@koe on' to start the event";
  13. dispbottom "type - '@koe off' to end the event";
  14. }
  15. end;
  16.  
  17. OnHour04:
  18. L_start:
  19. gvgon "koe";
  20. announce "The King of Emperium Hill has begun!", bc_all;
  21. .start = 1;
  22. enablenpc "The King#KoE";
  23. disablenpc "Exit#KoE";
  24. $koegid = 0;
  25. donpcevent "::OnRevKoE";
  26. maprespawnguildid "koe", $koegid, 7;
  27. monster "koe",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
  28. end;
  29.  
  30. OnHour08:
  31. L_end:
  32. gvgoff "koe";
  33. announce "The King of Emperium Hill is over!", bc_all;
  34. .start = 0;
  35. enablenpc "Exit#KoE";
  36. disablenpc "The King#KoE";
  37. killmonsterall "koe";
  38. // maprespawnguildid "koe", $koegid, 6;
  39. end;
  40. OnEmpDead:
  41. $koegid = getcharid(2);
  42. announce "The current King of Emperium Hill is the ["+ strcharinfo(2) +"] guild.", bc_all;
  43. donpcevent "::OnRevKoE";
  44. maprespawnguildid "koe", $koegid, 6;
  45. sleep 500;
  46. if ( .start )
  47. monster "koe",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead";
  48. end;
  49. }
  50.  
  51. // KoE Entrance
  52. prontera,155,183,4 script The King#KoE 487,{
  53. mes "[The King]";
  54. if ( !getcharid(2) ) {
  55. mes "You must have a guild to participate in the ^FF0000King of Emperium Hill Tournament^000000.";
  56. close;
  57. }
  58. mes "Hello.";
  59. mes "Would you like to participate in the ^FF0000King of Emperium Hill Tournament^000000?";
  60. if ( select ( "Yes", "No" ) == 2 ) close;
  61. switch( rand(1,4) ){
  62. case 1: warp "guild_vs1", 50, 88; end;
  63. case 2: warp "guild_vs1", 88, 50; end;
  64. case 3: warp "guild_vs1", 50, 11; end;
  65. case 4: warp "guild_vs1", 11, 50; end;
  66. }
  67. close;
  68. }
  69.  
  70. // KoE Exit
  71. koe,49,56,5 script Exit#KoE 51,{
  72. mes "[Exit]";
  73. mes "See ya.";
  74. if ( getcharid(2) == $koegid )
  75. getitem 671, 2; // configure prize here
  76. close2;
  77. warp "Save",0,0;
  78. end;
  79. }
  80.  
  81. // Flags
  82. koe,49,38,4 script King of Emperium Hill#1::koe_flag 722,{
  83. if ( !$koegid ) end;
  84. mes "[King of Emperium Hill]";
  85. mes "The Current King of Emperium Hill is the ["+ getguildname($koegid) +"] guild.";
  86. close;
  87.  
  88. OnRevKoE:
  89. flagemblem $koegid;
  90. end;
  91. }
  92. guild_vs1,61,49,6 duplicate(koe_flag) King of Emperium Hill#2 722
  93. guild_vs1,38,49,2 duplicate(koe_flag) King of Emperium Hill#3 722
  94. guild_vs1,49,61,0 duplicate(koe_flag) King of Emperium Hill#4 722
  95.  
  96. koe mapflag nobranch
  97. koe mapflag nomemo
  98. koe mapflag nopenalty
  99. koe mapflag noreturn
  100. koe mapflag nosave SavePoint
  101. koe mapflag noteleport
  102. koe mapflag gvg_noparty
  103. koe mapflag nowarp
  104. koe mapflag nowarpto
  105. koe mapflag guildlock
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement