Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Lua ➜ Omit from output

Omit from output

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Renny   Canada  (26 posts)  Bio
Date Sat 04 Jan 2014 07:34 AM (UTC)
Message
I want to make a lua script that omits lines when it matches an expression.

To give context (Aardwolf), when i type practice I get output that looks like this:

Skill/Spell name          Sn    Prac  Bonus  Level
------------------------- ---   ----  -----  -----
Agitation                  98     1%            15
Air dart                  465     1%             5
Ballistic attack          101     1%             1


So I was thinking of an expression like:

*     1%

Where * is the Sn number, and then have an if statement that checks if the variable matches a Sn number i want ommitted, and then omit the line if true.

Hopefully what I said makes sense. I'm not sure how I would do this in lua, or if there is an easier way (or if someone already has a plugin like this).
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 07 Jan 2014 09:10 PM (UTC)
Message
You probably want to omit the whole spell list and then re-display the ones that you don't want omitted.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


9,643 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.