You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

RoMage

rustyx is lame rogue

Posts: 2,694

Location: web

Occupation: DB Admin

Mood: Unsure

  • Send private message

941

Thursday, February 21st 2013, 4:41pm

Quoted from "Peryl;589758"

That explains the movement oddity. Since TS is an area of effect spell, this may explain the movement if the game moves you in range of the location you are trying to cast it on.

As to the game moving you while merely hovering the mouse, well that would appear to be a bug (a bug! ... gasp, say it ain't so!) though it occurs to me that you could use that as a "feature" (or minor exploit, depending on your view) by running around with the mouse cursor prepped for casting TS and you'd be a mere click away from casting it. Dunno if that would work but hey...


Well, usually if I run and cast TS, I would not notice it, except in rare occasions when character would move in opposite directions, or sideways. Mostly, when I notice it is when you stay in one place and try to cast TS as fast as possible. For example in CoT. You can't predict when and if it will happen.

RoMunited

Professional

Posts: 889

Location: Reni

  • Send private message

942

Saturday, February 23rd 2013, 5:34am

When I try to use my Diyce (unfinished still) in-game to test how things are going I get an error message that tells me that my macro's attempt to call KillSequence resulted in a nil value

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

943

Saturday, February 23rd 2013, 5:59am

That message means that it doesn't know what KillSequence is. The likeliest cause is that you have an error in the function and so it didn't actually load the function.

You should have a glowing icon next to the minimap with a description of the error, but it doesn't always show it. If you don't then try the following:

Source code

1
/run for i,v in ipairs(BUG_MESSAGE_LIST) do DEFAULT_CHAT_FRAME:AddMessage("['..i..']  "..v) end



Edit:
Took a very quick look at the code you posted. You have several lines that are effectively blank and have a use = with nothing following it. This is a no-no in Lua. Either put a value of false for these lines (this makes sure DIYCE wouldn't try to use these lines) or simply comment these lines out.
2013... The year from hell....

RoMunited

Professional

Posts: 889

Location: Reni

  • Send private message

944

Saturday, February 23rd 2013, 6:08am

Quoted from "Peryl;589957"

That message means that it doesn't know what KillSequence is. The likeliest cause is that you have an error in the function and so it didn't actually load the function.

You should have a glowing icon next to the minimap with a description of the error, but it doesn't always show it. If you don't then try the following:

Source code

1
/run for i,v in ipairs(BUG_MESSAGE_LIST) do DEFAULT_CHAT_FRAME:AddMessage("['..i..']  "..v) end


All that message says is that the attempt to use KillSequence resulted in nil value (paraphrasing), no line number or anything else was given

"KillSequence("","DPS")"]:1: attempt to call global 'KillSequence' (a nil value)

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

945

Saturday, February 23rd 2013, 6:11am

That's the error from the macro itself, you likely have other errors as well. Click the previous button to see those though it sometimes doesn't like to show the first error (hence the macro I posted which will print out all the errors to the chat frame)
2013... The year from hell....

RoMunited

Professional

Posts: 889

Location: Reni

  • Send private message

946

Sunday, February 24th 2013, 4:31am

Quoted from "Peryl;589959"

That's the error from the macro itself, you likely have other errors as well. Click the previous button to see those though it sometimes doesn't like to show the first error (hence the macro I posted which will print out all the errors to the chat frame)

"KillSequence("","DPS")"]:1: attempt to call global 'KillSequence' (a nil value)

Is what I got with the macro you gave me, and ty for the tip

\

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

947

Sunday, February 24th 2013, 6:39am

Well I copied the code above into an editor that understands Lua, and discovered the following issues:

The line numbers I specify will be after each previous edit (since the line will of course change as we go.

Line 1: This should really be two lines (though it probably won't actually affect the code, may as well get this cleaned up). Change it to

Source code

1
2
local WHITE = "|cffffffff"
local SILVER = "|cffc0c0c0"


Line 61: The end statement here is extraneous and causes problems. Probably a remnant from removing other code in this file. Remove this line.

Line 65: Another extraneous end statement. Remove this line.

Line 145: You are checking the player percent health here, but you have a value of 0.1.5 which is not a valid number. Probably should read 0.15 instead. However, the second check after the or statement is also check player percent health with a value of 0.35. Since 0.15 is also less than 0.35, the first check is redundant. I suggest changing this line to:

Source code

1
{ name = "Shield Form",				use =phealth <= 0.35 },


Line 150: You have an extra close parenthesis at the end of this line. Remove one.

Line 151: You are missing a closing brace and comma at the end of this line. Add }, to the very end of this line.

Line 161: You are trying to define the list "Skill 3". First, spaces are not allowed in the name of a variable, second Skill3 doesn't exist and third, there is no need to define a third list. Check this line to read:

Source code

1
Skill2 = {


Line 163: You are again missing a closing brace and comma at the end of this line. Add }, to the very end of this line.

Line 167: Yet again you are missing a closing brace and comma at the end of this line. Add }, to the very end of this line.

Line 168: Again there is an extra close parenthesis at the end of this line. Remove one.

