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.

1,241

Saturday, December 28th 2013, 3:17pm

Hmm, guess I am stuck.

Got the bleed ID's from Shadowstab, Low Blow, Sneak Attack and Blind Spot from both Rogue/Warden and Rogue/Scout.

Rogue/Scout

Shadowstab Bleed ID
-500654
Low Blow Bleed ID
-620314
Blind Spot Bleed ID
-620297
Sneak Attack Bleed ID
-500726
-----------------------------
Rogue/Warden
Shadowstab Bleed ID
-620313
Low Blod Bleed ID
-620314
Blind Spot Bleed ID
-620297
Sneak Attack Bleed ID
-500726

The code I wrote so far looks like below, cant get right on the "and" / "or" and "not".

Source code

1
2
3
					{ name = "Wound Attack",                   	use = (EnergyBar1 >= 35) and (tbuffs[620314]) and (tbuffs[620313]) and (tbuffs[500654]) and (tbuffs[620297]) },
					{ name = "Low Blow",                       	use = ((EnergyBar1 >= 30) and (tbuffs[620313]) or (not tbuffs[620314]) or (pvp)) },
					{ name = "Shadowstab",                     	use = (EnergyBar1 >= 20) and (not tbuffs[500654]) and (not tbuffs[620313]) and (not tbuffs[620297]) },


The goal once again is to cast Wound Attack if the target got bleeds from SS/LB from either myself or a other R/S or R/Wd.
Thesame goes for Low Blow, cast it only if the target got the Shadowstab bleed from either a R/Wd or a R/S (or myself).
Cast Shadowstab on the target if the target doesnt have a Shadowstab bleed from a R/Wd or R/S (or myself)
When those 3 works as described the goal is spam Low Blow untill Wound Attack gets off cooldown. Took this idea from the R/S and spam Low Blow if Energy Thief is up. As said before, this is a build for a R/M. Trying to maximaze the DPS and leech on other bleeds from other rogues. Thats why I'm looking for advices, should I do as the R/S with spamming Low Blow or is it better that I keep my energy up for Wound attacks?

The Throw/Combo Throw are there too, will be shown when I get this right.
Thanks in advance,
-B

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,242

Saturday, December 28th 2013, 10:27pm

As to the how to play the skills for a rogue (save energy for wa or not), cike or another rogue will have to answer that. As for the code...

I would group things a bit differently. Also, instead of so many "and"s, you should be using more "or" statements. "and" checks to see if they are ALL present, if not skip the line..."or" checks if any of them are present, if even one is, execute that line.

Source code

1
2
3
	{ name = "Wound Attack",    use = (EnergyBar1 >= 35) and (tbuffs[620314]) and ((tbuffs[620313]) or (tbuffs[500654]) or (tbuffs[620297])) },
	{ name = "Low Blow",        use = (EnergyBar1 >= 30) and ((tbuffs[500654]) or (tbuffs[620313]) or (tbuffs[620297])) and (not tbuffs[620314]) or (pvp)) },
	{ name = "Shadowstab",      use = (EnergyBar1 >= 20) and ((not tbuffs[500654]) or (not tbuffs[620313]) or (not tbuffs[620297])) },


Overall, good way to make this work. Good idea here to make sure to leach bleeds to maximize dps.

1,243

Saturday, December 28th 2013, 11:16pm

Thanks for the description and for the help ghostwolf82.

The code is as follow:

Source code

1
2
3
					{ name = "Wound Attack",					   use = (EnergyBar1 >= 35) and (tbuffs[620314]) and ((tbuffs[620313]) or (tbuffs[500654]) or (tbuffs[620297])) },
					{ name = "Low Blow",    					   use = (EnergyBar1 >= 30) and ((tbuffs[500654]) or (tbuffs[620313]) or (tbuffs[620297])) and (not tbuffs[620314]) or (pvp) },
					{ name = "Shadowstab",  					   use = (EnergyBar1 >= 20) and ((not tbuffs[500654]) or (not tbuffs[620313]) or (not tbuffs[620297])) },


