Mercurial > hg > batmud > ggrtf
annotate gm-alchemist.tf @ 1655:356c3c26aee6
Get rid of ISO-8859-1 in copyrights.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 28 Sep 2021 02:24:25 +0300 |
parents | 87f45da5abd1 |
children |
rev | line source |
---|---|
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 ;; |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 ;; GgrTF::Alchemist - Alchemist guild support and utility macros |
1655
356c3c26aee6
Get rid of ISO-8859-1 in copyrights.
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
3 ;; (C) Copyright 2010-2015 Matti Hamalainen (Ggr) |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 ;; |
1454
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
6 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
7 ;; This program is free software; you can redistribute it and/or |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
8 ;; modify it under the terms of the GNU General Public License |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
9 ;; version 2 as published by the Free Software Foundation. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
10 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
11 ;; This program is distributed in the hope that it will be useful, |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
14 ;; file "COPYING.txt" for more details. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
15 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
16 ;; You should have received a copy of the GNU General Public License |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
17 ;; along with this program; if not, write to the Free Software |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
18 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
19 ;; MA 02110-1301 USA. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
20 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1375
diff
changeset
|
21 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 ;; |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
23 ;; NOTICE! This file requires GgrTF (version 0.6.15 or later) to be loaded. |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 ;; |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 /loaded GgrTF:Alchemist |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 /test prdefmodule("Alchemist") |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
29 ;; General settings and data |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1375
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
31 /eval /set galch_file=%{HOME}/alch_results.txt |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
32 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
33 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
34 /set galch_cans=\ |
1301 | 35 arm_ear \ |
36 antenna_beak \ | |
37 bladder_brain \ | |
38 eye_foot \ | |
39 heart_horn \ | |
40 leg_liver \ | |
41 lung_kidney \ | |
42 nose_paw \ | |
43 spleen_stomach \ | |
44 tail_snout \ | |
45 tendril_wing \ | |
1302
cde14bd45f91
Change one organ can name.
Matti Hamalainen <ccr@tnsp.org>
parents:
1301
diff
changeset
|
46 c_gill |
1301 | 47 |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
48 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
49 /set galch_jars=\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
50 apple_arnica_barberry \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
51 bloodmoss_bloodroot_blueberry \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
52 boneset_borage_burdock \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
53 cabbage_carrot_cauliflower \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
54 chickweed_chicory_comfrey \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
55 costmary_cotton_crystalline \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
56 elder_foxglove_garlic \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
57 ginseng_hemlock_henbane \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
58 holly_honeysuckle_jaslah \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
59 lettuce_lobelia_lungwort \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
60 mandrake_mangrel_mistletoe \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
61 mugwort_mushroom_nightshade \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
62 onion_pear_plum \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
63 potato_raspberry_rhubarb \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
64 soapwort_spinach_strawberry \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
65 sweetflag_thistle_tomato \ |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
66 turnip_vineseed_waterlily \ |
1368 | 67 wolfbane_wormwood_yarrow \ |
68 j_jimsonweed | |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
69 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
70 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
71 /set galch_organs=antenna|arm|beak|bladder|brain|ear|eye|foot|gill|heart|horn|kidney|leg|liver|lung|nose|paw|snout|spleen|stomach|tail|tendril|wing |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
72 /set galch_minerals=adamantium|aluminium|anipium|batium|brass|bronze|cesium|chromium|cobalt|copper|darksteel|diggalite|dukonium|duraluminium|durandium|electrum|gold|graphite|hematite|highsteel|illumium|indium|iridium|iron|kryptonite|lead|magnesium|mithril|molybdenum|mowgles|mowglite|nickel|nullium|osmium|palladium|pewter|platinum|potassium|pyrite|quicksilver|rhodium|silicon|silver|starmetal|steel|tadmium|tin|titanium|tormium|tungsten|uranium|vanadium|zhentorium|zinc |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
73 /set galch_herbs=apple|arnica|barberry|blood_moss|bloodroot|blueberry|boneset|borage|burdock|cabbage|carrot|cauliflower|chickweed|chicory|comfrey|costmary|cotton|crystalline|elder|foxglove|garlic|ginseng|hcliz|hemlock|henbane|holly|honeysuckle|jaslah|jimsonweed|lettuce|lobelia|lungwort|mandrake|mangrel|mistletoe|mugwort|mushroom|mystic_carrot|mystic_spinach|nightshade|onion|pear|plum|potato|raspberry|rhubarb|soapwort|spinach|strawberry|sweet_flag|thistle|tomato|turnip|vine_seed|water_lily|wolfbane|wormwood|yarrow |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
74 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
75 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
76 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
77 ;; Automatically label jars and cans |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
78 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
79 /def -i galch_label =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
80 /let _item=%{1}%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
81 /let _num=1%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
82 /shift%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
83 /while ({#})\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
84 @@label %{_item} %{_num} as %{1}%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
85 /let _num=$[_num + 1]%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
86 /shift%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
87 /done |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
88 |
1375
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
89 |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
90 ;@command /dolabels |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
91 ;@desc Automatically re-label any jars and cans you have, to match the |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
92 ;@desc naming scheme of GgrTF Alchemist module for those containers. |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
93 /def -i dolabels =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
94 /galch_label jar %{galch_jars}%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
95 /galch_label can %{galch_cans} |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
96 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
97 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
98 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
99 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
100 /def -i galch_get_item =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
101 /let _item=$[replace("_", "", {1})]%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
102 /let _match=$[strcat("^", _item, "_|_", _item, "_|_", _item, "$")]%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
103 /shift%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
104 /while ({#})\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
105 /if (regmatch(_match, {1})) /result {1}%;/endif%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
106 /shift%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
107 /done%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
108 /result "" |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
109 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
110 |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
111 /def -i galch_herb_fixes =\ |
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
112 /if (regmatch("^vine|^seed", {1})) /return "vine_seed"%;\ |
1307
351fafb5e1fb
Fix handling of water lilies.
Matti Hamalainen <ccr@tnsp.org>
parents:
1306
diff
changeset
|
113 /elseif (regmatch("lily", {1})) /return "water_lily"%;\ |
1306
0377397445ef
Fixup 'sponge mushroom' to 'mushroom'.
Matti Hamalainen <ccr@tnsp.org>
parents:
1304
diff
changeset
|
114 /elseif (regmatch("mushroom", {1})) /return "mushroom"%;\ |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
115 /else /return {1}%;/endif |
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
116 |
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
117 |
1375
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
118 ;@command /mix <mineral> <organ> <herb> |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
119 ;@desc Mix a potion from given materials. This command will automatically |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
120 ;@desc retrieve organ and herb components from their specific containers. |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
121 ;@desc The other logic in the module will also return them into those containers |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
122 ;@desc if the skill is interrupted for some reason. |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
123 ;@desc Also, organ and herb names are checked for sanity. |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
124 /def -i mix =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
125 /if ({#} < 3)\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
126 /msq Usage: /mix <mineral> <organ> <herb>%;\ |
1374
191114d8a356
Another reset for alch_testing flag.
Matti Hamalainen <ccr@tnsp.org>
parents:
1373
diff
changeset
|
127 /set alch_testing=0%;\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
128 /break%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
129 /endif%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
130 /set alch_mineral=%{1}%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
131 /set alch_organ=%{2}%;\ |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
132 /set alch_herb=$[galch_herb_fixes({3})]%;\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
133 /if (!regmatch(strcat("^(",galch_minerals,")$"), alch_mineral))\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
134 /msq Invalid mineral '%{alch_mineral}'.%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
135 /let _error=1%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
136 /endif%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
137 /if (!regmatch(strcat("^(",galch_organs,")$"), alch_organ))\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
138 /msq Invalid organ '%{alch_organ}'.%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
139 /let _error=1%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
140 /endif%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
141 /if (!regmatch(strcat("^(",galch_herbs,")$"), alch_herb))\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
142 /msq Invalid herb/plant '%{alch_herb}'.%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
143 /let _error=1%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
144 /endif%;\ |
1373
424d6a3f14f5
Reset alch_testing flag when there is an error in /mix macro arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1372
diff
changeset
|
145 /if (_error)\ |
424d6a3f14f5
Reset alch_testing flag when there is an error in /mix macro arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1372
diff
changeset
|
146 /set alch_testing=0%;\ |
424d6a3f14f5
Reset alch_testing flag when there is an error in /mix macro arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1372
diff
changeset
|
147 /break%;\ |
424d6a3f14f5
Reset alch_testing flag when there is an error in /mix macro arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1372
diff
changeset
|
148 /endif%;\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
149 /set alch_can=$(/galch_get_item %{alch_organ} %{galch_cans})%;\ |
1360
34af09c59561
Lessen spam from alchemist potion mix macro.
Matti Hamalainen <ccr@tnsp.org>
parents:
1358
diff
changeset
|
150 /if (alch_can=~"")\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
151 /msq No matching can for organ '%{alch_organ}'.%;\ |
1296
5dbfd9e3703d
Use /grepeat to kill the delayed organ extracting from can if potion mixing is interrupted or fails due to missing components etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1293
diff
changeset
|
152 /let _error=1%;\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
153 /endif%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
154 /set alch_jar=$(/galch_get_item %{alch_herb} %{galch_jars})%;\ |
1360
34af09c59561
Lessen spam from alchemist potion mix macro.
Matti Hamalainen <ccr@tnsp.org>
parents:
1358
diff
changeset
|
155 /if (alch_jar=~"")\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
156 /msq No matching jar for herb '%{alch_herb}'.%;\ |
1296
5dbfd9e3703d
Use /grepeat to kill the delayed organ extracting from can if potion mixing is interrupted or fails due to missing components etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1293
diff
changeset
|
157 /let _error=1%;\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
158 /endif%;\ |
1373
424d6a3f14f5
Reset alch_testing flag when there is an error in /mix macro arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1372
diff
changeset
|
159 /if (_error)\ |
424d6a3f14f5
Reset alch_testing flag when there is an error in /mix macro arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1372
diff
changeset
|
160 /set alch_testing=0%;\ |
424d6a3f14f5
Reset alch_testing flag when there is an error in /mix macro arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1372
diff
changeset
|
161 /break%;\ |
424d6a3f14f5
Reset alch_testing flag when there is an error in /mix macro arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1372
diff
changeset
|
162 /endif%;\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
163 /set alch_st=1%;\ |
1366
82d30c2f10d0
Further fixes in handling of certain herbs in potion mixing macro etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1363
diff
changeset
|
164 /let _herb=$[replace("_"," ", alch_herb)]%;\ |
82d30c2f10d0
Further fixes in handling of certain herbs in potion mixing macro etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1363
diff
changeset
|
165 @@get %{_herb} from %{alch_jar}%;\ |
1296
5dbfd9e3703d
Use /grepeat to kill the delayed organ extracting from can if potion mixing is interrupted or fails due to missing components etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1293
diff
changeset
|
166 /set alch_process=$(/grepeat -14 1 /galch_get_organ)%;\ |
1366
82d30c2f10d0
Further fixes in handling of certain herbs in potion mixing macro etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1363
diff
changeset
|
167 /msq @{BCwhite}Mixing potion from@{n} '@{BCyellow}%{alch_mineral}@{n}', '@{BCcyan}%{alch_organ}@{n}' and '@{BCgreen}%{_herb}@{n}'...%;\ |
82d30c2f10d0
Further fixes in handling of certain herbs in potion mixing macro etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1363
diff
changeset
|
168 @@use mix potion at prepared flask use %{alch_mineral} %{alch_organ} %{_herb} |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
169 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
170 |
1375
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
171 ;@command /tmix <mineral> <organ> <herb> |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
172 ;@desc Same as /mix, will mix a potion from given materials, but also |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
173 ;@desc performs functions for potion research. Finished potion will be |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
174 ;@desc submitted to authenticator, so only use this command when you |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
175 ;@desc are doing potion research and reside in the authenticator room of the alchemist guild. |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
176 /def -i tmix =\ |
1371
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
177 /if (alch_testing)\ |
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
178 /msq Previous test still running.%;\ |
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
179 /else \ |
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
180 /set alch_testing=1%;\ |
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
181 /set alch_submit=1%;\ |
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
182 /mix %{*}%;\ |
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
183 /endif |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
184 |
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
185 |
1375
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
186 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
187 ;; Helper functions |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
188 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1281
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
189 /def -i galch_get_organ =\ |
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
190 /if (alch_st)\ |
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
191 /set alch_hasorgan=1%;\ |
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
192 @@get %{alch_organ} from %{alch_can}%;\ |
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
193 /endif |
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
194 |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
195 /def -i galch_return =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
196 /set alch_st=0%;\ |
1296
5dbfd9e3703d
Use /grepeat to kill the delayed organ extracting from can if potion mixing is interrupted or fails due to missing components etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1293
diff
changeset
|
197 /kill %{alch_process}%;\ |
5dbfd9e3703d
Use /grepeat to kill the delayed organ extracting from can if potion mixing is interrupted or fails due to missing components etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1293
diff
changeset
|
198 /if (alch_hasorgan)\ |
1281
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
199 /set alch_hasorgan=0%;\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
200 /msq Returning '%{alch_organ}' in can '%{alch_can}'%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
201 @@put %{alch_organ} in %{alch_can}%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
202 /endif%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
203 /if (alch_jar!~"" & alch_herb!~"")\ |
1366
82d30c2f10d0
Further fixes in handling of certain herbs in potion mixing macro etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1363
diff
changeset
|
204 /let _herb=$[replace("_"," ", alch_herb)]%;\ |
82d30c2f10d0
Further fixes in handling of certain herbs in potion mixing macro etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1363
diff
changeset
|
205 /msq Returning '%{_herb}' in can '%{alch_jar}'%;\ |
82d30c2f10d0
Further fixes in handling of certain herbs in potion mixing macro etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1363
diff
changeset
|
206 @@put %{_herb} in %{alch_jar}%;\ |
1371
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
207 /endif%;\ |
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
208 /set alch_testing=0 |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
209 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
210 |
1296
5dbfd9e3703d
Use /grepeat to kill the delayed organ extracting from can if potion mixing is interrupted or fails due to missing components etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1293
diff
changeset
|
211 /gdef -i -msimple -Ealch_st -aBCred -t"You need a prepared alchemist's flask first." galch_need_flask =\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
212 /galch_return |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
213 |
1281
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
214 |
1362
d97cf405902f
Adjusts trigger regexp patterns for detecting certain failures of having requires items/minerals/etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1361
diff
changeset
|
215 /gdef -i -mregexp -Ealch_st -aBCred -t"^You do not seem to have any '([a-z_ -]+)' on you\.$" galch_has_no1 =\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
216 /galch_return |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
217 |
1368 | 218 /gdef -i -mregexp -Ealch_st -aBCred -t"^ \.\. but you do not (seem to have any '[a-z_ -]+' on you|have enough '[a-z_ -]+' left)\." galch_has_no2 =\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
219 /galch_return |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
220 |
1371
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
221 |
1281
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
222 /def -i galch_interrupted =\ |
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
223 /if (alch_st) /galch_return%;/endif |
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
224 |
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
225 /test prlist_insert("event_skill_intr", "galch_interrupted") |
1358
b822318d149d
Add event_skill_stop support to alch module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1316
diff
changeset
|
226 /test prlist_insert("event_skill_stop", "galch_interrupted") |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
227 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
228 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
229 /gdef -i -F -aBCwhite -mregexp -t"^You mix the ingredients together and wait for the contents settle. A flask containing" galch_flask_ready =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
230 /set alch_st=0%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
231 /set alch_close=0%;\ |
1296
5dbfd9e3703d
Use /grepeat to kill the delayed organ extracting from can if potion mixing is interrupted or fails due to missing components etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
1293
diff
changeset
|
232 /set alch_hasorgan=0%;\ |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
233 /if (alch_submit)\ |
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
234 /set alch_submit=0%;\ |
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
235 @@submit flask%;\ |
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
236 /endif |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
237 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
238 /def -i galch_update =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
239 /let _file=$[tfopen(galch_file, "a")]%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
240 /if (_file < 0)\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
241 /msq Could not open '%{galch_file}'! Match data not saved!%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
242 /return 0%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
243 /else \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
244 /let _line=%{alch_mineral} %{alch_organ} %{alch_herb} %{1}%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
245 /test tfwrite(_file, _line)%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
246 /test tfclose(_file)%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
247 /return 1%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
248 /endif |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
249 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
250 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
251 /def -i galch_add_nomatch =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
252 /if (alch_close)\ |
1367
79fc9fd2626a
Add trigger for already submitted potion hits + cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents:
1366
diff
changeset
|
253 /msq Ready for next mix.%;\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
254 /else \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
255 /if (galch_update("-"))\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
256 /msq Added no match for %{alch_mineral}, %{alch_organ}, %{alch_herb} to database.%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
257 /endif%;\ |
1371
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
258 /endif%;\ |
bacbc8e248a5
Prevent the user from starting another potion test before the previous has
Matti Hamalainen <ccr@tnsp.org>
parents:
1369
diff
changeset
|
259 /set alch_testing=0 |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
260 |
1367
79fc9fd2626a
Add trigger for already submitted potion hits + cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents:
1366
diff
changeset
|
261 /gdef -i -F -aCgreen -mregexp -t"^You submit the contents of a flask containing " galch_submit_done =\ |
1361
4ac333d66158
Specifically use 'empty flask' and 'prepared flask' as targets in certain actions.
Matti Hamalainen <ccr@tnsp.org>
parents:
1360
diff
changeset
|
262 @@drop empty flask%;\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
263 /repeat -2 1 /galch_add_nomatch |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
264 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
265 /gdef -i -F -aCgreen -msimple -t"You feel close..." galch_submit_close1 =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
266 /set alch_close=1 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
267 |
1367
79fc9fd2626a
Add trigger for already submitted potion hits + cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents:
1366
diff
changeset
|
268 /gdef -i -F -aCgreen -mregexp -Ealch_close -t"^\.\.\.could be ([a-z_ -]+)\." galch_submit_close2 =\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
269 /let _match=$[replace(" ","_",{P1})]%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
270 /if (galch_update(strcat("?", _match)))\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
271 /msq Added near-match '%{_match}' (%{alch_mineral}, %{alch_organ}, %{alch_herb}) to database.%;\ |
1372
71d077d39236
Do not set alch_testing to 0 in some places, this is not "concurrency-safe".
Matti Hamalainen <ccr@tnsp.org>
parents:
1371
diff
changeset
|
272 /endif |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
273 |
1368 | 274 /gdef -i -F -aCgreen -mregexp -t"^Flask '([a-z_ -]+)' accepted\." galch_submit_match =\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
275 /set alch_close=1%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
276 /let _match=$[replace(" ","_",{P1})]%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
277 /if (galch_update(strcat("!", _match)))\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
278 /msq Added MATCH '%{_match}' (%{alch_mineral}, %{alch_organ}, %{alch_herb}) to database.%;\ |
1372
71d077d39236
Do not set alch_testing to 0 in some places, this is not "concurrency-safe".
Matti Hamalainen <ccr@tnsp.org>
parents:
1371
diff
changeset
|
279 /endif |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
280 |
1367
79fc9fd2626a
Add trigger for already submitted potion hits + cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents:
1366
diff
changeset
|
281 /gdef -i -F -aBCred -msimple -t"You've already researched that flask." galch_submit_already =\ |
1372
71d077d39236
Do not set alch_testing to 0 in some places, this is not "concurrency-safe".
Matti Hamalainen <ccr@tnsp.org>
parents:
1371
diff
changeset
|
282 /set alch_close=1 |
1367
79fc9fd2626a
Add trigger for already submitted potion hits + cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents:
1366
diff
changeset
|
283 |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
284 |
1375
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
285 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
286 ;; Herb and organ management helpers |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
287 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
288 ;; Store organ into proper can |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
289 /def -i galch_store_organ =\ |
1280 | 290 /let _organ=%{1}%;\ |
291 /let _can=$(/galch_get_item %{_organ} %{galch_cans})%;\ | |
1285 | 292 /if (opt_canmisc=~"on" | _can=~"") /let _can=can_misc%;/endif%;\ |
1280 | 293 /msq Store '%{_organ}' in '%{_can}'.%;\ |
294 @@get %{_organ}%;\ | |
295 @@put %{_organ} in %{_can} | |
296 | |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
297 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
298 ;; Store herb into proper jar |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
299 /def -i galch_store_herb =\ |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
300 /let _herb=$[galch_herb_fixes({1})]%;\ |
1369
80627c882e68
Handle mistletoe picking better, fix automatic placement in jar.
Matti Hamalainen <ccr@tnsp.org>
parents:
1368
diff
changeset
|
301 /if (regmatch("^(purplish|light green|a green|white|orange|red|blue|green|yellow|head of|orange|brown) ([a-z]+)", _herb))\ |
1280 | 302 /let _herb=%{P2}%;\ |
303 /endif%;\ | |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
304 /let _jar=$(/galch_get_item %{_herb} %{galch_jars})%;\ |
1308 | 305 /let _herb=$[replace("_"," ",_herb)]%;\ |
1285 | 306 /if (opt_canmisc=~"on" | _jar=~"") /let _jar=jar_misc%;/endif%;\ |
1280 | 307 /msq Store '%{_herb}' in '%{_jar}'.%;\ |
308 @@put %{_herb} in %{_jar} | |
1285 | 309 |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
310 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
311 ;; Dissection and herb picking triggers |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
312 /def -i -F -mregexp -t"^You carefully remove a bloody bodypart '([a-z]+)'\.$" galch_dissect1 =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
313 /test galch_store_organ({P1}) |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
314 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
315 /def -i -F -mregexp -t"^ \.\.and slicing expertly, you cut out a second organ '([a-z]+)'\.$" galch_dissect2 =\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
316 /test galch_store_organ({P1}) |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
317 |
1280 | 318 /def -i -F -mregexp -t"^You pick ([a-z -]+)\.$" galch_pick =\ |
1304
588d9dac9107
Don't try to store any "your noses" when picking things.
Matti Hamalainen <ccr@tnsp.org>
parents:
1303
diff
changeset
|
319 /if ({P1}!~"your nose")\ |
588d9dac9107
Don't try to store any "your noses" when picking things.
Matti Hamalainen <ccr@tnsp.org>
parents:
1303
diff
changeset
|
320 /test galch_store_herb({P1})%;\ |
588d9dac9107
Don't try to store any "your noses" when picking things.
Matti Hamalainen <ccr@tnsp.org>
parents:
1303
diff
changeset
|
321 /endif |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
322 |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
323 |
1375
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
324 ;@command /wconlook <herb or organ name> |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
325 ;@desc Automatically look into a container containing specified type of herb or organ. |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
326 ;@desc This is basically the same as 'look at jar x' or 'look at can y', except |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
327 ;@desc "/wconlook blueberry" would automatically look into the correct container. |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
328 /def -i wconlook =\ |
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
329 /let _item=$[galch_herb_fixes({*})]%;\ |
1279
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
330 /let _cont=$(/galch_get_item %{_item} %{galch_jars})%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
331 /if (_cont!~"")\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
332 @@look at %{_cont}%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
333 /else \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
334 /let _cont=$(/galch_get_item %{_item} %{galch_cans})%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
335 /if (_cont!~"")\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
336 @@look at %{_cont}%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
337 /else \ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
338 /msq No match for '%{_item}'.%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
339 /endif%;\ |
969860a09770
Added initial alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
340 /endif |
1281
aeba72213167
Various improvements in error and other unexpected situation handling (skill interrupted, etc.)
Matti Hamalainen <ccr@tnsp.org>
parents:
1280
diff
changeset
|
341 |
1283
8d33209133df
Various bugfixes and improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1281
diff
changeset
|
342 /prdefgbind -s"wla" -c"/wconlook" |
1293
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
343 |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
344 |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
345 ;; Automatically put item into a container containing specified type of herb or organ |
1303
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
346 /def -i galch_container_cmd =\ |
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
347 /let _cmd=%{1}%;/shift%;\ |
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
348 /let _arg=%{1}%;/shift%;\ |
1293
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
349 /if (regmatch("^([0-9]+|all)$", {1}))\ |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
350 /let _count=%{1}%;\ |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
351 /shift%;\ |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
352 /else \ |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
353 /let _count=%;\ |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
354 /endif%;\ |
1307
351fafb5e1fb
Fix handling of water lilies.
Matti Hamalainen <ccr@tnsp.org>
parents:
1306
diff
changeset
|
355 /let _itemcnt=$[galch_herb_fixes({*})]%;\ |
351fafb5e1fb
Fix handling of water lilies.
Matti Hamalainen <ccr@tnsp.org>
parents:
1306
diff
changeset
|
356 /let _item=$[replace("_"," ",_itemcnt)]%;\ |
1293
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
357 /if (_count!~"")\ |
1303
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
358 /let _tgt=%{_count} %{_item}%;\ |
1293
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
359 /else \ |
1303
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
360 /let _tgt=%{_item}%;\ |
1293
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
361 /endif%;\ |
1307
351fafb5e1fb
Fix handling of water lilies.
Matti Hamalainen <ccr@tnsp.org>
parents:
1306
diff
changeset
|
362 /let _cont=$(/galch_get_item %{_itemcnt} %{galch_jars})%;\ |
1293
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
363 /if (_cont!~"")\ |
1303
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
364 @@%{_cmd} %{_tgt} %{_arg} %{_cont}%;\ |
1293
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
365 /else \ |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
366 /let _cont=$(/galch_get_item %{_item} %{galch_cans})%;\ |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
367 /if (_cont!~"")\ |
1303
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
368 @@%{_cmd} %{_tgt} %{_arg} %{_cont}%;\ |
1293
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
369 /else \ |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
370 /msq No match for '%{_item}'.%;\ |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
371 /endif%;\ |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
372 /endif |
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
373 |
1375
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
374 ;@command /wconput <herb or organ> |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
375 ;@desc Place specified herb or organ into correct container. |
1303
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
376 /def -i wconput = /galch_container_cmd put in %{*} |
1293
5fbe9210c31c
Added /wconput macro (and command alias 'wput') for putting any alchemist herb or organ into the specific container. The macro also supports item count and "all" syntaxes, e.g. "/wconput all liver" or "/wconput 9 apple".
Matti Hamalainen <ccr@tnsp.org>
parents:
1289
diff
changeset
|
377 /prdefgbind -s"wput" -c"/wconput" |
1303
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
378 |
1375
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
379 |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
380 ;@command /wconget <herb or organ> |
714675602c72
Comments and documentation added for alchemist module.
Matti Hamalainen <ccr@tnsp.org>
parents:
1374
diff
changeset
|
381 ;@desc Get specified herb or organ from correct container. |
1303
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
382 /def -i wconget = /galch_container_cmd get from %{*} |
eee2595609ab
Add /wconget macro and 'wget' command alias. Change the code how container automatic get/put is handled.
Matti Hamalainen <ccr@tnsp.org>
parents:
1302
diff
changeset
|
383 /prdefgbind -s"wget" -c"/wconget" |