summaryrefslogtreecommitdiff
path: root/npc/craft/alchemy.txt
blob: 68d2d8014c1a1b6bbcaa6736f18f5e25b862678e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// TMW2 Script
// Author:
//  Jesusalva
// Description:
//  Alchemy System (Player, Guild, NPC)
// Notes:
//  Base for Evol MR

// Usage: AlchemySystem ({scope})
// Scopes: CRAFT_NPC, CRAFT_PLAYER, CRAFT_GUILD
// If an invalid scope is passed, .knowledge won't be set but will be required
// Returns true on success, false on failure
function	script	AlchemySystem	{
    // Set .scope, .knowledge and .success
    .scope=getarg(0, CRAFT_PLAYER);
    if (.scope == CRAFT_PLAYER)
    {
        copyarray(.knowledge,RECIPES_ALCHEMY,getarraysize(RECIPES_ALCHEMY));
    }
    else if (.scope == CRAFT_GUILD)
    {
       copyarray( .knowledge,getd("$RECIPES_ALCHEMY_"+getcharid(2)),getarraysize(getd("$RECIPES_ALCHEMY_"+getcharid(2))) );
    }
    .success=false;

    setskin "craft2";
    .@var$ = requestcraft(2);
    .@craft = initcraft(.@var$);
    .@entry = findcraftentry(.@craft, CRAFT_ALCHEMY);
    if (debug || $@GM_OVERRIDE) mes "found craft entry: " + .@entry;
    if (debug || $@GM_OVERRIDE) mes "knowledge value: " + .knowledge[.@entry];
    if (.@entry < 0) {
            .success=false;
    } else {
        if (.scope == CRAFT_NPC || .knowledge[.@entry]) {
            if (GSET_FIXED_ALCHEMY) {
                .@m=limit(1, GSET_FIXED_ALCHEMY, 25);
            } else {
                .@max=(is_sponsor() ? 25 : 10);
                mesc l("How many to brew? (%d-%d)", 1, .@max);
                input(.@m, 1, .@max);
            }
            // Alchemy loop
            .@i=0;
            while (.@i < .@m) {
                .@s=validatecraft(.@craft);
                // Could not validate (not enough resources)
                if (!.@s) {
                    mesc l("Not crafting - insufficient materials!"), 1;
                    break;
                }
                .@s=usecraft(.@craft);
                .@i++;
                // Exploiting?!
                if (!.@s)
                    break;
            }
            .success=true;
        } else {
            .success=false;
        }
    }
    deletecraft .@craft;
    setskin "";
    return .success;
}

/*
Alchemy can rely in cross-building
Where a weaker potion is base for a stronger one
Standard Duration = 2 minutes ~ 5 minutes

Reagents:
	Water
	...Eggs?
	...Milk?
	Nymph Poison
	Death Potion
	Manapple

Products:
	Tea (Chamomile, Spearmint, Oolong, Jasmine, Yerba Mate?)
	→ Argaes Water + «Herbal Reagent»
OK	Coffee (Shadow Herb + Tonori Water)
OK	Piberries Infusion (Piberries + Curshroom)
OK	Atropos Mixture (Lachesis Brew + Clotho Liquor)
OK	Death Potion (Dragonfruit + Nightshade Tea)
RE	Smoke Grenade (Cactus pot + Coal)
RE	Grenade (Cactus pot + Sulfur Powder)
RE	Scented Grenade (Cactus pot + Moss)
OK	Haste Potion (Plushshroom)
OK	Strength Potion (Chagashroom)
	Return Potion (Hurnscald Recipe => Ocean Croc Claw + Hard Spike? Grass Seeds?)
OK	Status Reset (Curshroom + Mana Piou Feather)
RE	Homun Stat Reset (Curshroom + Manapple)
OK	Move Speed (Gem Powder + Fluor Powder)
OK	Precision (Piberries + Mt. Snake Egg)
OK	Dodge Potion (Piberries + Snake Egg)
OK	Luck, Dex, Int, Vit, Agi (Gems + Tea)
OK	Sacred Life (Golden Apple + Elixir of Life)
OK	Sacred Mana (Golden Apple + Celestia Tea)
OK	Sacred Revival (Sacred Life + Sacred Mana)
RE	Broken Warp Crystal? (Wurtizite + Black Mamba Skin)
RE	Magic Apple? (Divine Apple + Manapple? Death Potion? Sacred Life/Revival?)
OK	Purification Potion (Nymph Poison + Sacred Life)
OK	Iced Bottle (Tonori W. + Argaes W.)
RE	Insurance Contract (» Insurance?) (Quill + Reed Bundle)
RE	Insurance (Quill + Death Potion)
	Mysterious Fruit? (Legendary)

For all Scrolls: Quill + ? (depends on scroll itself)
	» Summon Scrolls (Based on mob parts, 1× mob?)
		→ alignment_cansummon() + SummonMagic() or summon() directly
		→ Criteria between weak/strong version is alignment
		→ When aligned, scrolls always summon strongest ver
		→ Level must be equal or superior to strongest, tho
		» Maggot/Giant Maggot: Bug Leg (Lv 40)
		» CaveMaggot: Maggot Slime
		» Green Dragon/Nightmare: Dragon Scales (Lv 105)
		» Wolvern: Wolvern Pelt
		» Moggun/Yeti: Frozen Yeti Tear (Lv 60)
		» Terranite/T.Prot.: Terranite Ore (Lv 90)
	» Magnus Heal (Lifestone)
	» Area Provoke?
	» Guild Skills?

		// Skills for Aegis Shield, all beyond maximum level
		// Slimes, Snakes, Fairies, Darth Duck, Mr. Prickel
		// PoisonS.Mushroom
		// TODO: Lizards, (Black)Scorpions, Moonshroom, Black Mamba, Centaur
		skill TMW2_HALHISS, 10;
		skill TMW2_KALSPIKE, 9;
		skill TMW2_LIMERIZER, 10;
		skill TMW2_FAIRYKINGDOM, 9;
		skill TMW2_DUCKY, 10;
		skill TMW2_FAIRYEMPIRE, 10;

*/