Last active
September 19, 2020 21:14
-
-
Save AnnieRuru/4a87e0ab7451e671d0e3056aedd2a086 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//===== Hercules Script ======================================= | |
//= Cluck! Cluck! Boom! | |
//===== By: ================================================== | |
//= Keale | |
//===== Current Version: ===================================== | |
//= 1.2a | |
//===== 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'. | |
//============================================================ | |
prontera,155,185,4 script Cluckers 4_NFCOCK,{ | |
.@GMAccess = 80; // GM level required to access NPC | |
if (.startcluck) { | |
specialeffect EF_HIT3, AREA, playerattached(); | |
switch(rand(15)) { | |
case 1: | |
npctalk "CLUUUUUUCK!!!"; | |
specialeffect EF_SUI_EXPLOSION, AREA, playerattached(); | |
unitkill playerattached(); | |
emotion e_omg; | |
break; | |
case 2: | |
npctalk "Cluuuuuck!~"; | |
break; | |
case 3: | |
specialeffect EF_SUI_EXPLOSION, AREA, playerattached(); | |
unitkill playerattached(); | |
break; | |
case 4: | |
sc_start SC_FREEZE, 1000, 0; | |
break; | |
case 5: | |
npctalk "CLUUUUUUUUUCK!!!"; | |
specialeffect EF_SUI_EXPLOSION, AREA, playerattached(); | |
unitkill playerattached(); | |
emotion e_omg; | |
break; | |
case 6: | |
sc_start SC_SLEEP, 1000, 0; | |
break; | |
case 7: | |
sc_start SC_STONE, 1000, 0; | |
emotion e_gg; | |
break; | |
case 8: | |
npctalk "CLUUUUUUCK!!!"; | |
specialeffect EF_SUI_EXPLOSION, AREA, playerattached(); | |
unitkill playerattached(); | |
emotion e_omg; | |
break; | |
case 9: | |
npctalk "Cluck! CLUUUCK!!"; | |
specialeffect EF_SUI_EXPLOSION, AREA, playerattached(); | |
unitkill playerattached(); | |
emotion e_omg; | |
break; | |
case 10: | |
sc_start SC_STUN, 1000, 0; | |
break; | |
case 11: | |
sc_start SC_SLEEP, 1000, 0; | |
emotion 29; | |
break; | |
case 12: | |
sc_start SC_STUN, 1000, 0; | |
break; | |
case 13: | |
npctalk "Cluck! Cluck!"; | |
break; | |
case 14: | |
specialeffect EF_SUI_EXPLOSION, AREA, playerattached(); | |
unitkill playerattached(); | |
break; | |
default: | |
if (rand(50) < 4) { | |
npctalk "WOOF!..........."; | |
specialeffect EF_SPHERE, AREA, playerattached(); | |
announce "[Cluck! Cluck! Boom!] " + strcharinfo(PC_NAME) + " squeezed out the prize! Well done!", bc_all; | |
getitem $cluck_item_id,$cluck_item_amount; | |
.startcluck = 0; | |
} else { | |
npctalk "Cluck! CLUUUCK!!"; | |
specialeffect EF_SUI_EXPLOSION, AREA, playerattached(); | |
unitkill playerattached(); | |
} | |
} | |
end; | |
} | |
mes "[Cluckers]"; | |
if (getgmlevel() >= .@GMAccess) { | |
mes "Cluck cluck! Cluuuuuck? ^FF0000~Hi GM " + strcharinfo(PC_NAME) + ", Wanna play today?~^000000"; | |
mes "Cluck cluck... CLUCK! ^FF0000~Just tell me what to do!~^000000"; | |
next; | |
while(true) { | |
switch(select("Start Event", "Check Prize", "Set Prize", "Not today Cluckers")) { | |
case 1: | |
mes "[Cluckers]"; | |
mes "CLUCK! ^FF0000~Sure thing!~^000000"; | |
emotion 33; | |
close2; | |
announce "[Cluck! Cluck! Boom!] is about to start in Prontera!",bc_blue; | |
initnpctimer; | |
end; | |
case 2: | |
mes "[Cluckers]"; | |
mes "Cluck, cluck cluck... Cluck! ^FF0000~The current prize is^000000 ^008000"+ $cluck_item_amount +" "+ F_MesItemInfo($cluck_item_id) +".^000000"; | |
next; | |
break; | |
case 3: | |
mes "[Cluckers]"; | |
mes "Cluck cluck? Cluck??? ^FF0000~What should the prize for winning be? Please select the item ID.~^000000"; | |
next; | |
.@s = select(.prize_menu$) -1; | |
$cluck_item_id = .prize_id[.@s]; | |
$cluck_item_amount = .prize_amount[.@s]; | |
mes "[Cluckers]"; | |
mes "Cluck cluck..? Cluck. ^FF0000~So, the prize is^000000 ^008000"+ $cluck_item_amount +" "+ F_MesItemInfo($cluck_item_id) +"^000000? ^FF0000Great.~^000000"; | |
emotion 33; | |
next; | |
break; | |
case 4: | |
mes "[Cluckers]"; | |
mes "Cluck cluck cluck..."; | |
close; | |
} | |
} | |
} | |
mes "Cluck cluck! Cluuuuuck?"; | |
mes "Cluck...."; | |
close; | |
OnTimer10000: | |
announce "Please hurry behind the fountain if you want to play with the crazy chicken!",bc_blue; | |
end; | |
OnTimer20000: | |
announce "Cluckers has eaten one of my items! I'm too scared to retrieve it!",bc_blue; | |
end; | |
OnTimer30000: | |
announce "Click the insane chicken and try squeeze out the item, if you're lucky you'll win! Are you ready?",bc_blue; | |
end; | |
OnTimer40000: | |
announce "GO! Click the chicken to get the prize!",bc_blue; | |
stopnpctimer; | |
.startcluck = 1; | |
end; | |
OnInit: | |
setarray .prize_id, 501,502,503,504,505; | |
setarray .prize_amount, 1,2,3,4,5; | |
.@prize_size = getarraysize(.prize_id); | |
for (.@i = 0; .@i < .@prize_size; ++.@i) | |
.prize_menu$ += .prize_amount[.@i] +"x "+ getitemname(.prize_id[.@i]) +":"; | |
if (!$cluck_item_id) | |
$cluck_item_id = 501; | |
if (!$cluck_item_amount) | |
$cluck_item_amount = 1; | |
end; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment