Skip to content

Mudlet Scripting

11213141517

Comments

  • None of the binaries on the site appear to have been compiled within the last year, so they're all pretty dated. Windows 3.0delta seems to be the most recent, Jan 2015. Unfortunately if one is looking for a fix one will likely have to compile the application from source.
    image
  • The Mudlet guys sound like they are going to fix the https thing pretty quick I think. "Before the next snapshot" in Vadi's latest post (I don't know when that will be, but I bet it might be reasonably "soon"). They were super responsive.
  • EvaldirEvaldir United States
    So, I've recently been using Dicene's defense tracker that I believe was earlier in this(or another) thread. I really liked the base of it, and have recently been working on making the defense chart clickly.

    I've run into one minor problem, it's not a huge problem it's just annoying at this time and was wondering if someone could give some good advice to get around this.

    I'm using this Link echo: cechoLink("[elusive] ", [[kdefs.elusiveness = 1, expandAlias("defup")]], "turn on elusiveness", true)

    That's just a sample one for what it looks like when the defense is turned off(clicking it turns it on). The problem I'm running into right now is when I bring up the chart with the clickables, if I click it it does the whole expandlias("defup") part, but doesn't seem to recognize that I changed the variable kdefs.elusiveness to 1. Is there are valid way to fix that?

    *Just a note on what my problem is, I have to click twice if I want the expandAlias("defup") to realize that the variable = 1.
  • that comma after the 1 should be a semi-colon, no?
    kdefs.elusiveness = 1; expandAlias--- etc
    image
  • EvaldirEvaldir United States
    Aysari said:

    that comma after the 1 should be a semi-colon, no?
    kdefs.elusiveness = 1; expandAlias--- etc

    That didn't change anything. Thanks though
  • I've got an updated one that has a fully clicky menu that pops into its own box, rather than being printed to the scrollback. I'll put it up here later today if I can remember.
    image
  • IniarIniar Australia
    Eoghan said:

    This is now live, map syncing should work once again.

    @Eoghan
    would you kindly consider adding in a 'last updated' field for the map.xml file? I guess I could always look up the time of creation on my end, but it'd be nice.
    wit beyond measure is a Sidhe's greatest treasure
  • Iniar said:

    Eoghan said:

    This is now live, map syncing should work once again.

    @Eoghan
    would you kindly consider adding in a 'last updated' field for the map.xml file? I guess I could always look up the time of creation on my end, but it'd be nice.
    I'll send it the request up the chain. The mapping is shared IRE-wide, so it's above my paygrade.
    Like what we're doing? Why not take a second to vote? Vote for Imperian at http://www.imperian.com/vote
  • If anyone was curious, it looks like a new build of Mudlet is almost up which should have all the Windows sound problems fixed(since it's moving to a more recent version of QT). Yay!
    image
  • edited January 2017
    ISO: autobasher for Mudlet that works for any profession

    I have credits.
    (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."
  • A couple of people asked for my fishing system, so if anyone else wants it, just let me know.
    (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."
  • Just a quick plug...

    I highly recommend @Gjarrus autobasher if you're looking for one. You can't beat the price, and it is quite thorough and efficient. I think others who have received it would attest to this. Contact him!
    (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."
  • Probably not the smartest idea to be promoting that on forums.
    image
  • Aysari said:

    Probably not the smartest idea to be promoting that on forums.

    ....? You can autobash--you just can't be AFK. -1 for you.
    (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."
  • Um.. so.. I just read:

    Currently in Imperian, triggers and automation are allowed, provided they are
    not designed to a) generate gold, b) generate experience via bashing or doing
    quests. Using triggers or automation to do either of those things is strictly
    prohibited.


    I hate this--I don't autobash AFK, but I am not going to sit here and press F1 over and over while staring at the same walls of text I've been looking at for 10 years. Having a script run in the background while I play PS4 is one thing, but I don't want neither carpal tunnel nor death by boredom.

    I think this should be changed, personally.
    (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."
  • That doesn't quite reflect our adopted policies. I'll have Jeremy look over it.
    Like what we're doing? Why not take a second to vote? Vote for Imperian at http://www.imperian.com/vote
  • @Eoghan I didn't think so.. I appreciate that.
    (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."
  • Right. That is not correct. I will change that help file today. You can use triggers to do anything, as long as you are at your computer.

  • I am willing to pay credits for someone to spend some time with me working on an affliction tracker for Runeguard. I really don't even know where to begin. I don't want you to code it for me; I just want you to help me learn how to go about it and what the appropriate Mudlet functions are.
    (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."
  • Also, when I do ROOM LIST I get a nice table of all of the rooms in a particular area. It's not working for others, though. Any ideas what script this alias is found in so I can send it out?
    (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."
  • Most mmp aliases are in the 'aliases' script, but the problem is likely some of the weird xml bugs. Like temple at/of menanon, issues with UW/UW Caanae, issues with real world Caanae sewers and the Beneath the sewers, etc.
  • AydenAyden North Carolia

    I am willing to pay credits for someone to spend some time with me working on an affliction tracker for Runeguard. I really don't even know where to begin. I don't want you to code it for me; I just want you to help me learn how to go about it and what the appropriate Mudlet functions are.

    Dunno if you got help with this already, but what kinda affliction tracker are you wanting to set up? do you just want something simple that knows what toxins to apply based on what they already have? did you want it to display in a GUI style thing? it really depends on how you fight too. My stuff was far from perfect, but I had DK set up with toxin prios and would be willing to help you figure it out. more than anything I had to sit with someone and have them let me hit them with toxins and watch how they were cured.
    image
  • edited February 2017
    I figured it out.
    (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."
  • How can I do the next thing: Attack with EQ and BAL and next attack is with only EQ, then again with EQ and BAL and then again only with EQ? So I'd attack with those two rules rules every other attack. All help is appreciated.
  • Dreacor said:
    How can I do the next thing: Attack with EQ and BAL and next attack is with only EQ, then again with EQ and BAL and then again only with EQ? So I'd attack with those two rules rules every other attack. All help is appreciated.
    So if I understand you correctly, you are alternating attacks between one that needs EQ+BAL, and one that only needs EQ?

    What I would do in that case, is remember the last attack with a global variable with something like LastAttack.  Then call a function on receiving EQ that checks what the last attack was:
    -- -----------------------------------------------------------------------
    -- function: AlternateAttack
    -- Alternate between an attack that needs EQ *and* balance, and one that
    -- only needs EQ.  Call me from the equilibrium recovery message for best
    -- results.  Returns the attack we did if we attacked, false if we did not.  
    function AlternateAttack()<br>&nbsp; &nbsp;haveBalance &nbsp; &nbsp; = gmcp.Char.Vitals.bal or false<br>&nbsp; &nbsp;haveEquilibrium = gmcp.Char.Vitals.eq or false<br><br>&nbsp; &nbsp;if (LastAttack==nil) then<br>&nbsp; &nbsp; &nbsp; -- first attack<br>&nbsp; &nbsp; &nbsp;&nbsp;if (haveBalance==true and haveEquilibrium==true) then
             send("<PUT EQ+BAL ATTACK HERE>")
             lastAttack="<PUT EQ+BAL ATTACK HERE>"<br>         return lastAttack
          else
             return false
          end
       elseif (LastAttack=="<PUT EQ+BAL ATTACK HERE>") then
          -- second attack, just EQ
          if (haveEquilibrium==true) then
             send("<PUT EQ-ONLY ATTACK HERE>")
             lastAttack="<PUT EQ-ONLY ATTACK HERE>"
             return lastAttack
          else
             return false
          end<br>&nbsp; &nbsp;elseif (LastAttack=="<PUT EQ+BAL ATTACK HERE>") then
          -- third attack, EQ+BAL
          if (haveBalance==true and haveEquilibrium==true) then
             send("<PUT EQ+BAL ATTACK HERE>")
             lastAttack="<PUT EQ+BAL ATTACK HERE>"
             return lastAttack
          else
             return false
          end
       end<br>end
    I wrote this up entirely now, and haven't tested it, but it should put you on the right track in terms of the logic at least.
    image
  • Anette said:
    Dreacor said:
    How can I do the next thing: Attack with EQ and BAL and next attack is with only EQ, then again with EQ and BAL and then again only with EQ? So I'd attack with those two rules rules every other attack. All help is appreciated.
    So if I understand you correctly, you are alternating attacks between one that needs EQ+BAL, and one that only needs EQ?

    What I would do in that case, is remember the last attack with a global variable with something like LastAttack.  Then call a function on receiving EQ that checks what the last attack was:
    -- -----------------------------------------------------------------------
    -- function: AlternateAttack
    -- Alternate between an attack that needs EQ *and* balance, and one that
    -- only needs EQ.  Call me from the equilibrium recovery message for best
    -- results.  Returns the attack we did if we attacked, false if we did not.  
    function AlternateAttack()<br>&nbsp; &nbsp;haveBalance &nbsp; &nbsp; = gmcp.Char.Vitals.bal or false<br>&nbsp; &nbsp;haveEquilibrium = gmcp.Char.Vitals.eq or false<br><br>&nbsp; &nbsp;if (LastAttack==nil) then<br>&nbsp; &nbsp; &nbsp; -- first attack<br>&nbsp; &nbsp; &nbsp;&nbsp;if (haveBalance==true and haveEquilibrium==true) then
             send("<PUT EQ+BAL ATTACK HERE>")
             lastAttack="<PUT EQ+BAL ATTACK HERE>"<br>         return lastAttack
          else
             return false
          end
       elseif (LastAttack=="<PUT EQ+BAL ATTACK HERE>") then
          -- second attack, just EQ
          if (haveEquilibrium==true) then
             send("<PUT EQ-ONLY ATTACK HERE>")
             lastAttack="<PUT EQ-ONLY ATTACK HERE>"
             return lastAttack
          else
             return false
          end<br>&nbsp; &nbsp;elseif (LastAttack=="<PUT EQ+BAL ATTACK HERE>") then
          -- third attack, EQ+BAL
          if (haveBalance==true and haveEquilibrium==true) then
             send("<PUT EQ+BAL ATTACK HERE>")
             lastAttack="<PUT EQ+BAL ATTACK HERE>"
             return lastAttack
          else
             return false
          end
       end<br>end
    I wrote this up entirely now, and haven't tested it, but it should put you on the right track in terms of the logic at least.
    Thank you so much! I need to use this. I have quite some stuff in my attack script so I need to look into this and figure out how to use this effectively in the script. This is much appreciated!
  • @Dreacor the above won't work. Eq and bal values in  gmcp are not set to true/false or value/nil -- they're set to "1" and "0" respectively (I have them in quotes because they're not saved as a number type of data either, they're saved as strings.) That  said, it's super easy to change: haveBalance = tonumber(gmcp.Char.Vitals.bal), if haveBalance == 1 then... etc.
  • For puncture choke, I queue clear/use eqbal when I need to change wield, then the rest of the time I just use queue eq/queue bal. I have queue management functions, but I don't see why it wouldn't work without it.


    Excerpt: 

    local wieldSet = wieldCheck(wield1,wield2)

    if attachPrefix then command = attachPrefix..command end

    if command ~= "puncchoke" then



    queueSet(wieldSet..""..command,"eqbal")

    queueTrash("eq")

    queueTrash("bal")

    elseif wieldSet == "" then

    queueSet("puncture "..sys.target.ref.." with "..puncturetoxin,"bal")

    queueSet(attachPrefix.."worm choke "..sys.target.ref,"eq")


    queueTrash("eqbal")


    else

    queueSet(wieldSet.."puncture "..sys.target.ref.." with "..puncturetoxin.."|worm choke "..sys.target.ref,"eqbal")

    queueTrash("eq")

    queueTrash("bal")


    end




    ---End of function

    end


  • edited July 2017
    Owyn said:
    @Dreacor the above won't work. Eq and bal values in  gmcp are not set to true/false or value/nil -- they're set to "1" and "0" respectively (I have them in quotes because they're not saved as a number type of data either, they're saved as strings.) That  said, it's super easy to change: haveBalance = tonumber(gmcp.Char.Vitals.bal), if haveBalance == 1 then... etc.
    Do you not understand how boolean value equivalence works?

    False = 0 = nil

    Anything else evaluates as true.

    See http://lua-users.org/wiki/ExpressionsTutorial
    image
  • All values sent by GMCP are sent as strings, as defined in the GMCP spec. This means that the value sent by the server is the string "1", not the number 1. Since "1" and 1 are both non-false, this is fine. When a 0 is sent, though, it is sent as "0" which is a non-empty string and therefore has a truthy value of True. You need to check explicitly for "0" or convert it to a number to determine its truthy value is False.
    Like what we're doing? Why not take a second to vote? Vote for Imperian at http://www.imperian.com/vote
Sign In or Register to comment.