And its working as intended, it leeches other rouges bleeds from Shadowstab and Low Blow. I used the ID's from a R/Wd and a R/S, feel free to add more bleeds from different Rogue combos if needed.

Another thing I'm wondering about, for example if the target got bleeds from SS and LB and I finish off with Wound Attack and having 0 Energy left, when my Energy reaches to 20 it uses Shadowstab on the target and then keeps spamming Shadowstab, it doesnt wait for the Energy to fill up and to use Low Blow instead.

I know why it does it of course, I'm just asking if its really a good idea to having it like this? Could I move the "(EnergyBar1 >= 20)" to the end of that line? I dont know if moving it to the most end of the row will help because the line will be executed anyhow and it will keep spamming Shadowstab no matter where the "(EnergyBar1 >= 20)" is placed?

Another question to the more experienced Rogmages here, should I add Blind Spot and Sneak Attack to the list? Those two are rare seen on the boss debuff list if none rogue got the opportunity to go behind the target, (and Sneak Attack requires to be not in combat).

Regards,
-B

Cike

Rogue

Posts: 4,171

Occupation: Being Human

  • Send private message

1,244

Sunday, December 29th 2013, 12:43am

i'd keep SS as your bleed origin...no need for SA or BS in pve if ur not r/p or r/d...

i'd add a constraint to SS that restrics it from going off if there is already a SS bleed on the target, as you want your priority list to go WA > LB > SS, so that if you are not refreshing a bleed or using WA, u are using LB(out of the 3)...
my r/p can outdps r/m. your name is stupid.

mages should stack dex. word.

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,245

Sunday, December 29th 2013, 12:45am

Well, for the other skills mentioned, why not add them to the list? It doesn't hurt anything or slow it down to add the checks for those in, just adds more to check for just in case someone DOES end up using one, then you have it covered.

As for SS spammage, the line you have posted there doesn't spam it. You have another line for SS set up somewhere, my guess is at the end of the skill table that just spams it. Remove that, or add more checks in. You could have it check how much longer it will take to regen enough energy to cast a skill versus the time it is taking the group to take down the current mob, and if there isn't enough time then just cast SS, otherwise, wait to save the energy. It will take a LOT of code from you, but if that is really how you see best to do it, then it CAN be done. However, just moving the energy check to the end of the line itself will do nothing. I always just place the energy check at the front to keep the engine from having to delve further into the line than needed. If there isn't enough energy in the first place, no need to keep going through the rest of that particular check.

1,246

Sunday, December 29th 2013, 12:56am

Hmm alright.
Cike could you be a bit more precise please? Having hard to understand the constraint on the SS. How would you constraint it? And by using LB, do you mean to "spam" LB while I have the bleeds up?

This post has been edited 1 times, last edit by "BloodyArrow" (Dec 29th 2013, 2:26am)


Marvengus

Beginner

Posts: 14

Location: Netherlands

Occupation: Mathematician, Scientist

Mood: Smile

  • Send private message

1,247

Sunday, December 29th 2013, 10:18am

Very interesting discussion, since I am also building a R/S rotation. One question pops up: is it better to use id's instead of names for (de)buffs? Does it speed up the script, or have any other advantage? All I can think of is internationalization, which is nice of course.
Marvengo R/S/K (90/90/65)
Marvengus M/D/Wd (85/80/68 )
Playing on Isilitir (EU)
Guild Traumfaenger

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,248

Sunday, December 29th 2013, 3:13pm

The use of an ID over a name harkens back to a time when we had to use "/Bleed" vs "Bleed" to tell the difference between a warriors slash bleed and a rogues shadowstab bleed. The problem stems from within the game itself using similar names for several different debuffs that actually have different ID numbers, and you have to have a way to check for each one of the types. It makes the code more accurate is the biggest benefit. I use mostly ID numbers anymore, just so I know I will have it exactly right and not have to worry about a spelling error.

Cike

Rogue

Posts: 4,171

