Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Exploits, Hacks & Tools
You last visited: Today at 18:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Autoit] Howto move your pawn ;)

Discussion on [Autoit] Howto move your pawn ;) within the CO2 Exploits, Hacks & Tools forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2006
Posts: 199
Received Thanks: 26
Ok at first you need these 3 files which carry support functions, except for mem.au3 all come with autoit shipped. Mem.au3 can be gathered from the autoitscript community (you might look there for other code as well).

Feel free to play around with the code, it's not really nice because I never had the time to polish/finish it (and I fear I won't in the next months b/c I have many tests to pass).

Code:
#include <String.au3>
#include <Mem.au3>
#include <Array.au3>
And A Support function that converts the hex data from memory to decimal offsets.

Code:
Func _HexadecimalToDecimal($var)
  $result = 0
  $sum = 0
  $power=0
  
  Do
    $currentDigit = StringRight(_MemRev($var),$power+1)
    $currentDigit = StringLeft($currentDigit,1)
    If $currentDigit = "A" Then
      $currentDigit = 10
    ElseIf $currentDigit = "B" Then
      $currentDigit = 11
    ElseIf $currentDigit = "C" Then
      $currentDigit = 12
    ElseIf $currentDigit = "D" Then
      $currentDigit = 13
    ElseIf $currentDigit = "E" Then
      $currentDigit = 14
    ElseIf $currentDigit = "F" Then
      $currentDigit = 15
    EndIf
    $result=$currentDigit*16^$power
    $power = $power + 1
    $sum = $sum + $result
  Until $currentDigit = "x"
  
  Return $sum
