Quick Coding Questions

18911131424

Comments

  • KryptonKrypton shi-Khurena
    That's it! Thank you
  • AhmetAhmet Wherever I wanna be
    Oh in that case
    ^\[FW message\] ([^\(]+)$
    for everything up to the first (
    or
    ^\[FW message\] (.+) \($
    for everything up to the last (
    Huh. Neat.
  • AhmetAhmet Wherever I wanna be
    Damn, ninjad on mobile.
    Huh. Neat.
  • Hi!

    How can I do something like.

    If var1 == true and either two of var2, var3 and var4 true, then do x?
  • edited April 2017
    if var1 and (var2 and var3 or var3 and var4 or var2 and var4) then

    end

    assuming you're okay with it also running if var2 var3 and var4 are all true.
  • Antonius said:
    if var1 and (var2 and var3 or var3 and var4 or var2 and var4) then

    end

    assuming you're okay with it also running if var2 var3 and var4 are all true.
    Thanks, you have saved me from doing ugly nested if/else statements. Much appreciated!
  • Bad argument to ipairs() table expected got function.

    How to fix

    Trying to do for k, v in ipairs(table1)

    If table.contains (table2, v) then

    End
  • AhmetAhmet Wherever I wanna be
    table1 is a function. Dont pass a function to it!
    Huh. Neat.
  • But I have it defined as a table, I'm confused D:
  • AhmetAhmet Wherever I wanna be
    Then another part of your script (or another script you have installed) is redefining it as a function.
    Huh. Neat.
  • I had a function with the same name D: thanks haha!
  • Trying to find a stand alone chat window script to import. I have attempted to pull the script from Zulah's gui but can't get it to work, and all the forum searches seem to bring up out of date links.

    Do we have one somewhere?

    (Party): Mezghar says, "Stop."
  • I have a fairly basic one I could send you Sobby, no tabbed windows or anything, just sends all channel stuff to a different window.

    It is something I made though so there are a lot of better options out there :tongue:

  • edited April 2017
    Sobriquet said:
    Trying to find a stand alone chat window script to import. I have attempted to pull the script from Zulah's gui but can't get it to work, and all the forum searches seem to bring up out of date links.

    Do we have one somewhere?
    This should work fine on import. Will just have to reload mudlet. Shouldn't be difficult to edit. Don't usually rip things straight from my gui, but I have all the different pieces split anyway.
  • Ryzeth said:
    Sobriquet said:
    Trying to find a stand alone chat window script to import. I have attempted to pull the script from Zulah's gui but can't get it to work, and all the forum searches seem to bring up out of date links.

    Do we have one somewhere?
    This should work fine on import. Will just have to reload mudlet. Shouldn't be difficult to edit. Don't usually rip things straight from my gui, but I have all the different pieces split anyway.
    Can't seem to get this to work :/

    (Party): Mezghar says, "Stop."
  • Just google YATCO, Sobriquet. Have installed it on other peoples machines recently enough.
         He is a coward who has to bring two friends as backup to jump people hunting.

  • edited April 2017
    Sobriquet said:
    Ryzeth said:
    Sobriquet said:
    Trying to find a stand alone chat window script to import. I have attempted to pull the script from Zulah's gui but can't get it to work, and all the forum searches seem to bring up out of date links.

    Do we have one somewhere?
    This should work fine on import. Will just have to reload mudlet. Shouldn't be difficult to edit. Don't usually rip things straight from my gui, but I have all the different pieces split anyway.
    Can't seem to get this to work :/
    Oh. Right. I forgot the other trigger... Should be good after fixing that... Save/reload mudlet after.

    Find whatever trigger you have that has 'Password correct. Welcome to Achaea.' in it, or 'Last login was from domain:' --just your login trigger basically-- then add in:
    sendGMCP('Core.Supports.Add ["Comm.Channel 1"]')
  • edited April 2017
    Quick question for the mapper, everytime I load up my profile to get it to work I have to click the Map Icon, it looks like there is some sort of trigger for the mapper on the login but it doesn't seem to do anything.

    After I've clicked the map icon and it says downloaded map etc, it works fine. Anyone know how to fix?

    Edit: @Ryzeth also interested in the chat window, made the change to the login trigger like you said and still can't get it to work.
  • you need to make a window for the map to open in an open in in a script: GuAcci = GuAcci or {} GuAcci.Map = Geyser.Mapper:new({name = "GuAcci.Map", x="50%", y="50%", width="50%", height="50%"}, GuAcci.RightContainer)
  • edited April 2017
    edit - ignore for the moment, seen where I've gone wrong

    (Party): Mezghar says, "Stop."
  • edited April 2017
    So not sure if this is a quick question or not, but I have started to try do a bit of sparring.

    The first thing I noted is that the window in the main display whirls way too fast for me to keep up, so I have created some separate windows to split things up a bit and gag a few lines here and there to make things a bit more manageable adding echoes etc.

    I am using Svof on Mudlet 3.0.

    One of my questions is if through my own added triggers I use the deleteLine() function, to remove what I deem as unnecessary, either because I don't think it's worthwhile or I have shifted it to another window.

    I then get left in some instances with double prompts.

    e.g.
    100%h, 84%m, 95%e, 100%w cexkdb- [none]
    100%h, 84%m, 95%e, 100%w cexkdb- [none]
    100%h, 84%m, 95%e, 100%w cexkdb- [none]

    Is there a quick and easy way to write something that will make it so I only ever get one prompt in a row? Ideally the last prompt that's come through.

    So let's say before I had
    100%h, 85%m, 95%e, 100%w cexkdb- [none]
    Tintin eats a gypsum crystal.
    100%h, 84%m, 95%e, 100%w cexkdb- [none]

    then I delete "Tintin eats a gypsum crystal."

    so now I have

    100%h, 85%m, 95%e, 100%w cexkdb- [none]
    100%h, 84%m, 95%e, 100%w cexkdb- [none]

    Is there an aftermarket way of then saying to Mudlet ok now delete the top line so I only see (ideally the most up-to-date of the prompts), bearing in mind it could be 2, 3 or even 4 in a row.

    100%h, 84%m, 95%e, 100%w cexkdb- [none]

    Just keen to cut down on the spam, very new to Svof so not sure if there's anything in built in for this?

    Would really appreciate some help :)


    EDIT: Oops I missed the very Clear function in the documentation svo.deleteLineP()

  • KlendathuKlendathu Eye of the Storm
    use svo.deleteLineP() instead of deleteLine()

    Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."
  • edited April 2017
    deleteFull() does the same thing and is built into Muldet for non svof 
    function deleteFull()
            deleteLine()
            tempLineTrigger(1,1,[[if isPrompt() then
            deleteLine()
            end]])
    end

  • Renek said:
    deleteFull() does the same thing and is built into Muldet for non svof 
    With SVO the prompt still shows with deleteFull() - If you're using a custom prompt, anyway. The one Klendathu posted stops svo from displaying that prompt as well. Not sure why he (Vadi) didn't just make his own deleteFull() function like Nemutaur did with wsys.
  • deleteFull() deletes my svo custom prompts too.
  • How would I capture the next line after a specific line?

    For example, if I do farsee, and I want to report the location of where someone is, which is on the line after the farsee line.
  • Use a multiline trigger.
  • That response is not too helpful for someone who doesn't know what a multi line trigger is. 



  • @Vallie, this might be helpful. You tick multi-line / AND Trigger, then set the appropriate line delta.

    My regex stuff is terrible but you probably get the idea from this :)
  • JonathinJonathin Retired in a hole.
    You don't even need to make a multiline for farsight. I only use the second line and have not run into any issues at all.
    I am retired and log into the forums maybe once every 2 months. It was a good 20 years, live your best lives, friends.
Sign In or Register to comment.