Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===== Hercules Script ======================================
- //= Christmas Event - 2018
- //===== By ===================================================
- //= Hrist, Infiltrated, Wolfie
- //= Original 'Break the Seal Quest' by Albert
- //===== Description ==========================================
- //= Jack Frost - similar to Mysterious Crane.
- //============================================================
- amatsu,230,230,3 script Jack Frost CLEAR_NPC,{
- // sets the '.@name$' variable to custom bRO style
- .@name$ = F_NpcName(strnpcinfo(NPC_NAME));
- // flavour text
- mes(.@name$);
- mes("Ho, ho, hi~~~~fellow");
- mes("spirited adventurer-!");
- if (!@Repeat_Xmas_Text && .Condense_Text) {
- next();
- mes(.@name$);
- }
- mes("I am Jack Frost, many");
- mes("a-call me Jack and I'm");
- mesf("reaching out to you, %s.", strcharinfo(PC_NAME));
- if (!@Repeat_Xmas_Text && .Condense_Text) {
- next();
- mes(.@name$);
- }
- mes("On this blissfully chilly");
- mes("morning, it has frightfully");
- mes("come to my attention that");
- mes("we cannot start Christmas");
- mes("this year without the Seal");
- mes("of Christmas being broken.");
- if (!@Repeat_Xmas_Text && .Condense_Text) {
- next();
- mes(.@name$);
- }
- mes("For each time the seal");
- mes("is broken, you will be");
- mes("rewarded with a gift chosen");
- mes("randomly my bag of treats.");
- mes("To do that, I'll need for");
- mes("you to help me gather a");
- mes("list of items. Return them");
- mes("to me so I can work my magic.");
- next();
- mes(.@name$);
- if (.Condense_Text)
- @Repeat_Xmas_Text = true;
- // counts required items from '.Required' array
- if (F_CountItem(.Required) < 1) {
- // display a list of required items from array
- F_DispCountItem(.Required);
- } else {
- // player has required items, delete then award random item
- mes("So you have all the");
- mes("items..? In exchange");
- mes("I will give you a");
- mes("chance of a nice reward.");
- next();
- mes(.@name$);
- mes("Choose your class...the");
- mes("higher the less chance");
- mes("of something good!");
- next();
- .@i = select("Class S", "Class A", "Class B", "Class C", "Class D") -1;
- mes(.@name$);
- mes("Break the seal for a");
- mes("chance at one of these:");
- mes(" ");
- callsub(S_Item, .@i, true);
- next();
- mes(.@name$);
- mes("Are you ready to break");
- mes("the Seal of Christmas?");
- next();
- if (select("Ready!", "^777777Not ready.^000000") == 2)
- close();
- // in case somehow player lost items since last check
- if (F_CountItem(.Required) < 1) {
- mes(.@name$);
- mes("...");
- next();
- mes(.@name$);
- mes("Nothing happened.");
- close();
- }
- F_DelItem(.Required);
- .@ID = callsub(S_Item, .@i);
- getitem(.@ID, 1);
- if (.@ID == Gold_Coin)
- .@Mes$ = "A moment of silence for";
- else
- .@Mes$ = "Congratulations to";
- announce(sprintf("%s [ %s ] who received %s %s after breaking the seal of Christmas!", .@Mes$, strcharinfo(PC_NAME), callsub(S_A_An, getitemname(.@ID)), getitemname(.@ID)), bc_all);
- }
- close();
- S_A_An:
- .@str$ = strtolower(getarg(0));
- setarray(.@Vowel$, "a", "e", "i", "o", "u");
- for (.@i = 0; .@i < getarraysize(.@Vowel$); .@i++) {
- if (charat(.@str$, 0) == .@Vowel$[.@i])
- return "an";
- }
- return "a";
- S_Item:
- switch (getarg(0, 4)) {
- // CLASS S
- case 0:
- .@Chance = 200; // 2%
- setarray(.@ID,
- (getarg(1, false)) ? C_Sparkly_Xmas_Cloak : F_ReturnRand(C_Sparkly_Xmas_Cloak, C_Sparkly_Xmas_Cloak_Aqua, C_Sparkly_Xmas_Cloak_Black, C_Sparkly_Xmas_Cloak_Blue, C_Sparkly_Xmas_Cloak_Green, C_Sparkly_Xmas_Cloak_Grey, C_Sparkly_Xmas_Cloak_Orange, C_Sparkly_Xmas_Cloak_Pink, C_Sparkly_Xmas_Cloak_Purple, C_Sparkly_Xmas_Cloak_Yellow),
- King_Poring_Hat,
- C_Crimson_Booster,
- C_Scratching_Cat,
- C_Worg_In_Mouth,
- C_Merry_Xmas_Rudolph,
- C_White_Angel_Wing_Heart
- );
- break;
- // CLASS A
- case 1:
- .@Chance = 800; // 8%
- setarray(.@ID,
- Blue_Poring_Bubble,
- Valkyrie_Circlet,
- C_Small_Golden_Wings,
- C_Horse_King,
- C_Snowflakes,
- C_Snowman_Balloon,
- C_Sparkly_Winter_Scarf
- );
- break;
- // CLASS B
- case 2:
- .@Chance = 1600; // 16%
- setarray(.@ID,
- C_Neko_Santa_Hat,
- C_Cat_Santa_Hat,
- Candy_Hat,
- 5488,
- Frozen_Twin_Pompom,
- C_Large_Ribbon_Muffler,
- C_Light_Up_Christmas_Tree
- );
- break;
- // CLASS C
- case 3:
- .@Chance = 3200; // 32%
- setarray(.@ID,
- 5500,
- Navy_Beret,
- Red_Beret,
- Ice_Wing_Ear,
- 5402,
- C_Long_Tongue,
- (getarg(1, false)) ? C_Light_Up_Scarf : F_ReturnRand(C_Light_Up_Scarf, C_Light_Up_Scarf_Black, C_Light_Up_Scarf_Blue, C_Light_Up_Scarf_Green, C_Light_Up_Scarf_Purple, C_Light_Up_Scarf_Yellow)
- );
- break;
- // CLASS D
- case 4:
- .@Chance = 6400; // 64%
- setarray(.@ID,
- Gold_Spirit_Chain,
- C_Snowman_Hat,
- Candy_Cane_In_The_Mouth,
- F_ReturnRand(Blue_Scarf, Cyan_Scarf, Gold_Scarf, Pink_Scarf, Red_Scarf_, Green_Scarf),
- Citron_Hat,
- Mini_Tree,
- (getarg(1, false)) ? C_Light_Up_Santa_Hat : F_ReturnRand(C_Light_Up_Santa_Hat, C_Light_Up_Santa_Hat_Black, C_Light_Up_Santa_Hat_Blue, C_Light_Up_Santa_Hat_Green, C_Light_Up_Santa_Hat_Yellow)
- );
- break;
- default:
- break;
- }
- // Just display what item is in a category then return
- if (getarg(1, false)) {
- .@str$ = "";
- .@size = getarraysize(.@ID);
- for (.@i = 0; .@i < .@size; .@i++) {
- if (.@i == .@size - 1)
- .@str$ += sprintf("%s%s", (.@i > 0 ? " or " : ""), getitemname(.@ID[.@i]));
- else
- .@str$ += sprintf("%s%s", (.@i > 0 ? ", " : ""), getitemname(.@ID[.@i]));
- }
- mesf("- %s.", .@str$);
- return;
- }
- .@i = getarraysize(.@ID) - 1;
- if (.@i < 0)
- .@i = 0;
- .@i = rand(.@i);
- .@j = rand(10000);
- if (.@j < .@Chance)
- return .@ID[.@i];
- return Gold_Coin; // TODO: change to Ancient_Coin
- OnInit:
- setarray(.Required,
- Jellopy, 100,
- Red_Potion, 50,
- ITEMID_ZENY, 10000000
- );
- // Do you want the flavour text to be condensed after reading it the first time?
- // They will have to read it again if they relog.
- // (true / false)
- .Condense_Text = true;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement