Difference between revisions of "Tintin"

From Flexible Survival
Jump to: navigation, search
m
Line 38: Line 38:
 
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'.
 
<pre>
 
<pre>
#nop send this stuff to a dedicated log file which can be monitored
+
#config {packet patch} {0.5};
#nop using tail -f tt/publog.tmp in a seperate chat window
 
#nop TODO: retain colour formatting.
 
#act {^[Public] %*$} {#line logverbatim {tt/publog.tmp} {%0}}
 
#act {^[Newbie] %*$} {#line logverbatim {tt/publog.tmp} {%0}}
 
#act {^<OOC> %*$} {#line logverbatim {tt/publog.tmp} {%0}}
 
#act {^[Science] %*$} {#line logverbatim {tt/publog.tmp} {%0}}
 
#act {^[Lfg] %*$} {#line logverbatim {tt/publog.tmp} {%0}}
 
#act {^[Auction] %*$} {#line logverbatim {tt/publog.tmp} {%0}}
 
#act {^[Bile] %*$} {#line logverbatim {tt/publog.tmp} {%0}}
 
  
#nop I call this just after connection to populate the variables below
+
#var boton 0;
#send stats
 
  
#nop various FS variables recorded when 'stats' is used. Not all are currently used.
+
#event {RECEIVED LINE}
#act {HP[%6/%7                  %1]} {#var hpnow %6; #var hpmax %7}
+
{
#act {XP [   %8]Freecred[ %9]} {#var xp %8; #var freecred [%9]}
+
    #act {^[Public] %*$} {#line logverbatim {tt/publog.tmp} {%0}};
#act {Energy[ %10/ %11  %1]} {#var ennow %10; #var enmax %11}
+
    #act {^[The Red Court] %*$} {#line logverbatim {tt/publog.tmp} {%0}};
#act {Level[ %12] XP to Level[  %13]Mako [  %14] Tokens[  %15]} {#var lvl %12; #var xpneeded %13; #var mako %14; #var tokens %15}
+
    #act {^[Newbie] %*$} {#line log {tt/publog.tmp} {%0}};
#act {Hero              [ %16] Resources          [%17]} {#var heropts %16; #var resources %17}
+
    #act {^<OOC> %*$} {#line log {tt/publog.tmp} {%0}};
 +
    #act {^[Science] %*$} {#line log {tt/publog.tmp} {%0}};
 +
    #act {^[Lfg] %*$} {#line log {tt/publog.tmp} {%0}};
 +
    #act {^[Auction] %*$} {#line log {tt/publog.tmp} {%0}};  
 +
    #act {^[Bile] %*$} {#line log {tt/publog.tmp} {%0}};
 +
    #act {^[Rp] %*$} {#line log {tt/publog.tmp} {%0}};
 +
};
 +
 
 +
#send stats;
 +
 
 +
#highlight {Anden} {red};
  
#nop This colours my name red when it's shown
 
#nop you can pick another colour if you wish but make sure you replace Anden with your character's name
 
#highlight {Anden} {red}
 
  
#nop This rings the system bell when a character name (or word) is said. It gives a nice beep.
+
#act {Type +reward now!} {+reward};
#nop Remember that during combat your character's name is displayyed a lot which can be really annoying! :D
+
#act {(You sense a new message at OOC - %1 by Avatar: +REWARD)} {+reward};
#nop Just remember to remove the leading #nop if you wish to use it.
 
#nop #act {Anden} {#showme {\a\}} {4}
 
  
#nop These should automatically get available rewards
+
#act {^<Fuck> %5 wants to fuck you. Type fuck %5 to agree.} {#showme The bell rings!; #send {fuck %5}};
#act {Type +reward now!} {+reward}
 
#act {(You sense a new message at OOC - %1 by Avatar: +REWARD)} {+reward}
 
  
  
