diff options
Diffstat (limited to 'npc/craft/recipes.txt')
-rw-r--r-- | npc/craft/recipes.txt | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/npc/craft/recipes.txt b/npc/craft/recipes.txt index c3afa572d..e388c794f 100644 --- a/npc/craft/recipes.txt +++ b/npc/craft/recipes.txt @@ -167,3 +167,54 @@ OnInit: .sex = G_OTHER; .distance = 1; end; +} + +// Below this line are utils for Gacha. We use callfunc() on itemDB. +// Types: CRAFT_COOKING, CRAFT_ALCHEMY, CRAFT_EQUIPMENT +// Rarity: 1 - basic, 2 - intermediary, 4 - advanced, 8 - expert, 16 - master +// Level equivalents: 1: (1~20) 2: (21~44), 3: (45~75), 4: (76~99), 5: 100+ +function script MakeBlueprint { + .@type=getarg(0, -1); + .@rarity=getarg(1, 1); + + switch (.@type) { + case CRAFT_ALCHEMY: + if (.@rarity & CRAFT_BASIC) { + array_push(.@recipes, CraftPiberriesInfusion); + array_push(.@recipes, CraftHastePotion); + array_push(.@recipes, CraftStrengthPotion); + } + if (.@rarity & CRAFT_INTERMEDIARY) { + array_push(.@recipes, CraftLukPotionA); + array_push(.@recipes, CraftDexPotionA); + array_push(.@recipes, CraftIntPotionA); + array_push(.@recipes, CraftAgiPotionA); + array_push(.@recipes, CraftVitPotionA); + array_push(.@recipes, CraftSpeedPotion); + } + if (.@rarity & CRAFT_ADVANCED) { + array_push(.@recipes, CraftResetPotion); + array_push(.@recipes, CraftPrecisionPotion); + array_push(.@recipes, CraftDodgePotion); + } + if (.@rarity & CRAFT_EXPERT) { + array_push(.@recipes, CraftLukPotionB); + array_push(.@recipes, CraftDexPotionB); + array_push(.@recipes, CraftIntPotionB); + array_push(.@recipes, CraftAgiPotionB); + array_push(.@recipes, CraftVitPotionB); + } + if (.@rarity & CRAFT_MASTER) { + array_push(.@recipes, CraftLukPotionC); + array_push(.@recipes, CraftDexPotionC); + array_push(.@recipes, CraftIntPotionC); + array_push(.@recipes, CraftAgiPotionC); + array_push(.@recipes, CraftVitPotionC); + } + break; + default: + return Exception("Invalid blueprint type "+.@type+" - item was lost."); + } + return; +} + |