Envenoming/Juggling/Throwing Alias

Okay, so I have this alias I need help on - https://hastebin.com/welucafehu.lua

1) 1DaggerNumbersGoHere, 2DaggerNumbersGoHere, 3DaggerNumbersGoHere are obviously supposed to specific daggers based on the venom that had been applied. I don't know how to make a script/alias/trigger that would set it. 

2) I'm not fully sure how the queueing works, so, I need help there, too.

Just a BTW - 
^tj (g|c|k|v|s)(g|c|k|v|s)(g|c|k|v|s) (\w+)$
- is my pattern.

Please and thanks? :D

Comments

  • edited March 2017
    Wait, I figured out what I could do  :D I could make a trigger that sets each dagger a variable (or something), and then use that. Nevermind, there are three daggers.

    I'd still like help, if there's a more sophisticated way, though.
  • First off I would using throwing axes instead of daggers, they are a tiny bit faster.

    Second, I can't comment on the actual code of alias and whether it's correct or not.

    Third, you're over complicating it a little bit. You don't need to use specific weapon numbers, and you don't need to do envenom dagger;throw dagger. You can do throw dagger at cooper curare and it will automatically throw a dagger with curare on it.

    Since you're just starting out, pre-deciding what venoms to use in one alias is okay, but down the road you'll want to pick the venoms based on what your opponent is curing.

    When I was jester (RIP lucrescent nuts) I did all my throwing on the keypad of my keyboard.

    0 = stand/unwield blackjack/juggle stop/get axe/get axe/get axe/juggle axe axe axe
    1 = kalmia
    2 = slike
    3 = gecko
    4 = aconite
    5 = curare
    6 = use itch powder
    7 = vernalius
    8 = voyria
    9 = epteth
    Others as necessary.


  • Wow, I did not know that was a thing. Thanks.
  • Try using tables for the alias, and local variables.

    Local table = {
    c = "curare",
    k = "kalmia",
    Etc.,
    }

    local v1 = table[matches[2]]
    local v2 = table[matches[3]]
    local v3 = table[matches[4]]

    Send("stand/unwield blackjack/get dagger/get dagger/get dagger/juggle dagger dagger dagger/queue add eqbal throw dagger at "..targer.." "..v1.."/queue add eqbal throw dagger at "..target.." "..v2.."/queue add eqbal throw dagger at "..target.." "..v3) 

    At least, i think you can create local variables in an alias, but there may be a more efficient way.  I create functions for those types of things.

  • May be typos in there, as im on mobile, but you get the idea

  • Yea, I got it, I just have no clue how to use tables yet, lol. I have made a script (??) that has the above in it, so I can go straight to it once I learn more.
  • Putting that in the script section for your alias, replacing target with your target variable, and removing the etc. bit from the table should work. 

    Basically, a table (there are different types, btw) can be used to create a set of keys and values that you reference like a dictionary, where the key is the word and the value is the definition you want. So in my table, the key k returns the value kalmia,  and you just tell it where to find it. So table[k] is the same as "kalmia". Further, any time you do table[any thing here] if it matches a key in the table, it will return a value. 

    Im sure some of my nomenclature is technically incorrect, but thats how i think of it. The local bits above are just to let you create variables that only exist inside that alias, so you dont need unique names and such. 

Sign In or Register to comment.