Search found 41 matches

by Drevarr
Sun Feb 12, 2017 12:38 pm
Forum: Help Forum
Topic: Comparing 2 variables became variable and string
Replies: 5
Views: 1207

Re: Comparing 2 variables became variable and string

tonumber( )
Code: [show] | [select all] lua
abi=tonumber(matches[2])
bdee=tonumber(matches[3])
echo(abi)
echo(bdee)
by Drevarr
Thu Jul 28, 2016 12:34 am
Forum: Help Forum
Topic: Working with Multiple Variables
Replies: 4
Views: 1461

Re: Working with Multiple Variables

You could use a table with the long description as keys. InfTable = { ["some mineral dust"] = "Stone", ["a small chunk of stone"] = "Stone", ["a large, polished stone"] = "Stone", ["a small piece of meteorite"] = "Stone", ["a tiny shard of volcanic rock"] = "Stone", ["a bent adamantium scrap"] = "Ad...
by Drevarr
Sun May 22, 2016 5:35 pm
Forum: Help Forum
Topic: Interesting concept but... need help.
Replies: 6
Views: 2619

Re: Interesting concept but... need help.

Insert capture groups in your regex to align with your desired variables, then build a string from the matches and echo the string to the miniConsole. myExample: local Hps=tonumber(matches[4]) local Mvs=tonumber(matches[5]) local Name=matches[2] local CharClass=matches[3] SetHPcolor() SetMVcolor() G...
by Drevarr
Sun May 15, 2016 5:44 pm
Forum: Help Forum
Topic: Windows VS MiniConsole
Replies: 2
Views: 1302

Re: Windows VS MiniConsole

You can control the FontSize but not the Font for a miniConsole. They utilize the default font. calcFontSize(fontSize) Used to calculate the number of pixels wide and high a character would be on a mini console at fontSize. As the primary intended usage is for calculating the needed dimensions of a ...
by Drevarr
Sat Jan 23, 2016 12:08 am
Forum: Help Forum
Topic: Using deleteLine() at the tail of other trigger processing
Replies: 4
Views: 1207

Re: Using deleteLine() at the tail of other trigger processi

Any chance you trigger is multi-line? or otherwise allowing the cursor to get beyond the line your wanting to delete? Regarding you follow up, this works for me which uses matches[3]: Pattern: (Head|Front|Back)\)\s(.*)$ local xName = string.trim(matches[3]) groupMate = xName GroupCount = GroupCount ...
by Drevarr
Fri Jan 22, 2016 1:02 am
Forum: Help Forum
Topic: Using deleteLine() at the tail of other trigger processing
Replies: 4
Views: 1207

Re: Using deleteLine() at the tail of other trigger processi

I would suggest checking your logic without the deleteLine() to make sure you have things working appropriately. I use deleteLine() a lot to remove text from the main window that I have routed to miniconsoles. example: if not string.starts(line, "Zone:") then if not string.starts(line, "Room:") then...
by Drevarr
Sun Jan 17, 2016 3:33 am
Forum: Help Forum
Topic: [help] replacing words
Replies: 2
Views: 1083

Re: [help] replacing words

how about gsub?
Code: [show] | [select all] lua
str = string.gsub(matches[2], "Hello", "Greetings")
send("GT "..str)
by Drevarr
Sat Jan 02, 2016 10:17 pm
Forum: Help Forum
Topic: Newbie Rescue Trigger Question
Replies: 1
Views: 1173

Re: Newbie Rescue Trigger Question

Assuming you have the exact code in your post your issue is with the variable: Brasidas. I'm assuming you really wanted "Brasidas" rather than a variable Brasidas. target = matches[2] display (target) if target ~= "Brasidas" then send("stand") send("rescue " .. target) end or add a tank variable for...
by Drevarr
Sun Nov 29, 2015 4:42 am
Forum: Help Forum
Topic: Nesting labels inside Lua table structures
Replies: 4
Views: 2499

Re: Nesting labels inside Lua table structures

This change to the label definition worked for me, maybe it will point you in the right direction. Would love to see the final product when you are finished. starmap = {} starmap.systems = { } starmap.planet_container = Geyser.Container:new({ name = "starmap.planet_container", -- give it a unique na...
by Drevarr
Sun Nov 08, 2015 4:58 pm
Forum: Help Forum
Topic: Mapper Zoom Level
Replies: 2
Views: 1460

Re: Mapper Zoom Level

I like to prototype functions. Look forward to seeing those rollout.