Occupation: Being Human

  • Send private message

1,249

Sunday, December 29th 2013, 7:50pm

bloody, if you are not using WA, or refreshing the SS bleed, you should be using LB, as it is higher damage than SS...

to constrain SS, I'd just make it such that it casts when energy is greater than 20 AND there is no SS/BS/SA bleed already on the target...

constrain LB such that it casts when energy is simply greater than 40-60(whatever works best for your specific set up), but set it after SS...

put WA before SS, but only to cast when there is a SS/SA/BS bleed AND grevious wound already on the target AND energy is greater than 35...

sorry I can't put it into code ATM, on phone...
my r/p can outdps r/m. your name is stupid.

mages should stack dex. word.

1,250

Sunday, December 29th 2013, 7:59pm

Did some testing with the setup of code I got now (just like the previous posted one, no changes). And took the time to check the Scruntinizer for the amount of SS/LB/WA I do. It turns out to be that I do approx 26 Shadowstab attacks, 1 Low Blow and around 6 Wound Attacks on a fight of 20 seconds or longer.

@ ghostwolf82, I do not have any other line with SS than that, I am quite sure of that, got trough my code several times now, and I only got one line for Shadowstab under the Rogue/Mage section.

The code once again looks like below:

Source code

1
2
3
					{ name = "Wound Attack",					   use = (EnergyBar1 >= 35) and (tbuffs[620314]) and ((tbuffs[620313]) or (tbuffs[500654]) or (tbuffs[620297])) },
					{ name = "Low Blow",    					   use = (EnergyBar1 >= 30) and ((tbuffs[500654]) or (tbuffs[620313]) or (tbuffs[620297])) and (not tbuffs[620314]) or (pvp) },
					{ name = "Shadowstab",  					   use = (EnergyBar1 >= 20) and ((not tbuffs[500654]) or (not tbuffs[620313]) or (not tbuffs[620297])) },


Was thinking of removing the last two ID's from the Low Blow row in hope to do more Low Blows than Shadowstab, because Low Blow hits more than Shadowstab. So that will result in, that I will skip Shadowstab if there is already a bleed of it on the target and do a Low Blow and then Wound Attack, then again Low Blow untill I get out of energy. What do you think about this Cike?

Cike

Rogue

Posts: 4,171

Occupation: Being Human

  • Send private message

1,251

Sunday, December 29th 2013, 8:06pm

I'd put SS ahead of LB, and only have the energy constraint on LB, but you may need to play around with the energy required because you don't want to be completely out of energy when WA come back up, so maybe a 55 energy req. would not be too crazy...

edit: I think the issue you are having is SS is going off regardless of whether SS/BS/SA is on or not...I'd start troubleshooting there...you want SS to be prioritized right after WA, but being skipped if there is already a SS/BS/SA/slash bleed already on the target...
my r/p can outdps r/m. your name is stupid.

mages should stack dex. word.

This post has been edited 1 times, last edit by "Cike" (Dec 29th 2013, 8:12pm)


1,252

Monday, December 30th 2013, 9:44pm

My current setup isnt working correctly, I am only casting Blind Spot and Shadowstab, it is not moving to the other skills in the skill rotation.
Tried with some parameters on the bleed ID's but without progress. Could anyone tell me what I have done wrong and how it should be?
The code looks like below:

Source code

1
2
3
4
 { name = "Wound Attack",                   	use = (EnergyBar1 >= 35) and (tbuffs[620314]) and ((tbuffs[620313]) or (tbuffs[500654])) },
					{ name = "Blind Spot",  					   use = (EnergyBar1 >= 25) and (not tbuffs[620297] or not tbuffs[500654] or not tbuffs[620313]) and (presshift) },
					{ name = "Shadowstab",  					   use = (EnergyBar1 >= 20) and (not tbuffs[500654] or not tbuffs[620313] or not tbuffs[620297]) },
					{ name = "Low Blow",                       	use = (EnergyBar1 >= 40) },


