cluckers.txt 4.3 KB

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