|
You last visited: Today at 23:32
Advertisement
Why don't we make bots a little more interesting?
Discussion on Why don't we make bots a little more interesting? within the Mabinogi forum part of the MMORPGs category.
12/02/2012, 08:48
|
#1
|
elite*gold: 0
Join Date: Sep 2009
Posts: 1,528
Received Thanks: 613
|
Why don't we make bots a little more interesting?
So, bots with AutoIT. That's lame.
Why learn a pointless and worthless language, that will only get you mocked when you finally have that foolish "Oh, I program too!" moment, only to reveal.. You use AutoIT.
In all seriousness though, I think it'll be interesting to see what people do with a more versatile language, like C#.
It'll probably also be harder for AHN Labs to blanket detect, like AHK was, all that time ago. Maybe.
Yes, this is a console application, I clicked the wrong project type, and couldn't be bothered to change it/make a new project.
That's how fucking lazy I am.
Deal with it.
The Mouse_event function will probably be more effective with a windows form program, as I understand it, and I might even bother to test it one day.
ONE DAY.
Add a reference to System.Drawing to your .cs and then when you have your x and y coords, make your next line as follows:
Cursor.Position = new Point((int)x, (int)y);
Then use it in your SendMouseInput or mouse_event function (Cursor.Position.X and Y) instead of your original x and y.
Apparently, that is how that's done. I've added that in, and commented it out, in case anyone wants to give that a try.
I should probably say now, this was about 5-10 mins of half assed work, it's just a proof of concept really, that concept being "You don't need to use AutoIT to use ImageSearch".
Also, it's probably quite useful as a general guide/starting point.
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
//using System.Drawing;
namespace Image_Search_Test
{
class Program
{
[DllImport("ImageSearchDLL.dll")]
static extern string ImageSearch(int aLeft, int aTop, int aRight, int aBottom, string aImageFile);
//Examples of the use of the DLL's ImageSearch Function, in C#:
//ImageSearch(0, 0, 1920, 1080, "*250 Capture.JPG") this is a search across the entire screen, starting at topX = 0, topY = 0, bottomX = 1920, bottomY = 1080. The search system uses a simple space based system for tolerance and transparancy,
//but assumes that if there is only one value, that you wish to deal with tolerance only. If you wanted to deal with both in a search, it would look like this:
//ImageSearch(0, 0, 1920, 1080, "*250 *100 Capture.JPG")
//This is a search with 250 tolerance, and 100 transparency. The * and the space following the value mark it as not part of the filename.
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
[DllImport("user32.dll", EntryPoint = "SetCursorPos")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool SetCursorPos(int X, int Y);
private const int MOUSEEVENTF_LEFTDOWN = 0x02;
private const int MOUSEEVENTF_LEFTUP = 0x04;
private const int MOUSEEVENTF_RIGHTDOWN = 0x08;
private const int MOUSEEVENTF_RIGHTUP = 0x10;
static string str;
static void Main(string[] args)
{
str = ImageSearch(0, 0, 1920, 1080, "*120 Capture.JPG");
if (str.Split('|')[0] == "1")
{
Console.WriteLine("Found!");
Console.WriteLine(str);
Console.WriteLine("X: " + str.Split('|')[1]);
Console.WriteLine("Y: " + str.Split('|')[2]);
SetCursorPos(Convert.ToInt32(str.ToString().Split('|')[1]), Convert.ToInt32(str.ToString().Split('|')[2]));
DoMouseClick();
}
else
{
Console.WriteLine("Not found. Try adjusting the tolerance.");
}
Console.Read();
}
static void DoMouseClick()
{
//Cursor.Position = new Point(Convert.ToInt32(str.Split('|')[1]), Convert.ToInt32(str.Split('|')[2]));
//mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, Cursor.Position.X, Cursor.Position.Y, 0, 0);
mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, Convert.ToInt32(str.ToString().Split('|')[1]), Convert.ToInt32(str.ToString().Split('|')[2]), 0, 0); //supposed to move cursor to location and click, but only simulates click at current location.
}
}
}
//The original functions in autoIT format (From the ImageSearch.au3), for reference
//Func _ImageSearch($findImage,$resultPosition,ByRef $x, ByRef $y,$tolerance,$transparency=0)
// return _ImageSearchArea($findImage,$resultPosition,0,0,@DesktopWidth,@DesktopHeight,$x,$y,$tolerance,$transparency)
//EndFunc
//Func _ImageSearchArea($findImage,$resultPosition,$x1,$y1,$right,$bottom,ByRef $x, ByRef $y, $tolerance, $transparency=0)
// ;MsgBox(0,"asd","" & $x1 & " " & $y1 & " " & $right & " " & $bottom)
// if not ($transparency = 0) then $findImage = "*" & $transparency & " " & $findImage
// if $tolerance>0 then $findImage = "*" & $tolerance & " " & $findImage
// $result = DllCall("ImageSearchDLL.dll","str","ImageSearch","int",$x1,"int",$y1,"int",$right,"int",$bottom,"str",$findImage)
// ; If error exit
// if $result[0]="0" then return 0
// $array = StringSplit($result[0],"|")
// $x=Int(Number($array[2]))
// $y=Int(Number($array[3]))
// if $resultPosition=1 then
// $x=$x + Int(Number($array[4])/2)
// $y=$y + Int(Number($array[5])/2)
// endif
// return 1
//EndFunc
Inb4: Infraction.
This post isn't really on topic with the thread title, and I'm technically asking a question, in a section that says "I won't post a question or other non-releases in this forum.", and John loves to be petty <3
|
|
|
12/02/2012, 10:09
|
#2
|
elite*gold: 0
Join Date: Mar 2012
Posts: 168
Received Thanks: 42
|
Quote:
Originally Posted by adam_j
Why learn a pointless and worthless language, that will only get you mocked when you finally have that foolish "Oh, I program too!" moment, only to reveal.. You use AutoIT.
In all seriousness though, I think it'll be interesting to see what people do with a more versatile language, like C#.
It'll probably also be harder for AHN Labs to blanket detect, like AHK was, all that time ago. Maybe.
|
Because you don't really have to do much to learn how to script using AutoIT. It's quite straightforward.
You should know us by know, we're lazy bums who wish to get without giving.
It's true that if they do blanket AutoIT, many people who rely on it will be screwed, but why reinvent the wheel? Maybe once AutoIt is detected, it'll motivate people to learn to news to bot, e.g. programming in C#. But chances are, even that will take them a while.
|
|
|
12/02/2012, 17:53
|
#3
|
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,981
|
Mabinogi Hacks, Bots, Cheats & Exploits -> Mabinogi
#Moved to the right section
|
|
|
12/02/2012, 18:02
|
#4
|
elite*gold: 0
Join Date: Sep 2009
Posts: 1,528
Received Thanks: 613
|
Quote:
Originally Posted by retarded jas161
Because you don't really have to do much to learn how to script using AutoIT. It's quite straightforward.
You should know us by know, we're lazy bums who wish to get without giving.
It's true that if they do blanket AutoIT, many people who rely on it will be screwed, but why reinvent the wheel? Maybe once AutoIt is detected, it'll motivate people to learn to news to bot, e.g. programming in C#. But chances are, even that will take them a while.
|
Yeah, but if they took the time to learn whilst doing something small, like a bot, then they'd be able to progress to bigger things, like, XNA/MonoGame, or joining in on things like Aura.
Start small, work up to bigger things.
Quote:
Originally Posted by JohnHeatz
#Moved to the right section
|
Well, don't you feel special.
|
|
|
12/02/2012, 18:11
|
#5
|
elite*gold: 0
Join Date: Oct 2009
Posts: 929
Received Thanks: 290
|
Quote:
Originally Posted by adam_j
Start small, work up to bigger things.
|
That is quite what she said... And, talking about small, I am taking a programming class in school, and we are learning alice2.3... I don't think there is a way to work yourself up from that ****...
|
|
|
12/02/2012, 18:57
|
#6
|
elite*gold: 0
Join Date: Sep 2009
Posts: 1,528
Received Thanks: 613
|
Quote:
Originally Posted by Alwaho
That is quite what she said... And, talking about small, I am taking a programming class in school, and we are learning alice2.3... I don't think there is a way to work yourself up from that ****...
|
They don't really clarify what it is you learn from that.
I suppose it's familiarity with statements you might see in C#?
But yeah, it looks like a shittier version of Unity.
|
|
|
12/03/2012, 03:41
|
#7
|
elite*gold: 0
Join Date: Nov 2007
Posts: 142
Received Thanks: 23
|
I mean i'm willing to learn, I just recently came back to mabi and was about to redo my ot in auto it but it's so limited. I'm not very skilled in c# but if someone wanted to point me in the right direction i'd love to give it a try. I went to Auto it because it was easy to figure out and there were a lot of sample scripts out, my bot was just bits and pieces put together throughout 3 nights of testing.
|
|
|
12/03/2012, 05:40
|
#8
|
elite*gold: 0
Join Date: Sep 2009
Posts: 1,528
Received Thanks: 613
|
Quote:
Originally Posted by Cloudsdabomb
I mean i'm willing to learn, I just recently came back to mabi and was about to redo my ot in auto it but it's so limited. I'm not very skilled in c# but if someone wanted to point me in the right direction i'd love to give it a try. I went to Auto it because it was easy to figure out and there were a lot of sample scripts out, my bot was just bits and pieces put together throughout 3 nights of testing.
|
Well, why don't you start, and post when you get stuck on something?
|
|
|
12/03/2012, 06:56
|
#9
|
elite*gold: 0
Join Date: Oct 2009
Posts: 373
Received Thanks: 115
|
Wait.. people thought ImageSearch.dll was only for AutoIt? A dll with functions that will only work with AutoIt? What kind of stupidity..
@Cloudsdabomb: Can I get an example of when AutoIt is limited?
|
|
|
12/03/2012, 08:54
|
#10
|
elite*gold: 0
Join Date: Sep 2009
Posts: 1,528
Received Thanks: 613
|
Quote:
Originally Posted by Blade3575
Wait.. people thought ImageSearch.dll was only for AutoIt? A dll with functions that will only work with AutoIt? What kind of stupidity..
@Cloudsdabomb: Can I get an example of when AutoIt is limited?
|
I've honestly had people argue with me, saying that DLLs only work with the program they're "shipped" with. Any DLLs you need to download (mscvpxxx for example) are defined by them as "Windows DLLs that are missing".
"Stupidity" doesn't even begin to describe it..
But, perhaps "proof of concept" was the wrong term, "Dispelling of popular belief" would probably be more accurate, but who really cares as long as it promotes people learning?
And, AutoIT is limited in that you can "only" do automated tasks with it.
I say "only", because whilst you COULD write a game, or program in it, who would take you seriously if you then tried to sell or distribute it, via Steam for instance?
Who would make a (serious) Pserver from AutoIT?
And, even if people WOULD take such a thing seriously, you've still got the issue that it's made for Windows. With C#, you could go multi-platform, via mono.
Although, there are some really impressive things done with AutoIT, it's not exactly the engine of choice to do anything other than automate tasks.
And, some really unimpressive things (Comparatively.):
If people are willing to learn AutoIT to get a simple task done, we may as well lure them to C#, where they could at least learn something that will probably be useful later, to both themselves, and us.
I feel like a drug dealer, trying to lure them onto "harder substances" .__.;
Think about it, if we'd have done this years ago, when bots first started appearing in this section, we'd possibly have more people capable of assisting on things like Aura, as they'd have gone on to apply the skills they learned making their bot elsewhere, in other projects.
tl;dr:
We really need to stop letting people think that programming in anything other than AutoIT is a complex, difficult or daunting task, and make starting out in it more accessible.
That's not say EASIER, but, more worthwhile; Who wants to do those shitty 21 day exercises that have no bearing on your life, when you could get started on what you want to do immediately?
|
|
|
12/03/2012, 09:02
|
#11
|
elite*gold: 0
Join Date: Oct 2009
Posts: 373
Received Thanks: 115
|
AutoIt is what made it possible for me to learn C/C++. It's a great thing to start with and learn the flow of things, it's also a lot easy to debug so you can find a lot of common mistakes with it. It also has the best editor (SciTE) with amazing documentation and example of every function. I'm guessing you're telling people to learn C# due to it having more implemented functions allowing less code you have to type out and "easier" to use? I use the quotes as I don't much like C# and everything I've done has been in C/C++ or AutoIt.
|
|
|
12/03/2012, 10:19
|
#12
|
elite*gold: 0
Join Date: Sep 2009
Posts: 1,528
Received Thanks: 613
|
Quote:
Originally Posted by Blade3575
AutoIt is what made it possible for me to learn C/C++. It's a great thing to start with and learn the flow of things, it's also a lot easy to debug so you can find a lot of common mistakes with it. It also has the best editor (SciTE) with amazing documentation and example of every function. I'm guessing you're telling people to learn C# due to it having more implemented functions allowing less code you have to type out and "easier" to use? I use the quotes as I don't much like C# and everything I've done has been in C/C++ or AutoIt.
|
I agree that C/C++ both have many more uses, but I don't fancy your chances in getting novices using it.
Also, don't get me wrong, I like AutoIT, and I can't even think about using it without SciTE, and I started out using it as well, but I'd have used C# if there were complete examples of botting with it around, simply because there are more uses for what I'd have learned in making it.
I even gave some examples of how it's not limited xD
Honestly, I'm telling them to learn C# because it, like AutoIT, is a stepping stone to lower level languages (Like C/C++), but it's not "useless" in of itself.
I say that with quotation marks, because it's the way AutoIT is perceived, for instance, an employer is never going to take "I know how to program in AutoIT" seriously, whereas if you said the same statement about C#, you likely won't be laughed at.
Also, I wouldn't want to try and make a Pake module out of AutoIT. I do not see that being a fun endeavour, at all.
I'll add an actual example of a bot at some point this week, so people have something to work with.
Edit: Also, on the functions statement, I keep writing my own, and then later finding out there already WAS a function for that.
Happens to me in every language, and with moderate frequency >_>;;
|
|
|
12/20/2012, 03:03
|
#13
|
elite*gold: 0
Join Date: Aug 2012
Posts: 34
Received Thanks: 18
|
There's a reason lua exists. I'm never bothering with autoit.
Then again, I'm stuck at certain point with c++
|
|
|
01/05/2013, 22:27
|
#14
|
elite*gold: 0
Join Date: Dec 2009
Posts: 69
Received Thanks: 13
|
... Does ANYONE consider autoit a programming language? It's easier to understand than plain English... which can be said for some other programming languages; however, combine that with the fact that it's meant to do a specific niche of things, and doesn't have that many aspects to learn = basically just pick up and use.
What matters is how well you can use the tools provided. With just pixelgetcolor, simple clicks/keypresses, and if arguments, you can make it do absolutely anything if you can figure out how. Of course, for anything complex, it's ridiculously, ridiculously time consuming.
Still, it's amazing what you can do with such half-assed methods. A while back, for a 2D game/chat room, I made a bot that automatically changes IP and comp ID, makes a new user, and spams chat with certain messages I wanted people to see.
But all I was using was virtualbox, a windows ISO off piratebay, and hotspotshield. The autoit script was very annoying to make, but seriously... Hotspot Shield. VirtualBox. Methods as crude as anything could be but if you're smart with them, you can get good results with absolutely zero knowledge that doesn't even compare to script kiddies.
Yeah, I know the change/spam thing isn't impressive; just trying to get the point across. I've been able to do pretty much whatever I want just by improvisation and pretending. And even for programming languages used to create applications or games, the same thing applies to a fair extent. Use the most basic functions in clever ways to improvise whatever effect you want. I've been able to get pretty far starting a blank file in whatever programming language, with NO idea what I'm doing, NO guides of any kind... by basically just typing random **** until I find and become familiar with the basic syntax and functions. Then I just improvise or continue to advance with nothing but guesswork and common sense.
Of course, trying this kind of thing for any kind of reverse engineering a different story. If someone who doesn't even know what assembly is, for example, downloads olly and opens Mabinogi's client... heh. But working with foreign applications other people made with tools that seem like alienspeak, everything I've said before is still possible. Just needs a lot more focus, brainwork, and intelligence.
****, I love making up gibberish in poorly written walls of text.
|
|
|
01/07/2013, 00:08
|
#15
|
elite*gold: 0
Join Date: Jan 2011
Posts: 168
Received Thanks: 29
|
tldr
|
|
|
 |
