Mudlet Questions

1246710

Comments

  • That doesn't do what you think. It will always return true.

    Try this instead:

    if table.contains({1, 3, 5}, somevalue) then
      echo("Somevalue equals 1, 3, or 5")
    end

  • KaimanahiKaimanahi The One True Queen
    Hoo, that was not intuitive at all. Thanks very much!
    image
  • edited July 2014
    Nihta said:
    yeah the simplest way would be to record the room ids from gmcp.Room.Info into a table as you walk the loop manually. Once you have recorded your path, to make the mapper follow it, just have the mapper automatically goto the next room in the list when you change rooms.
    OK... so let's say that I have manually recorded every room # along my highway "loop" route; the series of room numbers exists within a basic text document (not sure how to make a table in Mudlet). How would I go about planning a series of  

    GOTO room # THEN
    GOTO room # THEN
    GOTO room # THEN

    so that when I arrive in one room, the next goto command will be sent? Right now I am thinking of a hundred bajillion triggers that will send the next goto command once I arrive in the room. This sounds like a surefire method, but absolutely tedious! Is there an easier way?
    image
  • DysDys
    edited July 2014
    Like Rialorm said, record the main nodes then let the mapper walk you between them. 

    Edited, because you don't need ROOM MARK. I just tried it with six triggers, starting out at Grand Junction and going anticlockwise the nodes I used are:

    1) Grand Junction. (road) [413]

    2) Great Southern Highway by the Blasted Land. (road) [352]

    3) Ackleberry Highway by the Blasted Land. (road). [344]

    4) Ackleberry Triple Junction. (road). [294]

    5) Alabaster Road nearing Serenwilde. (road). [498]

    6) Old Imperial Road. (road). [447]


    To automate the walking, you need triggers that call the mudlet mapper's 'GOTO <room number>' function. For the first one, make a trigger on the pattern "Grand Junction. (road)" at the beginning of a line, then in the code box put:

    if gmcp.Room.Info.num == 413 then

      expandAlias("goto 352")

    end


    That checks you're in the right room and tells the mapper to go to the next one. Same with the other five triggers. Once you've created all six it'll keep going round and round until you turn off the triggers or stop the mapper walking with "mstop".


    The only glitch in this route is that it leaves the road for about 6 rooms to walk you through the Tar Pits near Serenwilde, but you could add another node or lock that area off to stop that.


  • Thanks for the expanded explanation! I worked together a hack using the CONFIG MAPVIEW v room num atop the map and a trigger for the next location. The system works mostly fine until I can refine the system given additional feedback and coding experience. I have run into two issues.

    For some reason my Mudlet Maps AREALOCK isn't working. I mean, AREALOCK will produce the list of rooms, and I can (and have) locked the areas I don't want to wander into: Serewilde North/South, Villages, and the Blasted Lands. However, GOTO seems to ignore AREALOCK. I had to setup some 27 nodes to work around wandering off the highway. 

    NOTE: Script is up to date, but my maps are not- they aren't updating from Mudlet so I'll need to manual update. I'm using Mudlet 2.1 for Mac on an 8-year-old Macbook. Not sure where the issue is arising. It also should be noted that using the side panel Mudlet Maps doesn't work as well. Why is AREALOCK being ignored, and how can this be remedied?

    Secondly, I walk faster than I my trigger can send to invite the bards, scholars, and pilgrims (and gnomes...). I want to update my triggers to MSTOP on the highway mob and then invite. I can manually walk back a step if need be and then use an alias to resume walking the route.

    My temporary hack is to trigger a send and variable at each HW node. For example:

    EXACT MATCH: 
    --- Area 4: Avechna's Peak ---------- v67 ---

    TRIGGER:

    hwwalk_room_num = "82"

    send ( "goto 82")


    Only I'm sure the goto is a Mudlet Mapper alias, and produces an "That is not a valid command." when send directly to Lusternia. How do I rewrite the SEND command as an alias for Mudlet Mapper?

    image
  • TarkentonTarkenton Traitor Bear
    Check mconfig. Believe there's an option for slow walk that should let your invite trigger fire before moving. As for the goto command, you could use expandAlias("goto 82") to have mudlet fire the alias command. Usual caveat of be careful using expand.
    image
  • DysDys
    edited July 2014
    Deleted - Ninja'd by Tark
  • edited July 2014
    Athree also gave me the in-game advice of using:

    gotoRoom (82)


    rather than the suggested:


    expandAlias("goto 82")


    I've experienced disastrous results with Mudlet Mapper SLOWWALK. Basically my GOTO will walk all of three to five rooms before stopping. Not quite sure why that it, but it can't be salvaged. Besides, I want to walk as quickly as possibly between the rooms without the mobs (especially in the case of checking the highways after a gnome drop). 




    image
  • You could also pause the walking as soon as you detect a bard, speak to it, and trigger walking again as soon as the bard is following you. Might want to put in a manual override or so for when you end up in a room where someone is standing still with a following entourage of bards, else that may lead to awkwardness.
    image
    You have received a new honour! Congratulations! On this day, you have shown your willingness to ensure a bug-free Lusternia for everyone to enjoy. The face of Iosai the Anomaly unfolds before you, and within you grows the knowledge that you have earned the elusive and rare honour of membership in Her Order.
    Curio Exchange - A website to help with the trading of curio pieces in Lusternia.
  • edited July 2014
    ok so i'm trying to fix a problem with the old "Demonnic" scripts: They're not working, and as far as I can tell it's because it can't populate its internal list of skills properly. So I've been driving myself insane trying to work out why, and I've been manually sending gmcp request thingies (specifically "sendGMCP([[Char.Skills.Get { "group": "influence"}]])" and then checking gmcp.Char.Skills.List

    my understanding is that I should be getting something like this:

    image

    but instead what I'm getting is this:

    image

    does anybody have any idea what's going on, and how I might be able to fix it? And how come the influencer was working fine 6 months ago before I disappeared for a while? Gmcp is my worst enemy ;-;


    EDIT: 
    After further testing, Tailoring and Influence are the only skillsets that trigger a response and cause gmcp.Char.Skills.List to change at all - the other skills, ie "sendGMCP([[Char.Skills.Get { "group":"Aethercraft"}]])" seem to do literally nothing. ON THE OTHER HAND sendGMCP([[Char.Skills.Get { "group":"Influence", "name": "Praise"}]]) works fine????

    image


    at this point i don't even care about what I was originally trying to do, i would be relieved to learn that gmcp was broken or something because I'm out of ideas here lmao
  • OK... in short, I have the need to walk "backwards" one room when on one of my goto routes. Essentially I need a trigger to cause me to MSTOP, but Mudlet Mapper's goto moves me too fast (I'm in the next room by the time the trigger fires). I have no desire to Slow Walk... in fact, I want to walk as quickly as possible. 

    I was thinking about triggering a variable called "walk_backwards" that would essentially work with this logic: "You walk east." would define a "walk_backwards" variable of west. The main problem is that I don;t see any "You walk east" messages. I see it for swim messages, but certainly not the vanilla cardinal walk directions. 

    However, Mudlet Mapper echoes number of rooms and room direction. This gives me some pause for hope. See below:

    (mapper): Starting speedwalk from 17177 to 1337: (4 - ne)(3 - nw)
    --- Area 18: Glomdoring Forest ---- v1333 ---

    Now I would have assumed that the mapper would coordinate walking through room numbers rather than a cardinal direction. First, does Mudlet Mapper use cardinal directions to move? Secondly, is this variable stored anywhere? Finally, is there a way to build a trigger off a Mudlet echo? 
    image
  • @Reyl: Possibly the format of the GMCP tables changed, which causes the script to break.

    @Janalon: I have no idea, but I think the simpler way to solve this is to add extra waypoints to your route. Tell it explicitly when in the room where you want to go back to move to the room next to it, then continue your route.
    image
    You have received a new honour! Congratulations! On this day, you have shown your willingness to ensure a bug-free Lusternia for everyone to enjoy. The face of Iosai the Anomaly unfolds before you, and within you grows the knowledge that you have earned the elusive and rare honour of membership in Her Order.
    Curio Exchange - A website to help with the trading of curio pieces in Lusternia.
  • Hmm, I haven't logged in in a couple of weeks but they were working then. I'll see if I can log in tonight for a little while and check the influencer out, make sure the gmcp is still how it expects it to be.
  • General mudlet question: So somehow from last night, all my  triggers and aliases and stuff are now missing... When I look at the Package Manager, all the folders are there. I tried loading my profile from a previous date under the Connect button, but it doesn't change anything. Does anyone know what's going on?

    To be more specific, when I say everything is gone, everything under alias, key, scripts, timer is gone. Under triggers, I still have the M&M folders (M&M, M&M Demesne compress), but the only subfolder I have there is "Illusions ignored by default" and "General".
  • SynkarinSynkarin Nothing to see here
    Elodres said:
    General mudlet question: So somehow from last night, all my  triggers and aliases and stuff are now missing... When I look at the Package Manager, all the folders are there. I tried loading my profile from a previous date under the Connect button, but it doesn't change anything. Does anyone know what's going on?

    To be more specific, when I say everything is gone, everything under alias, key, scripts, timer is gone. Under triggers, I still have the M&M folders (M&M, M&M Demesne compress), but the only subfolder I have there is "Illusions ignored by default" and "General".
    This has been happening to me as well, I think it occurs when you don't properly exit out of Mudlet and the files get corrupted. It also doesn't happen everytime, so I can't be sure.

    The only solution I've found (and it's odd) is to take an older profile, move it to somewhere like dropbox, load it up in a new profile and make sure it works. If it does, uninstall all your previous packages and install the checked profile

    You may have to reinstall m&m

    Everiine said:
    "'Cause the fighting don't stop till I walk in."
    -Synkarin's Lament.
  • If this does happen you should look at the very first line - might have to scroll up if the 'welcome' makes you scroll. Is there an an error about opening a file in the m&m folder? Happened to me with precache but it didn't cause any of my profile to not be there, just didn't load properly because some things rely on the m&m loaded event which doesn't fire if one of the files are corrupt.
  • edited August 2014
    Thanks for your advice guys.

    @Synkarin: Where are the profiles saved? I looked in my C:\Users\...\AppData\Local\Mudlet directory and haven't found anything that looks like it might be it. EDIT: never mind, C:\Users\...\.config\mudlet\profiles\Lusternia\current

    You're right, I got 
    [  OK  ]  -  Lua module rex_pcre loaded
    [  OK  ]  -  Lua module zip loaded
    [  OK  ]  -  Lua module lfs loaded
    [  OK  ]  -  Lua module sqlite3 loaded
    [ ERROR ]  -  LuaGlobal.lua compile error - please report!cannot open mudlet-lua/lua/LuaGlobal.lua: 
    No such file or directory
    [ INFO ]  -  looking up the IP address of server:lusternia.com:23 ...
    [ INFO ]  -  The IP address of lusternia.com has been found. It is: 69.65.42.86
    [ INFO ]  -  trying to connect to 69.65.42.86:23 ...
    [ INFO ]  -  A connection has been established success

    What I don't understand is that said file (LuaGlobal.lua) actually does exist in the folder.  I will say that there have been times when I just re-installed mudlet/M&M as a crude workaround, but this time I lost all my personal aliases/triggers which would make me rather annoyed if I had to do that and start over from scratch (though thankfully, I do have an old backup of my stuff, and now that Elodres is in a new guild, it won't be a huge loss)

    EDIT: Ardmore made the suggestion that I run mudlet as an administrator. That took care of the LuaGlobal.lua error. I went back to running mudlet -not- as an administrator - the error did not show up again. I didn't look for the error in previous instances. 

    EDIT2: Okay Ardmore saved my ass. In case anyone has the same problems, the way I saved all my triggers is just going back to C:\Users\...\.config\mudlet\profiles\Lusternia\current and using the package manager to re-import the latest xml.  The folders are all ugly, but at least they're all there for me to back up. Thanks you two!
  • Quick question for trigger highlighting. I want to use a light rose color over POISONS IMMUNITY resist lines. I believe there are three general resist lines associated with this skill:

    ^You laugh in the face of (\w+).$
    ^Your increased immunity allows you to easily resist (\w+).$
    You shrug off the effects of the poison.

    My main "issue" (I won't even call it a problem) is that only the perl regex variable (\w+) gets the light rose highlight. What could I do to assure the entire line gets the highlight?
    image
  • XenthosXenthos Shadow Lord
    For clarification, only the first two lines are specifically related to Immunity; the third line is generally related to Resilience and is the natural poison resist rate (everyone has access to that, but that can be increased by other skills which increase poison shrug rate).

    As to the rest of it- a quick thing to try might be just to put the ( ) around the whole line (you probably also want to escape the "." with a \, just in case, as you're using regexp).

    It's most likely related to the code you're using specifically to highlight it, you have it set to highlight the variable itself which is found in the regex, and your variable only contains the \w+ bit.

    Note that regexp does not require the \w+ (or the \d+ for that matter) to be inside parentheses.  They are used to group things up for a variable, but your pattern would match just fine as "^You laugh in the face of \w+\.$" or "
    ^(You laugh in the face of \w+)\."

    I am answering this as a RegEx question instead of a Mudlet question, since I think it can be solved that way.  If you paste the code you're using to highlight the line, someone can probably also help you with the Mudlet side as well (if you don't want to change the trigger line itself).
    image
  • soooo "sendGMCP([[Char.Skills.Get {"group": "Elementalism"}]])" returns nothing, but "sendGMCP([[Char.Skills.Get {"group": "elemancy"}]])" returns "list = { "i" }. Isn't 'elemancy' from achaea or something? Lmao I should just give up on trying to understand gmcp
  • Aetolia
    image
  • EveriineEveriine Wise Old Swordsbird / Brontaur Indianapolis, IN, USA
    At one time, I had this worked out. I would target something, Mudlet would highlight the target, it's all good. Then I had to change my targetting alias, and now, no matter what I target, Mudlet only highlights the capitalized version of the word. The alias still sets my target, it's just the highlighting that doesn't work.

    Thing is, I'm pretty sure I asked this on the forums before and got an answer, but the Search functionality of these forums is nonexistent, and I can't find it anymore.

    Here's what I have:


    Pattern: ^t (.+)$<br><br>setTarget(matches[2])<br> cecho("<lime_green>Targeting: <a_yellow>"..target.."\n")<br> if id then killTrigger(id) end<br> id = tempTrigger(target, [[selectString("]] .. target .. [[", 1) fg("a_yellow") deselect() resetFormat()]])</a_yellow></lime_green>

    If I target "salamander", it returns "Targetting: Salamander" and won't highlight "salamander", which makes the highlighting pretty useless. How can I modify this to highlight both upper- and lower-case letters?
    Everiine is a man, and is very manly. This MAN before you is so manly you might as well just gender bend right now, cause he's the manliest man that you ever did see. His manly shape has spurned many women and girlyer men to boughs of fainting. He stands before you in a manly manerific typical man-like outfit which is covered in his manly motto: "I am a man!"

    Daraius said: You gotta risk it for the biscuit.

    Pony power all the way, yo. The more Brontaurs the better.
  • Can you post the setTarget function? 
    image
    You have received a new honour! Congratulations! On this day, you have shown your willingness to ensure a bug-free Lusternia for everyone to enjoy. The face of Iosai the Anomaly unfolds before you, and within you grows the knowledge that you have earned the elusive and rare honour of membership in Her Order.
    Curio Exchange - A website to help with the trading of curio pieces in Lusternia.
  • SynkarinSynkarin Nothing to see here
    triggers in Mudlet are cap-sensitive, so you'll have to make another temptrigger that matches to target:lower()

    so use something like

    if lowerid then killTrigger(lowerid) end

    Everiine said:
    "'Cause the fighting don't stop till I walk in."
    -Synkarin's Lament.
  • EveriineEveriine Wise Old Swordsbird / Brontaur Indianapolis, IN, USA
    But why is it automatically changing the target to Uppercase if I set it in lowercase? "t salamander" always returns "Targetting: Salamander".
    Everiine is a man, and is very manly. This MAN before you is so manly you might as well just gender bend right now, cause he's the manliest man that you ever did see. His manly shape has spurned many women and girlyer men to boughs of fainting. He stands before you in a manly manerific typical man-like outfit which is covered in his manly motto: "I am a man!"

    Daraius said: You gotta risk it for the biscuit.

    Pony power all the way, yo. The more Brontaurs the better.
  • SynkarinSynkarin Nothing to see here
    likely because your setTarget function is changing it to Salamander using something like target:title()

    Everiine said:
    "'Cause the fighting don't stop till I walk in."
    -Synkarin's Lament.
  • edited August 2014
    Synkarin's correct, yes. That is the function of my GUI, because I couldn't be bothered changing my trigger lines for combat, to do 'target:title()' instead. Sorry!
    I believe this is what you want, you could add it to the setTarget() function the GUI has;

    if target_upper then killTrigger(target_upper) end

    target_upper = tempTrigger(target:title(), [[selectString("]]..target:title()..[[",1) fg("orange") deselect() resetFormat()]])


    if target_lower then killTrigger(target_lower) end

    target_lower = tempTrigger(target:lower(), [[selectString("]]..target:lower()..[[",1) fg("orange") deselect() resetFormat()]])


    Which will highlight both upper, and lowercase versions of the target variable.


    image
  • DaraiusDaraius Shevat The juror's taco spot
    I've been playing with GOTO. 

    I did "room mark 19937 port" and "room mark 34600 teahouse" and tried running back and forth between the two.

    When I did "goto teahouse" from the portals, sometimes it worked and sometimes it tried to send me south.

    When I did "goto port" from the teahouse, I got

    (mapper): Starting speedwalk from 34600 to 34600: (1 - s)

    or

    (mapper): Starting speedwalk from 16440 to 34600: (1 - s)

    And then I ended up in The Holding Room.

    What is happening?
    I used to make cakes.

    Estarra the Eternal says, "Give Shevat the floor please."
  • I keep getting disconnects from any mud that I connect to using M&M, seems like if i'm not constantly entering commands then I lose connection but it doesn't happen with any other clients on the same connection.
    Also seems like sometimes my commands kinda... disappear and I have to enter them again.

    Anyone know what could cause this for mudlet specifically?
  • TarkentonTarkenton Traitor Bear
    I'll ask the obvious.  Done an uninstall/reinstall of the client?
    image
Sign In or Register to comment.