-
Member
Originally Posted by
Kwapuzzi
I have also thought about just using the mouse, the problems is the turning speed was not controllable. if you move too fast you are spinning like a rollercoaster =)
Maybe you can show us your solution.
I'm currently rewriting my navigation system in its entirety. In its previous state I had an addon handle navigation, which absolutely got the job done.
However, I'm attempting to make it even better/faster than it already was, in order to get it perfectly done.
Once It's starting to take its form I can show you how to handle mouse turning.
-
Member
Any new ideas for a smooth movement?
-
Member
Thought about using ConRO for the combat-system. What do you think?
Just press the buttons ConRO is showing me?
Whats the best way to read the spell which is ConRO marking?
-
Member
Originally Posted by
Cashless
Thought about using ConRO for the combat-system. What do you think?
Just press the buttons ConRO is showing me?
Whats the best way to read the spell which is ConRO marking?
In the class addon, for example "shaman.lua", find this:
Code:
--Rotations
if lShieldRDY and not lShieldBUFF then
print("Cast Lightning Shield")
return _LightningShield;
end
if lBoltRDY and not inMelee then
print("Cast Lightning Bolt")
return _LightningBolt;
end
if inMelee then
if sStrikeRDY then
print("Cast Stormstrike")
return Enh_Ability.Stormstrike;
end
if eShockRDY then
print("Cast Earth Shock")
return _EarthShock;
end
end
return nil;
end
I marked the lines which I've added with green. Just change these to whatever you want to do when ConRoc chooses a spell. For example, make a pixel a specific color depending on what it should cast. Note: this is just a quick fix, I'm pretty sure you can have the main addon do the same for every class.
-
Post Thanks / Like - 1 Thanks
Cashless (1 members gave Thanks to stonebent for this useful post)
-
Member
Originally Posted by
Kwapuzzi
180 Degree is exactly one second of pressing A or D you can simply calculate and write a function. for example
Java
deg is turning degree, r is java robot
Code:
public void rotateRightExact(int deg) {
float secs =(float) 1 / 180;
r.keyPress(KeyEvent.VK_D);
r.delay((int) ((int) ((secs*deg)*1000)));
r.keyRelease(KeyEvent.VK_D);
}
I'm using this atm but I'm finding it to be not accurate enough. Any way to make it more accurate? Or any other way to go at this? Thanks in advance.
-
Member
Originally Posted by
someorother
I'm using this atm but I'm finding it to be not accurate enough. Any way to make it more accurate? Or any other way to go at this? Thanks in advance.
i have added a factor to set. in some situations, it way easier to lower the turning or make them bigger
Code:
public void rotateLeftExact(int deg, double factor) {
float secs =(float) 1 / 180;
r.keyPress(KeyEvent.VK_A);
//System.out.println((secs*deg)*1000);
r.delay((int) ((int) ((secs*deg)*1000)*factor));
r.keyRelease(KeyEvent.VK_A);
}
in most cases im working with 0.7 and it gets the work done well
-
Member
Im still at the combat-system (Ill add some snippets later),
but is there a good way to debug that LUA-code except print(); ?
Debugging drives me crazy
-
Member
Originally Posted by
Kwapuzzi
i have added a factor to set. in some situations, it way easier to lower the turning or make them bigger
Code:
public void rotateLeftExact(int deg, double factor) {
float secs =(float) 1 / 180;
r.keyPress(KeyEvent.VK_A);
//System.out.println((secs*deg)*1000);
r.delay((int) ((int) ((secs*deg)*1000)*factor));
r.keyRelease(KeyEvent.VK_A);
}
in most cases im working with 0.7 and it gets the work done well
I have considered using some sort of factor. In what kind of situations are you using it? When the angle to turn is large or small or some other condition entirely?
-
Member
some maybe laugh but if found out really late:
Ingame you can /api COMMAND to see a full documentation. this helped me alot. otherwise, print is you best debuggin friend.
if you have problems, just ask. i think i have solved the most problems already.
-
Member
I've managed to get most of my things working, except the coordinates of the target which seems to be limited to self/party.
How do you guys do it?
I could run around like a chicken and check if spells are in range for the target, but that seems like a good way to get banned.
EDIT: I think I'll try using UnitSelectionColor and scan for the color, combined with range spell check.
Last edited by MrNotSoBright; 11-19-2019 at 02:29 PM.
-
Member
Originally Posted by
MrNotSoBright
I've managed to get most of my things working, except the coordinates of the target which seems to be limited to self/party.
How do you guys do it?
I could run around like a chicken and check if spells are in range for the target, but that seems like a good way to get banned.
EDIT: I think I'll try using UnitSelectionColor and scan for the color, combined with range spell check.
Im note sure what you are exactly looking for. Pixelbased you can just check if you have a target , the target state, if its still attacked and if the target is a real player or controlled by a player.
Then its very difficult to determine the distance. Even the AceLib Range check is very basic and just shows what you can get with your spells. Most of the time > 30 yeards and <8 yards. So you have to deal with spell in range.
To face always todwards you can set camera following to always.
-
Member
Originally Posted by
Kwapuzzi
Im note sure what you are exactly looking for. Pixelbased you can just check if you have a target , the target state, if its still attacked and if the target is a real player or controlled by a player.
Then its very difficult to determine the distance. Even the AceLib Range check is very basic and just shows what you can get with your spells. Most of the time > 30 yeards and <8 yards. So you have to deal with spell in range.
To face always todwards you can set camera following to always.
I'm looking for a way to find where my target is, so I can face and/or run to the target for combat, looting etc. I've managed to check all things you've listed, and even with range checking, I don't feel it's sufficient enough for identifying the location of the target and there must be a better way.
To elaborate what I'm thinking of how my bot will work: It'll follow some waypoint-path, by using the coordinates and where I'm facing. It'll be looking for targets by using TAB, and if found will make some checks to determine if it should engage. However without any kind of coordinates or similar, I can never know where the target is so the bot can attack or even loot after combat. It could even be so that the target is behind some object, which makes it unattackable from where the bot is. To solve this my idea was to use UnitSelectionColor on the target, and scan for some kind of cluster with that color and verify with cursor if I hover over a target (by e.g. checking for tooltip info). From the cursor position I can now face the target, and locate where to run until in range. Some problems with this though is for meele classes who are low lvl and doesn't have a range ability (to range check), and the terrain, but perhaps I'll have the same problem with coordinates of the target.
Last edited by MrNotSoBright; 11-20-2019 at 06:25 AM.
-
Member
Originally Posted by
MrNotSoBright
I'm looking for a way to find where my target is, so I can face and/or run to the target for combat, looting etc. I've managed to check all things you've listed, and even with range checking, I don't feel it's sufficient enough for identifying the location of the target and there must be a better way.
To elaborate what I'm thinking of how my bot will work: It'll follow some waypoint-path, by using the coordinates and where I'm facing. It'll be looking for targets by using TAB, and if found will make some checks to determine if it should engage. However without any kind of coordinates or similar, I can never know where the target is so the bot can attack or even loot after combat. It could even be so that the target is behind some object, which makes it unattackable from where the bot is. To solve this my idea was to use UnitSelectionColor on the target, and scan for some kind of cluster with that color and verify with cursor if I hover over a target (by e.g. checking for tooltip info). From the cursor position I can now face the target, and locate where to run until in range. Some problems with this though is for meele classes who are low lvl and doesn't have a range ability (to range check), and the terrain, but perhaps I'll have the same problem with coordinates of the target.
Ah okay. Its easier. Have a look for the Keybinds for:
Interact With Target
Interact With Mouseover
Interact with last Target
Tab > When Hit Check if Attack > Double Klick Interact with Target Key or Run until Spell XY is in Range > Kill > Hit Target Last Target > Hit Interact With Target > Loot > Center Mouse > Interact With Mouseover when Tooltip has more then 3 lines
Code:
local isDead = UnitIsDead("mouseover")
local count = GameTooltip:NumLines();
if count == 3 and isDead == true then
YourPixel
The next thing you could do is to write a function for nameplate tracking. I will give you hint: what can you set to mark an enemy an check if its visible or not? Im sure you will get it on your own
-
Post Thanks / Like - 1 Thanks
MrNotSoBright (1 members gave Thanks to Kwapuzzi for this useful post)
-
Member
Thanks a lot