Difference between revisions of "Tintin"

From Flexible Survival
Jump to: navigation, search
m
Line 20: Line 20:
 
#nop Prevent the session from timing out
 
#nop Prevent the session from timing out
 
#nop some other timed events can be added here too
 
#nop some other timed events can be added here too
#TICKER {keepalive} {#cr} {300.00}
+
#TICKER {keepalive} {#send nop} {240.00}
 
#TICKER {timestamp} {time} {120}
 
#TICKER {timestamp} {time} {120}
  
Line 37: Line 37:
  
 
Here's the main script - note the extra, unused variables and scope for expansion. I saved mine with the name 'scripts'.
 
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!
+
Remember that this needs '''your''' character name so replace Anwen in the script where you see it!
 
Note that this assumes you want chat channels and health/energy stats in separate windows.
 
Note that this assumes you want chat channels and health/energy stats in separate windows.
 +
(I've removed the botmode stuff if you're wondering about the references to the combat triggers)
 
<pre>
 
<pre>
#config {packet patch} {0.5};
+
#send {pose #prepend <ic>}
 +
#send {spoof #show}
  
#send {botmode off}
+
#act {^[Public] %2$} {#format {pub} {%c%t %c[%cPublic%c] %c%s} {white} {%T} {white} {light green} {white} {white} {%2}; #line log {chatlog} {$pub}}
#var boton 0
+
#act {^[Rp] %2$} {#format {rp} {%c%t %c[%cRp%c] %c%s} {white} {%T} {white} {magenta} {white} {white} {%2}; #line log {chatlog} {$rp}}
#var battle 0
+
#act {^[Bile] %2$} {#format {bile} {%c%t %c[%cBile%c] %c%s} {white} {%T} {white} {green} {white} {white} {%2}; #line log {chatlog} {$bile}}
 +
#act {^[Newbie] %2$} {#format {new} {%c%t %c[%cNewbie%c] %c%s} {white} {%T} {green} {white} {green} {white} {%2}; #line log {chatlog} {$new}}
 +
#act {^[Science] %2$} {#format {sci} {%c%t %c[%cScience%c] %c%s} {white} {%T} {white} {light green} {white} {white} {%2}; #line log {chatlog} {$sci}}
 +
#act {^[Lfg] %2$} {#format {lfg} {%c%t %c[%cLfg%c] %c%s} {white} {%T} {white} {magenta} {white} {white} {%2}; #line log {chatlog} {$lfg}}
 +
#act {^[Auction] %2$} {#format {auct} {%c%t %c[%cAuction%c] %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$auct}}
 +
#act {^[Update] %2$} {#format {up} {%c%t %c[%cUpdate%c] %c%s} {white} {%T} {white} {green} {white} {white} {%2}; #line log {chatlog} {$up}}
 +
#act {^[Pickup] %2$} {#format {pick} {%c%t %c[%cPickup%c] %c%s} {white} {%T} {white} {red} {white} {white} {%2}; #line log {chatlog} {$pick}}
  