EndFunc;==>_HexadecimalToDecimal by joshdb
Now you can start reading the memory and read your x/y coordinates from it, those used are old ones, check the sticky for the actual ones. I have marked the offsets (that's the only thing you need to change witch new patches).

Quote:

$Process = "Conquer.exe"
$Pid = ProcessExists($Process)
$h_open = _MemOpen($pid)
$ReadX = _MemRead($h_open,0x4FE53C,4)
$XCoord = _HexadecimalToDecimal($ReadX)
$ReadY = _MemRead($h_open,0x4FE540,4)
$YCoord = _HexadecimalToDecimal($ReadY)
_MemClose($h_open)
$MyCx=$XCoord
$MyCy=$YCoord
At first you need to setup your waypoints (in my case it where 4). $WP is the starting waypoint "counter".

Code:
;~ Waypoints
$WP=0
$WP1x=471
$WP1y=753

$WP2x=515
$WP2y=688

$WP3x=612
$WP3y=763

$WP4x=520
$WP4y=746
The final function. I made this one very simple: the screen is cut into quarters and juding from your position and the next waypoint the bot just clicks the screen to move, it's simple and works, if you want it more efficient you could move into 8 directions instead of 4, however that will be harder to understand.

Currently the bot moves to Waypoint 1,2,3,4 and then back to 1. The MyCx,-20 part means he considers a waypoint as reached if he is only +-20 coordinates away from it, depending on your needs you can use 5 or less as well.

Best part is to put that into a variable you declare in the function cos now you have to change all of them << my bad.

You MUST read the x/y offsets before you start moving. Best is to put the mem reading part into the code like below.

The function is not really nice because I coded a logic for each waypoint instead of using variables. But if you just need a level bot that kills one spawn over and over it will do it's job.

But I won't be able to make anything nice in the next months so it might be helpfull for someone else.

Quote:

func gotoWP ()

Quote:

&#036;Process = "Conquer.exe"
&#036;Pid = ProcessExists(&#036;Process)
&#036;h_open = _MemOpen(&#036;pid)
&#036;ReadX = _MemRead(&#036;h_open,0x4FE53C,4)
&#036;XCoord = _HexadecimalToDecimal(&#036;ReadX)
&#036;ReadY = _MemRead(&#036;h_open,0x4FE540,4)
&#036;YCoord = _HexadecimalToDecimal(&#036;ReadY)
_MemClose(&#036;h_open)
&#036;MyCx=&#036;XCoord
&#036;MyCy=&#036;YCoord
IF &#036;MyCx >= &#036;WP1x AND &#036;MyCx-20< &#036;WP1x AND &#036;MyCy >= &#036;WP1y AND &#036;MyCy-20 < &#036;WP1y Then
&#036;WP=1
Endif
IF &#036;MyCx >= &#036;WP2x AND &#036;MyCx-20< &#036;WP2x AND &#036;MyCy >= &#036;WP2y AND &#036;MyCy-20 < &#036;WP2y Then
&#036;WP=2
Endif
IF &#036;MyCx >= &#036;WP3x AND &#036;MyCx-20< &#036;WP3x AND &#036;MyCy >= &#036;WP3y AND &#036;MyCy-20 < &#036;WP3y Then
&#036;WP=3
Endif
IF &#036;MyCx >= &#036;WP4x AND &#036;MyCx-20< &#036;WP4x AND &#036;MyCy >= &#036;WP4y AND &#036;MyCy-20 < &#036;WP4y Then
&#036;WP=0
Endif
Select
Case &#036;WP=0
IF &#036;MyCx >= &#036;WP1x AND &#036;MyCy >= &#036;WP1y Then
Move1()
Endif
IF &#036;MyCx <= &#036;WP1x AND &#036;MyCy <= &#036;WP1y Then
Move4()
Endif
IF &#036;MyCx <= &#036;WP1x AND &#036;MyCy >= &#036;WP1y Then
Move2()
Endif
IF &#036;MyCx >= &#036;WP1x AND &#036;MyCy <= &#036;WP1y Then
Move3()
Endif
Case &#036;WP=1
IF &#036;MyCx >= &#036;WP2x AND &#036;MyCy >= &#036;WP2y Then
Move1()
Endif
IF &#036;MyCx <= &#036;WP2x AND &#036;MyCy <= &#036;WP2y Then
Move4()
Endif
IF &#036;MyCx <= &#036;WP2x AND &#036;MyCy >= &#036;WP2y Then
Move2()
Endif
IF &#036;MyCx >= &#036;WP2x AND &#036;MyCy <= &#036;WP2y Then
Move3()
Endif
Case &#036;WP=2
IF &#036;MyCx >= &#036;WP3x AND &#036;MyCy >= &#036;WP3y Then
Move1()
Endif
IF &#036;MyCx <= &#036;WP3x AND &#036;MyCy <= &#036;WP3y Then
Move4()
Endif
IF &#036;MyCx <= &#036;WP3x AND &#036;MyCy >= &#036;WP3y Then
Move2()
Endif
IF &#036;MyCx >= &#036;WP3x AND &#036;MyCy <= &#036;WP3y Then
Move3()
Endif
Case &#036;WP=3
IF &#036;MyCx >= &#036;WP4x AND &#036;MyCy >= &#036;WP4y Then
Move1()
Endif
IF &#036;MyCx <= &#036;WP4x AND &#036;MyCy <= &#036;WP4y Then
Move4()
Endif
IF &#036;MyCx <= &#036;WP4x AND &#036;MyCy >= &#036;WP4y Then
Move2()
Endif
IF &#036;MyCx >= &#036;WP4x AND &#036;MyCy <= &#036;WP4y Then
Move3()
Endif
EndSelect
EndFunc
And finally the move functions that actually make the bot move. Remove the " Send("{CTRLDOWN}"" if you want to walk/run instead of jumping.

Code:
func Move1 &#40;&#41;
  &#036;xrand1=Random&#40;341,682,1&#41;
	&#036;yrand1=Random&#40;20,256,1&#41;
  MouseMove&#40;&#036;xrand1,&#036;yrand1,0&#41;
	Send&#40;&#34;{CTRLDOWN}&#34;&#41;
  MouseClick&#40;&#34;Left&#34;&#41;
  Send&#40;&#34;{CTRLUP}&#34;&#41;
  Sleep&#40;300&#41;
EndFunc

func Move4 &#40;&#41;
  &#036;xrand2=Random&#40;314,682,1&#41;
  &#036;yrand2=Random&#40;512,640,1&#41;
  MouseMove&#40;&#036;xrand2,&#036;yrand2,0&#41;
  Send&#40;&#34;{CTRLDOWN}&#34;&#41;
  MouseClick&#40;&#34;Left&#34;&#41;
  Send&#40;&#34;{CTRLUP}&#34;&#41;
  Sleep&#40;300&#41;
EndFunc

func Move2 &#40;&#41;
  &#036;xrand3=Random&#40;512,1000,1&#41;
  &#036;yrand3=Random&#40;256,512&#41;
  MouseMove&#40;&#036;xrand3,&#036;yrand3,0&#41;
   Send&#40;&#34;{CTRLDOWN}&#34;&#41;
  MouseClick&#40;&#34;Left&#34;&#41;
  Send&#40;&#34;{CTRLUP}&#34;&#41;
  Sleep&#40;300&#41;
EndFunc

func Move3 &#40;&#41;n
  &#036;xrand4=Random&#40;20,314&#41;
  &#036;yrand4=Random&#40;384,640&#41;
  MouseMove&#40;&#036;xrand4,&#036;yrand4,0&#41;
   Send&#40;&#34;{CTRLDOWN}&#34;&#41;
  MouseClick&#40;&#34;Left&#34;&#41;
  Send&#40;&#34;{CTRLUP}&#34;&#41;
  Sleep&#40;300&#41;
EndFunc
Christoph_ is offline  
Thanks
1 User
Old 12/21/2006, 21:27   #2
 
elite*gold: 0
Join Date: Aug 2006
Posts: 367
Received Thanks: 11
what the hell is this -_-
pjay is offline  
Old 12/21/2006, 21:41   #3
 
elite*gold: 0
Join Date: Sep 2006
Posts: 199
Received Thanks: 26
Autoit Sourcecode...
Christoph_ is offline  
Old 12/21/2006, 23:14   #4
 
elite*gold: 0
Join Date: Aug 2006
Posts: 449
Received Thanks: 4
i don't get it, is it moving to coords or just 4 set points? too bad i'm working with autohotkey
yokoyoko is offline  
Old 12/22/2006, 01:20   #5
 
elite*gold: 0
Join Date: Sep 2006
Posts: 199
Received Thanks: 26
It moves to the coordinates you give him.

Btw: The Syntax of Autohotkey / Autoit is pretty much the same.
Christoph_ is offline  
Old 12/22/2006, 02:31   #6
 
elite*gold: 0
Join Date: Aug 2006
Posts: 367
Received Thanks: 11
this is... fun to use.. how do u use it?
pjay is offline  
Old 12/22/2006, 12:13   #7
 
elite*gold: 0
Join Date: Sep 2006
Posts: 199
Received Thanks: 26
Basicly you need to paste most of the stuff into your script, put the correct offsets for x/y into it, setup your own waypoints and call gotoWP (), that's it.

I did make a autohunter for me long ago before I used partner. Usually you do:

1) Scan for Monsters, if none
2) Scan for Items, if none
3) Move,
4) Repeat.
Christoph_ is offline  
Old 12/22/2006, 12:34   #8
 
