Conversation
internal/action/buff.go
Outdated
| } | ||
|
|
||
| // Check if we're in loading screen | ||
| ctx.RefreshGameData() |
There was a problem hiding this comment.
Are there downsides to this besides a few more CPU cycles? Is there a better way?
There was a problem hiding this comment.
You can selectively update just what you need from GetData() .
ctx.GameReader.GetData().OpenMenus.LoadingScreen
Or ctx.GameReader.GetData().OpenMenus
For all OpenMenus
Full refresh data is on a 100ms ticker already, the less we call it the better it is for cpu
| for ctx.Data.OpenMenus.LoadingScreen { | ||
| for ctx.GameReader.GetData().OpenMenus.LoadingScreen { | ||
| time.Sleep(100 * time.Millisecond) | ||
| ctx.RefreshGameData() |
There was a problem hiding this comment.
Hello , can you make sure the removal of the last refreshgamedata after loading screen is completed doesnt create issue with tinymod when creating new game. . Is perfect to only loop the loading screen until loaded but unsure if we dont need one full refresh after to sync.
it was in place because it would try to move/identify items without everything loaded with tinymod . Thanks
There was a problem hiding this comment.
I haven't used tinymod before, I'll just add a final refresh back in with a comment.
I did a brief look through closed issues and PRs; are there reproduction steps for the tinymod issue so that someone could check if this refresh is needed? When/if I get tinymod set up, I'm not confident I'd be able to say that the refresh isn't needed. Putting back the refresh is safer but potentially redundant.
|
I noticed fade wasn't getting cast and poked into why, I think it's because the state for it isn't mapped? I took a stab at a minor refactor here, although I didn't see the state needed for burst of speed. Presumably this needs to be filled out with all possible buffs and their states |
| ctx.HID.PressKeyBinding(ctx.Data.KeyBindings.MustKBForSkill(skill.BattleCommand)) | ||
| utils.Sleep(180) | ||
| ctx.HID.Click(game.RightButton, 300, 300) | ||
| utils.Sleep(100) |
There was a problem hiding this comment.
Is there a way to hook into the player's cast rate here?
…of speed, refactor of buff code with space for cta buffs
|
I added some updates based on some discussion with elb, leveraging the ability to check for runewords directly instead of looking for skills on the items, as well as a check for which weapon set we have equipped, instead of again, looking for skills. |
|
I took my own stab at implementing the request implemented in #756 and exposed it as a general config item |
|
once #761 is merged, this should be updated to leverage the cheaper update calls
|
Originally was just a fix for #714
By refreshing the game state before checking for a loading screen, the bot successfully identifies the loading screen and waits for it to complete before running through the Buff routine, avoiding the problem identified in issue 714
Now includes the ability to cast buffs with CTA, support for assassin buffs fade/BoS, and improved identification of CTA and swapping (although it expects the CTA to live on your secondary weapon set)