User:Sherry

From Flexible Survival
Jump to: navigation, search

This is not for people that don't know triggers/regex, but I'll post it anyways. Short explanation on how to setup: Login to flexible survival as usual. Then do a quickconnect, give world name of fs_chat and address of 127.0.0.1 (this is a dummy window to receive the text). Save that profile. Quick connect and make a fs_comb as well. Arrange windows as you like. fs_comb and fs_chat are full mushclient world profiles and can have their own triggers and scripts.

In your real profile then make a script and copy the script portion into it. This will cause lines that call the functions "tocomb" and "tochat" to be copied to those windows. Then set up triggers that call these functions for the lines you want to move/copy. If you want to move, then check "omit from output", if you want to copy then don't. In future just load your main profile and it will auto-open the other windows when it needs to (it might steal focus the first time).

Regex

Here's some triggers I find useful to move/copy. Make sure to replace Sherry with your character name.

Chats

This is what I copy to my chat window:

^.* pages, ".*" to you.$
^In a page-pose to you, .*$
^You page, ".*" to .*$
^<OOC> .*$
^\[(Auction|lfg|Public|Badges)\] .*$
^You page-pose, ".*" to .*$
^Somewhere on the muck, .* has (c|disc)onnected.$
^\w* (say|wheeze|chatter|hiss|reverently say|lustily coo|chirrup|hungrily chirrup|wail|rasp|squawk|hungrily say|softly churrls|moo|nya|warmly intone|quietly proclaim|confidently proclaim|squeak|clink|clank|neigh|bark|drawl|gurgle|gleam|quoth|timidly giggle|yowl|pant|hiss|yip|yap|impeccably say|boom|screech|whirr|squee|alluringly purr|buzzes|bestially hiss|burble|purr|whisper|whinny|snarl|whoosh|flup|chuff|click|smoothly say|sultrily squeak|swear|squeak|squeakily meow|wetly say|roar|lustily hiss|clack|meow|slur|rumble|dangerously hiss|blub-blub|flutter|mmph|grunt|quietly say|waagh|squeal|wildly howl|unpleasantly hiss|growl|chirr|rapidly click|marp|madly chitter|sproing|hiss|drunkenly slur|lustily murrs|churr|softly churr|chirp|smoothly whisper|scheme|snort|rustle|chorus|yammer|howl ferally|howl)\w*, ".*"$

Yes that last one is one long pattern

Combat

Turn Markers

^\[[><TURN ]{10}\].*\[.*\]
^--< (ALLIES >|FOES >--)--------------------------------------------------------------$
^(Active Powers|Status): .*$
^<ATB> .*$
^<Power> You begin preparing to use .*$

spoils

^<Salvage> .* checks for .* salvage
^Sherry gains .* XP.$
^Sherry receives .* FreeCreds.$
^You are holding as much XP as you can, you should.*$
^.\% chance of Nanite$

Powers

^<.*><.*> .*$
^<\[[0-9][0-9].*:.*> .*$
^<Debuff Clear> .*$
^<HPBuffer> .*Buffers.$
^<Power> .* gains the effect of .*$
^<Summon> .*.$
^<.*> .* takes .* lingering .* damage.$
^<DoT> .* succumbs to lingering damage!$
^<Energy Return> .* strikes back for .* damage!$
^<Physical Return> .* strikes back for .* damage!$

Defeat

^<Power> .* is defeated by .*!$
^<Victory> .*$

trigger config

Here's a sample trigger:

<trigger
   enabled="y"
   group="combat"
   match="^--< (ALLIES >|FOES >--)--------------------------------------------------------------$"
   omit_from_output="y"
   regexp="y"
   script="tocomb"
   sequence="100"
  >

This can be built in gui

  1. Check "Regular Expression" and "Omit from output"
  2. Filling in a group to tag the trigger and script of tocomb
  3. Setting the trigger pattern (^ is start of line, $ is end of line...)

script portion

comb_win_name = "fs_comb"
local comb_win_failed = false

chat_win_name = "fs_chat"
local chat_win_failed = false


function initchat()
	chat_win = GetWorld (chat_win_name)
	local filename = GetInfo (67) .. chat_win_name .. ".mcl"
	Open (filename)
	chat_win = GetWorld (chat_win_name)
	if not chat_win then
		ColourNote ("white", "red", "Can't open chat world file: " .. filename)
		chat_win_failed = true  -- Give up trying to open
	end
end

	
function tochat (name, line, wildcards, styles)
	if not chat_win and not chat_win_failed then
		initchat()
	end
	if chat_win then
		for _, v in ipairs (styles) do
 		     chat_win:ColourTell (RGBColourToName (v.textcolour), RGBColourToName (v.backcolour), v.text) 
		end
		chat_win:Note("")
	end
end
 

function initcomb()
	comb_win = GetWorld (comb_win_name)
	local filename = GetInfo (67) .. comb_win_name .. ".mcl"
	Open (filename)
	comb_win = GetWorld (comb_win_name)
	if not comb_win then
		ColourNote ("white", "red", "Can't open combat world file: " .. filename)
		comb_win_failed = true  -- Give up trying to open
	end
end

	
function tocomb (name, line, wildcards, styles)
	if not comb_win and not comb_win_failed then
		initcomb()
	end
	if comb_win then
		for _, v in ipairs (styles) do
 		     comb_win:ColourTell (RGBColourToName (v.textcolour), RGBColourToName (v.backcolour), v.text) 
		end
		comb_win:Note("")
	end
end