cluckers.txt 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. //===== rAthena Script =======================================
  2. //= Cluck! Cluck! Boom!
  3. //===== By: ==================================================
  4. //= Keale
  5. //===== Current Version: =====================================
  6. //= 1.2a
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= Click the chicken and try retrieve the item at a low
  11. //= chance. If you fail he will nuke, freeze, stone,
  12. //= stun, or make you fall asleep.
  13. //= The prize is configurable and triggered by the NPC.
  14. //===== Additional Comments: =================================
  15. //= 1.0 First release.
  16. //= 1.1 Using 'switch rand' instead.
  17. //= 1.2 Cleaned and standardized. [Euphy]
  18. //= 1.2a Switched 'atcommand' to 'unitskilluseid'.
  19. //= 1.3 Switched 'unitskilluseid' to 'unitkill'.
  20. //============================================================
  21. prontera,156,219,4 script Cluckers 800,{
  22. set .@GMAccess,80; // GM level required to access NPC
  23. if (.startcluck) {
  24. specialeffect2 EF_HIT3;
  25. switch(rand(15)) {
  26. case 0: npctalk "Cluckers : CLUUUUUUCK!!!"; unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
  27. case 1: npctalk "Cluckers : Cluuuuuck!~"; break;
  28. case 2: unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; break;
  29. case 3: sc_start SC_Freeze,10000,0; break;
  30. case 4: npctalk "Cluckers : CLUUUUUUUUUCK!!!"; unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
  31. case 5: sc_start SC_Sleep,10000,0; break;
  32. case 6: sc_start SC_Stone,10000,0; emotion ET_KIK; break;
  33. case 7: npctalk "Cluckers : CLUUUUUUCK!!!"; unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
  34. case 8: npctalk "Cluckers : Cluck! CLUUUCK!!"; unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
  35. case 9: sc_start SC_Stun,10000,0; break;
  36. case 10: sc_start SC_Sleep,10000,0; emotion ET_KIK; break;
  37. case 11: npctalk "Cluckers : Cluck! Cluck!"; break;
  38. case 12: sc_start SC_Stun,10000,0; break;
  39. case 13: unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; break;
  40. default:
  41. if (rand(50) < 4) {
  42. npctalk "Cluckers : WOOF!...........";
  43. specialeffect2 EF_SPHERE;
  44. announce "[Cluck! Cluck! Boom!] " + strcharinfo(0) + " squeezed out the prize! Well done!",0;
  45. getitem $cluck_item_id,$cluck_item_amount;
  46. set .startcluck,0;
  47. } else {
  48. npctalk "Cluckers : Cluck! CLUUUCK!!";
  49. unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1;
  50. }
  51. break;
  52. }
  53. end;
  54. }
  55. mes "[Cluckers]";
  56. if (getgmlevel() >= .@GMAccess) {
  57. mes "Cluck cluck! Cluuuuuck? ^FF0000~Hi GM " + strcharinfo(0) + ", Wanna play today?~^000000";
  58. mes "Cluck cluck... CLUCK! ^FF0000~Just tell me what to do!~^000000";
  59. next;
  60. while(1) switch(select("Start Event:Check Prize:Set Prize:Not today Cluckers")) {
  61. case 1:
  62. mes "[Cluckers]";
  63. mes "CLUCK! ^FF0000~Sure thing!~^000000";
  64. emotion ET_OK;
  65. close2;
  66. announce "[Cluck! Cluck! Boom!] is about to start in Prontera!",bc_blue;
  67. initnpctimer;
  68. end;
  69. case 2:
  70. mes "[Cluckers]";
  71. mes "Cluck, cluck cluck... Cluck! ^FF0000~The current prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +".^000000";
  72. next;
  73. break;
  74. case 3:
  75. mes "[Cluckers]";
  76. mes "Cluck cluck? Cluck??? ^FF0000~What should the prize for winning be? Please input the ID.~^000000";
  77. input $cluck_item_id;
  78. next;
  79. mes "[Cluckers]";
  80. mes "Cluck? cluuuck? ^FF0000~How many if this item should I give away?~^000000";
  81. input $cluck_item_amount;
  82. next;
  83. mes "[Cluckers]";
  84. mes "Cluck cluck..? Cluck. ^FF0000~So, the prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +"^000000? ^FF0000Great.~^000000";
  85. emotion ET_OK;
  86. next;
  87. break;
  88. case 4:
  89. mes "[Cluckers]";
  90. mes "Cluck cluck cluck...";
  91. close;
  92. }
  93. }
  94. mes "Cluck cluck! Cluuuuuck?";
  95. mes "Cluck....";
  96. close;
  97. OnTimer10000:
  98. announce "Please hurry behind the fountain if you want to play with the crazy chicken!",bc_blue;
  99. end;
  100. OnTimer20000:
  101. announce "Cluckers has eaten one of my items! I'm too scared to retrieve it!",bc_blue;
  102. end;
  103. OnTimer30000:
  104. announce "Click the insane chicken and try squeeze out the item, if you're lucky you'll win! Are you ready?",bc_blue;
  105. end;
  106. OnTimer40000:
  107. announce "GO! Click the chicken to get the prize!",bc_blue;
  108. stopnpctimer;
  109. if (!$cluck_item_id) set $cluck_item_id,512;
  110. if (!$cluck_item_amount) set $cluck_item_amount,1;
  111. set .startcluck,1;
  112. end;
  113. }