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

script help

Can anyone help me with a script I'm trying to create?

I want to be able to hit one buttom (alt+1 for example) and have it scroll through different abilities, let's say arash stance, mir stance and thyr stance.  Then I when it scrolls to say mir stance I want to be able to hit (ctrl+1) to activate that ability.

Anyone able to show me how I could create a script for this?

Comments

  • AntoniusAntonius Member Posts: 4,926 @@ - Legendary Achaean
    edited May 2014

    What client are you using? That makes a pretty substantial difference.

    General theory:

    Have a list (array) of commands you want to cycle through. Have a counter that keeps track of the current position in the list. Have your key combination move to the next entry in the list (accounting for rolling around to the start when necessary), display the command that will be executed. Have your other key combination (CTRL+1) send that command.

  • KhalisarKhalisar Member Posts: 5

    I'm on mudlet

  • JonathinJonathin Grand Rapids, MIMember Posts: 3,323 @@ - Legendary Achaean
    edited May 2014

    I made a function specifically to cycle through table entries forward and backward. One sec and I'll find it.

    http://forums.achaea.com/discussion/1982/lua-table-function#latest


    Make a table:

    stanceTable = {"arash","mir","thyr","whatevertheotheroneis"}


    Then put this as your "alt-1" macro
    cycleTable("next",stanceTable)

    Then put this as your "ctrl-1" macro
    send(stanceTable[1])



    My site will remain up, but will not be maintained. The repository will continue to have scripts added to it if I decide to play another game. Maybe I'll see you around in Starmourn!
    Tutorials and scripts  The Repository

    Dalran
Sign In to Comment.