Looking for more active discussion? Join our Discord at https://discord.gg/x2s7fY6

Small Coding Questions

123457»

Comments

  • I'm not sure this is a Small coding question. Perhaps it's something no one even knows. But here it goes. 

    So I want to be able to log on and do random things. The catch is I live off the grid. Yes that means I make my own power. Which isn't always easy, or doesn't always charge my laptop all the time. So I use my cell phone most other times. 

    Now I've gone through many android mud clients and finally found one that I can code a decent system with. Get some hunting done, defenses that kind of thing. Maybe even start combat coding. Who knows. Problem is. I'm use to coding in mudlet. Now I use TT++ on my phone, or Tintin, I'm not sure where to begin... Well actually I am very sure where to begin. Suppose that was the wrong statement.

    Let's try this again. 

    I've checked the manual. I've read some forum stuff. But I'm stuck at trying to call gmcp things, and knowing how to 'save' my sessions so I don't have to constantly start over or keep tt++ open all the time.

    I'm hoping someone can help me here. Or perhaps point me to an even better and easier mud client for Android. 
  • ZailaZaila Pacific Time
    @xai

    Depending on how much you're willing to learn writing in a new language, I use the webclient on my phone and find that extremely useful. Primarily because everything you do on the webclient on a computer saves to your character and no matter what device you open it up with via a browser, you have all your settings right there. All your code: right there.

    Another perk to this is the fact that it's widespread enough that there are some basic functions like an auto-fisher and auto-basher, etc. already worked up that you can just import from the forum here without having to code it all in if you don't want to.

    I honestly haven't found a phone client I like better.
  • AloliAloli Between Books
    Hello Xai!

    Blowtorch is a good Android app. I've tried a few on Android but this one is absolutely the easiest to work with and is intuitive.

    I've also tried MUDRammer on iPhone, that's the best one if you ever switch!

    I would encourage you to join the Frontline clan and look at a file Daren wrote a while ago called Phonetolia (CLHELP PHONETOLIA). He gives a good lesson on how to set up basic triggers and targets.

    In the game itself, you can also alias that will stay on the game server, usable from any platform! (HELP ALIAS)

    Personally, if I'm on my phone I find it easier to use a client app than the Nexus web client because scrolling seems to be such a pain on touch screens.

    I used to love using TT++, it's so simple and beautiful to make and save everything in its own text files but then a few years back someone introduced me to Zmud, then Cmud, then Mudlet!

    If you need any help with specific coding questions on these phones, just reach out, you'll find a lot of support and Aetolia has a lot of nice code monkeys.
    Between what is said and not meant, and what is meant and not said, most of love is lost. - Khalil Gibran
  • MoxieMoxie USA
    edited January 2019
    Hello, Xai! It's nice to meet fellow cellphone players and definitely understand the pain of trying to do -anything- on such a small screen. I spend anywhere from 12 to 14 hours at work and cannot install mudlet due to security issues. That leaves me with either weekends or very late at night when I can use a computer. Seeing as most of the action is during my work hours, I have just been using the trigger Phoe mentioned and Blowtorch (Android) with a sht ton of aliases. Unfortunately, blowtorch has a habit of deleting all of your settings randomly so it's good to keep it on a notepad. I don't use nexus because on my android phone it refuses to show anything I am typing, I am not certain if this is a bug or not.

    Side note: I have heard about TT++ but it's a little outside of my skillset to try and set up on my phone.If it doesn't randomly delete all of my settings/triggers/ aliases like blowtorch does, I would be interested learning how to use it.

    (Illuminai): Saltz says, "Moxie is just doing the Moxie thing to do, often misinterpreted."

    (Tells): Sir Iames Gallant, the Executioner tells you, "The one Illuminai beyond prayer, I swear."

    Valingar: "How could a daughter of me, the most noble man in the south, be so heartless?"

    (Tells): Haven Locke, Illuminai Khimaira tells you, "Be that as it may, I've also seen the strength in you. You can take care of yourself."
  • Something I've noticed for some phone users (unsure if this is a solution that would work for you two, @Moxie and @Xai) is at home they leave the computer on and running and access the computer through proxy on their phones.

    Something you two might consider doing. I know @Toz is someone who uses this solution to play from work.

    Moxie
  • I leave my laptop or tower on with VNC installed, and then use VNC Viewer on my phone to remote in that way. As long as I have a keyboard (bluetooth) hooked up, it's tolerable (if the screen is tiny), and it lets me access my system or run my basher. Without a keyboard though you won't have the nice fancy autocorrect of your phone keyboard and I typo like crazy so I usually use Blowtorch.

    Blowtorch likes to delete everything, but one thing I discovered is it deletes my CONNECTIONS, but not the DATA- like I can just make a new profile named the exact same thing and it loads all my settings, somehow, from before. Baffling, but I'm not gonna worry too hard about it if it works!

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

    MoxieAloli
  • I'm playing around with GMCP and the communications module and my current problem is in trying to parse the useful data out of the below example:

    "[0;1;36m(Web): You say, "Okay that is slightly but not really helpful."[0;37m"

    "[0;37m(MSGA: Sundaren): You say, "Hmm."[0;37m"

    There are actually arrows there from the sides, like so:


    From what I've found, they're ANSI color codes. Is there an easy way to parse them out and keep the rest? I tried a few variations of gsub but couldn't really get anything useful.



  • edited March 2019
    Try subbing out this pattern: \033%[.-m

    \033 is the escape character that is being shown as the left arrow. Followed by a bracket which you escape with % in the pattern because it's a special character. Then any character zero or many times, as few as possible. And ending with an m which ansi sequences do.
  • @lanira
    text2:gsub("\033%[.-m", "") < Something like that? I have to imagine it's wrong because the \ is escaping out the 0, but I'm not sure how else I would sub it out. Thanks in advance.

    Eliadon had similar suggestions but using the \27 for the ASCII variant.

    I also asked somewhere else and they suggested using \x1b.

    Suffices to say I'm a little out of my element but still interested if you have any ideas.
  • edited March 2019
    Those are just different ways of representing the escape character. Decimal, octal, and hex. I thought that lua used the \nnn for octal. But \x1b should definitely work, the x specifies it's the hex representation. If you look here www.asciitable.com you can see that 27, 1b, and 33, are all listed next to the esc character.
    So, yes, use \x1b instead of \033 to be sure.
  • Hi! I am making myself a little basher to make things a bit more manageable and I am stumped on an event to use to fire the script that I use to populate my available target list. I tried using gmcp.Room.Info.num since I knew (suspect?) that the value will only change if I move rooms, but that was to no avail. Does anyone else have any experience using registered event handlers to fire stuff when moving?
  • Could be a large answer to this small question. 
    I want to create my own MUD. Just a place I can build from scratch. Allow me to push my coding ability, and creating ability to it's limits. 

    What application would I use to do this? I can I just build like a mini universe in mudlet that would be interacted with? Or do I need an actual application of some sort? I'm not sure if I want to have it be online, but I would like some of my other coder friends test it out so some sort of way to get it 'out there' would be nice. 
  • Wow, I was the last one to post here.... Anyways


    Mudbot. Old Xon tool for mapping.

    Anyone know why I can't access gmcp.IRE.Rift while I have it running for my map? Without it I can access it and see everything in it in my variables. But with Mudbot running I can't use my regular cache scripts.
  • iirc mudbot chews on, eats and then destroys most GMCP without passing it along to you.
    Toz says, "Dishonor on you (Mjoll), dishonor on your family (Seirath), dishonor on your cow (Bulrok)"
  • edited May 2020
    Nexus client question if anyone can help.

    I am trying to set a variable to a multi word value, but it is only picking up the first word of the string (up to the space). I have tried every combination of brackets I can think of but can't find anything that works.

    What I currently have is:

    @set nextaction pole spinslash @tar

    which when called outputs:

    pole

    Any help would be appreciated.
  • After using Mudlet for previous playing, I'm trying to learn how to use Nexus now, and entirely too rusty with all things code it seems. With hopping around different computers so often, theoretically, Nexus should be the solution to make sure I have my system with me wherever. But I am doing something super wrong here and I'm not sure what.. any help would be appreciated.



    I'm trying to make a dumb little calculator to tell me how many more of whatever I'd just killed I'd need to kill to level. @my_maxxp is supposed to be the GMCP value, which should be automatically populated. Divide that max exp by the experience I just got, and I should have a number that represents how many more times I'd have to get that much experience to level, right?

    I can't seem to use the math built in to set a different variable using two others, so I'm working off of the existing one, maxexp.

    Except when I display it, I'm constantly getting "You would have to kill 0 more!" This seems like it should be so easy, but I have no idea what I'm missing here.
  • RhyotRhyot Bloodloch
    Try using a different variable. You're using maxexp twice.

    The first time you're setting it to the gmcp value. The second time you're trying to override it with a mathematical formula. Nexus might not be running the calculations or storing it in a manner for you to call it later.

    For context:

    ^Experience Gained\: (.+) \(Bashing\) \[total\: (\d+)\]$

    local xpvalue = matches[2]
    local mobs_to_level = (tonumber(gmcp.Char.Vitals.maxxp) - tonumber(matches[3])) / tonumber(xpvalue)

    cecho(" (" .. round(mobs_to_level) .. " mobs)")


    ArdentKoda
  • edited June 2020
    Thank you Rhyot! This definitely helped.

    Documentation for actual scripting in Nexus is.. pretty sparse. I've been combing through all the other IRE games' forums to figure out the syntax for these things, and it's been a nightmare. There are still a few things I'm trying to figure out the equivalents of, like cecho to make things a bit more colorful, or how to highlight my current target. Googling it is only so useful, since most of these are applications for websites, and not capturing text in a MUD haha.

    If anybody else finds themselves in a similar spot, here's the code for Nexus that worked for me:

    ^Experience Gained\: (\d+) \(Bashing\) \[total\: (\d+)\]$

    set_variable("xpvalue", Number(args[1]));
    set_variable("mobs_to_level", Math.round((Number(get_variable("my_maxxp")) - Number(args[2])) / Number(get_variable("xpvalue"))));
    display_notice("(Info): You'll need to kill roughly " + get_variable("mobs_to_level") + " more to level up!");
    RhyotGavramel
  • Ok, so duplicate post here, but in the continuing saga of trying to figure out how to do basic things with javascript to build on from there.. could somebody tell me how I could modify this line:

    display_notice("(Info): You'll need to kill roughly " + get_variable("mobs_to_level") + " more to level up!");

    ...so that the "mobs_to_level" variable showed up red in nexus?

    I've been importing so many systems from other IRE games to try and pick out the right syntax, but it doesn't seem to hit it. Javascript articles are saying to try using , but the editor freaks out in the closing tag saying that there's an extra < present that shouldn't be there. Mudlet used to have a super super useful Nexus -> Mudlet conversion page, but that appears to be outdated now with the new Nexus client. If IRE would do something similar with basic javascript for the client, that would be a game-changer.

    I promise as thanks for my continued pestering to drop some nifty scripts for the community as soon as I learn to put them together.
  • I'm curious here about gmcp.IRE. Am I doing something wrong with Mudlet, or does it only show Rift info?

  • TekiasTekias Wisconsin
    Aros said:

    I'm curious here about gmcp.IRE. Am I doing something wrong with Mudlet, or does it only show Rift info?

    I have this line in my defup alias, adds the support for gmcp.IRE.Time

    sendGMCP('Core.Supports.Add ["IRE.Time 1"]')
    Formerly: Spiegel. Eidycue.

    Hi.

    image
    Aros
  • edited June 2020
    @Aros Has all the documentation and usage of gmcp. https://nexus.ironrealms.com/GMCP
  • @Stine yeah I'be gone through that. @Tekias I think has the idea I'm looking for, have to add in the supports. Thanks both of you. 

  • After failing wildly with the Nexus client, I swapped back to Mudlet, but I'm having issues copying and sending the latest system tweaks I've made between the two computers I use throughout the day. I've already accidentally overwritten the latest changes I've put in twice by accident with an older version.

    Is there a relatively simple for-dummies-type primer on how to run Mudlet out of something like Google Drive for desktop, or similar, so that changes made on one computer carry over to the other? I've tried dropping my .config file into the shared drive, but then Mudlet doesn't show my profiles to load, and I'm not entirely sure how to tell it to look elsewhere for that .config that's now in the shared folder.

    I am confusion.
  • Koda said:

    I've tried dropping my .config file into the shared drive, but then Mudlet doesn't show my profiles to load, and I'm not entirely sure how to tell it to look elsewhere for that .config that's now in the shared folder.

    Poking through Mudlet's Github page, I don't think they're all the way to supporting something like this. I think you'd need to set .config/mudlet for Backup & Sync right where it is, rather than move it to the dedicated Google Drive folder. I've never used Google Drive, but it seems like that's possible or was possible at some point.
    Didi has expressed her esteem of you for the following reason: Smart organized leader.
    Experience Gained: 47720 (Special) [total: 2933660]
    Needed for LVL: 122.00775356245
  • Seurimas said:


    Poking through Mudlet's Github page, I don't think they're all the way to supporting something like this. I think you'd need to set .config/mudlet for Backup & Sync right where it is, rather than move it to the dedicated Google Drive folder. I've never used Google Drive, but it seems like that's possible or was possible at some point.

    Hmm, so I did that on the one computer, but they're both technically in different file paths for the different computers, so it doesn't seem like it's actually able to load the most recent one/keep it updated when it's updated on another device. I can find the file when I check out the web version of Google Drive, but I don't see it on the desktop version.

    I'm thinking at this point it'd probably be easiest to just stash the whole thing on a flash drive and carry that back and forth between the two to play?
  • edited July 2020
    Ensis said:
    So I'd actually tried this earlier, followed the directions, but upon hitting this part:

    "Now, in the script/trigger/alias/keybinding editor, you'll see your package. Put all your settings in here, click save, and every time you do click save, the changes are saved not only to the normal place mudlet keeps backups, but also to that XML file in dropbox."

    ..It seems to have gone a bit wonky. I don't actually have my module I created there in my script/trigger/alias editor for some reason. I'm wondering if there was an update that may have goofed this? I'm assuming it should be showing as a different folder labeled as whatever that module was called.

    EDIT: Cancel that, I finally got it! I.. may have accidentally that whole time been exporting a single trigger instead of my whole package, so now we're good to go. Tested on both computers and it saved properly! Appreciate the help!
    GavramelWjoltyr
Sign In or Register to comment.