Interaktion mit Aion Chat (Bot)

09/06/2012 11:24 ms.geburt#1
Hallo Leute,

wie kann man am besten etwas in den Aion Chat schreiben? Muss man extra die Tastendrücke simulieren, oder gibt es da 'ne schönere Möglichkeit?

Ich schreibe momentan aus Langeweile 'nen Bot für Aion, läuft auch soweit ganz gut mit farmen, inkl. adds und waypoints, aber ich würde ihn auch gerne Essenzen sammeln schicken, wobei ich gerne die Makros nutzen würde.

Ich arbeite übrigens mit C++ und bis jetzt auch nur von außen.
09/06/2012 13:48 lucid#2
Do you speak English? I've developed some tools and might be willing to collaborate.
09/07/2012 10:42 ms.geburt#3
Let's say I can understand it better than writing it on my own. :D How did you manage to use chat commands?
09/07/2012 13:38 lucid#4
My German isn't great (read: non-existent) so I can't understand exactly what it is you want to do, could you provide an English explanation of your goal?
09/08/2012 23:20 ms.geburt#5
I want to use the ingame commands you can type into chat, like "/Select xy".

My approaches would be
(a) pressing Enter, /, S, e, l, ... by SendInput or
(b) finding out the offset for one macro in the macro editor, writing my string to memory and calling this macro.

There has to be a less ugly way. :)

I am writing a bot for Aion, which is working well now, except for gathering. These chat commands would help me I think, because I can see no other way how I could select something to gather.

I'm working in C++ and without injection although I am thinking about doing it.
09/09/2012 10:26 lucid#6
What do you REALLY want it to do though? If you only need 1 or 2 commands then you might just want to make it into a macro and press the hotkey for that macro. For example:

Code:
/Select SOME GATHERABLE
/Attack
Pressing this macro would start gathering; you might need to set auto-approach in the options but it should actually move you to the gathering node and begin gathering it if you're within ~25m.

You could use SendInput but it flags keys as injected. SendInput actually is not that ugly of a way of performing the input, just risky. This method also might be slower (because each key needs to be pressed individually), and requires checking in case keystrokes were missed.

If you want to emulate key input without it being flagged as injected you might want to look into PostMessage; though if you think SendInput is bad then this will really be horrible for you.

A really dirty trick would be to inject the gatherable's entity offset into your target pointer... but I can't really say I'd recommend that either.

So, there are probably a lot of ways to do it, but why not just use a macro?
09/09/2012 11:04 ms.geburt#7
Right now I am using a macro, but I do not want to change the macro ingame every time I want to gather something different.

Right now I am using SendInput for clicking buttons while crafting and selling stuff when grinding if the cube is full and did not get banned yet. I don't think they are checking if something is injected by SendInput.

But thanks for your help. :)
09/09/2012 13:06 lucid#8
I am not sure if macro variables are client-side or server-side, but you might be able to overwrite their values.

For example, you can do this in-game:
Code:
/Variable 0 Plia
/Select [Variable0]
/Attack
Note that when setting the variable it requires a space but the use case requires there to be NO space

If the value of the variables are stored client-side, you could simply overwrite that memory and it would do exactly what you want.
09/10/2012 15:45 ms.geburt#9
This seems too complicated, I did it now like I suggested earlier. I am now overwriting the whole macro and trigger it via SendInput.
09/11/2012 05:05 lucid#10
That's not a bad solution, but if key presses are missed then you might type commands into chat >_<

Make sure you set chatmode to party or something^^
09/12/2012 15:11 ms.geburt#11
Quote:
Originally Posted by lucid View Post
That's not a bad solution, but if key presses are missed then you might type commands into chat >_<

Make sure you set chatmode to party or something^^
Sorry, if was not making it clear enough. I overwrite the part in memory that holds the ingame macro and just trigger the macro by a key. There is no chance that I am writing to chat.
09/14/2012 16:37 lucid#12
Oh yeah you could just write the macro, I meant just overwrite the variable in memory (Press 'U' by default and look in the "Variable" tab)