Here is the "Finished" set of triggers, aliases, and functions ....
<triggers>
<trigger
enabled="y"
match="^Minor Celestial Antipode$"
regexp="y"
send_to="12"
sequence="100"
>
<send>Note("")
ColourNote("white","blue","Vidblain SW's are as follows:")
ColourNote("lime","black","Darklight = run 7n14edn2e3nd")
ColourNote("lime","black","Doom and Gloom = run 4n11eu")
ColourNote("lime","black","Dune = run 8s11e")
ColourNote("lime","black","Galaxy = run 7n14ed")
ColourNote("lime","black","Mega-City One = run 3n11e")
ColourNote("lime","black","Star Wars = run 7w4s")
ColourNote("lime","black","ST:TNG = run 14s9e")
ColourNote("lime","black","Ultima = run 5e6s;enter moongate")</send>
</trigger>
<trigger
enabled="y"
name="Vidblain_Enter_Hole"
match="^Into the dark \(G\)$"
regexp="y"
send_to="10"
sequence="100"
><send>vidbigmap</send>
</trigger>
<trigger
name="Vidblain_Bigmap_Start"
keep_evaluating="y"
match="^\+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\+$"
regexp="y"
script="Vidblain_Bigmap_Start"
sequence="100"
>
</trigger>
<trigger
name="Vidblain_Bigmap"
keep_evaluating="y"
match="^(\+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\+)|(\|(.*?)\|)$"
regexp="y"
script="VidblainBigMap"
sequence="100"
>
</trigger>
</triggers>
<aliases>
<alias
match="^vidbigmap$"
enabled="y"
regexp="y"
script="Vidblain_Bigmap_Enable"
send_to="12"
ignore_case="y"
sequence="100"
>
</alias>
</aliases>
--===========================================
-- Put OUTSIDE ALL Functions, within script section
line_count = nil
x = 0
y = 0
--===========================================
function Vidblain_Bigmap_Enable(sName,sLine,wildcards)
Send("bigmap")
EnableTrigger("Vidblain_Bigmap_Start",1)
end -- Vidblain_Bigmap_Enable
function Vidblain_Bigmap_Start(sName,sLine,wildcards)
EnableTrigger("Vidblain_Bigmap_Start",0)
EnableTrigger("Vidblain_Bigmap",1)
end -- Vidblain_Bigmap_Start
function VidblainBigMap(sName,sLine,wildcards,STYLES)
if sLine ~= "+------------------------------+" then
line = line_count
if line == nil then line = 0 end
col = 0
local linestyles = table.getn(STYLES)
for style = 1, linestyles do
if RGBColourToName(STYLES[style]["textcolour"]) == "red" and string.sub(STYLES[style]["text"],1,1) == "*" then
SetVariable("Vidblain_Line", line)
for stylenum = 1, style - 1 do
col = col + tonumber(STYLES[stylenum]["length"])
end -- for
col = col - 1
x = col
y = line
end -- if
end -- for
line = tonumber(line) + 1
line_count = line
else
EnableTrigger("Vidblain_Bigmap",0)
Note("X: " .. x .. " Y: " .. y)
line_count = nil
if (y >=0 and y < 4) or (y > 4 and y < 8) or (y > 8 and y < 13) or (y > 13 and y < 23) or (y > 23 and y < 26) or (y > 27 and
y < 30) then
if y > 15 then
if x > 15 then
Send("run " .. 30 - x .. "e" .. 30 - y .. "s")
else
Send("run " .. x .. "w" .. 30 - y .. "s")
end -- if
else
if x > 15 then
Send("run " .. 30 - x .. "e" .. y .. "n")
else
Send("run " .. x .. "w" .. y .. "n")
end -- if
end -- if
--Send("run " .. x .. "w" .. y .. "n")
else
if y > 15 then
if x > 15 then
Send("run " .. 30 - y .. "s" .. 30 - x .. "e")
else
Send("run " .. 30 - y .. "s" .. x .. "w")
end -- if
else
if x > 15 then
Send("run " .. y .. "n" .. 30 - x .. "e")
else
Send("run " .. y .. "n" .. x .. "w")
end -- if
end -- if
--Send("run " .. y .. "n" .. x .. "w")
end -- if
end -- if
end -- VidblainBigmap
This will, upon speed walking to vidblain, find your X and Y coordinate, and find and run the shortest route to 0,0 (top left room), then present the list of SW's from that room...
I do hope that this can help someone in some way.
Also there is an alias vidbigmap, so that if you want to use THAT instead of having it be automatic, then do not include the "Vidblain_Enter_Hole" trigger, or just make the enabled="n"
Laterzzz,
Onoitsu2 |