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

Key Toggles

WynedereWynedere Member Posts: 305 ✭✭✭✭ - Eminent
I want to make keys that can be switched from one mode to another. In this one, I want to do one thing while in dragonform, or another when in lesser form. I also want to account for slowcuringmode for an additional option while in dragonform. In addition to all this, I want this same key to be able to be toggled between two modes: one for arm/leg/centreslashes and compassslashes. This is what I have thus far:

if gmcp.Char.Status.race == "Dragon" then
send("rend " .. target .. " left arm")
if not svo.inslowcuringmode() then
send("breathgust " .. target)
end

elseif gmcp.Char.Status.race == "Grook" and slash == true then
send("armslash " .. target .. " left")

elseif gmcp.Char.Status.race == "Grook" and slash == nil then
send("compassslash " .. target .. " east")

end


I have an alias that does the following in order to toggle between the two lesser form attacks:

if slash == nil then
checho("\nSLASH MODE ON!")
slash = true

elseif slash == true then
cecho("\nCOMPASS MODE ON!")
slash = nil
end


Obviously, it doesn't work. I'm doing something wrong, but since coding isn't really my thing, I'm not sure what. Any help would be highly appreciated.

Comments

  • XliXli Member Posts: 354 ✭✭✭ - Distinguished
    Change if slash == nil then to if not slash or slash == false then (you check later for true/false, unitialised variables default to nil)

    Change elseif slash == true then to else

    Change slash = nil to slash = false (you check later for true/false)

    Change elseif gmcp.Char.Status.race == "Grook" and slash == true then
    send("armslash " .. target .. " left")

    elseif gmcp.Char.Status.race == "Grook" and slash == nil then
    send("compassslash " .. target .. " east")


    to

    elseif slash == true then
    send("armslash "..target.." left")
    else
    send("compassslash "..target.." east")
    (if you're not dragon, you must be grook, so why explictly check?)

    I can't guarantee the above is correct, but probably more correct than what you had before!
    Hiroma tells you, "I just got to listen to someone complain about your deadly axekick being the bane of their existence."
    Archdragon Mizik Corten, Herald of Ruin says, "Man, that was a big axk."
    Hellrazor Cain de Soulis, Sartan's Hammer says, "Your [sic] a beast."
  • MishgulMishgul ROTHERHAAAAAAAAAAAAAAAMMember Posts: 5,314 @@ - Legendary Achaean
    edited January 2014
    .

    -

    One of the symptoms of an approaching nervous breakdown is the belief that one's work is terribly important

    As drawn by Shayde
    hic locus est ubi mors gaudet succurrere vitae
  • WynedereWynedere Member Posts: 305 ✭✭✭✭ - Eminent
    edited January 2014
    Nevermind. Got it figured out now. Thanks for the help!

Sign In to Comment.