EDIT: Did some changes to the code and got it to work without using any "or" statements in the code. Will this affect the execution of the code because "and" and "or" are two different statements? I have tried all different combinations with the parameters and with "or" statement but then it simply does only Blind Spot and Shadowstab.

The edited looks like below:

Source code

1
2
3
4
					{ name = "Wound Attack",                   	use = (EnergyBar1 >= 35) and (tbuffs[620314]) and ((tbuffs[620313]) or (tbuffs[500654]) or (tbuffs[620297])) },
					{ name = "Blind Spot",                     	use = (EnergyBar1 >= 25) and ((not tbuffs[620297]) and (not tbuffs[620313]) and (not tbuffs[500654]) and (presshift)) },
					{ name = "Shadowstab",  					   use = (EnergyBar1 >= 20) and ((not tbuffs[500654]) and (not tbuffs[620313]) and (not tbuffs[620297])) },
					{ name = "Low Blow",                       	use = (EnergyBar1 >= 40) },


Need help to use some "or" statements if that is better than the "and" in some cases, I'm out of ideas.

Regards,
-B

This post has been edited 1 times, last edit by "BloodyArrow" (Dec 30th 2013, 11:48pm)


1,253

Tuesday, December 31st 2013, 12:39am

here's a quick table for the difference between AND and OR in codes: (read going down in columns)


statement A | true | false | true | false
---------------------------------------------------------
statement b | true | true | false | false
----------------------------------------------------------
A "and" b: | true |false | false | false
---------------------------------------------------------
A "or" b: | true | true | true | false

from this table you can read that A True and B False is False
from this table you can read A False or B True is True

A and B and C and D and E and....Z is true ONLY when all statements are true. If any are false (you check for a buff and it is not there), then this statement will be false. It is ONLY true when ALL A,B,C,D,...Z are true.

A or B or C or D or E.....or Z is true when ANY 1 (or more then 1) is true. It is ONLY false when ALL are false.

Notice how the last statements are "opposites" of each other. Also notice how table values are kind of "opposite".


use = (EnergyBar1 >= 20) and (not tbuffs[500654] or not tbuffs[620313] or not tbuffs[620297])

every time you see "and" label what is on the left as A and what is on the right as B (or some other letter).

use = true only when A and B are true (above rule table).

A is true only when EnergyBar1 >= 20 is true.

B is true when (not tbuffs[500654] or not tbuffs[620313] or not tbuffs[620297]) is true.

