Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

Can somone who uses Achaea's default Client please help me with Triggers?

QahnaarinQahnaarin Member Posts: 11
Hello, I'm new to Achea, and I'm using the default flash client that the game offers (seems the least complicated for my newbie mind). Recently I've been trying to set up some basic reflexes such as automatically opening doors during travel, as well as some basic reflexes for defense, but have been having great difficulty so far. In filling out the "New Trigger" tab in Achaea's client I run into problems when I reach the "custom script" line. Since I know nothing about scripting, naturally I don't know what to enter.

Can someone please help me to set up some basic stuff like:
1. Automatically standing up when you wake.
2. Automatically opening doors on your way.
3. Any one defensive reflex, so I have an example of script to modify for other afflictions.

Thank you very much in advance.

Comments

  • QahnaarinQahnaarin Member Posts: 11
    Are there really no people who use the default client? Does one really need to become a programmer these days to play a free text-based game on the Internet an hour per day?
  • SarapisSarapis Member, Administrator Posts: 3,398 Achaean staff
    edited October 2013
    I'm unsure if you're talking about the flash client or the HTML5 client (which is actually the default client). client.achaea.com is the html5/default client.

    We're working on developing a helpful package of triggers for people using the default client, but it's still very much in-development. 

    A basic defensive reflex (to cure paralysis) though would work like this in the client:

    Just put: "A prickly stinging overcomes your body, fading away into numbness" into the 'Match Criteria' slot And then in the 'send to MUD' slot put: outr bloodroot | eat bloodroot 

    That is very basic, but should give you the idea of how to set up basic triggers. The same simple type of trigger will work for automatically standing up, though to intelligently open a door you have to get a bit more complicated. When output gets sent to you that matches the 'Match Criteria' bit, the client will send the output in the 'send to MUD' slot back to the MUD. The | character is used to separate commands (you can change which character to separate commands with in the 'Advanced' tab).
    Qahnaarin
  • QahnaarinQahnaarin Member Posts: 11
    Thank you greatly Sarapis. This little helps immensely!
  • QahnaarinQahnaarin Member Posts: 11
    edited October 2013
    Could you perhaps point me at what I am doing wrong in setting this trigger for standing up after waking? The following has no effect..
    imageimage
  • SarapisSarapis Member, Administrator Posts: 3,398 Achaean staff
    Qahnaarin said:
    Thank you greatly Sarapis. This little helps immensely!
    We're going to be releasing a new version of the client soonish (next month or so), and then after that we'll be focusing pretty heavily on making the Settings part of the client a lot better, including some basic explainer videos I'm thinking.
  • QahnaarinQahnaarin Member Posts: 11
    edited October 2013
    That's great news! But a month, little that it is, is three years in Achaea's time nonetheless. Perhaps you can still help me figure out what I've done wrong in the image I posted above? I would be very grateful.
  • AnaidianaAnaidiana Member Posts: 826 @ - Epic Achaean

    Command to stand is just STAND not 'stand up'.

     

    HELP BASIC COMMANDS is a good place to start to make sure you're inputting the correct bits :)



    image
    Qahnaarin
  • QahnaarinQahnaarin Member Posts: 11
    That's not it unfortunately. "stand up" works just as well in game... Still, I changed it to "stand" just in case, and it doesn't work. As do not all the other basic reflexes I try. Must be something else I'm doing wrong.
  • QahnaarinQahnaarin Member Posts: 11
    edited October 2013
    Antonius, you're my hero!
    Many thanks for taking a big chunk of your time and explaining this in such detail. Info in the "for dummies" format is invaluable for the likes of me-- you explain very clearly.
    With that said, in the "stand" trigger all the boxes you mentioned were checked before, but it started working only after I anchored it like you said and excluded the dot with an \. Still not sure why this helped. As I understand, it should have worked without doing so, right? Also not quite sure, do I need to "escape" other signs such as "!" or "?" as well? The door trigger worked well.
    For now I only have two questions/problems:
    1. Do I need to worry about any format issues for the commands I enter into the "send to Mud" box other than the "pipe" symbol to separate them?
    2. For some reason, I can't get the client to highlight the "match". I put down the foreground/background colors correctly, and check the box, but the matched text does not highlight. Althouh the trigger itself now works perfectly.

    Any ideas?
    Post edited by Qahnaarin on
  • AntoniusAntonius Member Posts: 4,769 @@ - Legendary Achaean
    1. I doubt you need to worry about formatting too much, provided they're all valid commands. I suspect variables would work, though I didn't have a need to test it while I was playing on the client.
    2. I think it says that gagging and highlighting are experimental right now, so they may not actually work at all.

    Might be worth asking about gagging and highlighting in the HTML5 Client questions thread: http://forums.achaea.com/discussion/65/html5-client-questions-and-such
    Qahnaarin
  • AntoniusAntonius Member Posts: 4,769 @@ - Legendary Achaean
    @Qahnaarin: "Also not quite sure, do I need to "escape" other signs such as "!" or "?" as well?"

    Yes for ?, you shouldn't need to for !. However, escaping a character that isn't a special character shouldn't make a difference: \! and ! should both work identically. I know some people who escape all punctuation characters just to be safe.

    A couple of useful links:

    Regular expression cheatsheet

    MDN entry for JavaScript's RegExp object

    Worth noting that JavaScript doesn't have a full regex implementation. It doesn't support lookbehind assertions, but does support lookahead. I can't imagine that being an issue for you, though.
  • QahnaarinQahnaarin Member Posts: 11
    Thanks very much for the links, just what I was looking for.
  • QahnaarinQahnaarin Member Posts: 11
    The client comes with "on load" function, and I'm having trouble with sending a direct command to mud. For example I want SELFISHNESS to be executed on load, I put in: send_direct"selfishness". Is this wrong? The Mud replies either "ReferenceError: selfishness is not defined" or "SyntaxError: missing ; before statement". I tried putting ; before "selfishness", but that didn't seem to help. Am I just doing this completely wrong?
  • EldEld Member Posts: 3,946 @@ - Legendary Achaean
    I would guess that you need to do
        send_direct("selfishness");
    I'm not real up on Javascript, but I don't think it supports leaving the parentheses out of function calls. 
    Qahnaarin
  • SaevaSaeva Member Posts: 1,939 @@ - Legendary Achaean
    You don't write things quite the same as you would with lua.
    @Qahnaarin, if you messaged Cidusii he might be able to help you.
    He's a pretty busy fella but there might be a chance he's look over what you're inputting and tell you where the error is. He's gotten pretty good manipulating that client.


    Qahnaarin
  • QahnaarinQahnaarin Member Posts: 11
    Thank you Eld, that was it. And Saeva, thanks as well. I will keep that name in mind in case I have more problems.

Sign In to Comment.