Triggers

edited December 2013 in Mechanic's Corner
Okay so basically all I know how to do is targeting. What I want to do is have a set up that when I am debating it will take the text and send me what their current mindset is in a nice colourful little word or two. What I need to know is what to put in the (here) in the example below that will allow the trigger to trigger on anything between the parentheses.

You passionately present your case, fervently arguing your points with emotional appeals. (here) frowns at you and shakes (here) head, but concedes the argument to you.

Comments

  • What client are you using? It's probably one of:
    *
    %w+
    \w+
  • Ah, right. That might be important information. I am using mudlet and thank you.
  • edited December 2013
    If you're on Mudlet then it would be the following:

    ^You passionately present your case, fervently arguing your points with emotional appeals\. (\w+) frowns at you and shakes (his|her) head, but concedes the argument to you\.$

    Make sure you have 'perl regex' selected in the drop down to the right.

    Also this little cheat sheet will come in handy quite a bit while you're learning! It's relatively self explanatory but you may want to just tinker around. You can use `echo <whatever> to feed lines to your system to test triggers too!


    Edit: I apologize for the wonky text formatting.
     
  • Thank you! I had figured out most of that from the mudlet wiki thing but was unaware that you had to have the \ before every period. The cheat sheet also looks like a thing of beauty!
  • Periods are actually 'catch all' wildcards, so you need to escape them with the slash in order to tell it 'Hey I want an actual period here instead of anything.' It all takes a bit of getting used to, but it's pretty easy once you get the hang of things!
  • edited December 2013
    So I'm not sure if I should just start a new topic but I already have this one so I'm just going to ask another question here.

    I'm trying to figure out now how to set it up so that I keep randomly changing my mindset. There are a couple of ways I can think of to do this but they all have their own problems.

    One way is to set up it so that every time I do a certain emote it triggers something that has me go through a set order of preset mindset changes. For example

    send("mindset analytical")
    tempTimer(1, [[ send("mindset cautious") ]])

    and then just continue that for however many changes I think I need to set up.

    The problems with this are numerous, to name some of them it requires an emote to start (figure out keybindings?) and it could potentially either end in the middle of debate or continue on long after the debate is done.

    So to fix one of the problems I would need to figure out a way to deactivate a trigger from the game window. If I could do that I could maybe even have two triggers bouncing off each other?


    Anyways enough about that, another way to do it is this script I found by way of google.

    function newDebate()
    local ms = math.random(1, 3)
    if ms == 1 then
    mindset = "cautious"
    send("mindset "..mindset)
    elseif ms == 2 then
    mindset = "pedantic"
    send("mindset "..mindset)
    elseif ms == 3 then
    mindset = "analytical"
    send("mindset "..mindset)
    end

    The problem is that I don't really understand scripts. How do you get them going? How do you stop them once they are going? Does this one even work?
  • Wooo! Figured out the script thing, now just to figure out how to use it most effectively!
  • Uh, necroing the thread slightly, I have this:

    table = { "influence monk with supplication", "influence monk with begging" }


    variable = 1


    if variable == 1 then send(table[1]) variable = 2


    elseif variable == 2 then send(table[2]) variable = 1


    end



    as my influencer, it rotates once, then sticks on the first variable and just repeats it, any ideas what I am doing wrong?

  • Do this
    Maliena said:
    Uh, necroing the thread slightly, I have this:

    table = { "influence monk with supplication", "influence monk with begging" }


    variable = 1


    if variable == 1 then send(table[1]) variable = 2


    elseif variable == 2 then send(table[2]) variable = 1


    end



    as my influencer, it rotates once, then sticks on the first variable and just repeats it, any ideas what I am doing wrong?

    Set your first-set variable using another alias or a script function elsewhere instead of in your influencing alias.

  • Thank you so much! My life is MUCH less tedious now :)
  • NeosNeos The Subtle Griefer
    Please tell me you are not using table as your table name.
    Love gaming? Love gaming stuff? Sign up for Lootcrate and get awesome gaming items. Accompanying video.

     Signature!


    Celina said:
    You can't really same the same, can you?
    Zvoltz said:
    "The Panthron"
Sign In or Register to comment.