elite*gold: 0
Join Date: Nov 2006
Posts: 32
Received Thanks: 0
Great post, Chris.

Well, I'm also on AutoIt for quite some time, making bots for MapleSEA well.

They patched AutoIt macros and I started to use AHK.

Wow, and can I ask for your old AutoHunter source code? I thought of making a AutoHunter/Lab Lvler that is way simpler to use than MacroExpress though. Might help me lots with your old source code.
crazyred is offline  
Old 12/22/2006, 12:36   #9
 
elite*gold: 0
Join Date: Feb 2006
Posts: 948
Received Thanks: 17
if its moves to coords u give..then its nothink more then another way to get to bot jail. As far as i remember ..bjx used simmilar method of walking... walking always on same coords..
Master_Mati is offline  
Old 12/22/2006, 12:54   #10
 
elite*gold: 0
Join Date: Oct 2006
Posts: 55
Received Thanks: 0
Can someone please put this into an au.3 program for me to edit and set my own co-ordinates coz i dont get how to put it together. [img]text2schild.php?smilienummer=1&text=Im AutoIt noob ' border='0' alt='Im AutoIt noob ' />
retlic is offline  
Old 12/22/2006, 14:23   #11
 
DarkMaster000's Avatar
 
elite*gold: 0
Join Date: Feb 2006
Posts: 262
Received Thanks: 7
lol i dont think i know exactly what it does..... but does it pretty much let u teleport to set coor?
DarkMaster000 is offline  
Old 12/22/2006, 14:53   #12
 
