Making a list of items into each item being a clickable link.

Post Reply
Guilend
Posts: 36
Joined: Fri Mar 09, 2018 1:21 am

Making a list of items into each item being a clickable link.

Post by Guilend »

In Starmourn there are Incursions and to find out how far they are away you have to enter STARCHART <coord>, but I was wondering if it was possible to make an alias to turn on a trigger, send incursion list and have the list of incursions as clickable links to send STARCHART <coord> so i don't have to do it by hand, i can just click on the one i want to see where it is? Here is an example of the list.

-----------------------------< Current Incursions >------------------------------
Zone Type Potential Danger Time Rem Enemies Rem
---------------------------------------------------------------------------------
RS-5450 Breakers Hard 31% 100%
Hiza Nabians Easy 91% 100%
RS-4448 Loroi Easy 11% 100%
RS-5053 Leviathan Easy 38% 100%
RS-4251 Trinaries Easy 5% 0%
RS-6343 Trinaries Medium 11% 100%
RS-5344 Miningdrone Easy 93% 100%
CS-5237 Rogueai Easy 20% 0%
---------------------------------------------------------------------------------

Guilend
Posts: 36
Joined: Fri Mar 09, 2018 1:21 am

Re: Making a list of items into each item being a clickable link.

Post by Guilend »

Never mind, Someone from the Starmourn discord made it for me.

User avatar
Zaphob
Posts: 180
Joined: Wed May 09, 2012 8:07 am
Location: mg.mud.de

Re: Making a list of items into each item being a clickable link.

Post by Zaphob »

For the sake of sharing, would you publish your solution?

Guilend
Posts: 36
Joined: Fri Mar 09, 2018 1:21 am

Re: Making a list of items into each item being a clickable link.

Post by Guilend »

Sure, it took two triggers.
Code: [show] | [select all] lua
^(\w+|\w+ \w+)(\s+)(\w+)(\s+)(Easy|Medium|Hard)

local destination = matches[2]
local true_dest = destination

if destination == "Eta Zeniah" then
	true_dest = "Eta"
end

local pos = string.find(line, destination)+string.len(destination)
local remainder = string.sub(line, pos)

deleteLine()
echoLink("\n"..destination, [[send("SHIP TRAVEL TO ]]..true_dest..[[")]], "SHIP TRAVEL TO "..destination)
echo(remainder)
Code: [show] | [select all] lua
^(\w+)(-)(\d+|\w+)(\s+)(\w+)(\s+)(Easy|Medium|Hard)

local quadrant = matches[2]
local coordinates = matches[4]

local pos = string.find(line, coordinates)+string.len(coordinates)
local remainder = string.sub(line, pos)

local full_dest = quadrant.."-"..coordinates

deleteLine()
echoLink("\n"..quadrant.."-"..coordinates, [[send("SHIP TRAVEL TO ]]..full_dest..[[")]], "SHIP TRAVEL TO "..full_dest)
echo(remainder)

Post Reply