or would it be easier to say if trick attack cooldown is less then 10 seconds then use suiton? Is there a simple way to add lines to CR? I really don't know how to do both. How do you make the CR check cooldown on other spell in general could point me to the right track. I really need help kupper CR kept using suiton over and over even when trick attack is on cooldown. Thank you very much.
cooldown data: GetSpellData(spell).Cooldown.TotalMilliseconds spell being "Trick Attack" <- case senstive To get the correct spelldata, you should create your own method for getspelldata (instead of datamanager) Code: public static SpellData GetSpellData(string spell) { SpellData data; Actionmanager.CurrentActions.TryGetValue(spell, out data); return data; } Just to warn you, the .Cooldown method is very slow. Like stupid insane wtf just happened to my rotation cause I'm using a few per tick slow. You should be able to just add bools to the rotation. However there are already three custom rotations which should handle ninjutsu very well. Instead of modifying kupo you could try them and leave a comment if you think anything about their rotation should be improved? edit: oh kupper not kupo. Can you please post a log of that in his thread? Hard to fix a bug if no one tells you about it
What? I don't see how that can be slow unless your calling it a ton of times on another thread outside a framelock.
it's a couple hundred ms per check. I'm guessing you're using some type of internal cache for it though? Since after a slow check, additional checks are quick for a short time frame and then have another spike of a couple hundred ms. Rinse and repeat. Hitting several of those long cooldown calls during a single tick at a bad time is way way too slow and will appear to freeze your rotation for a second. <-- pretty bad
Code: ClearLog(); Stopwatch stopwatch = new Stopwatch(); stopwatch.Restart(); int i = 0; using(Core.Memory.AcquireFrame(true)) { foreach(var action in Actionmanager.CurrentActions.Values) { var stuff = action.Cooldown; i++; } } Log(i); Log(stopwatch.Elapsed); Code: 13 00:00:00.0047661 vs... Code: ClearLog(); Stopwatch stopwatch = new Stopwatch(); stopwatch.Restart(); int i = 0; foreach(var action in Actionmanager.CurrentActions.Values) { var stuff = action.Cooldown; i++; } Log(i); Log(stopwatch.Elapsed); Code: 13 00:00:00.4246534 Like I said, if you are testing this outside a framelock; ie using the console you will get different results then if you used it inside a routine as everything inside routines/plugins is run on the main thread inside a framelock unless you do some stuff like making your own thread. Also the first results are higher then normal cause it needs to wait until a frame becomes available.