Mudlet Simple Question

Hey, I want to write a simple trigger that will announce mindnet only if they are enemies, including the area location. This is what I have so far, which could very well be incorrect:

^(\w+) has left the area\.$


if target_calling == true and ndb.isenemy(matches[2]) then

send("pt " .. matches[2] .. " left " ..something goes here, I know it)

end


Any help would be appreciated.


Give us -real- shop logs! Not another misinterpretation of features we ask for, turned into something that either doesn't help at all, or doesn't remotely resemble what we wanted to begin with.

Thanks!

Current position of some of the playerbase, instead of expressing a desire to fix problems:

Vhaynna: "Honest question - if you don't like Achaea or the current admin, why do you even bother playing?"


Comments

  • send("pt " .. matches[2] .. " left " .. gmcp.Room.Info.area)

    should work, I think.
  • I don't want to open a new thread for another question.

    I'm trying to write a script that would allow me to use a specific alias to check 'who here' and enemy all on that list IF I use that particular alias. I don't want to enemy everyone on who here if I'm not using that alias. Can anyone help, please?
    Give us -real- shop logs! Not another misinterpretation of features we ask for, turned into something that either doesn't help at all, or doesn't remotely resemble what we wanted to begin with.

    Thanks!

    Current position of some of the playerbase, instead of expressing a desire to fix problems:

    Vhaynna: "Honest question - if you don't like Achaea or the current admin, why do you even bother playing?"


  • KlendathuKlendathu Eye of the Storm
    You will need an alias which sets a flag to true (with an optioal tempTimer to set it to false again after a certain time has elapsed as failsafe), a trigger which runs off the standard output for who here and parses it into a list then passes a series of enemying commands if the flag is true, then sets the flag to false again. Probably need something to clear your existing enemy list too.

    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."
  • AustereAustere Tennessee
    edited January 2016
    Ismay said:
    I don't want to open a new thread for another question.

    I'm trying to write a script that would allow me to use a specific alias to check 'who here' and enemy all on that list IF I use that particular alias. I don't want to enemy everyone on who here if I'm not using that alias. Can anyone help, please?
    A good alternative, Klendathu has a very nice gmcp tracker in his signature that tells you who is in the room.  You could write an alias that simply enemied off the table he populates.

    Edit: on mobile, so I can't guarantee its still there.  Guessing. .
  • I want to add another action to this alias, by means of setting a variable, but I am not sure how to do it.


    send("setalias tkc combo "..target.." "..kicks[matches[2]].." "..punch[matches[3]].." "..punch[matches[4]].."/"..mindcmd[matches[5]])

    send("queue add eqbal tkc")


    I'd like to add stancing to the end of this alias, but only if unstanced. I already have my variable created and all the relevant trigger lines to change the variable. I'm just not sure how to add the if statement to this.


    I thought about doing this:

    if unstanced == true then

    send("queue add eqbal scs")

    end


    But, monks can stance while off balance, I think. So, I'd be wasting more balance stancing when I don't need to. Any suggestions?





    Give us -real- shop logs! Not another misinterpretation of features we ask for, turned into something that either doesn't help at all, or doesn't remotely resemble what we wanted to begin with.

    Thanks!

    Current position of some of the playerbase, instead of expressing a desire to fix problems:

    Vhaynna: "Honest question - if you don't like Achaea or the current admin, why do you even bother playing?"


  • AustereAustere Tennessee
    edited March 2016
    If unstanced then
      local stance = "/scs"
    else 
      local stance = ""
    end

    send("setalias tkc combo "..target.." "..kicks[matches[2]].." "..punch[matches[3]].." "..punch[matches[4]].."/"..mindcmd[matches[5]]..""..stance)
    send("queue add eqbal tkc")

    Edit: mobile so it's ugly, but that's one way to do it.  Another would be to simply call a function that returns the stance instead of a variable 
  • EldEld
    edited March 2016
    Two options that do the same thing:
    1)
    if unstanced then
    send("setalias tkc combo "..target.." "..kicks[matches[2]].." "..punch[matches[3]].." "..punch[matches[4]].."/"..mindcmd[matches[5]].."/scs")
    else
    send("setalias tkc combo "..target.." "..kicks[matches[2]].." "..punch[matches[3]].." "..punch[matches[4]].."/"..mindcmd[matches[5]])
    end

    2)
    send("setalias tkc combo "..target.." "..kicks[matches[2]].." "..punch[matches[3]].." "..punch[matches[4]].."/"..mindcmd[matches[5]]..(unstanced and "/scs" or ""))

    The second is more concise, but the first might make the logic easier to understand.
Sign In or Register to comment.