using above statements, B is true when ANY of { not tbuffs[500654] , not tbuffs[620313], not tbuffs[620297 } are true.
alternatively, B is false ONLY when ALL of { not tbuffs[500654] , not tbuffs[620313], not tbuffs[620297 } are false.

so here, use = true when: EnergyBar1>=20 + [any of the buffs are not on]
alternatively, use = true when: EnergyBar1>=20 + [NOT (all buffs are on)]

This post has been edited 5 times, last edit by "BlankMinded" (Dec 31st 2013, 12:50am)


1,254

Tuesday, December 31st 2013, 1:38am

Thanks for the explaination BlankMinded, really hard and complicated to understand. Is there any losses or benefits having "and" or "or" in the code, does the code execute faster in any way? If not then it's not worth to change to "or" because I really cant get a hang of it.

1,255

Tuesday, December 31st 2013, 3:32pm

I would like to add another key detect to DIYCE just like with Shift, "local presshift = IsShiftKeyDown()".
I am wondering if I could do thesame with Left Ctrl?
Like: "local pressctrl = isCtrlKeyDown()"

- B

1,256

Tuesday, December 31st 2013, 8:55pm

In regards as to which is "better" between AND and OR, there is no speed difference that you will be able to notice. The difference between them is simply how they work. You can find ways to take an AND statement and turn it into an OR statement, or vice versa, so you can use one all the time instead of the other, but this becomes more complicated -- sometimes its just easier to use "or", and sometimes its just easier to use "and", in order to make the code do what you want it to.

If you need more information on AND and or, you can google search "logical operators" or "logical connectives". Here's a link to the wiki page, http://en.wikipedia.org/wiki/Logical_connective , and I suggest you read the individual pages for the ones you are interested in.



Google search "runes of magic functions" or simply go to this link here: http://runesofmagic.gamepedia.com/List_of_Functions . This is a list of all functions you can use in the game, and is not restricted to Diyce -- you can use any of these functions in a lua based macro (the ones that start with /script or /run ). In fact, many addons use these functions to work.

Search for something along the lines of what you are looking for. For example, searching for "keypress" doesn't find anything, but searching for "keydown" I can find:
IsAltKeyDown()
IsCtrlKeyDown()
isShiftKeyDown()

functions. You can copy same structure as before, and make local pressAlt = IsAltKeyDown(), just put it in a new line underneath the other local variables near the top of KillSequence().
When searching on that page, try to stick with ones that are in white font/text, as these are the ones that you can click on for an explanation on how they work. If you can't find anything using search, try a different search term (keypress vs keydown, Questbook vs questlog, etc.). If all else fails, just start at the top of the list and read the whole thing until you find something that sounds similar to what you're looking for.

In the case you do not find anything suitable, you can always try to make your own, or ask someone on the forums who has programming experience to try and make the function for you.

1,257

Wednesday, January 1st 2014, 7:58pm

Hi,
Once again thanks for the great explaination BlankMinded. I've tried all of the 3 local variables you have showed me.
But somehow none of them works. I have the local variable just below the KillSequence with the rest of the local variables there is.
I did like this:

local pressalt = IsAltKeyDown()

and then using of course the "pressalt" with the skill rotation. The DIYCE works so there isnt a misspell or so, its just that DIYCE doesnt react when I have the "ALT" key down, thesame with "Ctrl".

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,258

Wednesday, January 1st 2014, 8:35pm

Not sure how you are using them in the code, but if you look at the customaction function, you can see an example of how to use them, as such:

Source code

1
2
3
4
5
6
7
8
9
10
function CustomAction(action)
	if CD(action) then
 	   	if IsShiftKeyDown() then Msg("- "..action) end
     	   	g_lastaction = action
     	   	CastSpellByName(action)
     	   	return true
    	else
     	   	return false
    	end
end

1,259

Wednesday, January 1st 2014, 8:54pm

Oh I dont have this function in my version of DIYCE, guess I got a version older than the newest. Are there any importnant changes that has been done so I can upgrade to the newest version or should I stick with my older one?

Also, the function you posted ghostwolf82. Could I change the name on "IsShiftKeyDown" to for example IsAltKeyDown() or IsCtrlKeyDown()?

Source code

1
2
3
4
5
6
7
8
9
10
function CustomAction(action)
	if CD(action) then
if IsShiftKeyDown() then Msg("- "..action) end
g_lastaction = action
CastSpellByName(action)
return true
else
return false
end
end


Do I have to add something under local variables, for example local pressctrl = IsCtrlKeyDown()? and then use "pressctrl" in the rotation?
-B

This post has been edited 1 times, last edit by "BloodyArrow" (Jan 1st 2014, 9:02pm)


1,260

Wednesday, January 1st 2014, 9:58pm

the function Ghostwolf posted is not found in Custom Fuctions, it is found in Diyce.lua file. It was added a few versons back, to help use Action bar slots and/or item set skills without having to reference the name of the action on the action bar.


fromt he sounds of things you want something like:

Source code

1
2
3
4
5
6
7
8
9
10
 function KillSequence(arg1, mode, healthpot, manapot, Healslot, foodslot, speedpot, ragepot, HoTslot)
...
[put local variables]
...
...
	local pressalt = IsAltKeyDown()   --this will either be true or false
...
...
...
            	{name = "skillname",   	use = pressalt },





Be careful when holding keys like CTRL, or ALT down that you aren't pressing things that are already hotkeyed. For example, ALT + 1 (by default) is the Alternate action bar slot one, and will not activate the action that is hotkeyed as "1"