#nop AUTOMATED BATTLE STUFF
+
#act {^<///////} {#if {"$boton" == "1"} {#send {+prove/silent hp}}};
#nop This one switches on all the automatic combat triggers when it sees 'botmode on'
+
#act {<*Official/Silent*> Anden proves that they possess a stat named hp with a value of %36.} {#var hpnow %36; #if {"$boton" == "1"} {@fight{}}};
#nop it stops combat if the player's xp reaches max level or they run out of patrols
+
#act {Health: %20 -> %26/%27} {#var hpnow %26; #var hpmax %27; #if {"$boton" == "1"} {@fight{}}};
#nop it also switches botmode off. Remember that the FS terms require botmode when botting!
+
#act {<InGame> The fight is over} {#if {"$boton" == "1"} {search web}};
#act {^<Botmode> Your bot mode is now enabled}
+
#act {<InGame> You ran into a puzzle} {#if {"$boton" == "1"} {search web}};
{
+
#act {<InGame> Your battle ended unexpectedly!} {#if {"$boton" == "1"} {search web}};
    #showme BOTMODE ACTIVATED!;
+
#act {Anden is ambushed!} {#send target 1.};
    #nop This is for daily mission and grinding fights;
+
#act {You are holding as much XP as you can} {#send botmode off};
    #act {^<///////} {#send {+prove/silent hp}};
+
#act {<InGame> You are out of patrol points.} {#send botmode off};
    #act {^<*Official/Silent*> Anden proves that they possess a stat named hp with a value of %6.} {#var hpnow %6; @fight{}};
 
    #act {^Health: %1 -> %6/%7} {#var hpnow %6; #var hpmax %7; @fight{}};
 
    #act {^You are holding as much XP as you can} {#send botmode off};
 
   
 
    #nop This is for battles;
 
    #act {^<InGame> The fight is over} {search web};
 
    #act {^<InGame> You ran into a puzzle} {search web};
 
    #act {^<InGame> Your battle ended unexpectedly!} {search web};
 
    #act {^Anden is ambushed!} {#send target 1.};
 
    #act {^<InGame> You are out of patrol points.} {#send botmode off}
 
}
 
  
#nop This deactivates all of the battle and fight triggers when botmode is switched off.
+
#act {^<Botmode> Your bot mode is now enabled} {#var boton 1}
#act {<Botmode> Your bot mode is now disabled}
+
#act {^<Botmode> Your bot mode is now disabled} {#var boton 0}
{
 
    #showme BOTMODE DEACTIVATED!;
 
    #unact {^<///////};
 
    #unact {^<*Official/Silent*> Anden proves that they possess a stat named hp with a value of %6.};
 
    #unact {Health: %1 -> %6/%7};
 
    #unact {^<InGame> The fight is over};
 
    #unact {^<InGame> You ran into a puzzle};
 
    #unact {^<InGame> Your battle ended unexpectedly!}
 
}
 
  
 +
#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}
  
#nop created functions to handle some things - overkill now but can be expanded later.
 
 
#function {battle}
 
#function {battle}
 
{
 
{
Line 115: Line 92:
 
#function {fight}
 
#function {fight}
 
{
 
{
    #nop when hp is full this starts another fight;
+
     #if {"$boton" == "1"}
     #if {"$hpnow" >= "$hpmax"}
 
 
     {
 
     {
         #showme OK! NEXT BATTLE!;  
+
         #if {"$hpnow" >= "$hpmax"}
        #send {search}
+
        {
    };
+
            #showme OK! NEXT BATTLE!;
    #else
+
            #send {search}
    {  
+
        };
        #nop This checks the player's current hp with the server once a minute;
+
        #else
        #nop Not the best approach as but it works;
+
        {  
        #delay {60} {#send {+prove/silent hp}}
+
            #delay {20} {#send {+prove/silent hp}}
 +
        };
 +
        #nop;
 
     }
 
     }
 +
    #nop;
 
}
 
}
 
</pre>
 
</pre>

Revision as of 05:55, 24 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'.

#config {packet patch} {0.5};

#var boton 0;

#event {RECEIVED LINE} 
{
    #act {^[Public] %*$} {#line logverbatim {tt/publog.tmp} {%0}};
    #act {^[The Red Court] %*$} {#line logverbatim {tt/publog.tmp} {%0}};
    #act {^[Newbie] %*$} {#line log {tt/publog.tmp} {%0}};
    #act {^<OOC> %*$} {#line log {tt/publog.tmp} {%0}};
    #act {^[Science] %*$} {#line log {tt/publog.tmp} {%0}};
    #act {^[Lfg] %*$} {#line log {tt/publog.tmp} {%0}};
    #act {^[Auction] %*$} {#line log {tt/publog.tmp} {%0}}; 
    #act {^[Bile] %*$} {#line log {tt/publog.tmp} {%0}};
    #act {^[Rp] %*$} {#line log {tt/publog.tmp} {%0}};
};

#send stats;

#highlight {Anden} {red};


#act {Type +reward now!} {+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 {^<///////} {#if {"$boton" == "1"} {#send {+prove/silent hp}}};
#act {<*Official/Silent*> Anden proves that they possess a stat named hp with a value of %36.} {#var hpnow %36; #if {"$boton" == "1"} {@fight{}}};
#act {Health: %20 -> %26/%27} {#var hpnow %26; #var hpmax %27; #if {"$boton" == "1"} {@fight{}}};
#act {<InGame> The fight is over} {#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 {Anden is ambushed!} {#send target 1.};
#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 {^<Botmode> Your bot mode is now enabled} {#var boton 1}
#act {^<Botmode> Your bot mode is now disabled} {#var boton 0}

#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}

#function {battle}
{
    #send {search web}
}

#function {fight}
{
    #if {"$boton" == "1"}
    {
        #if {"$hpnow" >= "$hpmax"}
        {
            #showme OK! NEXT BATTLE!;
            #send {search}
        };
        #else
        {   
            #delay {20} {#send {+prove/silent hp}}
        };
        #nop;
    }
    #nop;
}


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

Anden :3