Looking for more active discussion? Join our Discord at https://discord.gg/x2s7fY6

Combat alias

I'm trying to write an alias set for combat so I can cycle through frenzy or claw and be able to pull my whispers off a list/table so that I can hit the alias and cycle my whispers without having to have 50 aliases for combat.

Done a number of things and only been able to get the primary attack to fire, so I ripped it all out and am starting fresh. Any assistance would be greatly appreciated.

Comments

  • AshmerAshmer Barefoot Adventurer Life
    Which client/language are you coding the script in?

    the way she tells me I'm hers and she is mine

    open hand or closed fist would be fine

    blood as rare and sweet as cherry wine

  • I'm on mudlet, so I think that's Lua.
  • edited August 2014
    To elaborate.

    I'm attempting to make an alias that will look, similar to this, but work.


    local nextWhisper = getNextPriority("whisper", 2)
    send("claw " ..target)
    send("dwhisper " "..whisper[1].." " ..whisper[2].. " ..target)
    send("qe contemplate " ..target)

    Claw works, contemplate won't fire and I can't get the whispers to work properly.
  • local nextWhisper = getNextPriority("whisper", 2)
    send("claw " ..target)
    send("dwhisper " "..nextWhisper[1].." " ..nextWhisper[2].. " ..target)
    send("qe contemplate " ..target)


    nextWhisper is the array you made, not whisper. Because of that, contemplate won't fire - mudlet scripts freak out when you try to use a non-existing value.

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

  • edited August 2014
    Okay.

    Lua syntax error:[string "function alias568()..."]:4 ')' expected near '"..nextWhisper[1].."'

    local nextWhisper = getNextPriority("whisper", 2)
    send("claw " ..target)
    send("dwhisper " "..nextWhisper[1].." "..nextWhisper[2].." ..target)
    send("qe contemplate " ..target)

    also, table is
    pvp.priority.whisper = pvp.priority.whisper or {}
    pvp.priority.whisper.fallback = "normal"

    pvp.priority.whisper.normal = {
    "Seduction",
    "Temptation",
    "Impatience",
    "Confusion",
    "Epilepsy",
    "Loneliness",
    "Recklessness",
    "Stupidity",
    "Masochism",
    "Dementia",
    "Peace",

    }
  • edited August 2014
    Fixed the alias so the bug was gone, but is inactive. As in, I type in the alias command and it does nothing. No claw, whispers or contemplate.

    Edit:

    Got it to claw but still not getting whispers or contemplate to fire.
  • TozToz
    edited August 2014
    local nextWhisper = getNextPriority("whisper", 2)
    send("claw " ..target)
    send("dwhisper " "..nextWhisper[1].." "..nextWhisper[2].." "..target)
    send("qe contemplate " ..target)

    You missed a " on the second to last line - I missed it too the first time over. That's where that error was coming from. Not sure what you're at now/what you've done.

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

  • Lua syntax error:[string "function alias568()..."]:4 ')' expected near '"..nextWhisper[1].."' is popping up again
  • Re-paste your code?

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

  • alias

    local nextWhisper = getNextPriority("whisper", 2)
    send("claw " ..target)
    send("dwhisper " "..nextWhisper[1].." "..nextWhisper[2].." "..target)
    send("qe contemplate " ..target)

    table

    pvp.priority.whisper = pvp.priority.whisper or {}
    pvp.priority.whisper.fallback = "normal"

    pvp.priority.whisper.normal = {
    "Seduction",
    "Temptation",
    "Impatience",
    "Confusion",
    "Epilepsy",
    "Loneliness",
    "Recklessness",
    "Stupidity",
    "Masochism",
    "Dementia",
    "Peace",

    }
  • send("dwhisper " "..nextWhisper[1].." "..nextWhisper[2].." "..target)

    should be

    send("dwhisper "..nextWhisper[1].." "..nextWhisper[2].." "..target)

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

  • That got it! Thank you sir!
  • Kraz said:

    That got it! Thank you sir!

    Yep, I just overlooked something simple both times. ("Anything in here is a string," ..anything out here is a variable.. " and now we're back to strings, which have to be closed")

    If you get that error or one like it again, check your quotation marks first, then make sure variables exist.

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

  • Of course.

    If I want to set up a list for venoms and have an active one would I have to rename the whisper list to match or should it use that primary list as a fall back since I have no others?
  • The way modes work on TW, you'd just set up a new table with the same name and reference THAT. Example:

    You have:

    pvp.priority.whisper = pvp.priority.whisper or {}
    pvp.priority.whisper.fallback = "normal"

    pvp.priority.whisper.normal = {
    "Seduction",
    "Temptation",
    "Impatience",
    "Confusion",
    "Epilepsy",
    "Loneliness",
    "Recklessness",
    "Stupidity",
    "Masochism",
    "Dementia",
    "Peace",

    }


    So make:

    pvp.priority.venom = pvp.priority.venom or {}
    pvp.priority.venom.fallback = "normal"

    pvp.priority.venom.normal = {
    "your",
    "venoms",
    "here",
    }


    So long as you make a matching pair for each mode, you'll be fine.

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

  • So it would come out as the following for using a venom right?

    local nextVenom = getNextPriority("venom",1)
    local nextWhisper = getNextPriority("whisper", 2)
    send("slash " ..target " with " ..nextVenom[1])
    send("dwhisper " ..nextWhisper[1].." "..nextWhisper[2].." "..target)
    send("qe contemplate " ..target)
  • send("slash " ..target.. " with " ..nextVenom[1])

    but otherwise, yeah, looks fine.

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

    Kraz
Sign In or Register to comment.