echoPopup()

Post Reply
zenevan
Posts: 2
Joined: Sat Nov 18, 2017 9:39 pm

echoPopup()

Post by zenevan » Sat Feb 16, 2019 4:27 am

heya

So i've got this triggerset that just grabs my group members from a group list, ill include the whole triggerset here..

Been working on this functionality.

this is pretty close to done, hoping for someone seeing what im doing wrong.

what this is supposed to do:

when i type group, it builds a list of castable buffs, i will work on the buff list once this functionality is working.

to test this i do this:
lua echoPopup("blur|", {[[mud:send "bl test"]]}, {"blur test"})

this makes a clickable link that tries to blur test

so, here's what i did

1) Create a new trigger group with all of this in it, i called it BuffGroup which is irrellavant

2) Create new triggers

Name:BuildGroup
Substring:Group information for
Code: [show] | [select all] lua
enableTrigger("GroupLine")
enableTrigger("EndGroup")
Name: GroupLine
Regex:- ([A-Za-z ]+)

My problem, its not sending the commands, ive tried send "bl " .. temp, mud:send "bl " .. temp, send("bl " .. temp)
Code: [show] | [select all] lua
local temp = matches[2]
echoPopup("->blur|", {[[mud:send "bl " .. temp]]}, {"blur "  .. temp})
echoPopup("ds|", {[[mud:send "ds " .. temp]]}, {"ds "  .. temp})
echoPopup("gi", {[[mud:send "gi " .. temp]]}, {"gi test"})
Name: EndGroup
Regex:^$
Code: [show] | [select all] lua
disableTrigger("GroupLine")
disableTrigger("EndGroup")
Once i got this running and type group
and get

Group information for Vamot and Company
Size: 2
(Head) 108/108 move 805/724 hit - Vamot->blur ds gi
104/104 move 666/666 hit - Poromople->blur ds gi

you can see the string when u hold the mouse over it, its correct
dunno whats goin on.

also tried this:
Code: [show] | [select all] lua
local temp1 = "bl " .. matches[2]
local temp2 = "ds " .. matches[2]
local temp3 = "gi " .. matches[2]

echoPopup("blur ", {[[send "say " .. temp1]] }, {temp1})
echoPopup("ds ", {[[send "say " .. temp2]] }, {temp2})
echoPopup("gi ", {[[send "say " .. temp3]] }, {temp3})

zenevan
Posts: 2
Joined: Sat Nov 18, 2017 9:39 pm

Re: echoPopup()

Post by zenevan » Sun Feb 17, 2019 10:45 pm

figured it out huzzah, expandAlias instead of send!

User avatar
Vadi
Posts: 4712
Joined: Sat Mar 14, 2009 3:13 pm

Re: echoPopup()

Post by Vadi » Tue Feb 19, 2019 6:12 am

It will work - but it's not the best! See https://wiki.mudlet.org/w/Manual:Functi ... xpandAlias on how to do it in a better way

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 5 guests