diff options
-rw-r--r-- | db/constants.conf | 10 | ||||
-rw-r--r-- | npc/functions/aurora.txt | 124 |
2 files changed, 127 insertions, 7 deletions
diff --git a/db/constants.conf b/db/constants.conf index 56de5727f..510b3ccbf 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4541,5 +4541,15 @@ constants_db: { MAZE_EAST: 2 MAZESOUTH: 3 + comment__: "Aurora Event constants" + FY_MISC: 0 + FY_BP: 1 + FY_WARP: 2 + FY_POT: 3 + FY_HEAL: 4 + FY_ORE: 5 + FY_MAGIC: 6 + FY_GIFT: 7 + @include "conf/import/constants.conf" } diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index 47df65945..88027889d 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -133,6 +133,99 @@ function script FYNewEvent { +// Returns an item: (type, lv) +// types: misc, bp, warp, pot, heal, ore, magic, gift +// maxlv: 3 5 2 3 - 6 - 5 +function script FYT { + .@t=getarg(0); + .@l=getarg(1, 0); + switch (.@t) { + case FY_MISC: + switch (.@l) { + case 1: + return any(SmokeGrenade, ScentedGrenade, Grenade, Lockpicks); + case 2: + return any(MysteriousBottle, TreasureMap); + case 3: + return any(ArcmageBoxset, MercBoxA); + } + break; + case FY_BP: + switch (.@l) { + case 1: + return any(EquipmentBlueprintA, AlchemyBlueprintA); + case 2: + return any(EquipmentBlueprintB, AlchemyBlueprintB); + case 3: + return any(EquipmentBlueprintC, AlchemyBlueprintC); + case 4: + return any(EquipmentBlueprintD, AlchemyBlueprintD); + case 5: + return any(EquipmentBlueprintE, AlchemyBlueprintE); + } + break; + case FY_WARP: + switch (.@l) { + case 1: + return any(TulimWarpCrystal, CandorWarpCrystal, HurnsWarpCrystal, LoFWarpCrystal); + case 2: + return any(HalinWarpCrystal, NivalWarpCrystal, FrostiaWarpCrystal); + } + break; + case FY_POT: + switch (.@l) { + case 1: + return any(LukPotionA, DexPotionA, IntPotionA, VitPotionA, AgiPotionA, HastePotion, StrengthPotion); + case 2: + return any(LukPotionB, DexPotionB, IntPotionB, VitPotionB, AgiPotionB, MoveSpeedPotion, PrecisionPotion, DodgePotion); + case 3: + return any(SacredImmortalityPotion, SacredLifePotion, SacredManaPotion); + } + break; + case FY_ORE: + switch (.@l) { + case 1: + return any(CopperIngot, IronIngot); + case 2: + return any(SilverIngot, GoldIngot); + case 3: + return any(TinIngot, LeadIngot); + case 4: + return any(TitaniumIngot, TerraniteIngot); + case 5: + return any(IridiumIngot, PlatinumIngot); + case 6: + return any(Diamond, Ruby, Emerald, Sapphire, Topaz, Amethyst); + } + break; + case FY_GIFT: + switch (.@l) { + case 1: + return BronzeGift; + case 2: + return SilverGift; + case 3: + return GoldenGift; + case 4: + return PrismGift; + case 5: + return SupremeGift; + } + break; + // Single cases doesn't needs break + case FY_HEAL: + return any(SpearmintTea, Coffee, ClothoLiquor); + case FY_MAGIC: + return any(FluoPowder, Quill, ScholarshipBadge);; + } + + return Exception("Invalid cast to FYEIT: "+.@t+" (Lv "+.@l+")", RB_IRCBROADCAST|RB_DEBUGMES|RB_GLOBALANNOUNCE, Bread); +} + + + + + // Modify Kamelot function script FYE_Kamelot { .@g=getcharid(2); @@ -201,9 +294,25 @@ function script FYEConf_Regnum { // Configure World Expo function script FYEConf_Expo { $WORLDEXPO_ENEMY$=any("Xakabael the Dark", "Isbamuth", "Saulc", "SUSAN", "Terogan"); - setarray $FYREWARD_PT, 100, 200; - setarray $FYREWARD_ID, Bread, Bread; - setarray $FYREWARD_AM, 1, 2; + setarray $FYREWARD_PT, 100, 220, 440, 880, 1760, + 3520, 7040, 10560, 14080, 21120, + 28160, 42240, 56320, 84480, 112640, + 168960, 225280; + + // FYEIT: misc, bp, warp, pot, heal, ore, magic, gift + // maxlv: 3 5 2 3 - 6 - 5 + .@b=FY_BP; .@g=FY_GIFT; .@h=FY_HEAL; .@m=FY_MISC; .@mg=FY_MAGIC; + .@o=FY_ORE; .@p=FY_POT; .@w=FY_WARP; + + // Misc: AncientBlueprint, StrangeCoin + setarray $FYREWARD_ID, FYT(.@g, 1), StrangeCoin, FYT(.@m, 1), FYT(.@b, 1), FYT(.@p, 1), + FYT(.@h, 1), FYT(.@o, 1), FYT(.@g, 2), FYT(.@w, 1), FYT(.@b, 2), + FYT(.@m, 2), FYT(.@p, 2), FYT(.@o, 2), FYT(.@b, 3), FYT(.@mg, 1), + FYT(.@o, 3), FYT(.@o, 4); + setarray $FYREWARD_AM, 1, 20, 1, 1, any(1,2), + rand2(1,3), 1, 1, 1, 1, + 1, any(1,2), 1, 1, 1, + 1, 1; $FYLOGIN_PTS=rand2(18,22); return; } @@ -212,9 +321,10 @@ function script FYEConf_Expo { // Modify Treasure Chests function script FYE_Expo { // TODO: Merit-based random formula - getitem EventTreasure1, rand2(6); - getitem EventTreasure2, rand2(4); - getitem EventTreasure3, rand2(2); + getitem EventTreasure1, 1+rand2(15); // 15 + getitem EventTreasure2, rand2(6); // 15 + getitem EventTreasure3, rand2(4); // 15 + // Total: (15+15+15)=1~45 points [AVG: 22 pts] return; } @@ -236,7 +346,7 @@ function script FYEConf_Fishing { // Modify Fishing function script FYE_Fishing { // TODO: Merit-based random formula - getitem EventFish, 1; + getitem EventFish, rand2(1, 6); return; } |