From 0e815bf70a0ab74416b15c2384b935c1da0db271 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 24 May 2019 23:54:33 -0300 Subject: Alchemy Blueprints --- npc/craft/recipes.txt | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'npc/craft/recipes.txt') 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; +} + -- cgit v1.2.3-70-g09d2