Line 169: Once again you are missing a closing brace and comma at the end of this line. Add }, to the very end of this line.
2013... The year from hell....

RoMunited

Professional

Posts: 889

Location: Reni

  • Send private message

948

Sunday, February 24th 2013, 3:43pm

Quoted from "Peryl;590038"


Line 145: You are checking the player percent health here, but you have a value of 0.1.5 which is not a valid number. Probably should read 0.15 instead. However, the second check after the or statement is also check player percent health with a value of 0.35. Since 0.15 is also less than 0.35, the first check is redundant. I suggest changing this line


Thank you for the fixes :) sorry about my endings

For Shield Form I want it to be used (after more thinking) under 10% hp. Then for it to be used once again after 20% hp to return me to my normal state (you can't right-click the buff to remove it, you need to use the skill to remove it). I only want Shield form to be used once after I get above 20% because I lose strength and thus physical attack from going into shield form

^extra pdef and health might save me while I wait for heals

I didn't show that in my code though :/. I could probably create a timer and then get some cheap pots to use that would end the timer, but if there is an easier way.....

I also updated my DIYCE function from my last post, so unless this thread goes to another page I won't be spamming my un-finished diyce :P.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

949

Monday, February 25th 2013, 1:38am

Quoted from "RoMunited;590061"

For Shield Form I want it to be used (after more thinking) under 10% hp. Then for it to be used once again after 20% hp to return me to my normal state (you can't right-click the buff to remove it, you need to use the skill to remove it). I only want Shield form to be used once after I get above 20% because I lose strength and thus physical attack from going into shield form

Then you'll want the skill twice in the list. The first is for turning it on, the second for turning it off. For turning on Shield form, do the health check for 10% as well as (use and) checking that you do not currently have the buff on you (I'm assuming it places a "buff" on you when you enter shield form).

For turning it off, check that your health percentage is at or above 20% and you do in fact have Shield Form active (again I'm assuming the buff is present in this case).
2013... The year from hell....

RoMunited

Professional

Posts: 889

Location: Reni

  • Send private message

950

Tuesday, February 26th 2013, 1:07am

Quoted from "Peryl;590096"

Then you'll want the skill twice in the list. The first is for turning it on, the second for turning it off. For turning on Shield form, do the health check for 10% as well as (use and) checking that you do not currently have the buff on you (I'm assuming it places a "buff" on you when you enter shield form).

For turning it off, check that your health percentage is at or above 20% and you do in fact have Shield Form active (again I'm assuming the buff is present in this case).


Source code

1
2
3
{ name = "Shield Form",                use = (phealth <= 0.10) and (not pbuffs['Shield Form']) },

{ name = "Shield Form",                use = (phealth >= 0.20) and (pbuffs['Shield Form']) },


This.....right?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

951

Tuesday, February 26th 2013, 2:48am

As long as "Shield Form" is indeed the name of the buff then yes, that should be correct. If it has trouble with the buff as a name, you can try using the buff ID instead (use the ID the same way as the name, but do not put it in quotes).

If you don't know what the ID is, you can run KillSequence with the first parameter of "debugbufflist". The first buff list shown are the player buffs (if any). There is also a macro I wrote up floating around the forums (I think it is in the "useful macros" thread) that can show you the player buffs.
2013... The year from hell....

RoMunited

Professional

Posts: 889

Location: Reni

  • Send private message

952

Tuesday, February 26th 2013, 3:04am

Quoted from "Peryl;590187"

As long as "Shield Form" is indeed the name of the buff then yes, that should be correct. If it has trouble with the buff as a name, you can try using the buff ID instead (use the ID the same way as the name, but do not put it in quotes).

If you don't know what the ID is, you can run KillSequence with the first parameter of "debugbufflist". The first buff list shown are the player buffs (if any). There is also a macro I wrote up floating around the forums (I think it is in the "useful macros" thread) that can show you the player buffs.


Thanks :D

"KillSequence("","DPS")"]:1: attempt to call global 'KillSequence' (a nil value)

Though because of this error, I still am not able to test the stuff I've already got

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

953

Tuesday, February 26th 2013, 3:16am

Well then there is still an error in the code somewhere so go over it carefully.

Basically, what is happening when you get that error is that when RoM goes to load the add-on, it encounters a compile error and aborts. Since it aborted, the function itself doesn't exist and Lua treats things that don't exist as having the value nil. Hence the error message.

Edit:
Looking at the last code you posted previously, there doesn't appear to be any errors that would stop the function from being defined. There appears to be some errors in the code itself, but lets start with getting the function defined properly.
2013... The year from hell....

RoMunited

Professional

Posts: 889

Location: Reni

  • Send private message

954

Tuesday, February 26th 2013, 3:32am

Quoted from "Peryl;590190"

There appears to be some errors in the code itself, but lets start with getting the function defined properly.

What do you mean by that?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

955

Tuesday, February 26th 2013, 3:56am

Quoted from "RoMunited;590192"

What do you mean by that?

There are compile errors that effectively stops Lua from actually generating executable code for the code provided, then there are errors that, due to the way Lua works generates "something", but will stop the code from actually working.

Anyway, the compile error bugs are:
Line 1: You are missing a closing double quote on this line. Add " to the end of this line.

line 159: You have an extra open parenthesis after pbuffs. Remove it. The section in question should read:

Source code

1
(pbuffs['Shield Form'])




Now for some of the logic bugs:
Line 155: You are missing the word and in here. The line should read:

Source code

1
        if enemy and (mode == "DPS") then

As originally written, it would attempt to call a function called enemy with a true/false parameter depending on whether or not mode is equal to "DPS".

Line 160: The use clause here is missing an and between then two checks in parenthesis. It should read:

Source code

1
use = (EnergyBar1 >= 20) and (silenceThis)


Line 161: The use of ("Rune Growth") here is incorrect. I'm not sure if you are checking for player or target buffs/debuffs or if it is merely a remnant from something else. As written, it wouldn't actually do any harm, but it serves no actual purpose.

Line 178: This is the same error as line 160. Same change to be done here.

Line 179: This is the same basic error as Line 161 (with a different skill name).

Line 182: I take it you still need to fill this one out as I'm unaware of any mobs called insert mob's name here :D
2013... The year from hell....

RoMunited

Professional

Posts: 889

Location: Reni

  • Send private message

956

Tuesday, February 26th 2013, 4:36am

Quoted from "Peryl;590193"


Line 182: I take it you still need to fill this one out as I'm unaware of any mobs called insert mob's name here :D

I farm them for insert item's name here....anyhooo

I edited my post above and my customfunctions with the changes you suggested, but when I go into the game I still get the same error message. I tried using "farm", but that didn't work either

For tank:

Source code

1
elseif enemy and (mode == "tank") and pbuffs("Shield Form") then


Would that work as a way of making me only able to use the sequence when in shield form?, and would there be a way to make me switch from "DPS" to "tank", the tank sequence without moving buffs around? (e.g tank dies and need someone to take aggro fast, but who would want to tank for those sucky healers) This would also need to switch dps gear to tanking gear. Maybe even I would be able to go so far as for diyce to recognize the "main tank" that you can set in a raid, and then if that player dies I switch, just in case I don't notice the screaming in vent.

^I should brainstorm elsewhere

Though, I'm just happy with the diyce actually working :D

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

957

Tuesday, February 26th 2013, 5:35am

Quoted from "RoMunited;590195"

I farm them for insert item's name here....anyhooo

Meh... I never liked that item ;)

