Advertisement
shockwar14

KOE Script

Aug 23rd, 2023
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.07 KB | Gaming | 0 0
  1. //===== Hercules Script ===========================================
  2. //= King of Emperium Hill
  3. //===== By: =======================================================
  4. //= AnnieRuru
  5. //===== Current Version: ==========================================
  6. //= 1.2
  7. //===== Compatible With: ==========================================
  8. //= hercules & rathena 2018-04-08
  9. //===== Description: ==============================================
  10. //= defends the emperium in the middle of the map until times up
  11. //===== Topic =====================================================
  12. //= http://hercules.ws/board/topic/4495-gvg-king-of-emperium-hill/
  13. //===== Additional Comments: ======================================
  14. //= Finally there is a topic for this !
  15. //=================================================================
  16.  
  17. - script KoE FAKE_NPC,{
  18. OnInit:
  19. disablenpc "The King#KoE";
  20. disablenpc "Exit#KoE";
  21. bindatcmd "koe", strnpcinfo(0)+"::OnCommand", 99,100;
  22. end;
  23. OnCommand:
  24. if ( compare( .@atcmd_parameters$, "on" ) ) goto L_start;
  25. else if ( compare( .@atcmd_parameters$, "off" ) ) goto L_end;
  26. else {
  27. dispbottom "type - '@koe on' to start the event";
  28. dispbottom "type - '@koe off' to end the event";
  29. }
  30. end;
  31. L_start:
  32. OnClock2000: // 8:00 PM
  33. if ( .start ) end;
  34. gvgon "guild_vs1";
  35. announce "The King of Emperium Hill has begun!", bc_all;
  36. .start = true;
  37. enablenpc "The King#KoE";
  38. disablenpc "Exit#KoE";
  39. $koegid = 0;
  40. donpcevent "::OnRevKoE";
  41. maprespawnguildid "guild_vs1", $koegid, 3;
  42. killmonster "guild_vs1", "KoE::OnEmpDead";
  43. monster "guild_vs1",49,49, "EMPERIUM", 1288, 1, "KoE::OnEmpDead";
  44. end;
  45. L_end:
  46. OnClock2100: // 9:00 PM
  47. gvgoff "guild_vs1";
  48. announce "The King of Emperium Hill is over!", bc_all;
  49. .start = 0;
  50. enablenpc "Exit#KoE";
  51. disablenpc "The King#KoE";
  52. killmonster "guild_vs1", "KoE::OnEmpDead";
  53. maprespawnguildid "guild_vs1", $koegid, 2; // uncomment this line to kick non-owner off the map when event ends
  54. end;
  55. OnEmpDead:
  56. $koegid = getcharid(2);
  57. announce "The current King of Emperium Hill is the ["+ strcharinfo(2) +"] guild.", bc_all;
  58. donpcevent "::OnRevKoE";
  59. maprespawnguildid "guild_vs1", $koegid, 2;
  60. killmonster "guild_vs1", "KoE::OnEmpDead";
  61. sleep 500;
  62. if ( .start )
  63. monster "guild_vs1",49,49, "EMPERIUM", 1288, 1, "KoE::OnEmpDead";
  64. end;
  65. }
  66.  
  67. // KoE Entrance
  68. turbo_room,121,121,4 script The King#KoE 1_M_MERCHANT,{
  69. mes "[The King]";
  70. if ( !getcharid(2) ) {
  71. mes "You must have a guild to participate in the ^FF0000King of Emperium Hill Tournament^000000.";
  72. close;
  73. }
  74. mes "Hello.";
  75. mes "Would you like to participate in the ^FF0000King of Emperium Hill Tournament^000000?";
  76. if ( select ( "Yes", "No" ) == 2 ) close;
  77. if ( !getvariableofnpc( .start, "KoE" ) ) close;
  78. switch( rand(1,4) ){
  79. case 1: warp "guild_vs1", 50, 88; end;
  80. case 2: warp "guild_vs1", 88, 50; end;
  81. case 3: warp "guild_vs1", 50, 11; end;
  82. case 4: warp "guild_vs1", 11, 50; end;
  83. }
  84. }
  85.  
  86. // KoE Exit
  87. guild_vs1,49,56,5 script Exit#KoE 1_M_BARD,{
  88. mes "[Exit]";
  89. mes "Here's the rewards.";
  90. mes "See ya!";
  91. close2;
  92. warp "Save",0,0;
  93. if ( getcharid(2) == $koegid )
  94. getitem 22783, 25; // Finale Token
  95. getitem 22780, 25; // Guild Weapon Box
  96. end;
  97. }
  98.  
  99. // Flags
  100. guild_vs1,49,38,4 script King of Emperium Hill#1::koe_flag GUILD_FLAG,{
  101. if ( !$koegid ) end;
  102. mes "[King of Emperium Hill]";
  103. mes "The Current King of Emperium Hill is the ["+ getguildname($koegid) +"] guild.";
  104. close;
  105. //OnInit: // Uncomment this line to make the emblem stay after @reloadscript
  106. OnRevKoE:
  107. flagemblem $koegid;
  108. end;
  109. }
  110. guild_vs1,61,49,6 duplicate(koe_flag) King of Emperium Hill#2 GUILD_FLAG
  111. guild_vs1,38,49,2 duplicate(koe_flag) King of Emperium Hill#3 GUILD_FLAG
  112. guild_vs1,49,61,0 duplicate(koe_flag) King of Emperium Hill#4 GUILD_FLAG
  113.  
  114. guild_vs1 mapflag nobranch
  115. guild_vs1 mapflag nomemo
  116. guild_vs1 mapflag nopenalty
  117. guild_vs1 mapflag noreturn
  118. guild_vs1 mapflag nosave SavePoint
  119. guild_vs1 mapflag noteleport
  120. guild_vs1 mapflag gvg_noparty
  121. guild_vs1 mapflag nowarp
  122. guild_vs1 mapflag nowarpto
  123. guild_vs1 mapflag guildlock
  124. //guild_vs1 mapflag noicewall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement