Few Mudlet Questions

Hey guys, I've got a few questions in regards to Mudlet and triggers and the like.

I'm wanting to take a default line and replace it with a multiline of text mainly. I've been looking around and couldn't find anything on it. I've found some things showing how to highlight or color text, but I'm wanting to replace the line with something else that's a bit bigger/multiline and wondering how to do this and what would be the more efficient way to do it.

Ok, I thought I had more questions, but I guess this was the only one. If I come across another one, I'll post here. Thank you in advance.

Comments

  • To gag the existing line, use
    deleteLine()

    Then to replace it, use either echo or cecho.
  • edited January 2018
    Alright thanks, btw, what's the difference between echo and cecho?

    As well, would this be done in the trigger itself? Like...

    Pattern: Trigger Line

    Code:
    deleteLine()
    cecho("line 1")
    cecho("line 2")
    cecho("line 3")


  • edited January 2018
    echo just echoes the text. cecho allows embedding colors in the message, e.g.
    cecho("<green>This text is green!")

    See the docs here

    Yes, you'd put that in the code for the trigger. You can have each line as a separate echo, or use the newline character (\n) to insert newlines.
  • Ah alright, thank you!
  • edited January 2018
    ok, new question, some reason in Mudlet, when I go to search for a trigger, it'll show in the search results, but when I click on it to go to it, it doesn't go to the trigger.

    Specifically, I'm using m&m, and when I search for the trigger "dissolves the shimmering", it show a trigger for it, with the name 3787, but when I click on it to go to the trigger, nothing happens. So, I don't know where I can edit this at all.

    EDIT: @Mrak shot me the answer to this in game. So, thanks goes to them. It's because the trigger was being loaded by Mudlet, but wasn't actually in Mudlet. It's being loaded from the base MMF LUA file, which can be edited with Notepad++.
  • As a quick note about gagging. The deleteLine() I found didnt work as well as I wanted. It had a issue with not getting rid of all the prompt.

    You can make a script that does

    function deleteFull()
      deleteLine()
      tempLineTrigger(1,1,[[if isPrompt() then deleteLine() end]])
    end


    and then use deleteFull() instead and it sort of tidies up the prompt issue

  • deletefull has been a native function of Mudlet since 2.1, just so you know.


    No need to make a script that does it.
Sign In or Register to comment.