Similar Threads
|
[New Idea] Fortress War Changes To Make The Game 10 Times More Interesting
08/04/2012 - SRO Private Server - 20 Replies
"WHAT CHANGES DOES SILKROAD ONLINE NEED MOST PRIORITY?"
Allow guilds to register to all Fortress simultaneously during Fortress War Weekly Event.
Credit goes to Marked
-Guild/Union can own more then 1 fortress simultaneously.
-Guilds can split themselves to defends/attack multiples fortress simultaneously.
If nobody attack your fortress, you can enjoy taking over other fortress while defending your own.
You can also own all fortress, and if nobody attack, it just show how OP your...
|
INteresting in HH
06/24/2012 - Archlord - 10 Replies
At this days no problem
But at moment i cant drop items ( only gold ) in HH in party , if i leave the party i have drop.
OFC no JANUS
Try relog and wout Easy login but same effect
Somebody know what happened ?
|
Interesting..
05/08/2009 - Grand Chase - 4 Replies
I found something interesting, could someone elaborate this? hehe
Cara, p melhorar o tópico, tu podia colocar isso:
--XP Hack Caçada--
1ºCrie uma sala Com senha
2ºColoque Caçada 1 mas não comece va ao CE e de fist scan em 2 (Exact Value) e (4 Bytes)
3ºColoque Caçada 25 mas não comece Volte ao CE e de Next Scan em 30 vai sobrar no maximo 3 adress freeze todos em 999999999
(são Noves 9)
|
hmm take a look its interesting:):D
11/19/2008 - Dekaron - 1 Replies
ok,i am looking for a vac hack or non agrro such etc, for the pas like half a year i am looking for thr hacks i know they publish the codes but i donr know ho to use,i know that this is a noob question because i am noob bacause i dont even know how to use winhex-.-:(
and i need some1 to help me out with it and if some1 will just make a hack i am willing to pay dil^^ so pm plz
msn is:[email protected]
skype is:neidas1994
|
All times are GMT +1. The time now is 23:37.
|
|