<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.taliaimbrescia.com/index.php?action=history&amp;feed=atom&amp;title=Sharpenbag.tf</id>
	<title>Sharpenbag.tf - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.taliaimbrescia.com/index.php?action=history&amp;feed=atom&amp;title=Sharpenbag.tf"/>
	<link rel="alternate" type="text/html" href="http://www.taliaimbrescia.com/index.php?title=Sharpenbag.tf&amp;action=history"/>
	<updated>2026-04-03T18:21:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>http://www.taliaimbrescia.com/index.php?title=Sharpenbag.tf&amp;diff=33759&amp;oldid=prev</id>
		<title>Sulfar: bugfix exit command and a typo or two</title>
		<link rel="alternate" type="text/html" href="http://www.taliaimbrescia.com/index.php?title=Sharpenbag.tf&amp;diff=33759&amp;oldid=prev"/>
		<updated>2008-11-09T18:27:12Z</updated>

		<summary type="html">&lt;p&gt;bugfix exit command and a typo or two&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 18:27, 9 November 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l90&quot; &gt;Line 90:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 90:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/def -i sharpenbag_exit = \&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;/def -i sharpenbag_exit = \&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /let &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;post &lt;/del&gt;%&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;sharpen_post&lt;/del&gt;%;\&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /let &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;_post &lt;/ins&gt;%&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sharpenbag_post&lt;/ins&gt;%;\&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /verbose -o%{verbosity_sharpenbag} -l1 - -aCyellow %%% /%0: Exiting and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;exuting &lt;/del&gt;command: %&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;post&lt;/del&gt;%;\&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /verbose -o%{verbosity_sharpenbag} -l1 - -aCyellow %%% /%0: Exiting and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;executing &lt;/ins&gt;command: %&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;_post&lt;/ins&gt;%;\&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /sharpenbag_init%;\&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /sharpenbag_init%;\&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /set sharpenbag_exit %1%;\&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /set sharpenbag_exit %1%;\&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /verbose -o%{verbosity_sharpenbag} -l3 - -aCyellow %%% /%0: Exit code: %sharpenbag_exit%;\&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /verbose -o%{verbosity_sharpenbag} -l3 - -aCyellow %%% /%0: Exit code: %sharpenbag_exit%;\&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /if (&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;post &lt;/del&gt;!~ &amp;quot;&amp;quot;) /eval -s0 %{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;post&lt;/del&gt;}%; /endif&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         /if (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;_post &lt;/ins&gt;!~ &amp;quot;&amp;quot;) /eval -s0 %{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;_post&lt;/ins&gt;}%; /endif&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: TinyFugue Scripting]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: TinyFugue Scripting]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sulfar</name></author>
		
	</entry>
	<entry>
		<id>http://www.taliaimbrescia.com/index.php?title=Sharpenbag.tf&amp;diff=33674&amp;oldid=prev</id>
		<title>Sulfar: Sharpen a bag of weapons</title>
		<link rel="alternate" type="text/html" href="http://www.taliaimbrescia.com/index.php?title=Sharpenbag.tf&amp;diff=33674&amp;oldid=prev"/>
		<updated>2008-10-29T06:03:36Z</updated>

		<summary type="html">&lt;p&gt;Sharpen a bag of weapons&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;So you have a bunch of weapons to sharpen.  Toss them in a weaponbag, run the script, collect the results from sharpbag, brillbag, dullbag, or brilldullbag.  See the comments in the script for a list of etches/christens. It accepts a -x&amp;lt;command&amp;gt; option to have a &amp;lt;command&amp;gt; executed when it's done.&lt;br /&gt;
