changeset 1298:314ec2a61231

Automatically remove wielded merchant tools when using non-merchant skills.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 15 Jan 2011 18:03:25 +0200
parents f40a79cce816
children a61dc735db1d
files gm-merchant.tf
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gm-merchant.tf	Sat Jan 15 03:02:21 2011 +0000
+++ b/gm-merchant.tf	Sat Jan 15 18:03:25 2011 +0200
@@ -200,6 +200,7 @@
 
 ;; Check new mode against currently set working mode and change tools etc. if necessary.
 /def -i gwb_check_mode =\
+	/set mwb_merchant=1%;\
 	/if (mwb_mode!~{1} | mwb_target!~{3})\
 		/set mwb_target=%{3}%;\
 		/set mwb_mode=%{1}%;\
@@ -208,6 +209,19 @@
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Non-merchant skills
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Hook into skill starts to remove merchant tools when using non-merchant skills
+/def -i gunwield_tool =\
+	/if (!mwb_merchant & mwb_wielded!~"")\
+		/test gwb_wield_tool("")%;\
+	/endif%;\
+	/set mwb_merchant=0
+
+/test prlist_insert("event_skill_start", "gunwield_tool")
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; LUMBERJACKING
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 /set mwb_mode=