Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===== rAthena Script =======================================
- //= Cluck! Cluck! Boom!
- //===== By: ==================================================
- //= Keale
- //===== Current Version: =====================================
- //= 1.2a
- //===== Compatible With: =====================================
- //= rAthena Project
- //===== Description: =========================================
- //= Click the chicken and try retrieve the item at a low
- //= chance. If you fail he will nuke, freeze, stone,
- //= stun, or make you fall asleep.
- //= The prize is configurable and triggered by the NPC.
- //===== Additional Comments: =================================
- //= 1.0 First release.
- //= 1.1 Using 'switch rand' instead.
- //= 1.2 Cleaned and standardized. [Euphy]
- //= 1.2a Switched 'atcommand' to 'unitskilluseid'.
- //= 1.3 Switched 'unitskilluseid' to 'unitkill'.
- //============================================================
- doubrius,43,135,0 script Crazy Chicken 800,2,2,{
- set .@GMAccess,80; // GM level required to access NPC
- if (.startcluck) {
- specialeffect2 EF_HIT3;
- switch(rand(15)) {
- case 0: npctalk "Crazy Chicken : CLUUUUUUCK!!!"; unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
- case 1: npctalk "Crazy Chicken : Cluuuuuck!~"; break;
- case 2: unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; break;
- case 3: sc_start SC_Freeze,10000,0; break;
- case 4: npctalk "Crazy Chicken : CLUUUUUUUUUCK!!!"; unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
- case 5: sc_start SC_Sleep,10000,0; break;
- case 6: sc_start SC_Stone,10000,0; emotion ET_KIK; break;
- case 7: npctalk "Crazy Chicken : CLUUUUUUCK!!!"; unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
- case 8: npctalk "Crazy Chicken : Cluck! CLUUUCK!!"; unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; emotion ET_HUK; break;
- case 9: sc_start SC_Stun,10000,0; break;
- case 10: sc_start SC_Sleep,10000,0; emotion ET_KIK; break;
- case 11: npctalk "Crazy Chicken : Cluck! Cluck!"; break;
- case 12: sc_start SC_Stun,10000,0; break;
- case 13: unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1; break;
- default:
- if (rand(50) < 4) {
- npctalk "Crazy Chicken : WOOF!...........";
- specialeffect2 EF_SPHERE;
- announce "[Cluck! Cluck! Boom!] " + strcharinfo(0) + " squeezed out the prize! Well done!",0;
- getitem $cluck_item_id,$cluck_item_amount;
- set .startcluck,0;
- } else {
- npctalk "Crazy Chicken : Cluck! CLUUUCK!!";
- unitkill getcharid(3); skilleffect "NPC_SELFDESTRUCTION",1;
- }
- break;
- }
- end;
- }
- mes "[Crazy Chicken]";
- if (getgmlevel() >= .@GMAccess) {
- mes "Cluck cluck! Cluuuuuck? ^FF0000~Hi GM " + strcharinfo(0) + ", Wanna play today?~^000000";
- mes "Cluck cluck... CLUCK! ^FF0000~Just tell me what to do!~^000000";
- next;
- while(1) switch(select("Start Event:Check Prize:Set Prize:Not today Crazy Chicken")) {
- case 1:
- mes "[Crazy Chicken]";
- if (.startcluck) {
- mes "Cluck! the event is running do you want to stop it?";
- if (select("Yes")) {
- next;
- mes "[Crazy Chicken]";
- mes "Event is stopped! Cluuuuuuuuuuuuck!!";
- close2;
- callsub S_CheckStop, .startcluck;
- }
- }
- mes "CLUCK! ^FF0000~Sure thing!~^000000";
- emotion ET_OK;
- close2;
- OnCluckStart:
- announce "[Cluck! Cluck! Boom!] is about to start in Maintown!",bc_blue;
- initnpctimer;
- end;
- case 2:
- mes "[Crazy Chicken]";
- mes "Cluck, cluck cluck... Cluck! ^FF0000~The current prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +".^000000";
- next;
- break;
- case 3:
- mes "[Crazy Chicken]";
- mes "Cluck cluck? Cluck??? ^FF0000~What should the prize for winning be? Please input the ID.~^000000";
- input $cluck_item_id;
- next;
- mes "[Crazy Chicken]";
- mes "Cluck? cluuuck? ^FF0000~How many if this item should I give away?~^000000";
- input $cluck_item_amount;
- next;
- mes "[Crazy Chicken]";
- mes "Cluck cluck..? Cluck. ^FF0000~So, the prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +"^000000? ^FF0000Great.~^000000";
- emotion ET_OK;
- next;
- break;
- case 4:
- mes "[Crazy Chicken]";
- mes "Cluck cluck cluck...";
- close;
- }
- }
- mes "Cluck cluck! Cluuuuuck?";
- mes "Cluck....";
- close;
- OnClock1800:
- donpcevent strnpcinfo(3)+"::OnCluckStart";
- end;
- S_CheckStop:
- if (getarg(0)) {
- if (getnpctimer(0)) {
- setnpctimer 0;
- stopnpctimer;
- }
- .startcluck = 0;
- }
- end;
- OnTimer10000:
- callsub S_CheckStop, .startcluck;
- announce "[Crazy Chicken] : Please hurry behind the fountain if you want to play with the crazy chicken!",bc_all,0xFF7F50;
- end;
- OnTimer20000:
- callsub S_CheckStop, .startcluck;
- announce "[Crazy Chicken] : Crazy Chicken has eaten one of my items! I'm too scared to retrieve it!",bc_all,0xFF7F50;
- end;
- OnTimer30000:
- callsub S_CheckStop, .startcluck;
- announce "[Crazy Chicken] : Click the insane chicken and try squeeze out the item, if you're lucky you'll win! Are you ready?",bc_all,0xFF7F50;
- end;
- OnTimer40000:
- callsub S_CheckStop, .startcluck;
- announce "[Crazy Chicken] : GO! Catch me to get the reward!",bc_all,0xFF7F50;
- stopnpctimer;
- if (!$cluck_item_id) set $cluck_item_id,512;
- if (!$cluck_item_amount) set $cluck_item_amount,1;
- set .startcluck,1;
- end;
- OnTouch:
- if (!rand(9) && !.startcluck) {
- unitkill getcharid(3);
- skilleffect "NPC_SELFDESTRUCTION",1;
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement