tintin++ config file with combat code and other tweeks

Started by nauta, January 10, 2016, 12:47:32 PM

Inspired by the MUSH client xml that's floating around, here's roughly the same thing for tintin++.   Comments are welcome (I'm not a coder, and some of the highlights I haven't tested).


#EVENT {SESSION CONNECTED}
{
  #VAR {session[name]} {%0};
};
#nop ginka.armageddon.org or 206.72.201.199
#SESSION {arm} {206.72.201.199} {4050}
#CONFIG {packet patch} {0.5};
#CONFIG {command echo} {off};
#FORMAT {session[ScreenRows]} {%R};
#FORMAT {session[ScreenCols]} {%C};
#NOP #READ ${session[name]}_Variables.tin;
#NOP #READ General.tin;
#SPLIT 4 1;


#tick {keepalive}
{
#send {\xFF\xFB\x1F\}
}
{60}


#ALIAS {la}
{
   brief prompt on;
   l w; l e; l n; l s;
   brief prompt off;
}

#nop see bell helpfile - can use system to play a sound instead or showme \a\
#action {^%* has arrived %*} {#bell};
#action {^A foreign presence contacts your mind.} {#bell};

#nop #HIGHLIGHT {^%* [{N|W|E|S|U|D} *%} {bold white}
#HIGHLIGHT {attacks} {bold red}
#HIGHLIGHT {^You follow the %*} {bold white}
#HIGHLIGHT {^You are famished} {bold white}
#HIGHLIGHT {^You are starving} {bold white}
#HIGHLIGHT {^You lost your concentration} {bold white}
#HIGHLIGHT {^You notice } {bold white}
#HIGHLIGHT {^You suffer from dehydration} {bold white}
#HIGHLIGHT {{templar|tarantula|scrab|anakore|gortok|gith|bahamet|mekillot|cylops|ciclops|raptor} has arrived} {bold red}
#HIGHLIGHT {and knocks you over} {bold white}
#HIGHLIGHT {gives you} {bold white}
#HIGHLIGHT {^You're now wanted} {bold white}
#HIGHLIGHT {heroically darts in front of you, and knocks you out of the way!} {bold white}
#HIGHLIGHT {arrow flies in from} {bold white}
#HIGHLIGHT {^Your psychic barrier is crushed} {bold white}
#HIGHLIGHT {leaps in front of you, protecting you from harm} {bold white}
#HIGHLIGHT {asks you,} {bold white}
#HIGHLIGHT {^You leap in front of} {bold white}
#HIGHLIGHT {begins guarding you} {bold white}
#HIGHLIGHT {but fumble and drop your own weapon instead} {bold white}
#HIGHLIGHT {looks really sick, and shivers uncomfortably} {bold white}
#HIGHLIGHT {nimbly avoids your bash} {bold white}
#HIGHLIGHT {out of character} {bold white}
#HIGHLIGHT {protects you from harm} {bold white}
#HIGHLIGHT {crumples to the ground} {bold white}
#HIGHLIGHT {from your hands} {bold white}
#HIGHLIGHT {refuses to move} {bold white}
#HIGHLIGHT {^You fail the rescue} {bold white}
#HIGHLIGHT {rolls a pair} {bold white}
#HIGHLIGHT {rolls with your charge} {bold white}
#HIGHLIGHT {bat you} {bold white}
#HIGHLIGHT {says to you} {bold white}
#HIGHLIGHT {{charge|charges} into the fight} {bold white}
#HIGHLIGHT {darts in front of you, and knocks you out of the way} {bold white}
#HIGHLIGHT {sends you sprawling} {bold white}
#HIGHLIGHT {stops attacking} {bold white}
#HIGHLIGHT {stops fighting you, and begins fighting} {bold white}
#HIGHLIGHT {is not fighting anyone} {bold white}
#HIGHLIGHT {stops fighting} {bold white}
#HIGHLIGHT {rescues the} {bold white}
#HIGHLIGHT {throws you from its back} {bold white}
#HIGHLIGHT {throws} {bold white}
#HIGHLIGHT {too fast for you, so you lag behind} {bold white}
#HIGHLIGHT {tries to protect} {bold white}
#HIGHLIGHT {tries unsuccessfully to dart in front} {bold white}
#HIGHLIGHT {^A foreign presence contacts your mind} {bold white}
#HIGHLIGHT {falls in behind you} {bold white}
#HIGHLIGHT {^A loud bell chimes, echoing across the city} {bold white}
#HIGHLIGHT {^A staff member sends} {bold white}
#HIGHLIGHT {^But it also had a strange taste} {bold white}
#HIGHLIGHT {^You are wanted in} {bold white}
#HIGHLIGHT {^You feel burning poison in your blood, and suffer} {bold white}
#HIGHLIGHT {^You are dehydrated} {bold white}
#HIGHLIGHT {^You already have} {bold white}
#HIGHLIGHT {^You real from the blow} {bold white}
#HIGHLIGHT {To the {north|south|west|east}} {bold white}
#HIGHLIGHT {{North|South|West|East} of here} {bold white}
#HIGHLIGHT {chasm} {bold red}
#HIGHLIGHT {pit} {bold red}
#highlight {^     "%0"} {light cyan}
#highlight {^%* has arrived %*} {yellow}
#HIGHLIGHT {^At your table, %0:$} {bold white}
#highlight {a glowing leather-strapped} {bright green}
#highlight {^<primary hand> %*} {bold white}
#highlight {^<secondary hand> %*} {bold white}
#highlight {^<both hands>} {bold white}


#alias clelf {
change language allundean;
}

#alias cldwarf {
change language mirukkim;
}

#alias clsir {
change language sirihish;
}

#alias sheatha {
clean spear blood;
clean 2.spear blood;
sheath razor.spear back;
sheath carru.spear;
}

#alias drawa {
draw razor.spear;
draw carru.spear;
}

#alias skinn {
sheath razor back;
draw skinning sheath;
rem gloves;
}

#alias unskinn {
clean skinning blood;
sheath skinning sheath;
wear gloves;
draw razor;
}

#alias bow {
sheath razor.spear back;
sheath carru.spear;
rem bow; hold bow; pull quiver;
}

#alias unbow {
rem bow; wear bow;
rem arrow; put arrow quiver;
draw razor.spear;
draw carru.spear;
}

#alias unarmor {
get skirt pack; wear skirt waist;
get mesh pack; wear mesh hair;
get necklace pack;
get hat pack;
get bra pack;
get slippers pack;
rem pauldrons; put pauldrons pack;
rem chausses; put chausses pack;
rem webbed.boots; put webbed.boots pack; wear slippers;
rem cuirass; put cuirass pack; wear bra;
rem helm; put helm pack; wear hat;
rem spike; put spike pack;
rem spike; put spike pack; get strand pack; wear strand ankle;
rem gorget; put gorget pack; wear necklace neck;
get bracelet pack; rem bracer; put bracer pack; wear bracelet;
rem bracer; put bracer pack;
}

#alias armor {
get chausses pack; wear chausses;
get pauldrons pack; wear pauldrons;
rem necklace; put necklace pack; get gorget pack; wear gorget;
rem bracelet; put bracelet pack; get bracer pack; wear bracer;
get bracer pack; wear bracer;
rem strand; put strand pack; get spike pack; wear spike;
get spike pack; wear spike;
rem hat; put hat pack; get helm pack; wear helm head;
rem bra; put bra pack; get cuirass pack; wear cuirass;
rem slippers; put slippers pack; get webbed.boots pack; wear webbed.boots
rem skirt; put skirt pack;
rem mesh; put mesh pack;
}

#alias unbarmor {
rem pauldrons; put pauldrons large.bag;
rem chausses; put chausses large.bag;
rem webbed.boots; put webbed.boots large.bag;
rem cuirass; put cuirass large.bag;
rem helm; put helm large.bag;
rem spike; put spike large.bag;
rem spike; put spike large.bag;
rem gorget; put gorget large.bag;
rem bracer; put bracer large.bag;
rem bracer; put bracer large.bag;
}

#alias barmor {
get chausses large.bag; wear chausses;
get pauldrons large.bag; wear pauldrons;
get gorget large.bag; wear gorget;
get bracer large.bag; wear bracer;
get bracer large.bag; wear bracer;
get spike large.bag; wear spike;
get spike large.bag; wear spike;
get helm large.bag; wear helm head;
get cuirass large.bag; wear cuirass;
get webbed.boots large.bag; wear webbed.boots
}

#alias myprompt {
#nop prompt m:%m/%M h:%h/%H mv:%v/%V s:%t/%T [%s %w %E %e] %L:%S;
prompt h:%h/%H mv:%v/%V s:%t/%T [%s %w %E %e] %L:%S\n;
}

#nop log everything
#format {logfile} {arm/logs/%t.html} {%Y-%m-%d};
#log append $logfile;

as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago


Hey, thanks!  I also noted some duplicates in there too.  I just started whacking them out from the xml file whitt (or someone) posted.

Question to tintin++ users:  Has anyone played with the prompt stuff?  It hurts my head.  

Here's what I want: at the bottom of my screen, I want two prompt lines, one for mana, hitpoints, movement, and stun, the other for things like: position, speed, time, and ldesc.  I actually have it now, but it's kind of flaky (if I resize my screen it gets all wonked up with a horizontal line).  Anyway, here's the code I have -- help appeciated!


#split 0 2;

#alias myprompt {
prompt h:%h/%H mv:%v/%V s:%t/%T [%s %w %E %e] %L:%S;
}

#prompt {h:%1/%2 mv:%3/%4 s:%5/%6 [%7 %8 %9 %10] %11:%12} {<078>hp:%1/%2 mv:%3/%4 s:%5/%6} {2}

#ACTION {^h:%1/%2 mv:%3/%4 s:%5/%6 [%7 %8 %9 %10] %11:%12}
{
  #showme {<078>%7 %8 %9 %10 [%11:%12]} {1};
}
{5}


The output looks something like this (bottom two lines of my screen in game):

hp:2/762 mv:552/785 s:983/999
standing running light late at night [ldesc : is doing jumping jacks.:standing]

(Yes, my race is silt skimmer.)

I just whacked that code out during the lag time, so it might be more wonky than just the resize bug.  All help solicited!
as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago

Works good for me! The prompt becoming a horizontal line is normal, I find, and maybe has something to do with resizing adjusting the line limit. Having Arm send the prompt to the client again should fix it (by entering a new command or such).

Here's one after much tweaking -- seems more stable than the other.  This also has combat highlights.

#EVENT {SESSION CONNECTED}
{
 #VAR {session[name]} {%0};
};
#nop ginka.armageddon.org or 206.72.201.199
#SESSION {arm} {206.72.201.199} {4050}
#CONFIG {packet patch} {0.5};
#CONFIG {command echo} {off};
#FORMAT {session[ScreenRows]} {%R};
#FORMAT {session[ScreenCols]} {%C};
#SPLIT 0 3;


#tick {keepalive}
{
#send {\xFF\xFB\x1F\}
}
{60}

#ALIAS {la}
{
 l w;
 l e;
 l n;
 l s;
}

#alias {test}
{
 #showme A giant scrab has arrived from the west walking like crazy.;
 #showme A foreign presence contacts your mind.
}

#action {beeps you.$} {
                #system mplayer beep-07.mp3 > /dev/null &;
}

#ALIAS {alert}
{
#if {$alertstatus==0}
{
#action {^%* has arrived %*} {
                #system mplayer beep-07.mp3 > /dev/null &;
#system echo alert;
};
#action {^A foreign} {
                #system mplayer beep-07.mp3 > /dev/null &;
#system echo alert;
};

#variable alertstatus 1;
#showme {Alerting to all actions.};
};
#else
{
#unaction {^%* has arrived %*};
#unaction {^A foreign};
#variable alertstatus 0;
#showme {Alert mode is now off.};
}
}

#HIGHLIGHT {The body of } {cyan}
#HIGHLIGHT {The head of } {cyan}
#HIGHLIGHT {gives you} {light cyan}
#HIGHLIGHT {You follow} {cyan}
#HIGHLIGHT {You are famished%*} {yellow}
#HIGHLIGHT {You are starving%*} {yellow}
#HIGHLIGHT {You lost your concentration} {bold white}
#HIGHLIGHT {You notice } {cyan}
#HIGHLIGHT {You suffer from dehydration%*} {yellow}
#HIGHLIGHT {{carru|templar|tarantula|scrab|anakore|gortok|gith|bahamet|mekillot|cylops|ciclops|raptor} has arrived} {bold red}
#HIGHLIGHT {You're now wanted%*} {bold white}
#HIGHLIGHT {Your psychic barrier is crushed%*} {light cyan}
#HIGHLIGHT {asks you,} {light cyan}
#HIGHLIGHT {out of character} {light cyan}
#HIGHLIGHT {refuses to move} {cyan}
#HIGHLIGHT {says to you} {light cyan}
#HIGHLIGHT {throws you from its back} {cyan}
#HIGHLIGHT {too fast for you, so you lag behind} {cyan}
#HIGHLIGHT {A foreign presence contacts your mind%*} {light cyan}
#HIGHLIGHT {falls in behind you} {cyan}
#HIGHLIGHT {A loud bell chimes, echoing across the city%*} {light cyan}
#HIGHLIGHT {A staff member sends} {light cyan}
#HIGHLIGHT {a strange taste} {yellow}
#HIGHLIGHT {You are wanted in} {bold white}
#HIGHLIGHT {You feel burning poison in your blood, and suffer%*} {yellow}
#HIGHLIGHT {You are dehydrated%*} {yellow}
#HIGHLIGHT {You already have} {light cyan}
#HIGHLIGHT {{seem|seems} to have {your|his|her|its} hands full} {light cyan}
#HIGHLIGHT {To the {north|south|west|east}} {cyan}
#HIGHLIGHT {{walks|runs|sneaks|run|sneak|walk} {north|south|west|east|up|down}} {cyan}
#HIGHLIGHT {{North|South|West|East} of here} {cyan}
#HIGHLIGHT {chasm} {bold red}
#HIGHLIGHT {pit} {bold red}

#NOP COMBAT!
#HIGHLIGHT {attack reversed} {bold red}
#HIGHLIGHT {fumbles} {bold red}
#HIGHLIGHT {{knocks|knock} a } {bold red}
#HIGHLIGHT {crumples to the ground} {bold red}
#HIGHLIGHT {{reel|reels} from the blow} {bold red}
#HIGHLIGHT {arrow flies in from} {bold red}
#HIGHLIGHT {attacks {the|a} } {bold red}

#HIGHLIGHT {and knocks you over} {yellow}
#HIGHLIGHT {{leaps|leap} in front of } {yellow}
#HIGHLIGHT {begins guarding } {yellow}
#HIGHLIGHT {fumble and drop} {bold red}
#HIGHLIGHT {looks really sick, and shivers uncomfortably} {yellow}
#HIGHLIGHT {nimbly avoids your bash} {yellow}
#HIGHLIGHT {protects you from harm} {bold red}
#HIGHLIGHT {from your hands} {yellow}
#HIGHLIGHT {fail the rescue} {yellow}
#HIGHLIGHT {rolls with your charge} {yellow}
#HIGHLIGHT {bat you} {yellow}
#HIGHLIGHT {{charge|charges} into the fight} {yellow}
#HIGHLIGHT {darts in front of you} {yellow}
#HIGHLIGHT {sends you sprawling} {yellow}
#HIGHLIGHT {stops attacking} {yellow}
#HIGHLIGHT {begins fighting} {yellow}
#HIGHLIGHT {is not fighting anyone} {yellow}
#HIGHLIGHT {stops fighting} {yellow}
#HIGHLIGHT {rescues the} {yellow}
#HIGHLIGHT {throws} {yellow}
#HIGHLIGHT {tries to protect} {yellow}
#HIGHLIGHT {tries unsuccessfully to dart in front} {yellow}

#highlight {^     "%0"} {light cyan}
#highlight {has arrived from %*} {yellow}
#highlight {^At your table,} {light cyan}
#highlight {a glowing leather-strapped} {bright green}
#highlight {^<primary hand> %*} {light cyan}
#highlight {^<secondary hand> %*} {light cyan}
#highlight {^<both hands> %*} {light cyan}


#alias pose {
change ldesc %0
}

#alias clelf {
change language allundean;
}

#alias cldwarf {
change language mirukkim;
}

#alias clsir {
change language sirihish;
}

#alias sheatha {
clean razor.spear blood;
clean razor.sword blood;
sheath razor.spear back;
sheath razor.sword;
}

#alias drawa {
draw razor.spear;
draw razor.sword;
}

#alias skinn {
sheath razor.spear back;
draw skinning boots;
rem gloves;
}

#alias unskinn {
clean skinning blood;
sheath skinning boots;
wear gloves;
draw razor.spear;
}

#alias bow {
sheath razor.spear back;
sheath razor.sword;
rem bow; hold bow; pull quiver;
}

#alias unbow {
rem bow; wear bow;
rem arrow; put arrow quiver;
draw razor.spear;
draw razor.sword;
}

#alias unarmor {
get skirt pack; wear skirt waist;
get mesh pack; wear mesh hair;
get necklace pack;
get hat pack;
get bra pack;
get slippers pack;
rem pauldrons; put pauldrons pack;
rem chausses; put chausses pack;
rem webbed.boots; put webbed.boots pack; wear slippers;
rem cuirass; put cuirass pack; wear bra;
rem helm; put helm pack; wear hat;
rem spike; put spike pack;
rem spike; put spike pack; get strand pack; wear strand ankle;
rem gorget; put gorget pack; wear necklace neck;
get bracelet pack; rem bracer; put bracer pack; wear bracelet;
rem bracer; put bracer pack;
}

#alias armor {
get chausses pack; wear chausses;
get pauldrons pack; wear pauldrons;
rem necklace; put necklace pack; get gorget pack; wear gorget;
rem bracelet; put bracelet pack; get bracer pack; wear bracer;
get bracer pack; wear bracer;
rem strand; put strand pack; get spike pack; wear spike;
get spike pack; wear spike;
rem hat; put hat pack; get helm pack; wear helm head;
rem bra; put bra pack; get cuirass pack; wear cuirass;
rem slippers; put slippers pack; get webbed.boots pack; wear webbed.boots
rem skirt; put skirt pack;
rem mesh; put mesh pack;
}

#alias unbarmor {
rem pauldrons; put pauldrons large.bag;
rem chausses; put chausses large.bag;
rem webbed.boots; put webbed.boots large.bag;
rem cuirass; put cuirass large.bag;
rem helm; put helm large.bag;
rem spike; put spike large.bag;
rem spike; put spike large.bag;
rem gorget; put gorget large.bag;
rem bracer; put bracer large.bag;
rem bracer; put bracer large.bag;
}

#alias barmor {
get chausses large.bag; wear chausses;
get pauldrons large.bag; wear pauldrons;
get gorget large.bag; wear gorget;
get bracer large.bag; wear bracer;
get bracer large.bag; wear bracer;
get spike large.bag; wear spike;
get spike large.bag; wear spike;
get helm large.bag; wear helm head;
get cuirass large.bag; wear cuirass;
get webbed.boots large.bag; wear webbed.boots
}


#alias {hpsi} {
psi %0;
phem eyes go cross-eyed;
}

#alias myprompt {
  prompt hH:%h/%H vV:%v/%V tT:%t/%T w(%w) E(%E) e(%e) s(%s) [L(%L)] S(%S) FINPROMPT;
}

#ACTION {hH:%1/%2 vV:%3/%4 tT:%5/%6 w(%7) E(%8) e(%9) s(%10) [%11] S(%12) FINPROMPT}
{
  #var {armspeed} {%7};
  #replace {armspeed} {running} {R};
  #replace {armspeed} {walking} {W};
  #replace {armspeed} {sneaking} {S};

  #var {armweight} {%8};
  #replace {armweight} {no problem} {NP};
  #replace {armweight} {light} {L};
  #replace {armweight} {easily manageable} {EM};
  #replace {armweight} {manageable} {M};
  #replace {armweight} {heavy, but M} {*HBM*};
  #replace {armweight} {VERY heavy} {*VH*};
  #replace {armweight} {heavy, but manageable} {*HM*};
  #replace {armweight} {unbelievably heavy} {*UH*};

  #var {armtime} {%9};
  #replace {armtime} {early afternoon} {EA};
  #replace {armtime} {late afternoon} {LA};
  #replace {armtime} {early morning} {EM};
  #replace {armtime} {late morning} {LM};
  #replace {armtime} {high sun} {HS};
  #replace {armtime} {before dawn} {BD};
  #replace {armtime} {dawn} {dawn};
  #replace {armtime} {dusk} {dusk};
  #replace {armtime} {late at night} {LN};

  #var {armldesc} {%11};
  #replace {armldesc} {ldesc : } {};

  #showme {h:%1/%2 mv:%3/%4 s:%5/%6} {3};
  #showme {%12} {2};
  #showme {$armspeed $armweight $armtime $armldesc} {1};
}
{1}

#SUBSTITUTE {hH:%*FINPROMPT} {}

#format {logfile} {logs/%t.html} {%Y-%m-%d};
#log append $logfile;
as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago

February 03, 2016, 10:41:25 PM #5 Last Edit: February 03, 2016, 10:44:29 PM by CodeMaster
Quote from: nauta on February 03, 2016, 08:07:34 PM
#alias {hpsi} {
psi %0;
phem [redacted]
}

Careful you don't out yourself!

[edit: but sweet config all the same]
The neat, clean-shaven man sends you a telepathic message:
     "I tried hairy...Im sorry"

Fixed it.
as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago

Is phem a tintin or a game command? I can't seem to find it in-game, yet it seems to be sending it to the world. Unless it only sends lines with a ; at the end (it's sending the psi, for example).
> who
Immortals
---------

There are 0 visible Immortals currently in the world.

There are 0 players currently in the world, other than yourself.

"Only the Lonely" - Roy Orbison


That script horks up my vtmap. I tried to put it to the top but I can't get it to stay on one line at the 18 font size.

Right now I'm trying to get it to #SUB or #HIGHLIGHT the numbers in my prompt for health and movement. Green if max or near max, yellow if below a certain threshold, or red if very low. Colors improve the visibility a lot for me. Any ideas on how to do that?

Quote from: azuriolinist on February 04, 2016, 03:12:12 AM
Phem is short for phemote.

Oh, right. I forgot about command abbreviation. Off the top of my head, I can't imagine why you'd want to hemote at the same time you psi any given argument. If I shared my mushclient config, I'd have some obscure aliases too, I think.
> who
Immortals
---------

There are 0 visible Immortals currently in the world.

There are 0 players currently in the world, other than yourself.

"Only the Lonely" - Roy Orbison

Quote from: JackGibbons on February 04, 2016, 03:54:02 PM
Quote from: azuriolinist on February 04, 2016, 03:12:12 AM
Phem is short for phemote.

Oh, right. I forgot about command abbreviation. Off the top of my head, I can't imagine why you'd want to hemote at the same time you psi any given argument. If I shared my mushclient config, I'd have some obscure aliases too, I think.

Well, it's 'hpsi' and I do it now and then rather than 'psi', because it's a peeve of mine to sit in a room with someone who is waying yet giving zero outward signs that would distinguish them from an NPC/idler.  But it's also annoying to have to type out an hemote each time.  It's sort of a heartbeat.
as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago

Quote from: nauta on February 04, 2016, 04:00:29 PM
Quote from: JackGibbons on February 04, 2016, 03:54:02 PM
Quote from: azuriolinist on February 04, 2016, 03:12:12 AM
Phem is short for phemote.

Oh, right. I forgot about command abbreviation. Off the top of my head, I can't imagine why you'd want to hemote at the same time you psi any given argument. If I shared my mushclient config, I'd have some obscure aliases too, I think.

Well, it's 'hpsi' and I do it now and then rather than 'psi', because it's a peeve of mine to sit in a room with someone who is waying yet giving zero outward signs that would distinguish them from an NPC/idler.  But it's also annoying to have to type out an hemote each time.  It's sort of a heartbeat.

That makes sense. Some kind of subtle sign of concentration, glassy eyes, distant look associated with using a mental power, instead of merely appearing to be AFK.

/my derail
> who
Immortals
---------

There are 0 visible Immortals currently in the world.

There are 0 players currently in the world, other than yourself.

"Only the Lonely" - Roy Orbison

#HIGHLIGHT {^You real from the blow} {bold white}

This one won't work, right? Since it's 'reel'?
> who
Immortals
---------

There are 0 visible Immortals currently in the world.

There are 0 players currently in the world, other than yourself.

"Only the Lonely" - Roy Orbison

Yeah, should work.

I can read in the hp and mv values into variables just fine, I just haven't figured out how to spit them back to me on the prompt line with substitute using color yet. :) I can't seem to get it to read an #ELSEIF during the #sub.

Quote from: Miradus on February 04, 2016, 07:58:25 PM
Yeah, should work.

I can read in the hp and mv values into variables just fine, I just haven't figured out how to spit them back to me on the prompt line with substitute using color yet. :) I can't seem to get it to read an #ELSEIF during the #sub.

#SUB only reads text, as far as I know. You can use #action instead of #prompt. You'll have to make use of #split, adding in some bottom border height (e.g., #split {} {2}). Then have the #action input the variables into their split lines using #showme (e.g., #showme {<example prompt>} {1}).

An example would be...


#split {} {2}
#ACTION {^h:%1/%2 mv:%3/%4 s:%5/%6 [%7 %8 %9 %10] %11:%12}
{
  #var {position} {%12};
  #if {"$position" != "standing"} {
    #var {position} {<faa>$position<099>};
  };
  #showme {<078>%7 %8 %9 %10 [%11:$position]} {1};
  #showme {<078>hp:%1/%2 mv:%3/%4 s:%5/%6} {2};
  #line gag;
}


...which checks if %12 is equal to standing and, if not, makes the variable display in red.

That's pretty elegant. I can work with that. Thanks!

I'm not using tintin++, but I'm coloring my prompt using delimits quite neatly.

<trigger priority="1410" newline="false" prompt="true" id="141">
  <pattern>|{standing|sitting|resting}|</pattern>
  <value>#cw teal</value>
</trigger>

Kinda stuff in CMUD.

The problem with this guide is that it doesnt show whether mythical units are to be used instead "normal" units or not... Are you able to add this?

Quote from: Gonzak on April 24, 2016, 01:52:46 PM
The problem with this guide is that it doesnt show whether mythical units are to be used instead "normal" units or not... Are you able to add this?

I'm confused about what you are asking...
as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago

It's a bot. :)
The neat, clean-shaven man sends you a telepathic message:
     "I tried hairy...Im sorry"

How is tintin with setting up aliases?  I have aliases that I've setup that will do certain scripted functions with certain mobs for when I do animations.  For example, a certain tentacle creature can grab onto a PC and drag it a room, then spawn said tentacle and force it to attack the person that got grabbed.  All of it is based on commands I can do in game, but with variables I've setup.  I type:  grab <player> <direction>  and then it has a target and direction the drag is done.  Can you do this with tintin?
Ourla:  You're like the oil paint on the canvas of evil.

Quote from: Ath on May 03, 2016, 02:20:25 PM
How is tintin with setting up aliases?  I have aliases that I've setup that will do certain scripted functions with certain mobs for when I do animations.  For example, a certain tentacle creature can grab onto a PC and drag it a room, then spawn said tentacle and force it to attack the person that got grabbed.  All of it is based on commands I can do in game, but with variables I've setup.  I type:  grab <player> <direction>  and then it has a target and direction the drag is done.  Can you do this with tintin?

Definitely.

I would recommend a chain of commands be separated in time with the #delay command. I have never been an imm in a mud so I dunno what commands you use but here is an example. Each part will be separated in time by seconds. The alias should take two arguments but be warned that argument wildcards in tintin was always a fuzzy topic for me so please test it to be sure it takes them right. Period drelimited keywords should work. If you want to enter the alias in your client then delete all the carriage returns and spaces to separate each line by ;



#alias {grab %1 %2} {
     Echo A tentacle appears from below and shoots towards ~%1!;
     #delay 1 {Drag %1 %2};
     #delay 2 {mload (vnum for tentacle mob)};
     #delay 3 {echo A black tentacle begins to thrash violently at ~%1!};
     #delay 4 {order black.tentacle kill %1};
}

Useful tips: Commands |  |Storytelling:  1  2

Thank you.  MUSHClient has been going buggy for me as of late, so I'm thinking of trying something new.  I have a very heavily customized setup that helps with a lot of staff side functions and the aliases that I've been building to help me with animations.  I've been able to pull off some really fun things.
Ourla:  You're like the oil paint on the canvas of evil.

Just wanted to say thanks to nauta for or this.  I am using tt++ on Ubuntu because potato and mudlet seemed to be being weird - suppressing the last line of output and stuff.  I've modified it a fair bit, but I'm making heavy use of nauta's script.

Hi,

Any regular expression gurus out there want to help me with a small project?  I'm trying to implement the bolded opponent thing client-side, and I've probably not had enough coffee.

Here's what I want:
Quote
The vicious, sexy, and tall muscular man chops at you.

(Among other things.)

So, I thought I'd try this:

#action {{%*} chops at you.} {
  #substitute {%1} {<170>%1};
}


But for some reason this doesn't work as expected.  It bright whites the entire line.

Any thoughts?  Here's the reference:

http://tintin.sourceforge.net/manual/action.php
as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago

Hehe, figured it out.


#action {%* attacks you.} {
  #substitute {%1} {<170>%1<099>};
}


Thanks coffee!
as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago

It's a WIP, but the following is an outline for getting the brighted opponent during combat -- I'll update as I go along.  This was more a Proof-of-Concept for me, but it works!  (I'm missing some attack types.)


#substitute {%1 {attacks you.}} {
  <150>%1<099> %2
}

#substitute {%1 {reels from the blow.}} {
  <150>%1<099> %2
}

#substitute {%1 {lunges at you}%3} {
<150>%1<099> %2%3
}

#substitute {%1 {swiftly dodges your}%3} {
<150>%1<099> %2%3
}

#substitute {%1 {parries your}%3} {
<150>%1<099> %2%3
}

#substitute {%1 {slides away from your mount}%3} {
<150>%1<099> %2%3
}

#substitute {%1 {lightly|solidly} {gores|claws|pecks|hits|chops|slashes|pierces} {at you|your|you}%5} {
<150>%1<099> %2 %3 %4%5
}

#substitute {%1 {gores|claws|pecks|hits|chops|slashes|pierces} {at you|your|you}%4} {
<150>%1<099> %2 %3%4
}

#substitute {{You} {viciously|lightly|solidly} {nick|slash|chop|hit|pierce} %4{'s} %6} {
  %1 %2 %3 <150>%4<099>%5 %6
}

#substitute {{You} {nick|slash|chop|hit|pierce} %3{'s} %5} {
%1 %2 <150>%3<099>%4 %5
}

#substitute {{You} {viciously|lightly|solidly} {nick|slash|chop|hit|pierce} %4 {very|on}} {
%1 %2 %3 <150>%4<099> %5
}

#substitute {{You} {nick|slash|chop|hit|pierce} %3 {very|on}} {
%1 %2 <150>%3<099> %4
}

#substitute {{You inflict a grievous wound on} %2{'s} %4} {
  %1 <150>%2<099>%3 %4
}

#substitute {{You land a solid chop to} %2{'s} %4} {
  %1 <150>%2<099>%3 %4
}

#substitute {{You wound} %2 {on} %4} {
  %1 <150>%2<099> %3 %4


#substitute {{You charge at} %2} {
  %1 <150>%2<099>
}

#substitute {{You attack} %2} {
  %1 <150>%2<099>
}

#substitute {{You deftly parry} %2{'s attack.}} {
  %1 <150>%2<099>%3
}

as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago

Here's an updated version that has worked for me over the last few weeks.  It seeks to emulate the 'old' behavior of color highlighting certain bits of text during combat (notably: who your opponent is).


#substitute {%1 {attacks you.}} {
  <150>%1<099> %2
}

#substitute {%1 {lightly|solidly|brutally|viciously} {gores|bites|claws|pecks|hits|chops|stings|stabs|whips|pinches|bludgeons|slashes|pierces} {at you|your|you}%5} {
<150>%1<099> %2 <170>%3<099> %4%5
}

#substitute {%1 {gores|bites|claws|pecks|hits|chops|stings|stabs|whips|pinches|bludgeons|slashes|pierces} {your|you}%4} {
<150>%1<099> <170>%2<099> %3%4
}

#substitute {%1 {gores|bites|claws|pecks|hits|chops|stings|stabs|whips|pinches|bludgeons|slashes|pierces} %3{'s|, barely} %5} {
<150>%1<099> <170>%2<099> <150>%3<099>%4 %5
}

#substitute {%1 {lightly|solidly|brutally|viciously} {gores|bites|claws|pecks|hits|chops|stings|stabs|whips|pinches|bludgeons|slashes|pierces} %4 on %6} {
<150>%1<099> <170>%2 %3<099> <150>%4<099> on %6
}

#substitute {%1 {gores|bites|claws|pecks|hits|chops|stings|stabs|whips|pinches|bludgeons|slashes|pierces} %3 on %5} {
<150>%1<099> <170>%2<099> <150>%3<099> on %5
}

#substitute {{You} {lightly|solidly|brutally|viciously} {nick|slash|chop|stab|whip|bludgeon|hit|pierce} %4{'s} %6} {
  %1 %2 %3 <150>%4<099>%5 %6
}

#substitute {{You} {nick|slash|chop|stab|whip|bludgeon|hit|pierce} %3{'s} %5} {
%1 %2 <150>%3<099>%4 %5
}

#substitute {{You} {lightly|solidly|brutally|viciously} {nick|slash|chop|stab|whip|bludgeon|hit|pierce} %4 {very|on}} {
%1 %2 %3 <150>%4<099> %5
}

#substitute {{You} {nick|slash|chop|stab|whip|bludgeon|hit|pierce} %3{, barely| very| on}} {
  %1 %2 <150>%3<099>%4
}

#substitute {{You inflict a grievous wound on} %2{'s} %4} {
  %1 <150>%2<099>%3 %4
}

#substitute {{You wound} %2 {on} %4} {
  %1 <150>%2<099> %3 %4
}

#substitute {{You do unspeakable damage to} %2{'s} %4} {
  %1 <150>%2<099>%3 %4

}
#substitute {{You land a solid} {nick|slash|chop|stab|whip|bludgeon|hit|pierce} {to} %4{'s} %6} {
  %1 %2 %3 <150>%4<099>%5 %6
}
as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago

Nice. With some modifications it also helps me figure out what's going on when I'm fighting alongside someone else. Are they taking big hits, etc?


Okay, your choice of colors are getting on my nerves. Bright magenta. Really? :)

How do I change the colors?

as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago



My eyes!

Okay, thanks for the chart. I'll go find something less freakin' fabulous to change it to.

This is awesome! Thanks, nauta!
Useful tips: Commands |  |Storytelling:  1  2

Thanks.  It's by no means perfect.  One flaw is that the #substitute matches are a tit bit too inclusive, so they'll grab, for example,

[b]You[/b] peck [b]the tressy-tressed tressed tress[/b] on the cheek.

as IF you didn't just have them unconscious, naked, and helpless in the street 4 minutes ago

When writing an alias/ Action * = send Action %1 (which is action (target) .

How do I add a direction, so my out come is as below?

alias abbreviated Action (target) (direction)

send full Action (target) (direction)
The funny little foreign man

I often hear the jingle to -Riunite on ice- when I read the estate name Reynolte, eve though there ain't no ice in Zalanthas.

Quote from: Potaje on December 06, 2019, 08:45:31 PM
When writing an alias/ Action * = send Action %1 (which is action (target) .

How do I add a direction, so my out come is as below?

alias abbreviated Action (target) (direction)

send full Action (target) (direction)

Send me a pm so I can understand what you are asking.

I wanted to add a few thing to this post!  I have been using Windows Terminal in Windows 11 (with Ubuntu for Windows, formerly WSL) and I think it works well.  It has full unicode support, so you could have things that contain emojis if you really wanted to.

There were some tt++ changes on config settings, like buffer size and something else.. But these are the config's I use.  Notably, I'm now using #CONFIG {MOUSE} {ON} for reasons I'll get to in a minute.


#CONFIG {COLOR MODE} {256}
#CONFIG {AUTO TAB}  {5000}
#CONFIG {BUFFER SIZE}  {1000000}
#CONFIG {CHARSET}  {UTF-8};
#CONFIG {COLOR PATCH}  {OFF}
#CONFIG {COMMAND COLOR}  {<g08>}
#CONFIG {COMMAND ECHO}  {ON}
#CONFIG {CONNECT RETRY}  {15}
#CONFIG {HISTORY SIZE}  {1000}
#CONFIG {LOG} {HTML}
#CONFIG {PACKET PATCH}  {0.20}
#CONFIG {REPEAT CHAR}  {!}
#CONFIG {REPEAT ENTER}  {OFF}
#CONFIG {SCROLL LOCK}  {ON}
#CONFIG {SPEEDWALK}  {ON}
#CONFIG {TINTIN CHAR}  {#}
#CONFIG {VERBATIM}  {OFF}
#CONFIG {VERBATIM CHAR}  {\}
#CONFIG {VERBOSE}  {OFF}
#CONFIG {WORDWRAP}  {ON}
#CONFIG {MOUSE} {ON}


This is my prompt, adapted from nauta's.. It's purely personal preference.  But I also like my prompt to highlight when I'm armed or sneaking as you can see

#alias myprompt {
   prompt hp:%h/%H mv:%v/%V st:%t/%T [%s] [%w] [%E] [%e] [%A] FINPROMPT;
}
#ACTION {hp:%1/%2 mv:%3/%4 st:%5/%6 [%7] [%8] [%9] [%10] [%11] FINPROMPT} {#showme {-- hp:%1/%2 mv:%3/%4 st:%5/%6 [%7] [%8] [%9] [%10] [%11] -- } {-2};} {1}
#SUBSTITUTE {hp:%*FINPROMPT} {}
#HIGHLIGHT {[armed]} {<ffe>}
#HIGHLIGHT {[sneaking]} {<ffe>}


Another fun thing can be sounds...  This used to work better when I had Linux proper and not Win11.. It seems like enabling paplay is too hard in Win11, or too much driver hassle.  One thing I'm testing is a bit of a hack.. Getting tintin++ to trigger the default windows app for a sound.  I haven't tested enough to see if this causes lag:

#action {^A foreign} {#system wslview contact.wav};
#action {beeps you.$} {#system wslview beep.wav};


Then logging, I adapated an existing tintin++ script on the website to be able to turn logging on and off.

#alias {log}
{
#if {"%0" == "on"}
{
#if {"$logging" != "on"}
{
#format {logfile} {/mnt/c/Users/user/Documents/mudlogs/%t.html} {%Y-%m-%d};
#log append $logfile;
#showme Starting logging.;
#var logging on
};
#else
{
#showme You are already logging.
}
};
#elseif {"%0" == "off"}
{
#if {"$logging" == "on"}
{
#showme Stopping logging.;
#log off;
#var logging off

};
#else
{
#showme You are not logging.
}
};
#else
{
#showme Logging is currently $logging ... 
}
}

#var logging on
#format {logfile} {/mnt/c/Users/user/Documents/mudlogs/%t.html} {%Y-%m-%d};
#log append $logfile;


Then the last thing I wanted to get working... tintin++ maps.  First, here is my basic split setup.  It adjusts the split based on the available size in the window.  I use an alias if I change the window size and I want to reset the split properly.  I'm assuming you've already created a tintin map file which you'd do manually in the first instance.


#split 0 2 0 -83;
#map read ArmMap.map;
#map return;
#map offset 1 85 -4 -1;
#map flag vtmap on;
#ACTION {You flee, heading %.} {#map move %1} {5};
#ACTION {Come back soon!} {#map write ArmMap.map;};
#ALIAS {splitreset} {
#split 0 2 0 -83;
#map offset 1 85 -4 -1;
}



Then, mouse actions!  I wanted to be able to scroll the buffer with the mouse wheel, and I wanted to be able to move the center of my map around with the mouse.  Here is something basic which does that.  Note to access regular mouse actions (like right-click paste) hold shift.

#event {MAP REGION PRESSED MOUSE BUTTON ONE} {
        #var {o_x} %0;
        #var {o_y} %1;
        #var {pressed_at} %0;
}
#event {MAP REGION MOVED MOUSE BUTTON ONE} {
            #var d_x %0;
            #var d_y %1;
            #math {c_x} {$o_x - $d_x};
            #math {c_y} {$d_y - $o_y};
            #map center $c_y $c_x 0;

};
#event {SCROLLED MOUSE WHEEL UP} #buffer up 4;                         
#event {SCROLLED MOUSE WHEEL DOWN} #buffer down 4;


Then the last thing.. very much a work in progress, is how to actually make a map. I've always been curious about how people make maps in muds and the internet tells me that tintin++ has a powerful and flexible mapper.  So I wanted to learn it.

I adapted the logging on/off code above to have a "mapping" mode on/off.. Basically what it does is toggle #map flag static .. which automatically creates rooms as you move, but also either loads or kills a set of mapping triggers which I'm working on.  So just the on/off part:

#alias {mapping} {
#if {"%0" == "on"}
{
#if {"$mapping" != "on"}
{
    #class mapping read maptriggers.tin;
#map flag static off;
#var mapping on
};
#else
{
#showme You are already mapping.
}
};
#elseif {"%0" == "off"}
{
#if {"$mapping" == "on"}
{
#class mapping kill;
#map flag static on;
#map write ArmMap.map;
#showme No longer mapping rooms.;
#var mapping off;
};
#else
{
#showme You are not mapping.
}
};
#else
{
#showme Mapping is currently $mapping ... 
}
}


Then the triggers kept in a separate file.  Because it seemed the easiest, I used a colour trigger to grab the room name.  I set roomnames to be colour 105, exits 111, and then it's fairly easy to grab those.  The other trigger is something that automatically undoes room creation if you accidentally try and move a direction that doesn't exist.  This could be expanded alot:  automatic #map set roomsymbol or #map set roomcolor based on the room name, capturing the room descriptions, setting a variable to assign rooms you mapped to "areas" eg Allanak or Southlands etc..  But for now this is pretty basic.

#ACTION {~\e[38;5;105m%1\e[0m\e[38;5;111m [%2]\e[0m} {#map set roomname %1} {5};
#ACTION {You cannot go '%1', there is no exit that way.} {#map undo; #showme Undid room creation};