summaryrefslogtreecommitdiff
path: root/npc/craft/recipes.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-24 23:54:33 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-24 23:54:33 -0300
commit0e815bf70a0ab74416b15c2384b935c1da0db271 (patch)
tree332b01dd4b0471fbeef48d5f9051819e91c8e67f /npc/craft/recipes.txt
parent9c76064b28f0aecbdc4d9955225a5c40c55fa02b (diff)
downloadserverdata-0e815bf70a0ab74416b15c2384b935c1da0db271.tar.gz
serverdata-0e815bf70a0ab74416b15c2384b935c1da0db271.tar.bz2
serverdata-0e815bf70a0ab74416b15c2384b935c1da0db271.tar.xz
serverdata-0e815bf70a0ab74416b15c2384b935c1da0db271.zip
Alchemy Blueprints
Diffstat (limited to 'npc/craft/recipes.txt')
-rw-r--r--npc/craft/recipes.txt51
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;
+}
+