[Guide] How to walk from point to point using AutoIt

03/14/2013 15:29 168Atomica#1
Today I feel a bit generous to share my AutoIt script and how I use it to move my character from one location to another.
Credits to Wayntressierts for the release of wallhack using AutoIt as I use it for this function.

Note that this guide is a work in progress. I will post it bit by bit until the whole function is complete. I have limited time because of my gigs but nonetheless, I promise to complete this for those who are willing to learn scripting.

Ok let's get to work.

You need the following important points to complete this script
- Determine where you are in the map
- Determine the angle needed to go to a particular point in the map
- Determine whether you are near the target area

I will explain each of these points in great detail so be sure to comeback to this post for updates. (I plan to update this at least once a week - I am sorry that is all I have for you guys)

Determine where you are in the map - 03/20/2013
Knowing where your character in the map is critical in botting (not unless you want it to wander in cabalworld :P)
Declared below are two variables $currX and $currY taking the values of the two functions _readX() and _read Y
Code:
;Get the current coordinates of character
Global $currX = _readX ()
Global $currY = _readY ()
And here are the two functions.
Code:
Func _readX ()
	Return int(_MemoryRead($cabalmain+ $ad_x,$proc,"FLOAT")/100)
EndFunc

Func _readY ()
   Return int(_MemoryRead($cabalmain+ $ad_y,$proc,"FLOAT")/100)			
EndFunc
Note the following variables
$cabalmain -> your cabal base address
$ad_x -> your pointer address for X coordinate
$ad_y-> your pointer address for X coordinate

Here is how I declare the addresses in AutoIt
Code:
Global $ad_x = 0xE8BFA8
GLobal $ad_y = 0xE8BFB0
Here is how I get the base address of cabal
Code:
Global $PID = ProcessExists('cabalmain.exe')
Global $proc=_MemoryOpen($PID)
Global $cabalmain = _MemoryGetBaseAddress($proc)
That's it. You have your base address, offset address, and two functions that returns the exact position of your character in the map.

Question: Where do I get ProcessExists, _MemoryOpen, and _MemoryGetBaseAddress?
Answer: They are included in NomadMemory Autoit library (or UDF) which is available across the web. (Ask Google)

Determine the angle needed to go to a particular point in the map
To be Updated.

Determine whether you are near the target area
To be Updated.

The whole function and demo video
To be Updated.
03/14/2013 21:53 Wayntressierts#2
Here a few snipplets how my bots do the walk A to B thing:

I switch off the "DASH TO CURSOR" and change char direction into the right angle. Then you just need to dash/walk until you're there.

Assuming you have DASH assigned to "1" and walk to "w" (standard)


$targetx/$targety are the target coordinates in form of e.g. 150 204.

This is just a code snipplet with basic math for direction calculation and sending the walk keys.

For faster walking I use a combination of no skill delay and I transform the standard DASH into a Wizards BLINK with reduced cooldown.


Ofcourse the standard DASH distance is only about 8 but because the tuned dashing is soo damn fast the char has to stop a little earlier.

Hope this little code helps ;-)


I could use a little help with auto-selling items from the inventory.
At the moment my bot destroys(Transmuter) all unwanted items. This is working fine and you collect quite a bunch of option scrolls from this, but there are still items wich cannot be destroyed and still fill up the inventory. Any idea in this ?
03/15/2013 15:36 168Atomica#3
Nice method you have there.
Dashing would get to the target location faster :)

As for destroying items in inventory, that is very interesting. I may be needing your help with it.

My way of emptying my inventory is detect if the inventory is full. (An existing script is at hand to check on the inventory once in a while). If it is full - send all items to an array of characters.

This is a bit costly because it requires alz to send mail. But nonetheless, quite effective because the number of items to be looted depends on the number of receiving characters you have :D
03/15/2013 15:36 ๒๏гภt๏๔เє#4
Nice! Thanks too!
03/15/2013 15:59 Acid#5
Quote:
Originally Posted by ๒๏гภt๏๔เє View Post
Nice! Thanks too!
Use the thanks button instead of writing thanks.
03/15/2013 18:58 Wayntressierts#6
ITEM DESTRUCTION WITH AUTOIT:

I solved the destroying items thing with a little trick.
The item to be destructed is represented by an index value, based on the inventory position. You can easily find the pointer/offset for this.

Then do a for..next loop and browse through your inventory item ID's and check if there is a valuable craft on the item or if it has already a filled slot (might be just 2slot item drop but may also be amp). I already found SIGMetal Gloves for WA with 7% SSA in Slot ;-)

If it's just a crappy empty slotted or nonslot item let your script click on destruction for any other item (ideally a item on a fixed position ;-) then change the destruct-item-id into the item you want to destroy and as last step have autoit confirm this with OK. Voila..
06/30/2022 03:47 ptcptc#7
Could you please show me how to find Item Position (Inventory ID) Cabal Online?

Thank you

Quote:
Originally Posted by Wayntressierts View Post
ITEM DESTRUCTION WITH AUTOIT:

I solved the destroying items thing with a little trick.
The item to be destructed is represented by an index value, based on the inventory position. You can easily find the pointer/offset for this.

Then do a for..next loop and browse through your inventory item ID's and check if there is a valuable craft on the item or if it has already a filled slot (might be just 2slot item drop but may also be amp). I already found SIGMetal Gloves for WA with 7% SSA in Slot ;-)

If it's just a crappy empty slotted or nonslot item let your script click on destruction for any other item (ideally a item on a fixed position ;-) then change the destruct-item-id into the item you want to destroy and as last step have autoit confirm this with OK. Voila..