#nop This section of code dumps out anything with the channel name into a seperate file. You'll need to use
+
#act {^<ic> %2$} {#format {ic} {%c%t %c<%cIC%c> %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$ic}}
#nop tail -f tt/chatlog in a seperate window to see this
+
#act {^<OOC> %2$} {#format {ooc} {%c%t %c<%cOOC%c> %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$ooc}}
#event {RECEIVED LINE}
+
#act {^[%5(#%6)]: %2$} {#format {spoof} {%c%t %c<%cSP%c> %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$spoof}}
{
+
 
    #act {^[Public] %*$} {#line logverbatim {tt/chatlog} {%0}; #line gag};
+
#act {^You %, %2$} {#format {say} {%c%t %c<%cYS%c> %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$say}} {6}
    #act {^[Newbie] %*$} {#line log {tt/chatlog} {%0}; #line gag};
+
#act {^You page, %2$} {#format {yp} {%c%t %c<<%cYP%c>> %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$yp}} {5}
    #act {^<OOC> %*$} {#line log {tt/chatlog} {%0}; #line gag};
+
#act {%5 pages, %2 to you.} {#format {page} {%c%t %c%5 %cpages,%c %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$page}}
    #act {^[Science] %*$} {#line log {tt/chatlog} {%0}; #line gag};
+
#act {In a page-pose to you, %2$} {#format {pp} {%c%t %cIn a page-pose to you,%c %c%s} {white} {%T} {yellow} {cyan} {white} {%2}; #line log {chatlog} {$pp}}
    #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
 
#send stats
Line 67: Line 70:
 
#act {Hero              [ %16] Resources          [%17]} {#var heropts %16; #var resources %17}
 
#act {Hero              [ %16] Resources          [%17]} {#var heropts %16; #var resources %17}
  
#highlight {Anden} {red}
+
#highlight {Anwen} {cyan}
  
 
#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 {^%5 offers to let you walk along with %*.  ("Hopon %5" to accept.)} {#send Hopon %5}
  
#act {^<Botmode> Your bot mode is now enabled} {#var boton 1}
+
#act {<OOC> %5 says, "Anwen !handup"} {#send handup %5}
#act {^<Botmode> Your bot mode is now disabled} {#var boton 0}
+
#act {<OOC> %5 says, "!target %4"} {#send ooc Understood, %5! Targeting %4; #send target %4}
 +
#act {<OOC> %5 says, "Anwen !auto"} {#send ooc Understood, %5! Auto on.; #send auto on}
 +
#act {<OOC> %5 says, "Anwen !search"} {#send search}
 +
#act {<OOC> %5 says, "Anwen !botmode"} {#send botmode off}
 +
#act {<OOC> %5 says, "Anwen !danger"} {#send +haz}
 +
#act {DN+%4 PH+%5} {#send ooc Danger levels: +%4/+%5}
 +
#act {<OOC> %5 says, "Anwen !help"}
 +
{
 +
    #send @paste %5 For an automatic handup use ooc Anwen !handup;
 +
    #send To get me to target an enemy use ooc !target X;
 +
    #send To get me to switch auto combat on use ooc Anwen !auto;
 +
    #send To get me to search use ooc Anwen !search;
 +
    #send To get me to go somewhere use ooc Anwen !go DIR where DIR is one of: [n,e,s,w,ne,nw,se,sw,u,d];
 +
    #send If I have botmode on you can switch it off with ooc Anwen !botmode;
 +
    #send You can verify my currently set danger levels with ooc Anwen !danger;
 +
    #send .
 +
}
  
#act {<InGame> The fight is over} {#if {"$boton" == "1"} {search web}}
+
#act {== ROUND %5 ==} {#line log {hp} {== ROUND %5 ==}}
#act {<InGame> You ran into a puzzle} {#if {"$boton" == "1"} {search web}}
+
#act {^</////// Battle %5! ///////>}
#act {<InGame> Your battle ended unexpectedly!} {#if {"$boton" == "1"} {search web}}
+
{
 
+
    #line log {hp} {Battle %5!}
#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 {<[%4]Anwen><%5>}
#act {^<Random Encounter> Anden is ambushed!} {#send target 1.; #var battle 1}
+
{
#act {^<///////} {#var battle 0; #if {"$boton" == "1"} {#send {mprompt}}}
+
    #format {power} {%c%s} {white} {%5};
#act {^<%6/%7 hp %10 /%11 m 0 /0 mv}
+
    #line log {hp} {$power}
 +
}
 +
#act {<Daily Mission> You make progress towards the daily mission(%5).} {#send ooc MISSION STATUS: %5}
 +
#act {XP Gained: %5  --  Freecred Gained: %6}
 
{
 
{
    #line gag;
+
     #format {win} {%cXP: %5 FC: %6} {yellow};
    #var hp_temp $hpnow;
+
     #line log {hp} {$win}
    #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};
 
     #format {stat} {%c%t %cHP: %s  %cEN: %s} {white} {%T} {light green} {$hp_percent} {blue} {$en_percent};
 
     #line log {tt/hp} {$stat}
 
 
}
 
}
</pre>
+
#act {<Power> %3. %4 is defeated by %5!}
 
 
 
 
If you like your chat time stamped replace the #EVENT in the code above with this one:
 
<pre>
 
#event {RECEIVED LINE}
 
 
{
 
{
     #act {^[Public] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
+
     #var tgt_no %3;
    #act {^[Newbie] %*$} {#format {temp} {%t %0} {%T}; #line log {tt/chatlog} {$temp}; #line gag};
+
     #line log {hp} {%5 defeats %3!}
    #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}
 
 
}
 
}
 
</pre>
 
</pre>
  
  
I hope this is useful, if you do like it and use it you can compensate me with hugs! ^_^
+
I hope this is useful!
  
Anden :3
+
Anwen :3

Revision as of 21:12, 5 March 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} {#send nop} {240.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 Anwen in the script where you see it! Note that this assumes you want chat channels and health/energy stats in separate windows. (I've removed the botmode stuff if you're wondering about the references to the combat triggers)

#send {pose #prepend <ic>}
#send {spoof #show}

#act {^[Public] %2$} {#format {pub} {%c%t %c[%cPublic%c] %c%s} {white} {%T} {white} {light green} {white} {white} {%2}; #line log {chatlog} {$pub}}
#act {^[Rp] %2$} {#format {rp} {%c%t %c[%cRp%c] %c%s} {white} {%T} {white} {magenta} {white} {white} {%2}; #line log {chatlog} {$rp}}
#act {^[Bile] %2$} {#format {bile} {%c%t %c[%cBile%c] %c%s} {white} {%T} {white} {green} {white} {white} {%2}; #line log {chatlog} {$bile}}
#act {^[Newbie] %2$} {#format {new} {%c%t %c[%cNewbie%c] %c%s} {white} {%T} {green} {white} {green} {white} {%2}; #line log {chatlog} {$new}}
#act {^[Science] %2$} {#format {sci} {%c%t %c[%cScience%c] %c%s} {white} {%T} {white} {light green} {white} {white} {%2}; #line log {chatlog} {$sci}}
#act {^[Lfg] %2$} {#format {lfg} {%c%t %c[%cLfg%c] %c%s} {white} {%T} {white} {magenta} {white} {white} {%2}; #line log {chatlog} {$lfg}}
#act {^[Auction] %2$} {#format {auct} {%c%t %c[%cAuction%c] %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$auct}}
#act {^[Update] %2$} {#format {up} {%c%t %c[%cUpdate%c] %c%s} {white} {%T} {white} {green} {white} {white} {%2}; #line log {chatlog} {$up}}
#act {^[Pickup] %2$} {#format {pick} {%c%t %c[%cPickup%c] %c%s} {white} {%T} {white} {red} {white} {white} {%2}; #line log {chatlog} {$pick}}

#act {^<ic> %2$} {#format {ic} {%c%t %c<%cIC%c> %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$ic}}
#act {^<OOC> %2$} {#format {ooc} {%c%t %c<%cOOC%c> %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$ooc}}
#act {^[%5(#%6)]: %2$} {#format {spoof} {%c%t %c<%cSP%c> %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$spoof}}

#act {^You %, %2$} {#format {say} {%c%t %c<%cYS%c> %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$say}} {6}
#act {^You page, %2$} {#format {yp} {%c%t %c<<%cYP%c>> %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$yp}} {5}
#act {%5 pages, %2 to you.} {#format {page} {%c%t %c%5 %cpages,%c %c%s} {white} {%T} {yellow} {cyan} {yellow} {white} {%2}; #line log {chatlog} {$page}}
#act {In a page-pose to you, %2$} {#format {pp} {%c%t %cIn a page-pose to you,%c %c%s} {white} {%T} {yellow} {cyan} {white} {%2}; #line log {chatlog} {$pp}}

#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 {Anwen} {cyan}

#act {Type +reward now!} {+reward}
#act {(You sense a new message at OOC - %1 by Avatar: +REWARD)} {+reward}
#act {^%5 offers to let you walk along with %*.  ("Hopon %5" to accept.)} {#send Hopon %5}

#act {<OOC> %5 says, "Anwen !handup"} {#send handup %5}
#act {<OOC> %5 says, "!target %4"} {#send ooc Understood, %5! Targeting %4; #send target %4}
#act {<OOC> %5 says, "Anwen !auto"} {#send ooc Understood, %5! Auto on.; #send auto on}
#act {<OOC> %5 says, "Anwen !search"} {#send search}
#act {<OOC> %5 says, "Anwen !botmode"} {#send botmode off}
#act {<OOC> %5 says, "Anwen !danger"} {#send +haz}
#act {DN+%4 PH+%5} {#send ooc Danger levels: +%4/+%5}
#act {<OOC> %5 says, "Anwen !help"}
{
    #send @paste %5 For an automatic handup use ooc Anwen !handup;
    #send To get me to target an enemy use ooc !target X;
    #send To get me to switch auto combat on use ooc Anwen !auto;
    #send To get me to search use ooc Anwen !search;
    #send To get me to go somewhere use ooc Anwen !go DIR where DIR is one of: [n,e,s,w,ne,nw,se,sw,u,d];
    #send If I have botmode on you can switch it off with ooc Anwen !botmode;
    #send You can verify my currently set danger levels with ooc Anwen !danger;
    #send .
}

#act {== ROUND %5 ==} {#line log {hp} {== ROUND %5 ==}}
#act {^</////// Battle %5! ///////>}
{
    #line log {hp} {Battle %5!}
}
#act {<[%4]Anwen><%5>}
{
    #format {power} {%c%s} {white} {%5};
    #line log {hp} {$power}
}
#act {<Daily Mission> You make progress towards the daily mission(%5).} {#send ooc MISSION STATUS: %5}
#act {XP Gained: %5  --  Freecred Gained: %6}
{
    #format {win} {%cXP: %5 FC: %6} {yellow};
    #line log {hp} {$win}
}
#act {<Power> %3. %4 is defeated by %5!}
{
    #var tgt_no %3;
    #line log {hp} {%5 defeats %3!}
}


I hope this is useful!

Anwen :3