Skip to content

Scripting with Thespia songs in flash client

i'm looking for a script to put into the flash client that will

wield panpipes play panpipes
sing restoration me

gain equilibrium

sing requiem me 

gain equilibrium

wield drum
play drum
sing ward me

gain equilibrium

sing empower me

I don't know how to do this so please let me know 

Comments

  • Flash is the in game client, right? If it is, I too want to see this question answered.

  • Hi there! If you mean the client at http://client.imperian.com, I can help you (although there's actually no Flash involved!).

    We're going to create a function. Let's call it "do_cool_stuff" (or whatever you want).
    1. In the Settings window, click the Functions tab, then the New Function button
    2. Make the function name do_cool_stuff or whatever you want
    3. Erase all the default commented code and put this in the "Function Code" block
    // Setup a javascript function for step 1 //
    var song1 = function () {
        send_direct("wield panpipes");
        send_direct("play panpipes");
        send_direct("sing restoration me");

        // The tricky part -- setup a temporary trigger to wait for eq, then run song 2 //
        var trigger = {
            criteria: "You have regained your mental equilibrium\.",      
            code: "song2()" // The super important part! This executes song2() -- the next step in the chain //
        };
     
        add_temporary_trigger(trigger);
    };

    var song2 = function () {
        
        send_direct("sing requiem me");
        
        var trigger = {
            criteria: "You have regained your mental equilibrium\.",      
            code: "song3()"
        };
     
        add_temporary_trigger(trigger);
    };
      
        
    var song3 = function () {
        // Here's another way to send multiple commands in a row //
        send_direct("wield drum|play drum|sing ward me");
            
        var trigger = {
            criteria: "You have regained your mental equilibrium\.",      
            code: "song4()"
        };
        
        add_temporary_trigger(trigger);
    };

    var song4 = function () {
        
        send_direct("sing empower me");
        
    };       

    // Run song1(), the first step //
    song1();

    Once you've pasted that in, hit the "Save" button at the bottom of the page, then go back to the game and try typing do_cool_stuff and then pressing enter.

    Let me know if I can explain anything further or if this doesn't get you what you need!
  • Thanks! But I understand little coding, and while I could just copy and paste this in, I would not know what any of it is should it break, nor could I make new functions after. What language is this written in?

    Regardless of any of that, thanks anyway for the help!
  • Ah, also, would you happen to have a client reccomendation? I have been told ot switch so I can use a mapper.
  • Well, since I wrote the HTML5 client (the one the example was for), I'd have to say that one!  :-D  The language that the scripting is done in is Javascript, by the way.  There are a LOT of javascript tutorials on the web, and the client manual has some pretty basic scripts and things to get you started.

    Mudlet is the most popular (and also free) client you'll find people using.  Lots of scripts and support available from fellow players.  Whichever you choose, just keep having fun with it!

  • edited December 2012
    Mudlet is also fairly complicated. If you're not into learning a complex language, you may want a simpler client. MM2k6 is my favored client(and it's also free), but I'm one of a small handful of people that still uses it. zMUD/cMUD are also popular choices.

    Anyways, regarding the scripting problem, the prior approach is kind of clumsy, in my opinion. I hate chained temp triggers(I use them all the time, admittedly, I just hate having to do it).

    This is how I would handle it in MM2k6.

    /alias {songme} {sing restoration me;queue eqbal sing requiem me;/enablegroup autosong} {thespia}
    /action {<requiem message goes here>} {queue eqbal sing ward me} {autosong}
    /action {<ward message goes here>} {queue eqbal sing empower me;/disablegroup autosong} {autosong}

    That's it. It takes advantage of a recent classlead change to handle all the wielding and playing, and each song is simply triggered to use the queue system to set up the next one. You'd just do "songme" to start the buffing process on yourself. The /enablegroup and /disablegroup stuff simply ensures that those triggers only fire when activated by the "songme" command, so that if you ever use requiem or ward by themselves, you don't start burning eq on other songs automatically.

    You could set something like this up quite simply in most any client that uses triggers with no need to mess with temporary triggers and equilibrium triggers and whatnot.

    The aforementioned classlead change, for reference:
    THESPIA:
    - If you are not playing/wielding the required instruments for a song, the SING command will now automatically unwield both hands, wield, and play the
    required instruments.

    "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."

  • Thanks. What language is mudlet/zmud though? I ahve very, VERY basic python, so I am looking for the easiest.
  • Mudlet is lua. Cmud uses its own language (zscript) but also supports lua.
    I am the righteous one... 
    the claims are stated - it's the world I've created 
Sign In or Register to comment.