<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<func name="set_compliment" copy="yes">
<value>#LOCAL $compliment
#FORALL $b {
#IF (!%ismember( %i, $a)) {
#ADDITEM $compliment %i
}
}
#RETURN $compliment</value>
<arglist>$a, $b</arglist>
</func>
<func name="set_difference" copy="yes">
<value>#LOCAL $difference
#FORALL $a {
#IF (!%ismember( %i, $b)) {
#ADDITEM $difference %i
}
}
#FORALL $b {
#IF (!%ismember( %i, $a)) {
#ADDITEM $difference %i
}
}
#RETURN $difference</value>
<arglist>$a, $b</arglist>
</func>
<func name="set_intersection" copy="yes">
<value>#LOCAL $intersection
#FORALL $a {
#IF (%ismember( %i, $b)) {
#ADDITEM $intersection %i
}
}
#RETURN $intersection</value>
<arglist>$a, $b</arglist>
</func>
<func name="set_union" copy="yes">
<value>#LOCAL $union
#FORALL $a {
#ADDITEM $union %i
}
#FORALL $b {
#ADDITEM $union %i
}
#RETURN $union</value>
<arglist>$a, $b</arglist>
</func>
</cmud>
Neat Little Scripts Awww, so cute
#901
Posted 22 July 2010 - 08:48 AM
That voice which calls to me, and speaks my name
#902
Posted 22 July 2010 - 10:14 AM
function check_defences( cmd )
local def_start
if ( last_command == "def" or last_command == "defences" ) then
for line = 1, mb.nr_of_lines do
if mb.lines[line] == "You have the following active defences:" then
--sdebug( "Defline is being seen." )
for k, v in pairs( def ) do
if v.defline then
--sdebug( "Defline is being discovered." )
v.affirm = false
end
end
end
def_start = line
break
end
if not def_start then
return
end
for line = def_start + 1, mb.nr_of_lines do
for k, v in pairs( def ) do
if v.defline ~= nil and cmp(v.defline, mb.lines[line]) then
--sdebug( tostring( v.defline ) .. " compared to " .. tostring( mb.lines[line] ) ) -- Working
v.affirm = true
suffix( line, C.c .. ' (' .. ( v.name ) .. C.c .. ')' .. C.x )
end
end
end
end
end

<rafic
#903
Posted 22 July 2010 - 07:29 PM
/def -q -Fp10 -mregexp -h"SEND ^mwho enorian active$" CheckingEnorian = /set checkingEnorian=2%;/quote -S /undeflast `"/list -mregexp -s ActiveMilitiaHighlight"
/def undeflast = /undef $(/last %*)
/def -E(%checkingEnorian) -mregexp -t"^Recruit:$" RecruitsEndIt = /set checkingEnorian=1
/def -mregexp -t"^((\w+)(, |))+$" CaptureNames = /if (%checkingEnorian) /parselist $[replace(",","",%*)]%;/if (%checkingEnorian == 1) /unset checkingEnorian%;/endif%;/endif
/def parselist = /while (%#) /def -mregexp -Fp10 -PBCgreen -t"%1" %{1}ActiveMilitiaHighlight%;/shift%;/done
Oh, and I'd like to make this clear. I'm a guy. Feel free to refer to me as Seurimas, my current character, or Nick, hi!
#904
Posted 22 July 2010 - 07:50 PM
/tf_rant

-----------------------------------------------------------------------------------------------------------------------
I would love to change the world, but they won't give me the source code.
#906
Posted 22 July 2010 - 08:12 PM
Naamah, on Jul 22 2010, 09:06 PM, said:
*snicker*

-----------------------------------------------------------------------------------------------------------------------
I would love to change the world, but they won't give me the source code.
#907
Posted 22 July 2010 - 08:13 PM
Naamah, on Jul 22 2010, 03:06 PM, said:
So you can. Alas, it can be adapted to any list of names easily enough.
Also, this way SCENT is neon green too, so I don't have to do WHO, scan the list, OMG, that's by me! Runaway!
Oh, and I'd like to make this clear. I'm a guy. Feel free to refer to me as Seurimas, my current character, or Nick, hi!
#909
Posted 24 July 2010 - 05:54 AM
/def -q -Fp10 -mregexp -h"SEND ^mwho enorian active$" CheckingEnorian = /set checkingEnorian=2%;/quote -S /undeflast `"/list -mregexp -s ActiveMilitiaTracker"
/def undeflast = /undef $(/last %*)
/def -E(%checkingEnorian) -mregexp -t"^Recruit:$" RecruitsEndIt = /set checkingEnorian=1
/def -mregexp -t"^((\w+)(, |))+$" CaptureNames = /if (%checkingEnorian) /parselist $[replace(",","",%*)]%;/if (%checkingEnorian == 1) /unset checkingEnorian%;/endif%;/endif
/def parselist = /while (%#) \
/def -mregexp -Fp10 -t"^( +)%1 - (.{24})(.{10})" %{1}ActiveMilitiaTracker = /set curLKP=$$[textencode(%%P2)]%%;/if (%%_Aet_%{1}_lkp !/ %%curLKP) /echo -aBCblue [ %1 moved from $$[textdecode(%%_Aet_%{1}_lkp)] to $$[textdecode(%%curLKP)] ]%%;/set _Aet_%{1}_lkp=%%curLKP%%;/endif%;/shift%;/done
Oh, and I'd like to make this clear. I'm a guy. Feel free to refer to me as Seurimas, my current character, or Nick, hi!
#910
Posted 24 July 2010 - 07:05 AM
*opens up a shell*

-----------------------------------------------------------------------------------------------------------------------
I would love to change the world, but they won't give me the source code.
#911
Posted 04 August 2010 - 12:42 AM
Name: Improved Emotes
Pattern: ^(.*)\<me\>(.*)$
Script:
if matches[2] == "" then
send("em " .. matches[3])
else
send("em \(" .. matches[2] .. "\) " .. matches[3])
endNow, you can emote a little more flexibly with the command <me>.
Quote
You have emoted: With a loud crash, Lin tumbles down from the treetops above.
"Absolutely not," <me> says
You have emoted: "Absolutely not," Lin says.
<me> can still do good ol'-fashioned emotes this way
You have emoted: Lin can still do good ol'-fashioned emotes this way.
#912
Posted 23 August 2010 - 01:59 AM
From:
Quote
It will take you 1764 more lessons to transcend Vision.
It will take you 1764 more lessons to transcend Reanimation.
It will take you 1764 more lessons to transcend Avoidance.
It will take you 705 more lessons to transcend Constitution.
It will take you 705 more lessons to transcend Thermology.
It will take you 705 more lessons to transcend Frost.
It will take you 705 more lessons to transcend Antidotes.
It will take you 705 more lessons to transcend Fitness.
It will take you 705 more lessons to transcend Galvanism.
It will take you 705 more lessons to transcend Philosophy.
It will take you 1764 more lessons to transcend Tattoos.
It will take you 1758 more lessons to transcend Survival.
It will take you 1764 more lessons to transcend Weaponry.
It will take you 705 more lessons to transcend Horsemanship.
To:
Skill Lessons Credits (8.5) Bound (6) Daily Lessons (5) ---------------------------------------------------------------------- Vision 1764 207 294 352 Reanimation 1764 207 294 352 Avoidance 1764 207 294 352 Constitution 705 82 117 141 Thermology 705 82 117 141 Frost 705 82 117 141 Antidotes 705 82 117 141 Fitness 705 82 117 141 Galvanism 705 82 117 141 Philosophy 705 82 117 141 Tattoos 1764 207 294 352 Survival 1758 206 293 351 Weaponry 1764 207 294 352 Horsemanship 705 82 117 141
/def -Fp8 -ag -mregexp -t"^You have learnt the following lessons:" LearnedStart = \ /echo -aBCblue Skill Lessons Credits (8.5) Bound (6) Daily Lessons (5)%;\ /echo -aBCcyan -- ---------------------------------------------------------------------- /def -Fp10 -ag -mregexp -t"^It will take you (\d+) more lessons to transcend (\w+).$" LearnedtoTranscend = \ /let skill=$[strip_attr(%P2)]%;/let lessons=$[strip_attr(%P1)]%;/let credits=$[lessons / 8.5]%;/let bound=$[lessons / 6]%;/let daily=$[lessons / 5]%;\ /let credits=$[nodecimal(credits)]%;\ /echo -aBCyellow -- $[pad(skill,-14)]$[pad(lessons,10)]$[pad(credits,15)]$[pad(bound,11)]$[pad(daily,12)] /def -Fp10 -ag -mregexp -t"^You have learned (\d+) lessons in (\w+).$" LearnedTotal = \ /trigger It will take you %P1 more lessons to transcend %P2. /def nodecimal = /return $[substr(%*,0,((strrchr(%*,".") + 1) ? : 3) - 1)]
Oh, and I'd like to make this clear. I'm a guy. Feel free to refer to me as Seurimas, my current character, or Nick, hi!
#914
Posted 23 August 2010 - 04:34 AM
Bashing highlighter:
To the best of its ability, it will turn this:
Quote
There are 2 wickedly sharp stalagmites here. A slave strains and grunts as it tries to push a cart of ore by you.
You see exits leading south and northwest.
:
You can see the following 3 objects:
"stalagmites170911" wickedly sharp stalagmites.
"stalagmites189287" wickedly sharp stalagmites.
"kobold42894" a kobold slave.
:
Into this:
Quote
Down the mining tunnel. (Azdun dungeon.)
There are 2 wickedly sharp stalagmites here. A slave strains and grunts as it tries to push a cart of ore by you.
You see exits leading south and northwest.
:
You can see the following 3 objects:
"stalagmites170911" wickedly sharp stalagmites.
"stalagmites189287" wickedly sharp stalagmites.
"kobold42894" a kobold slave.
:
Extensible to include other things or things which don't match the primitive regexp I use, if you so choose. Using <targ>_room variables, just add a LOOK description (or more, separated by '|') and it'll highlight that as well. Can only highlight one of each targ pattern in a look line. Requires wrapwidth 0. (Which is to say it won't match whole sentences/room descs if it's not.)
/require textencode.tf
/def btarg = /if (%# = 0) /newbtarg%;/return 0%;/endif%;\
/newbtarg%;\
/set bashTargs=%*%;/foreach i bashTargs /buildBashTarg %%i%;/sysmessage Targetting: %bashTargs
/def -Fp10 -mregexp -t"^You can see the following (\d+) objects.$" GatherIHBtarg = /set _IH=1
/def -E(_IH) -mregexp -t"^(.*)$" CatchAllUntilNotCatching = \
/if (!regmatch("^\"(\w+)(\d+)\"( +)(.*)\.$",%*)) \
; It isn't an IH line, so end IH
/set _IH=0%;\
/endif
/def newbtarg = /foreach i rTrigs /undef %%i%;/foreach i iTrigs /undef %%i%;/unset rTrigs%;/unset iTrigs
/def buildBashTarg = \
/set rTrigs=%rTrigs rTrig%1%;\
; Room trigs list ^
/set iTrigs=%iTrigs iTrig%1%;\
; IH trigs list ^
/if (get_val(textencode(%1),"_room") !/ "") /set otherROOM=|$[get_val(textencode(%1),"_ih")]%;/else /set otherROOM=%;/endif%;\
/def -mregexp -PBCgreen -Fp10 -t"(?i)(^|\\. +)(There are (\\d+)[^.]\{0,%preLim1\}%{1}[^.]\{0,%postLim1\} here|[^.]\{0,%preLim2\}%1[^.]\{0,%postLim2\}\\.%{otherROOM})($$| )" rTrig%1%;\
/def -E(_IH) -mregexp -PBCgreen -Fp10 -t"(?i)^(\\"%1(\\d+)\\"|\\"(\\w+)(\\d+)\\"( +).*%1.*\\.%{otherIH})" iTrig%1 = /
/def sysMessage = /echo -p @{Cblue}[@{Ccyan} @{Cred}+*+@{Ccyan} Neuromancer @{Cred}+*+@{Ccyan} @{Cblue}:@{BCblue} %*@{n} @{Cblue}]
/def -i get_val= /return %1%2%3%4%5%6%7%8%9%10
/set ivoln_room=Erupting from the ground and engulfed by a funnel of sand and stray earth, a lesser, clay status of a wyrm thrusts upwards, an ebon egg clutched in its maw.
/set skt_39_all_room=Proud and tall, Skt\'all the ophidian chieftain stands here.
/set preLim2=20
/set postLim2=40
/set preLim1=20
/set postLim1=20Usage:
/btarg <targets> [<more targets> [...]]
preLim1, postLim1 are limits to how many characters can be matched before and after the target in a grouped room, while preLim2 and postLim2 are the same for when there's just one.
All triggers here are caseless, so you needn't worry about Horkval or horkval for example.
EDIT: After a bit of testing, I can say, without a shred of modesty, that this actually works really nice
Oh, and I'd like to make this clear. I'm a guy. Feel free to refer to me as Seurimas, my current character, or Nick, hi!
#916
Posted 23 August 2010 - 07:02 PM
Ezrax, on 23 August 2010 - 12:31 PM, said:
Besides PURE AWESOME, nothing much.
Oh, and I'd like to make this clear. I'm a guy. Feel free to refer to me as Seurimas, my current character, or Nick, hi!
#918
Posted 23 August 2010 - 09:13 PM

Help

Add Reply

MultiQuote

















1 User(s) are reading this topic