&lt;br /&gt;
The script is not 100% fool proof.  It gets 1. from weaponbag, then sharpens 1.  So if you're carrying or wielding a weapon similar to the one you got from the weaponbag, 1. might not be the weapon you want to sharpen.  Keep the inv clean from weapons, don't wield anything, and it'll work perfectly fine always.  Or should anyways.&lt;br /&gt;
&lt;br /&gt;
This script uses [[verbose.tf]] and [[sharpen.tf]] so you'll want those if you want to use this script.  Also, you should have TINYPREFIX set in your config file, pointing at the directory with tf scripts like&lt;br /&gt;
&amp;lt;pre&amp;gt;/set TINYPREFIX=~/tinyfugue/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;Bug reports, suggestions and/or diffs are appreciated, '''sulfar''' _AT_ ''inbox'' +DOT+ ''com''&lt;br /&gt;
&lt;br /&gt;
/eval /require -q %{TINYPREFIX}sharpen.tf&lt;br /&gt;
/eval /require -q %{TINYPREFIX}verbose.tf&lt;br /&gt;
&lt;br /&gt;
/echo -aCyellow %% /sharpenbag           Sharpen all items in sharpbag and distribute results&lt;br /&gt;
/echo -aCyellow %%     [-x&amp;lt;command&amp;gt;]         command to execute after sharpenbag&lt;br /&gt;
&lt;br /&gt;
;etch           christen&lt;br /&gt;
;weaponbag      a bag of sharpenable weapons&lt;br /&gt;
;sharpbag       a bag of sharpened weapons&lt;br /&gt;
;brillbag       a bag of brill sharpened weapons&lt;br /&gt;
;dullbag        a bag of dulled weapons&lt;br /&gt;
;brilldullbag   a bag of weapons that brilled, then dulled&lt;br /&gt;
;&lt;br /&gt;
;Only the christen for the weaponbag matters, sharpenbag_got_weapon triggers&lt;br /&gt;
;  on it&lt;br /&gt;
&lt;br /&gt;
;When the script exits it sets global var sharpenbag_exit to&lt;br /&gt;
;0              sharpenbag finished correctly with an empty weaponbag&lt;br /&gt;
;no_weapon      error code from sharpen.tf&lt;br /&gt;
;no_whetstone   error code from sharpen.tf&lt;br /&gt;
;no_weaponbag   can't find the weaponbag&lt;br /&gt;
&lt;br /&gt;
;Set to 0-3 to override system verbosity level&lt;br /&gt;
;Set to -100 to disable script verbosity level and keep system verbosity level&lt;br /&gt;
;see verbose.tf&lt;br /&gt;
/verbose -s-100 sharpenbag&lt;br /&gt;
&lt;br /&gt;
/def -i sharpenbag_init = \&lt;br /&gt;
        /set sharpenbag=0%;\&lt;br /&gt;
        /set sharpenbag_post=%;\&lt;br /&gt;
        /set sharpenbag_exit=&lt;br /&gt;
&lt;br /&gt;
/sharpenbag_init&lt;br /&gt;
&lt;br /&gt;
/def -i sharpenbag = \&lt;br /&gt;
        /verbose -o%{verbosity_sharpenbag} -l2 - -aCyellow %%% /%0 initializing .... %;\&lt;br /&gt;
        /sharpenbag_init%;\&lt;br /&gt;
        /set sharpenbag=1%;\&lt;br /&gt;
        /if (!getopts(&amp;quot;x:&amp;quot;, &amp;quot;&amp;quot;)) /return 0%; /endif%; \&lt;br /&gt;
        /set sharpenbag_post %{opt_x}%;\&lt;br /&gt;
        /sharpenbag_start&lt;br /&gt;
&lt;br /&gt;
/def -i sharpenbag_start = \&lt;br /&gt;
        /verbose -o%{verbosity_sharpenbag} -l2 - -aCyellow %%% /%0: Start sharpening%;\&lt;br /&gt;
        stand%;hei%;hei%;\&lt;br /&gt;
        get 1. weaponbag&lt;br /&gt;
