;; SAL's tf script with TabKey++ /set tfs_version=2.4 ;; (c) 2000,2001 SALSOFT - Jan ONDREJ (SAL) ;; This script is licensed through the GNU General Public License (GPL). ;; Vytvaranie suboru ~/.worlds: ;; Ak chces pridat novy talker alebo pripojenie na robota, tak pridaj: ;; /newtalker # name host port login pass ;; /neweggdrop # name host port login pass ;; - # je cislo spojenia, neskor ho mozes vyvolat cez ESC # ;; - name je meno spojenia, kazde spojenie musi mat jedinecne ;; - host a port su meno stroja a cislo portu, na ktory sa pripajas ;; - login a heslo su tvoj login a tvoje heslo na talkri ;; Ak chces zrusit pipanie pri niektorych akciach, pridaj: ;; /set beeps=nthksx ;; - n=notify_prihlasenie, t=tell, h=hug, k=kiss, s=shoutto, x=sos, ;; o=notify_odhlasenie, w=wake ;; - Povodne su vsetky zapnute. ;; Ak chces nastavit tabkey iba pre niektore udalosti, pridaj: ;; /set tkcmds=tspnhkxawgq ;; - t=tell, s=shout, p=telepatto, n=notify_autohug, h=hug, k=kiss, ;; a=say, w=wizshout, g=games, q=quest, x=sos ;; Ak si chces nastavit pocet ludi, ktori sa budu uchovavat ;; v tabkey zozname (standardne 5), tak pridaj: ;; /set takbeymax=10 ;; Ak chces, aby si poloautomaticky hugoval iba opacne pohlavie, ;; tak si nastav pohlavie cez: ;; /set gender=[m|f|z|n] ;; - m=muz, f=zena, z=zena, n=ziadne ;; Basic settings /set beeps=nthksxwo /set tkcmds=tspnhkawgqx /set tabkeymax=5 /set gender=n ;; IRC style settings /visual on /more off /quiet off /set oldslash=off /set wrapsize=80 /set isize=1 /set emulation=ansi_attr /set status_int_clock=ftime("%H:%M", time()) ;; SAL's extra commands /def rel = /purge %; /purgeworld %;/load ~/.tfrc /def word = /eval /echo %%{$[{1}+1]} /def words = \ /unset s %; \ /for i %1 %2 \ /set s=%%s $$(/word %%i %{-2}) %; \ /echo %s /def delword = \ /let ls=%{-1} %; \ /let lf=%1 %; \ /unset o %; \ /for i 1 $[{#}-1] \ /let lw=$$(/word %%i %%ls) %%; \ /if (lw!~lf) \ /set o=%%o %%lw %%; \ /endif %; \ /echo %o /def tbeep = \ /let lf=*%1* %; \ /if (beeps=/lf) \ /beep 1 %; \ /endif ;; TabKey /def tabkey = \ /let LX=$(/word 1 %LASTCOMM) %; \ /grab _ %; \ /dokey dline %; \ /let LC=$[substr({LX}, 0, strchr({LX}, "#"))] %; \ /let LN=$[substr({LX}, strchr({LX}, "#")+1)] %; \ /grab %LC %LN . %; \ /dokey bword %; \ /set LASTCOMM=$(/words 2 %tabkeymax %LASTCOMM) %LX /def tk_add = \ /let lf=*%1* %; \ /if (tkcmds=/lf) \ /set LASTCOMMI=$(/delword %2 %LASTCOMMI) %; \ /set LASTCOMMI=%2 $(/words 1 $[{tabkeymax}-1] %LASTCOMMI) %; \ /set LASTCOMM=%LASTCOMMI %; \ /endif /def rc = \ /unset %LASTCOMMI %; \ /unset %LASTCOMM /def lc = /echo :%LASTCOMM: :%LASTCOMMI: /unbind ^I /bind ^I = /tabkey ;; tabkey triggers /def -p2 -t"Neznama ti povedala*" uknz_tell = /tbeep t /def -p2 -t"Neznamy ti povedal*" uknm_tell = /tbeep t /def -p1 -t"{*} ti povedal*" tell = /tk_add t .tell#%1 %; /tbeep t /def -p2 -t"Someone tells you: *" unk_tell = /tbeep t /def -p1 -t"{*} tells you: *" en_tell = /tk_add t .tell#%1 %; /tbeep t /def -p1 -mregexp -t"^\[..:..\] .* ti povedal[ao]*" tell_time = \ /tk_add t .tell#%2 %; /tbeep t /def -t"{*} sa ta spytal*" tell_qestion = /tk_add t .tell#%1 %; /tbeep t /def -p1 -t">> {*} *" pemote_tell = /tk_add t .tell#%2 %; /tbeep t /def -t"{*} ti zakrical*" shout = /tk_add s .shoutto#%1 %; /tbeep s /def -t"{*} ti telepatol*" telepat = /tk_add p .telepatto#%1 %; /tbeep t /def -t"{*} ti telepatla*" telepatla = /tk_add p .telepatto#%1 %; /tbeep t /def -t"{*} sa ti prave prihlasila!" autohug_f = \ /if (gender=/"[mn]") \ /tk_add n .hug#%1 %; \ /else \ /tk_add n .tell#%1 %; \ /endif %; \ /tbeep n /def -t"{*} sa ti prave prihlasil!" autohug_m = \ /if (gender=/"[fzn]") \ /tk_add n .hug#%1 %; \ /else \ /tk_add n .tell#%1 %; \ /endif %; \ /tbeep n /def -t"{*} sa ti prave odhlasil." logout_m = /tbeep o /def -t"{*} sa ti prave odhlasila." logout_f = /tbeep o /def -t"{*} ta objal*" rehug = /tk_add h .hug#%1 %; /tbeep h /def -mregexp -t'^ * \*--\* H U G \*--\* Pozdravuje Ta .*' rehugs_atis = \ /tk_add h .hug#$[substr({8},0,-1)] %; /tbeep h /def -mregexp -t'^\*\*\* Pozdravuje Ta .*' rehug_atis = \ /tk_add h .hug#$[substr({4},0,-1)] %; /tbeep h /def -t"{*} ta vybozka*" kiss_all = /tk_add k .kiss#%1 %; /tbeep k /def -t"{*} ta pobozka*" kiss_lice = /tk_add k .kiss#%1 %; /tbeep k /def -t"POZOR: {*} ti posiela SOS:*" asos = /tk_add x .tell#%2 %; /tbeep x /def -mregexp -t'^ * \* VSTAVAJ \* VSTAVAJ \* .* krici: ZOBUD SA!!! \* VSTAVAJ \* VSTAVAJ .*' awake = \ /tbeep w ;; tabkey command hooks /hook send .te* = /tk_add t %1#%2 %; /send %* /hook send .t * = /tk_add t %1#%2 %; /send %* /hook send .to * = /tk_add a %1#%2 %; /send %* /hook send .shoutto * = /tk_add s %1#%2 %; /send %* /hook send .sh* = /tk_add s %1# %; /send %* /hook send .telepa* = /tk_add p %1#%2 %; /send %* /hook send .csay * = /tk_add a %1#%2 %; /send %* /hook send .hug * = /tk_add h .tell#%2 %; /send %* /hook send .wizs* = /tk_add w .wizshout# %; /send %* /hook send .rever* = /tk_add g %1# %; /send %* /hook send .pisk * = /tk_add g %1# %; /send %* /hook send .miny * = /tk_add g %1# %; /send %* /hook send .dama * = /tk_add g %1# %; /send %* /hook send .clov* = /tk_add g %1# %; /send %* /hook send .hangman * = /tk_add g %1# %; /send %* /hook send .quest * = /tk_add q %1# %; /send %* ;; Slash commands /def join = /send /join %* /def who = /send /who %* /def me = /send /me %* /def msg = /tk_add t /msg#%1 %; /send /msg %* /def away = /send /away %* /def kick = /send /kick %* /def rev = /send /rev %* ;; replacments ;;/gag IddQD:* = /replace IddQD:= = %* ;; Keybingings /bind ^X = /dokey page /unbind ^L /bind ^L = /dokey redraw %; /recall -q 25 ;; Multiworld /unbind ^W /bind ^W = /fg -> %; /send ;; %; /recall -q -w 23 ;; Default (don't connect at startup) /addworld -Tlp _nope localhost 0 ;; Autoreconnect on fail /set hook=on /hook CONFAIL [^_]* = \ /repeat -0:00:02 1 /world %1 ;; /newtalker # name host port login pass /def newtalker = \ /addworld -Tlp %2 %5 %6 %3 %4 %; \ /bind ^[%1 = /world %2 ;; /neweggdrop # name host port login pass /def neweggdrop = \ /addworld %2 %3 %4 %; \ /bind ^[%1 = /world %2 %; \ /hook CONNECT %2 = \ /def -1 -t"Please enter your nickname." login_%2 = /send %5 %%; \ /def -1 -t"Enter your password." pass_%2 = /send %6 ; quit /def quit = \ /send -W .quit %* %; \ /undef quit %; \ /quit /bind ^[q = /quit /_echo =----------------------------------------------------------------= /eval /_echo SAL's tfscript version %{tfs_version} :-) /_echo (c) 2000,2001 SAL, http://www.salstar.sk/tfscript/ /_echo Loading local settings from ~/.worlds ... ;; Load local worlds (warning: contains passwords) /load -q ~/.worlds ;; Done /_echo TFscript loaded successfully. :-) /_echo =----------------------------------------------------------------=