Battlerage Script

Hello,

Been working on making a simple battlerage script for hunting so I can use the new skills in conjunction with my normal ones. However, when I try to use it, nothing happens. Was wondering if someone could look and tell me what is going on please?

function bash ()
if myRage > 50 and spinningbackfist and tornadokick then
	send("tnk " .. target)
	send("sbp " .. target)
	send("combo " .. target .. " sdk ucp ucp")
elseif myRage > 36 and tornadokick then
	send("tnk " .. target)
	send("combo " .. target .. " sdk ucp ucp")
elseif myRage > 14 and spinningbackfist then
	send("sbp " .. target)
	send("combo " .. target .. " sdk ucp ucp")
elseif myRage > 14 then
	send("combo " .. target .. "sdk ucp ucp")
end
end
Thank you in advance for any help that can be given.

Comments

  • I don't know anything about scripting, but you want to send your combo first just in case it kills the target, in order to save/use battlerage more efficiently. You can use BR off balance.

  • Also there is a 1s delay between the Rage abilities now, so you can't send 2 or 3 together.




    Penwize has cowardly forfeited the challenge to mortal combat issued by Atalkez.
  • so I made some progress with the script. Starting to get it to fire up until a certain point. So now my new question is this...how do I set a variable to true using an if then statement? I.E. if myRage => 14 then rage.spinningbackfist = true.

    Thanks for the help.
  • That's pretty much exactly it. (Re: Your original question, I suspect myRage was stored as a string or spinningbackfist/tornadokick weren't initialized).

    To the second question

    if myRage => 14 then
        rage.spinningbackfist = true
    end

    If this is giving you problems, ensure the rage table is created beforehand. I suggest having a table created in a script with all relevant variables made to prevent non-firing.
    image
    Cascades of quicksilver light streak across the firmament as the celestial voice of Ourania intones, "Oh Jarrod..."

  • edited June 2015
    Jarrod said:
    That's pretty much exactly it. (Re: Your original question, I suspect myRage was stored as a string or spinningbackfist/tornadokick weren't initialized).

    To the second question

    if myRage => 14 then
        rage.spinningbackfist = true
    end

    If this is giving you problems, ensure the rage table is created beforehand. I suggest having a table created in a script with all relevant variables made to prevent non-firing.
    Well, the first issue I found is at the end...I had it set for myRage > 14 then send the combo...when it should have been =< 14. The next issue I have is that the variables are showing false and not switching to true when I have the right amount of rage thus the question.

    Thank you very much for the help!!

    So gave it a shot...keep getting an error...

    Lua syntax error:[string "function trigger123()..."]:4:'then' expected near '='

    Anyone able to translate?
  • edited June 2015
    Paste line 4 from your trigger script here, or the whole trigger but it should be a problem with the fourth line. Since it's a syntax error, you might have done something like 'if something = this then' instead of 'if something == this then', but there are a number of things that could have happened.

  • myRage = tonumber(string.match(gmcp.Char.Vitals.charstats[2], "%d+"))


    if myRage => 14 then

    rage.spinningbackfist == true

    end


  • edited June 2015
    myRage = tonumber(string.match(gmcp.Char.Vitals.charstats[2], "%d+"))


    if myRage => 14 then

    rage.spinningbackfist = true

    end


    == compares two variables, = assigns a value to a variable.


  • Tried it both ways, it still gives the error.
  • edited June 2015
    Sorry, this should work.

    if myRage >= 14 then
    rage.spinningbackfist = true
    end
  • Woot! Looks like it is working now. @Karai you are awesome!! And thank you @Jarrod too!! Greatly appreciated
Sign In or Register to comment.