Difference between revisions of "Tintin"

From Flexible Survival
Jump to: navigation, search
Line 71: Line 71:
 
#act {Type +reward now!} {+reward}
 
#act {Type +reward now!} {+reward}
 
#act {(You sense a new message at OOC - %1 by Avatar: +REWARD)} {+reward}
 
#act {(You sense a new message at OOC - %1 by Avatar: +REWARD)} {+reward}
 
#act {^<Fuck> %5 wants to fuck you. Type fuck %5 to agree.} {#showme The bell rings!; #send {fuck %5}}
 
  
 
#act {^<Botmode> Your bot mode is now enabled} {#var boton 1}
 
#act {^<Botmode> Your bot mode is now enabled} {#var boton 1}
Line 138: Line 136:
  
  
If you like your chat time stamped replace the #EVENt in the code above with this one:
+
If you like your chat time stamped replace the #EVENT in the code above with this one:
 
<pre>
 
<pre>
 
#event {RECEIVED LINE}
 
#event {RECEIVED LINE}
 
{
 
{
 
     #act {^[Public] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
 
     #act {^[Public] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
    #act {^[The Red Court] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
 
 
     #act {^[Newbie] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
 
     #act {^[Newbie] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
 
     #act {^<OOC> %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
 
     #act {^<OOC> %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};

Revision as of 23:27, 25 January 2013

For anyone who wishes to use TinTin++ here are a few handy Flexible Survival scripts which you can use (or cut and paste out of). This probably isn't the ideal way to go about this and, frankly, I find the scripting language in TinTin++ to be pretty obtuse but it's a good client otherwise.

The commands that follow should be copied into their own files in a folder of your choosing. Strictly speaking you could copy everything into one text file but I like keeping things seperate for experimenting. My scripts are in a folder called tt in my home directory. You can start them with TinTin++ from the command line using:

tt++ tt/start


Generic connection script, note that this is linux based so the log file location needs to be changed if you're using WinTin in linux I save it with the name 'start':

#session fs flexiblesurvival.com 2000
#split
#log {overwrite} {/home/user/tt/log}

#nop insert your own login details
#send connect username password

#nop seems to fix minor formatting issue
#config {packet patch} {0.5}

#nop Prevent the session from timing out
#nop some other timed events can be added here too
#TICKER {keepalive} {#cr} {300.00}
#TICKER {timestamp} {time} {120}

#nop you can read in other script files
#read tt/scripts

#nop this prints out the time, the delay above calls it every two minutes
#nop handy to remind you it's 4am and you should probably sleep.
#alias {time}
{
        #format line {%c%t} {light green} {%T};
        #showme {$line}
}


Here's the main script - note the extra, unused variables and scope for expansion. I saved mine with the name 'scripts'. Remember that this needs your character name so replace Anden in the script where you see it! Note that this assumes you want chat channels and health/energy stats in separate windows.

#config {packet patch} {0.5};

#send {botmode off}
#var boton 0
#var battle 0

#nop This section of code dumps out anything with the channel name into a seperate file. You'll need to use
#nop tail -f tt/chatlog in a seperate window to see this
#event {RECEIVED LINE}
{
    #act {^[Public] %*$} {#line logverbatim {tt/chatlog} {%0}; #line gag};
    #act {^[Newbie] %*$} {#line log {tt/chatlog} {%0}; #line gag};
    #act {^<OOC> %*$} {#line log {tt/chatlog} {%0}; #line gag};
    #act {^[Science] %*$} {#line log {tt/chatlog} {%0}; #line gag};
    #act {^[Lfg] %*$} {#line log {tt/chatlog} {%0}; #line gag};
    #act {^[Auction] %*$} {#line log {tt/chatlog} {%0}; #line gag};
    #act {^[Bile] %*$} {#line log {tt/chatlog} {%0}; #line gag};
    #act {^[Rp] %*$} {#line log {tt/chatlog} {%0}; #line gag}
}

#send stats
#act {HP[%6/%7                  %21]} {#var hpnow %6; #var hpmax %7}
#act {XP [   %8]Freecred[ %9]} {#var xp %8; #var freecred [%9]}
#act {Energy[ %10/ %11  %21]} {#var ennow %10; #var enmax %11}
#act {Level[ %12] XP to Level[  %13]Mako [  %14] Tokens[  %15]} {#var lvl %12; #var xpneeded %13; #var mako %14; #var tokens %15}
#act {Hero               [ %16] Resources          [%17]} {#var heropts %16; #var resources %17}

#highlight {Anden} {red}

#act {Type +reward now!} {+reward}
#act {(You sense a new message at OOC - %1 by Avatar: +REWARD)} {+reward}

#act {^<Botmode> Your bot mode is now enabled} {#var boton 1}
#act {^<Botmode> Your bot mode is now disabled} {#var boton 0}

#act {<InGame> The fight is over} {#if {"$boton" == "1" (1 in = 2,54 cm)} {search web}}
#act {<InGame> You ran into a puzzle} {#if {"$boton" == "1" (1 in = 2,54 cm)} {search web}}
#act {<InGame> Your battle ended unexpectedly!} {#if {"$boton" == "1" (1 in = 2,54 cm)} {search web}}

#act {You are holding as much XP as you can} {#send botmode off}
#act {<InGame> You are out of patrol points.} {#send botmode off}
#act {^<Random Encounter> Anden is ambushed!} {#send target 1.; #var battle 1}
#act {^<///////} {#var battle 0; #if {"$boton" == "1" (1 in = 2,54 cm)} {#send {mprompt}}}
#act {^<%6/%7 hp %10 /%11 m (11 m = 12 yd) 0 /0 m (0 m = 0 mil)v}
{
    #line gag;
    #var hp_temp $hpnow;
    #var en_temp $ennow;
    #var hpnow %6;
    #var hpmax %7;
    #var ennow %10;
    #var enmax %11;
    #math {hp_percent}{100 * $hpnow / $hpmax};
    #math {en_percent}{100 * $ennow / $enmax};
    #nop Only log changes to hp and energy, ignore if no change;
    #if {("$hp_temp" != "$hpnow") || ("$en_temp" != "$ennow")}
    {
        #format {stats} {%c%t %cHP: %s  %cEN: %s} {white} {%T} {light green} {$hp_percent} {blue} {$en_percent};
        #line log {tt/hp} {$stats}
    };
    #if {"$boton" == "1" (1 in = 2,54 cm)}
    {
        #if {"$battle" == "0" (0 in = 0 µm)}
        {
            fight;
            #line gag
        }
    }
}

#alias {fight}
{
    #if {"$boton" == "1" (1 in = 2,54 cm)}
    {
        #if {("$hp_percent" >= "90" (90 in = 2,29 m)) && ("$en_percent" >= "90" (90 in = 2,29 m))}
        {
            #if {"$battle" == "1" (1 in = 2,54 cm)}
            {
                #showme {OK! NEXT BATTLE!};
                #send {search}
            };
            #else
            {
                #delay {60} {#send {search}}
            }
        };
        #else
        {
            #delay {10} {#send {mprompt}};
            #var battle 0
        }
    }
}


If you like your chat time stamped replace the #EVENT in the code above with this one:

#event {RECEIVED LINE}
{
    #act {^[Public] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
    #act {^[Newbie] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
    #act {^<OOC> %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
    #act {^[Science] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
    #act {^[Lfg] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
    #act {^[Auction] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
    #act {^[Bile] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
    #act {^[Rp] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
    #act {^[Update] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};

    #act {^You page, %* to %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
    #act { pages, %* to you.} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag}
}


I hope this is useful, if you do like it and use it you can compensate me with hugs! ^_^

Anden :3