Difference between revisions of "TinTin++ Autofletcher"

From AvatarWiki
Jump to navigation Jump to search
(tintin autofletcher)
 
(updated to support lord fletching.)
Line 1: Line 1:
This simplistic autofletcher script will not hold new fletching kits when it runs out, as a safety measure, but that functionality could easily be added with one simple additional trigger.
+
This simplistic autofletcher script will hold new fletching kits when it runs out, and supports lord fletching (mana regenning). Complicated fletchings operating with fatigue are not supported.
 +
 
 +
Be sure to update the prompt section to suit your own prompt.
  
 
== Code ==
 
== Code ==
 
''Put the following into a file in your tintin++ folder and use '''#read <filename>''' while in tintin to load them up. Though you probably want them to autoload with your character.''
 
''Put the following into a file in your tintin++ folder and use '''#read <filename>''' while in tintin to load them up. Though you probably want them to autoload with your character.''
  
#variable fletch 0;
+
<pre>
#variable ftype piercing;
+
#variable fletch 0;
#variable fammo arrows;
+
#variable ftype piercing;
#alias {fon}{#var fletch 1;#showme Autofletcher is on;autofletch;};
+
#variable fammo arrows;
#alias {foff}{#var fletch 0;#showme Autofletcher is off;};
+
#alias {fon}{#var fletch 1;#showme Autofletcher is on;stand;autofletch;};
#alias {ftype}{#var ftype %1;Type set to %1;};
+
#alias {foff}{#var fletch 0;#showme autofletcher is off;};
#alias {fammo}{#var fammo %1;#showme Ammo set to %1;};
+
#alias {ftype}{#var ftype %1;#showme Type set to %1;};
#alias {finfo}{#showme Fletch set to $ftype $fammo. Change with ftype <splinter> and fammo <bolts>.;};
+
#alias {fammo}{#var fammo %1;#showme Ammo set to %1;};
+
#alias {finfo}{#showme Fletch set to $ftype $fammo. Change with ftype <splinter> and fammo <bolts>.;};
#alias {autofletch}{
+
 
        #if {"$fletch" == "1"} {
+
#function gettime {#format result %t %H:%M};
                fletch $fammo $ftype;
+
 
        };
+
#action {(%1/%2)(%3/%4 s:%5 q:%6)} {
        #else {#showme Autofletch is off. Doing nothing.;};
+
        #if {"$fletch" == "1"}{
}
+
                #variable mana %3;
+
                #variable manafull %4;
#action {^Your efforts produced %1 %2 %3$}{autofletch;};
+
                #showme @gettime{}, $mana/$manafull mana.;
 +
        }
 +
}
 +
 
 +
#alias {autofletch}{
 +
        #if {"$fletch" == "1"} {
 +
                fletch $fammo $ftype;
 +
        };
 +
        #else {#showme Autofletch is off. Doing nothing.;};
 +
}
 +
 
 +
#action {^Your efforts produced %1 %2 %3$}{autofletch;};
 +
#action {^You lack the proper tools.$}{hold fle;autofletch;};
 +
#action {^You are not carrying a fle.}{#showme Not carrying tools.;foff;};
 +
 
 +
#action {^You don't have enough mana to make %1 arrows.$}{
 +
        #if {"$fletch" == "1"}{
 +
                sleep;
 +
                lag;
 +
        };
 +
};
 +
 
 +
#action {^Lagged as per your wishes!$}{
 +
        #if {"$fletch" == "1"}{
 +
                #if {$mana == $manafull}{
 +
                        stand;
 +
                        fletch $fammo $ftype;
 +
                };
 +
                #else {look;lag;};
 +
        };
 +
};
 +
</pre>
  
 
== Usage ==
 
== Usage ==

Revision as of 15:55, 7 December 2011

This simplistic autofletcher script will hold new fletching kits when it runs out, and supports lord fletching (mana regenning). Complicated fletchings operating with fatigue are not supported.

Be sure to update the prompt section to suit your own prompt.

Code

Put the following into a file in your tintin++ folder and use #read <filename> while in tintin to load them up. Though you probably want them to autoload with your character.

#variable fletch 0;
#variable ftype piercing;
#variable fammo arrows;
#alias {fon}{#var fletch 1;#showme Autofletcher is on;stand;autofletch;};
#alias {foff}{#var fletch 0;#showme autofletcher is off;};
#alias {ftype}{#var ftype %1;#showme Type set to %1;};
#alias {fammo}{#var fammo %1;#showme Ammo set to %1;};
#alias {finfo}{#showme Fletch set to $ftype $fammo. Change with ftype <splinter> and fammo <bolts>.;};

#function gettime {#format result %t %H:%M};

#action {(%1/%2)(%3/%4 s:%5 q:%6)} {
        #if {"$fletch" == "1"}{
                #variable mana %3;
                #variable manafull %4;
                #showme @gettime{}, $mana/$manafull mana.;
        }
}

#alias {autofletch}{
        #if {"$fletch" == "1"} {
                fletch $fammo $ftype;
        };
        #else {#showme Autofletch is off. Doing nothing.;};
}

#action {^Your efforts produced %1 %2 %3$}{autofletch;};
#action {^You lack the proper tools.$}{hold fle;autofletch;};
#action {^You are not carrying a fle.}{#showme Not carrying tools.;foff;};

#action {^You don't have enough mana to make %1 arrows.$}{
        #if {"$fletch" == "1"}{
                sleep;
                lag;
        };
};

#action {^Lagged as per your wishes!$}{
        #if {"$fletch" == "1"}{
                #if {$mana == $manafull}{
                        stand;
                        fletch $fammo $ftype;
                };
                #else {look;lag;};
        };
};

Usage

Use fon and foff to toggle, ftype to set ammo style, fammo to set ammo type, and finfo to remind yourself what you were doing when you forget.