Quoted from "RoMunited;590195"

Source code

1
elseif enemy and (mode == "tank") and pbuffs("Shield Form") then


Would that work as a way of making me only able to use the sequence when in shield form?

The idea is sound, but pbuffs isn't a function but a list, so you have to use square brackets instead of parentheses.

Quoted from "RoMunited;590195"

would there be a way to make me switch from "DPS" to "tank", the tank sequence without moving buffs around? (e.g tank dies and need someone to take aggro fast, but who would want to tank for those sucky healers) This would also need to switch dps gear to tanking gear. Maybe even I would be able to go so far as for diyce to recognize the "main tank" that you can set in a raid, and then if that player dies I switch, just in case I don't notice the screaming in vent.

Well it is technically possible, but would involve large amounts of coding. Easiest is to simply have different macros for each one.

You could also make a more complex macro that would do the work for you. If you can spare the focus frame slot, you could put the tank as the first focused unit and check their health that way. If they are alive, do the DPS version, if not do the tank version. For the gear swap, you can first check if you have the correct gear and if not do the gear swap otherwise do the DIYCE call.

This assumes that you have a function defined that does the actual gear swapping and another that checks for correct gear.

Source code

1
2
/run if UnitExists("focus1") and UnitHealth("focus1") > 0 then if CheckGear("DPS") then KillSequence("","DPS") else SwapGear("DPS") end end
/run if UnitExists("focus1") and UnitHealth("focus1") <= 0 then if CheckGear("tank") then KillSequence("","tank") else SwapGear("tank") end end


Anyway, I need to get to bed as my brain is turning to mush, so I'll have to get back to you for the rest.
2013... The year from hell....

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

958

Wednesday, February 27th 2013, 2:09pm

Okay, took another look at your code and it seems all right at this point so there is probably something else failing. As you were not getting any errors at all in-game, I'm guessing it is the .toc file that is either bad or missing. Can you post the contents of that file?
2013... The year from hell....

RoMunited

Professional

Posts: 889

Location: Reni

  • Send private message

959

Thursday, February 28th 2013, 6:20am

Quoted from "Peryl;590656"

Okay, took another look at your code and it seems all right at this point so there is probably something else failing. As you were not getting any errors at all in-game, I'm guessing it is the .toc file that is either bad or missing. Can you post the contents of that file?


Source code

1
DIYCE.lua

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

960

Thursday, February 28th 2013, 6:23am

That's the problem then. You never actually load CustomFunctions.lua and therefore KillSequence is never being defined.
Change your .toc file to:

Source code

1
2
DIYCE.lua
CustomFunctions.lua

Make sure the filename is correct (that includes case sensitivity).
2013... The year from hell....