Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Mudlet Scripting

11213151718

Comments

  • TheophilusTheophilus Member Posts: 784 ✭✭✭✭
    How would I go about using GMCP to check to see if I have an affliction?

    I want to check to see if I have slow eq before headbutting after incendiary.

    Would it be:

    if ~Char.Afflictions.List [ { "name": "slow equilibrium" } ] then incendiary|headbutt?
    else incendiary alone?
    (Ring): Lartus says, "I heard Theophilus once threw a grenade and killed ten people."
    (Ring): Lartus says, "Then it exploded."

    (Ring): Zsetsu says, "Everyone's playing checkers, but Theophilus is playing chess."
  • DecDec Member, Immortal Posts: 216 mod
    The biggest misconception about GMCP is that the *.List commands are regularly sent.  They are not.  When you get a new affliction, you get a Char.Afflictions.Add message.  When you lose an affliction, you get a Char.Afflictions.Remove message.  It's up to you to keep track of the full list of afflictions. Pretty much the only time you get a Char.Afflictions.List is when you use DIAGNOSE on yourself.
  • IniarIniar Member Posts: 3,213 ✭✭✭✭✭
    Think of it as triggers that don't show up.

    -- gmcp.Char.Afflictions.Add

    gm.add_affliction = function()

    cam.give(me, gmcp.Char.Afflictions.Add.name)

    end


    -- gmcp.Char.Afflictions.Remove

    gm.remove_affliction = function()

    for i=1,#gmcp.Char.Afflictions.Remove do

    local aff = gmcp.Char.Afflictions.Remove[i]

    cam.take(me, aff)

    end

    end


    Adding and removing should be mostly enough.

    wit beyond measure is a Sidhe's greatest treasure
  • IluvIluv Member Posts: 703 ✭✭✭✭
    I am having trouble with Mudlet Mapper. When I try to map new rooms I get this

    (mapper): Oops! Has a small problem ([string "--mmp_mapping_newroom..."]:194: attempt to index 
    field 'envids' (a nil value)).
      view steps

    stack traceback:
    [string "--mmp_mapping_newroom..."]:219: in function <[string "--mmp_mapping_newroom..."]:217>
    [string "--mmp_mapping_newroom..."]:194: in function <[string "--mmp_mapping_newroom..."]:59>
    [C]: in function 'xpcall'
    [string "--mmp_mapping_newroom..."]:59: in function <[string "--mmp_mapping_newroom..."]:58>mc

    anyone know what's wrong?
  • DiceneDicene Member Posts: 913 ✭✭✭✭
    edited March 2016
    Why could the code at the bottom possibly produce the output above?

    1. anti-weapon field
    2. No match here: (density) and (anti-weapon field)!
    3. No match here: (anti-weapon field) and (anti-weapon field)!
    4. No match here: (blind) and (anti-weapon field)!
    5. No match here: (deaf) and (anti-weapon field)!
    6. No match here: (insomnia) and (anti-weapon field)!
    7. No match here: (quince) and (anti-weapon field)!
    8. No match here: (caloric salve) and (anti-weapon field)!
    9. No match here: (fenugreek) and (anti-weapon field)!
    10. No match here: (curseward) and (anti-weapon field)!
    11. No match here: (heightened speed) and (anti-weapon field)!
    12. No match here: (venom) and (anti-weapon field)!
    13. No match here: (levitating) and (anti-weapon field)!
    14.  
    15.     if matches[2]:find(v) then
    16.       cecho("Matched! (" .. v .. ") and (" .. matches[2] .. ")!\n")
    17.       return false
    18.     else
    19.       cecho("No match here: (" .. v .. ") and (" .. matches[2] .. ")!\n")
    20.     end
    image
  • IniarIniar Member Posts: 3,213 ✭✭✭✭✭
    You could try matches[2]:find(tostring(v)) but I avoid :find() and :gmatch() like the plague.
    wit beyond measure is a Sidhe's greatest treasure
  • DiceneDicene Member Posts: 913 ✭✭✭✭
    Eventually went so far as to compare them with string.byte() one character at a time. They were identical. =(

    Per Iniar's advice, I replace with "matches[2] == v" and that fixed it. >_>
    image
  • SenaliSenali Member Posts: 44 ✭✭
    Okay, so finally gonna come ask forums, because I can't pinpoint it... Someone/anyone look at this, and tell me what's missing / would be good to add in. Because I can't figure out what I feel is missing from it, been a looong time since I've made a GUI for Imperian. :(

    image
  • JulesJules Member Posts: 1,080 ✭✭✭
    Theophilus tells you, "// you're too smart."  Listen to Theo.  He has dumb face, like me.  I mean, you don't want to have a heart attack.

  • KhizanKhizan Member Posts: 2,648 ✭✭✭✭✭
    edited April 2016

    image

    The yellow area is mostly wasted screen real estate. First, most messages from the game won't stretch out that long. Second, it's easier to read shorter lines anyways, so you'd want to artificially wrap the text shorter than that anyways; there's a reason books are printed in 'portrait' mode instead of 'landscape'.

    I'd move the chat window to the yellow box instead of having it up at the top. This makes it easier to track long conversations, as well as making it easier to visually track the chat window when things are happening.

    "On the battlefield I am a god. I love war. The steel, the smell, the corpses. I wish there were more. On the first day I drove the Northmen back alone at the ford. Alone! On the second I carried the bridge! Me! Yesterday I climbed the Heroes! I love war! I… I wish it wasn’t over."

  • IniarIniar Member Posts: 3,213 ✭✭✭✭✭
    Just think about the amount of travel your eyes need to do, and you'll make tbetter placement decisions.
    wit beyond measure is a Sidhe's greatest treasure
  • SenaliSenali Member Posts: 44 ✭✭
    Oddly enough, better layout did make it seem like less was missing. Also centered text looks a lot nicer. >_>
    image
  • SalikSalik Member Posts: 143 ✭✭✭
    I really should build myself a deffer like that at some point.

  • IniarIniar Member Posts: 3,213 ✭✭✭✭✭
    The next step @Senali, is to create toggles that lets you go full immersive mode... ;)
    wit beyond measure is a Sidhe's greatest treasure
  • SenaliSenali Member Posts: 44 ✭✭
    What kinda toggles? o.o
  • DiceneDicene Member Posts: 913 ✭✭✭✭
    If anyone is using my Truehonours stuff, here's some updated code so that titles don't wreck your life.

    Update the "downloaded_file" script to: http://pastebin.com/Hqw1ATYq

    Update the "PLinfo" alias to: http://pastebin.com/1qUignw3

    If you want, make a new alias "Whois" with the regex "^whois (\w+)$" and have the script do: http://pastie.org/10795971
      ^ depends on you having my chatEcho and chatStamp functions which work with Demonnic's chat capture thing, those two function are here: http://pastie.org/10795972
    image
  • TheophilusTheophilus Member Posts: 784 ✭✭✭✭
    http://forums.achaea.com/discussion/1501/denizen-targeting-script

    I highly recommend this targetting script.
    (Ring): Lartus says, "I heard Theophilus once threw a grenade and killed ten people."
    (Ring): Lartus says, "Then it exploded."

    (Ring): Zsetsu says, "Everyone's playing checkers, but Theophilus is playing chess."
  • VeratyrVeratyr Member Posts: 75 ✭✭
    edited April 2016
    I got a question about tables, and I'm sorry if its been posted somewhere. I did find a good tutorial about them but it raised a couple questions.

    What is the differance between this-

    mytable = {} 
    mytable.keyone = "something"

    and this-

    mytable = {

    ["keyone"] = "something",
    }

    Is there any differance? Also, I was under the impression that the brackets around qoutes (i.e. ["something like this"]) denoted a string. I tried to use something like that for a value in a table, and it kept giving me an error.
    Like, I was trying to do this-
    mytable = {
    ["keyone"] = ["something"]

    }

    and it wouldn't do it. 

    Help please!
  • JuranJuran Member Posts: 909 ✭✭✭✭✭
    If you want to do it that way, you'd do mytable["keyone"] = "something", but it's irrelevant. Lua is smart enough to realize that your key is supposed to be a string without explicit casting unless your key string is multiple words.
  • TheophilusTheophilus Member Posts: 784 ✭✭✭✭
    http://hastebin.com/urosavimaj.rb

    "fishon" to start fishing, "fishoff" to start.

    fdir (dir) to choose initial direction
    fbait (bait) to choose bait.

    Cast your pole wherever and then it will continue to fish for you. You have to move rooms when the fish are depleted in the surrounding rooms.
    (Ring): Lartus says, "I heard Theophilus once threw a grenade and killed ten people."
    (Ring): Lartus says, "Then it exploded."

    (Ring): Zsetsu says, "Everyone's playing checkers, but Theophilus is playing chess."
  • JulesJules Member Posts: 1,080 ✭✭✭
    edited May 2016
    In order to really lock down a truly solid "don't hit Deliverance" solution, I am going to need to deal with titles and such, unfortunately.  The few comments I find so far (even on Achaea forums, which is often a good place to look for coding stuff) are not super encouraging.  

    In short, what I need to do is, be able to QL, and if any monks already have deliverance up, I need to be able to grab their actual names out of all the titles and aspect stuff.  I need to do the same when they don't have deliverance up, so I can change their status to "not Deliverance guy now".  

    For example:

    The ever-shifting visage of Tashi, Aspect of Moradeim, is here. He is surrounded by a glowing white nimbus.

    So you have all of that stuff before Tashi, and all of that stuff before "is here\. (He|She) is surrounded by a glowing white nimbus\.".  And that's the problem. 



    So I will need some kind of horrific regex trigger and then do something like:


    if matches[2] == "Risca" or "Septus" or "Khizan" or "Laeka" or "Tikal" or "every player in Imperian that might ever be a monk or mirror one"
    elseif matches[3] == "Risca" or "Septus" or "Khizan" or "Laeka" or "Tikal" 
    elseif matches[4] == and so forth....I am not even totally sure how many matches I should go yet

    then 
    if deliverancepeep1 == noone then deliverancepeep1 = matches[blah number that matched a name]tempTimer(30, [[deliverancepeep1 = noone]])
    elseif if deliverancepeep2 == noone then deliverancepeep2 = matches[blah number that matched a name]tempTimer(30, [[deliverancepeep2 = noone]])
    elseif deliverancepeep3 == noone then deliverancepeep3 = matches[blah number that matched a name]tempTimer(30, [[deliverancepeep3 = noone]])
    end
    end
    if (string.lower(deliverancepeep1) == string.lower(target)) then 
    target = nothing
    if deliveranceguy1 == noone then deliveranceguy1 = deliverancepeep1; tempTimer(30, [[deliveranceguy1 = noone]])
    elseif deliveranceguy2 == noone then deliveranceguy2 = deliverancepeep1tempTimer(30, [[deliveranceguy2 = noone]]
    elseif deliveranceguy3 == noone then deliveranceguy3 = deliverancepeep1tempTimer(30, [[deliveranceguy3 = noone]]
    end
    send("rt " .. deliverancepeep1 .. " DELIVERANCE DO NOT HIT OR YOU WILL DIE HORRIBLY
    send("rt " .. deliverancepeep1 .. " DELIVERANCE DO NOT HIT OR YOU WILL DIE HORRIBLY
    send("rt " .. deliverancepeep1 .. " DELIVERANCE DO NOT HIT OR YOU WILL DIE HORRIBLY



    elseif (string.lower(deliverancepeep2) == string.lower(target)) then 
    target = nothing
    if deliveranceguy1 == noone then deliveranceguy1 = deliverancepeep2; tempTimer(30, [[deliveranceguy1 = noone]])
    elseif deliveranceguy2 == noone then deliveranceguy2 = deliverancepeep2tempTimer(30, [[deliveranceguy2 = noone]]
    elseif deliveranceguy3 == noone then deliveranceguy3 = deliverancepeep2tempTimer(30, [[deliveranceguy3 = noone]]
    end
    send("rt " .. deliverancepeep2 .. " DELIVERANCE DO NOT HIT OR YOU WILL DIE HORRIBLY
    send("rt " .. deliverancepeep2 .. " DELIVERANCE DO NOT HIT OR YOU WILL DIE HORRIBLY
    send("rt " .. deliverancepeep2 .. " DELIVERANCE DO NOT HIT OR YOU WILL DIE HORRIBLY

    elseif (string.lower(deliverancepeep3) == string.lower(target)) then 
    target = nothing
    if deliveranceguy1 == noone then deliveranceguy1 = deliverancepeep3; tempTimer(30, [[deliveranceguy1 = noone]])
    elseif deliveranceguy2 == noone then deliveranceguy2 = deliverancepeep3tempTimer(30, [[deliveranceguy2 = noone]]
    elseif deliveranceguy3 == noone then deliveranceguy3 = deliverancepeep3tempTimer(30, [[deliveranceguy3 = noone]]
    end
    send("rt " .. deliverancepeep3 .. " DELIVERANCE DO NOT HIT OR YOU WILL DIE HORRIBLY
    send("rt " .. deliverancepeep3 .. " DELIVERANCE DO NOT HIT OR YOU WILL DIE HORRIBLY
    send("rt " .. deliverancepeep3 .. " DELIVERANCE DO NOT HIT OR YOU WILL DIE HORRIBLY




    end


    I think this is a pretty tricky issue for most people, as are so many things with LOOK, because LOOK is such a mess and has no config option.  If it ends up people are friendly to the idea of a config brief for prefixes and suffixes (really, anything that isn't your name), awesome.  I actually do think our players and admin might go for it, but I've also seen players pretty much riot at the idea, and in the meantime, I need to figure something out anyway.  
    Post edited by Jules on
  • DiceneDicene Member Posts: 913 ✭✭✭✭
    Easiest way I can think of to find a player name in look is to look at every single capitalized word in a position that could be a player name and compare it to your entire list of player names. It's terrible. All I've got set up right now is to just clear my target if I see Deliverance anywhere in a Look, although I guess it wouldn't be that crazy to parse the line before the deliverance line for my target. Still, that's pretty crappy, and is rather unfriendly for new players, especially since it's required to automate a defense against an instakill.

    A config for simple player names(removing titles, aspect type, etc to reduce it to "Septus is here. <modifier like deliverance or prone>. <another modifier>." would be fantastic for this reason, and for many others(making who-parsing easier, making it easier to read pet glance feedback and automate reporting, etc. The players that might riot at this idea are probably objectively bad human beings.

    An alternative that might be easier to code would be simply adding the player's name to the deliverance look message as well. "Tashi is here. Tashi is surrounded by a glowing white nimbus.". That's almost certain a trivial change to be able to make, and I don't know that you can consider it affecting the balance of Deliverance at all, seeing as there is no in-game stat/artifact/investment determining the ability to trigger it properly, it's just a coding-knowledge requirement that we should probably NOT be considering when considering the balance of something like that.

    I know you're busy, but we'd love an opinion, @Garryn =D


    image
  • JulesJules Member Posts: 1,080 ✭✭✭
    A few (very few) people don't automate their defense against this, and die very, very rarely, but hrm.  In one sense, it's one of those things you could sort of challenge yourself to notice... as it is something that is probably going to happen right at the beginning of a fight.  Still... rooms can be so full of stuff.  Paragraphs... It often almost eats my buffer right away.  Now if I had to notice it in the middle of a team fight without some serious help... I really wouldn't want to try it.  So all of that said, having seen a couple of wipes (which is a fairly crap sample size, ofc), I immediately got the impression that Deliverance team wipes are a huge morale killer, especially for teams where you're counting on several team members who might not fight much.  Even for "experienced" teams, who probably should take one or two wipes in stride, and even find it a bit funny, my attitude is pretty much "sure, I will totally go back against Deliverance -  as soon as I am ready to test drive a solution that means my teammates and I hopefully won't ever hit it again".
  • IniarIniar Member Posts: 3,213 ✭✭✭✭✭
    Doesnt just clearing your target still work?
    wit beyond measure is a Sidhe's greatest treasure
  • JulesJules Member Posts: 1,080 ✭✭✭
    edited May 2016
    Yeah, but everyone has to notice that the guy has Deliverance up (and clear their target yeah).  The tricky one is when it's already up when you enter (because of the spam around names).  It's also one of those things where it is definitely not good enough to become "pro" yourself.  The whole team has to be "pro" and not hit.  
    Post edited by Jules on
  • ZarimZarim Member Posts: 85 ✭✭✭
    edited May 2016
    So I have this weird issue with Mudlet that's been ongoing for three days.

    Everything I see from the game is subject to random character changes. For an hour or two, all periods will be replaced with '-a' or spaces will be replaced with '0' or whatever, or every type of communication will look like "Bob saysq$Hi there/"

    An hour or two later, the affected things and what they're turned into will change. All random so far as I can tell, but persistent as well.

    I thought today I'd fixed it when I disabled a chat window script Baasche gave me, but the problem started up again a few minutes later. When I removed the script entirely, still there. When I uninstalled and reinstalled a freshly downloaded Mudlet, same issue, even without any scripts or settings at all.

    I'm completely lost here. If anyone has any suggestions, I'm desperate enough to try them. :/
  • DjenDjen Member Posts: 1
    Might be a gmcp parsing issue. I've had those, especially when I've sent the Comm.Channel request.
  • ZarimZarim Member Posts: 85 ✭✭✭
    Would that affect a completely vanilla new copy of mudlet? / How would I fix that?
  • JulesJules Member Posts: 1,080 ✭✭✭
    edited June 2016
    I think some people are able to pinpoint location in an area like Bardosi, even when the person is in one of a very, very large number of rooms named "Wide open plains.", for example.  That means I get a huge list of rooms the target could be in.  But somehow... there might be a way to know exactly which one the person is in?  Are they using an ability or is there something I need to do to my mapper?

    EDIT:  I am also curious exactly how fancy some of these walkers are.  We had a guy walk into our room, presumably his walker made a "nope" calculation, and his char turned around and went the other direction, all within a few -thousandths- of a second (so faster than even a very, very pro guy who wasn't utterly automated - processor speed decision there).  We can certainly try to block both directions at choke points at something like a shard fall (well, not for this guy, who has a lot of amazing escape options and is probably able to cycle through them instantly), but the fact that he actually turned around is what got my attention, and just makes me wonder... what am I up against (in general, not necessarily just walkers)?  And that is not to say that automation is always "bad" - I rely on it to reduce the number of things I have to actually provide input for or make split second decisions about, just like so many people.  But some of these sorts of things just might be a very, very high coding bar for many people, and I'd want to know when I should just go... okay, I am out.  You go you.  It's pretty easy to figure out when you're just totally out of your depth if you 1 v. 1 someone who is very, very good, usually due to a combination of really good automation and the ability to do certain things manually when needed, too, and of course a deep understanding of the game itself (and that is part of why I pretty much don't 1 v. 1 unless someone wants me for "test dummy"), but group stuff and other situations aren't always quite as obvious.  Hrm.  
    Post edited by Jules on
  • IluvIluv Member Posts: 703 ✭✭✭✭
    Config your mapview on and use an ability that shows the room look.
Sign In or Register to comment.