elite*gold: 0
Join Date: Aug 2006
Posts: 367
Received Thanks: 11
where do you put these codes? macro express?
pjay is offline  
Old 12/22/2006, 16:02   #13
 
elite*gold: 0
Join Date: Nov 2006
Posts: 32
Received Thanks: 0
These are AutoIt source.

AutoIt scripts ends with .au3 extensions.

Google AutoIt, People.

Learn to do things yourself.
crazyred is offline  
Old 12/22/2006, 16:42   #14
 
elite*gold: 0
Join Date: Aug 2006
Posts: 367
Received Thanks: 11
Quote:
Originally posted by crazyred@Dec 22 2006, 16:02
These are AutoIt source.

AutoIt scripts ends with .au3 extensions.

Google AutoIt, People.

Learn to do things yourself.
why you gota be mean for... i just asked a simple question :|
pjay is offline  
Old 12/22/2006, 16:53   #15
 
elite*gold: 0
Join Date: Nov 2006
Posts: 32
Received Thanks: 0
It's not meant to be targetted at anyone particularly.

Just funny to see how people ask without googling about AutoIt first.
crazyred is offline  
Reply


Similar Threads Similar Threads
[HowTo]Ausschaltbot und Mausbewegungen mit AutoIt
12/27/2009 - Coding Tutorials - 8 Replies
Hallo Community!! Vorwort: Heute zeige ich euch, wie man einen Bot macht, welcher die Maus auf das Startsymbol (in der Taskleiste) steuert, links klickt und auf ausschalten drückt.Außerdem zeige ich euch wie man den Bot so vervollständigt, dass er den Pc ganz herunterfährt. Was benötigen wir?: AutoIt http://img695.imageshack.us/img695/4240/autoitdow nload.jpg Scite http://img38.imageshack.us/img38/244/scitedload.j pg
[METIN2] Howto - Change Attack- Move Speed
07/14/2009 - Metin2 Guides & Templates - 259 Replies
Cheat Engine 1,) http://www.cghost.de/mediahost/img16/1RNpf.th.jpg Metin2 und CheatEngine starten. --- Run Metin2 and CheatEngine. _____________________
[HOWTO????] Design AutoIt ??
05/17/2009 - Metin2 - 0 Replies
pls closed :D hat sich erledigt
pawn :D
04/06/2008 - General Coding - 5 Replies
hey zusammen^^ kennt sich von euch jemand mit dem spiel pawn (PawnGame.com - Multiplayer Flash Gaming) aus? Ich habs geschafft mit ner CE die werte für die Killzahl zu ändern, klappt auch immer für 30-60 sekunden, aber dann loggt er sich aus... hat wer ne idee?



All times are GMT +1. The time now is 18:26.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.