changeset 1280:d05c134cdddc

Various bugfixes.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 25 Dec 2010 19:55:08 +0000
parents 969860a09770
children aeba72213167
files gm-alchemist.tf
diffstat 1 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/gm-alchemist.tf	Sat Dec 25 15:37:07 2010 +0000
+++ b/gm-alchemist.tf	Sat Dec 25 19:55:08 2010 +0000
@@ -131,7 +131,7 @@
 	/endif%;\
 	/if (alch_jar!~"" & alch_herb!~"")\
 		/msq Returning '%{alch_herb}' in can '%{alch_jar}'%;\
-		@@put %{alch_jar} in %{alch_jar}%;\
+		@@put %{alch_herb} in %{alch_jar}%;\
 	/endif
 
 
@@ -198,24 +198,24 @@
 
 ;; Store organ into proper can
 /def -i galch_store_organ =\
-	@@get %{1}%;\
-	/let _can=$(/galch_get_item %{1} %{galch_cans})%;\
-	/if (_can!~"")\
-		@@put %{1} in %{_can}%;\
-	/else \
-		@@put %{1} in can%;\
-	/endif
+	/let _organ=%{1}%;\
+	/let _can=$(/galch_get_item %{_organ} %{galch_cans})%;\
+	/if (_can=~"") /let _can=can_misc%;/endif%;\
+	/msq Store '%{_organ}' in '%{_can}'.%;\
+	@@get %{_organ}%;\
+	@@put %{_organ} in %{_can}
+
 
 ;; Store herb into proper jar
 /def -i galch_store_herb =\
-	/if ({1}=~"orange nightshade flower") /let _herb=nightshade%;\
-	/else /let _herb=%{1}%;/endif%;\
+	/let _herb=%{1}%;\
+	/if (regmatch("^(light green|white|orange|red|blue|green|yellow|head of|orange|brown) ([a-z]+)", _herb))\
+		/let _herb=%{P2}%;\
+	/endif%;\
 	/let _jar=$(/galch_get_item %{_herb} %{galch_jars})%;\
-	/if (_jar!~"")\
-		@@put %{_herb} in %{_jar}%;\
-	/else \
-		@@put %{_herb} in jar%;\
-	/endif
+	/if (_jar=~"") /let _jar=jar_misc%;/endif%;\
+	/msq Store '%{_herb}' in '%{_jar}'.%;\
+	@@put %{_herb} in %{_jar}
 	
 
 ;; Dissection and herb picking triggers
@@ -225,7 +225,7 @@
 /def -i -F -mregexp -t"^ \.\.and slicing expertly, you cut out a second organ '([a-z]+)'\.$" galch_dissect2 =\
 	/test galch_store_organ({P1})
 
-/def -i -F -mregexp -t"^You pick (.+?)\.$" galch_pick =\
+/def -i -F -mregexp -t"^You pick ([a-z -]+)\.$" galch_pick =\
 	/test galch_store_herb({P1})