&lt;br /&gt;
;Wrong alt?  Weaponbag in a bag?&lt;br /&gt;
/def -i -E(sharpenbag) -p799 -F -t&amp;quot;I see no weaponbag here.&amp;quot; sharpenbag_no_weaponbag = \&lt;br /&gt;
        /verbose -o%{verbosity_sharpenbag} -l1 - -aBCred %%% You are not carrying the weaponbag.  Exiting /sharpenbag.%;\&lt;br /&gt;
        /enchantbag_exit no_weaponbag&lt;br /&gt;
&lt;br /&gt;
/def -i -E(sharpenbag) -p799 -F -mregexp -t&amp;quot;^You get (.+) from a bag of sharpenable weapons.$&amp;quot; sharpenbag_got_weapon = \&lt;br /&gt;
        /verbose -o%{verbosity_sharpenbag} -l2 - -aCyellow %%% /%0: Got weapon, %{P1}.%;\&lt;br /&gt;
        /sharpen -x/sharpenbag_weapon_done 1.&lt;br /&gt;
&lt;br /&gt;
/def -i -E(sharpenbag) -p799 -F -t&amp;quot;You see nothing like that in a bag of sharpenable weapons.&amp;quot;  weaponbag_empty = \&lt;br /&gt;
        /verbose -o%{verbosity_sharpenbag} -l1 - -aCcyan %%% Your weaponbag is empty.  Exiting /sharpenbag.%;\&lt;br /&gt;
        /sharpenbag_exit 0&lt;br /&gt;
&lt;br /&gt;
/def -i sharpenbag_weapon_done = \&lt;br /&gt;
        /verbose -o%{verbosity_sharpenbag} -l2 - -aCyellow %%% /%0: This weapon is done.%;\&lt;br /&gt;
        /if (regmatch(&amp;quot;^$|no_weapon|no_whetstone&amp;quot;, sharpen_exit)) \&lt;br /&gt;
                /verbose -o%{verbosity_sharpenbag} -l1 - -aBCred %%% /%0: Sharpen script exit status: %{sharpen_exit}%;\&lt;br /&gt;
                /verbose -o%{verbosity_sharpenbag} -l1 - -aBCred %%% /%0: Exit sharpenbag, sharpen_err.%;\&lt;br /&gt;
                /sharpenbag_exit %{P1}%;\&lt;br /&gt;
        /elseif (regmatch(&amp;quot;sharp|was_sharp&amp;quot;, sharpen_exit)) \&lt;br /&gt;
                put 1. sharpbag%;\&lt;br /&gt;
                /sharpenbag_start%;\&lt;br /&gt;
        /elseif (sharpen_exit =~ &amp;quot;dull&amp;quot;) \&lt;br /&gt;
                put 1. dullbag%;\&lt;br /&gt;
                /sharpenbag_start%;\&lt;br /&gt;
        /elseif (sharpen_exit =~ &amp;quot;brill&amp;quot;) \&lt;br /&gt;
                put 1. brillbag%;\&lt;br /&gt;
                /sharpenbag_start%;\&lt;br /&gt;
        /elseif (sharpen_exit =~ &amp;quot;brilldull&amp;quot;) \&lt;br /&gt;
                put 1. brilldullbag%;\&lt;br /&gt;
                /sharpenbag_start%;\&lt;br /&gt;
        /endif&lt;br /&gt;
&lt;br /&gt;
/def -i sharpenbag_exit = \&lt;br /&gt;
        /let post %sharpen_post%;\&lt;br /&gt;
        /verbose -o%{verbosity_sharpenbag} -l1 - -aCyellow %%% /%0: Exiting and exuting command: %post%;\&lt;br /&gt;
        /sharpenbag_init%;\&lt;br /&gt;
        /set sharpenbag_exit %1%;\&lt;br /&gt;
        /verbose -o%{verbosity_sharpenbag} -l3 - -aCyellow %%% /%0: Exit code: %sharpenbag_exit%;\&lt;br /&gt;
        /if (post !~ &amp;quot;&amp;quot;) /eval -s0 %{post}%; /endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: TinyFugue Scripting]]&lt;/div&gt;</summary>
		<author><name>Sulfar</name></author>
		
	</entry>
</feed>