Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant archive_postsperpage - assumed 'archive_postsperpage' (this will throw an Error in a future version of PHP) in ..../archive/index.php on line 456
[VB.NET]Market - Why u no make bot? [Archive] - Forums

PDA

View Full Version : [VB.NET]Market - Why u no make bot?



SeeingBlue
02-13-2014, 09:43 PM
I got out of Tibia programming a long time ago and never really was that good. I started playing Tibia again recently and I've enjoyed working the market. I've thought about a lot of ideas to make it easier to profit from the market so I started looking into simply read and pulling data from the market.

My first approach to this was by reading memory. So I started searching addresses related to the market to see how it was structured. None of the addresses I found stuck. When I restarted the client none of them worked. So now I'm not sure what to do next.

Has anyone tried this? Anyone want to help create something to make it easier to read the market?

I've always found memory reading easier than a proxy, but maybe a proxy will be the only way?

Discuss.

Blequi
02-13-2014, 10:44 PM
I've always found memory reading easier than a proxy, but maybe a proxy will be the only way?

It is not exclusive to proxies and can be done purely reading memory, once the market window is opened. As the market is a regular Tibian dialog, you can walk through its GUI structure. If you didn't get what I meant, Snowak explained a few things related to Tibias GUI here http://tpforums.org/forum/threads/443-Tibia-GUI-structure

Each listbox contains its items (both raw data and string presentation), selected index and common listbox properties. So you can read such items, since most of the things contained in the market are presented in listboxes.

In the beginning it might be a bit confuse, but following Snowak's tutorial and practicing a bit, you can get it.

SeeingBlue
02-14-2014, 01:05 AM
Ok, so I need to find the address for the market window, then address for the listboxes and their indexes and text? I think I understand that. Let me try this.

ottizy
02-14-2014, 01:24 AM
I think you'll actually only need 1 single address, the pointer to the dialog structure.

SeeingBlue
02-14-2014, 04:53 PM
I've only found 2 static addresses. 00020738 & 0002073C. Those hold the windows size. Everything else I search for won't survive when I close the game.

Blequi
02-14-2014, 05:17 PM
I've only found 2 static addresses. 00020738 & 0002073C. Those hold the windows size. Everything else I search for won't survive when I close the game.

are you using Tibia's base address? If so, disregard it.

Also, many of the structures within Tibias GUI are linked/double linked lists (mostly moveable controls like chat channels, backpacks, etc), so you have something like: "item0 -> item1 -> item2" and each step (ex: access item1 from item0, item0 -> item1) requires a call to ReadProcessMemory, unless you're injected.

As the example said above, you won't find a static address for item2 (meaning you haven't a direct access to item2). Instead, you have to read item0, then "read some address" and go to item1, then "read some address" and go to item2.

SeeingBlue
02-15-2014, 03:37 AM
I've learned a lot today. I've started trying to map the market. I'm using cheat engine to find some address related to the market window then scan for it's pointers. Problem is sometimes I find many pointers that survive restarting the client. How do I know which one to use?

Blequi
02-15-2014, 04:11 AM
there is an offset really useful for GUI walking: cursor buttondown control.

This offset is usually 0 as far as you don't click any control, otherwise it'll point to the next address you have to go. Just look around (til 0x70 +-) and probably the address you have to follow in the path will be into this range.

You can try easier problems before trying this one, because I know it's quite confusing the first times we try it. But well, the most you practice, the better you become.

easier problems: reaching all the opened backpacks (it is a good exercise), player inventories, visible chat channels, etc. If you solve most of these problems, I'm pretty sure you will be able to solve the market window or any other Tibia graphical element.

if I would trace a solution, I would say: click some button you want to reach, look the suggested address in the cursor buttondown, find it in the region you are looking at and follow it.

SeeingBlue
02-17-2014, 06:06 PM
I've found some useful market addresses like:
Category Index
Object Index
Search box
Sell Offer Index
Buy Offer Index
1st, 2nd & 3rd Sell Offers.
1st Buy Offer

I could do very little with that right now, especially since when I change an index or the search box it doesn't refresh automatically.

If anyone wants to help feel free. I'm in over my head here and could use it.

XtrmJash
02-18-2014, 01:16 AM
I've found some useful market addresses like:
Category Index
Object Index
Search box
Sell Offer Index
Buy Offer Index
1st, 2nd & 3rd Sell Offers.
1st Buy Offer

I could do very little with that right now, especially since when I change an index or the search box it doesn't refresh automatically.

If anyone wants to help feel free. I'm in over my head here and could use it.

Not refreshing automatically is probably because you're in fact looking at a pointed value. I suspect when you select an item the data about that item is downloaded, and memory allocated for it. I doubt this memory is released until the market window is closed, though it's possible that it's done when you select a different item. Regardless, the most seamless way to present this information is to allocate new memory, write the contents of the selected item to it, then deallocate the old memory later on at leisure. If you're not scanning for pointers, try that. If you are, try scanning for a higher level pointer.