deleteLine() in Lua

Hi guys!

I was wondering if any of you could help me out. I'm trying to delete specific lines in a paragraph that is received, for example...

"A glorious pegasus with glowing white wings is here, eyeing his surroundings
serenely. There are 4 cadaverous gentlemen here."

I want to remove the line about my pegasus being in the room, but using deleteLine() seems to clear out the whole thing including the stuff about the gentlemen in the room. I was wondering if there's a different function or a parameter I should be putting in to make it remove only that bit.

Best Answer

  • KaimanahiKaimanahi The One True Queen
    edited October 2012 Accepted Answer
    I don't think deleteLine() is a Lua function, so I'm assuming you mean doing this using Mudlet functions.

    I'm not sure if there is a better way, but you can probably use something like this.

    substring trigger: A glorious pegasus with glowing white wings is here, eyeing his surroundings serenely.
    script:
      selectString(matches[1],1)
      replace("")
      deselect()

    (I hope this doesn't come out looking stupid. I must have hit the code box button ten times. Workkkk :SS )

    Edited because it did look stupid
    image

Answers

Sign In or Register to comment.