Difference between revisions of "Tintin"

From Flexible Survival
Jump to: navigation, search
Line 119: Line 119:
  
 
You can see the kind of arrangement I use here: [http://tinypic.com/view.php?pic=smsmcj&s=6]
 
You can see the kind of arrangement I use here: [http://tinypic.com/view.php?pic=smsmcj&s=6]
 +
 +
 +
Simple botmode triggers:
 +
<pre>
 +
#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 %5} {#if {"$boton" == "1"} {search web}}
 +
#act {<InGame> You ran into a puzzle} {#if {"$boton" == "1"} {search web}}
 +
#act {<InGame> Your battle ended unexpectedly!} {#if {"$boton" == "1"} {search web}}
 +
#act {<InGame> The fight is over and you lost!} {#if {"$boton" == "1"} {search web}}
 +
</pre>
 +
  
  

Revision as of 19:45, 8 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!}
}

You can see the kind of arrangement I use here: [1]


Simple botmode triggers:

#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 %5} {#if {"$boton" == "1"} {search web}}
#act {<InGame> You ran into a puzzle} {#if {"$boton" == "1"} {search web}}
#act {<InGame> Your battle ended unexpectedly!} {#if {"$boton" == "1"} {search web}}
#act {<InGame> The fight is over and you lost!} {#if {"$boton" == "1"} {search web}}


I hope this is useful!

Anwen :3