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
Looking for help [Archive] - Forums

PDA

View Full Version : Looking for help



ruffs
07-20-2013, 03:34 AM
Hey guys im looking to see if anyone could help me learn how to program a bot i can make a design in vb just dont know how to put the guts in the program, i know how to read memory curious to how i know what to write for what thanks in advance my skype is caseylachney@gmail.com i have wierd work hours and stuff so msg me if you want to help me

101
102
103

Blequi
07-20-2013, 11:01 PM
ok, you gotta agree your question is quite general.

First, I encourage you reading this thread: http://tpforums.org/forum/threads/5638-Good-References

I made it in the past for this purpose: let newcomers to get friendly with general tibian structures.

Since you said you work or do something with vb, read http://code.google.com/p/tibiaapi/ (unfortunately, it is not updated for the latest tibia versions)

In generals, bot developers spend months reading here to have the necessary background to write a bot. But as you can see, we do this because it is a really enjoyable programming task and for the good knowledge we acquire along the way. Believe me, once you understand several of these structures, you'll answer this question yourself. However, it doesn't mean to be easy nor short the path.

Do not hesitate to ask.

ruffs
07-21-2013, 04:34 AM
Thats why its in general forum xd lol but thanks ill take a look at it just dont know how much it will help ;p

ruffs
07-27-2013, 08:34 AM
I am designing a bot for Zezenia i need help with a OCR Code for VB 2010, i dont know what i need been searching for a hour or 2. if someone has please help me i will change the button info please!!

XtrmJash
07-27-2013, 09:03 AM
I am designing a bot for Zezenia i need help with a OCR Code for VB 2010, i dont know what i need been searching for a hour or 2. if someone has please help me i will change the button info please!!

Ok so think of it like a self help book. You said you don't know what to write... Here are the steps every programmer will use almost constantly when programming:

1. Think about what you're trying to achieve as your end goal.
2. Break this end goal down into easily achievable steps.
3. Take these steps, and work out what you need to think and do in order to perform them.
4. Traverse the things you need to think and do into code, and put it all together!

Let's take an example:

End Goal:

I want a program which will add any two numbers together.

Achievable steps:
1. Take 2 numbers as input.
2. Add them together.
3. Tell the user the result.

How to think:
1. The numbers taken as input could be taken into the console or to text boxes.
2. But both a console and a text box will accept letters too, I must be careful not to allow letters!
3. How can I do that? I guess I could use Int32.TryParse() - this will try convert the contents of the box to a number, and if it fails I can alert the user.
4. What if the numbers are too big for my variable?
5. I can't do a lot about that I guess... Perhaps I should inform the user on the programs startup that the numbers cannot be more than X and Y.
6. I can use MessageBox.Show (in WinForms of WPF) or Console.WriteLine to tell the user this information, or just put it in a label.
7. Outputting the result is pretty easy, again using one of the methods in step 6.

And now for the code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AddNumbers
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("This application will add two numbers together, make sure the numbers to not exceed " + Convert.ToString(sizeof(int)));
Console.WriteLine("Please enter the first number: ");
int FirstNumber;
bool FirstNumberDone = Int32.TryParse(Console.ReadLine(), out FirstNumber);
Console.WriteLine("Please enter the second number: ");
int SecondNumber;
bool SecondNumberDone = Int32.TryParse(Console.ReadLine(), out SecondNumber);

if (FirstNumberDone && SecondNumberDone)
{
int Result = AddNumbers(FirstNumber, SecondNumber);
Console.WriteLine(Result.ToString());
}
else
{
Console.WriteLine("One of the numbers was invalid, so the operation failed. Please restart the program.");
}
Console.ReadLine();
}

public static int AddNumbers(int a, int b)
{
return a + b;
}
}
}


See how easy that was? :)

ruffs
07-27-2013, 11:21 AM
and what is that i am wanting ocr to hold box over area click button it reads text

XtrmJash
07-27-2013, 02:01 PM
and what is that i am wanting ocr to hold box over area click button it reads text

What do you mean by ocr, box, and the rest of that sentence? You're making no sense.

ruffs
07-27-2013, 11:12 PM
http://www.youtube.com/watch?v=Kjdu8SjEtG0

just his script dont work 100%

XtrmJash
07-28-2013, 09:34 AM
http://www.youtube.com/watch?v=Kjdu8SjEtG0

just his script dont work 100%

If you listen to him in the video he says that it will only work properly with text above size 14. No Tibia font is that size, it's much smaller. On top of that, it might not work for some fonts specifically, and the Tibia font is non-standard in Windows. Chances are you'll never read ingame text using a pre-made OCR engine. You could potentially create your own library for it, but that'd be a large task...

ruffs
07-28-2013, 12:55 PM
Its for zezenia not tibia, then how would i go about making a button to read an adress and display it in a richtextbox and make my combo box listing my spells be used when my health or mana adress is below the rich text box when the checkbox is checked

ruffs
07-28-2013, 01:04 PM
Do you have any kind of message contact thing for better communication, where do you live?

Farsa
07-28-2013, 03:09 PM
http://www.pixel-technology.com/freeware/tessnet2/

XtrmJash
07-28-2013, 03:14 PM
Its for zezenia not tibia, then how would i go about making a button to read an adress and display it in a richtextbox and make my combo box listing my spells be used when my health or mana adress is below the rich text box when the checkbox is checked

Zezenia = glorified OT. I believe the font used in it is the same as that used in Tibia, hence describing it as the Tibia font. You can use ReadProcessMemory from kernel32.dll by DllImporting it. I'm not sure though but I think Zezenia has some features designed to prevent bots from accessing the memory regions they need, so you'll probably find a lot of pointers, maybe XOr'd values, and a ton of other shit in your way (perhaps even a rootkit, if the devs are experienced enough). There are tutorials here for reading memory, finding memory addresses, and all sorts of things. Personally I'd advise you to first read your current experience in the Tibia client, before proceeding to try develop for other clients. It will be considerably easier as there is no XOr nor Ptr to go through.

ruffs
07-28-2013, 06:50 PM
Well i no how to get xor an ptrs the c++ part i dont know how to do if you could team view to show me an example would be cool

XtrmJash
07-28-2013, 07:33 PM
Well i no how to get xor an ptrs the c++ part i dont know how to do if you could team view to show me an example would be cool

Sounds to me like you need to learn about programming itself, so look on YouTube... Search for C# tutorials, information about variables, methods, structures, classes, memory layout, and spend at least 2 hours a night for a month or so watching videos and practising, then try implement what you've learnt into a Zezenia bot, and you'll probably be able to scrape together something that does what you want. Nobody is going to be willing to program via TeamViewer, not unless you're willing to pay them (don't particularly want to have this whole argument again but oh well), and you won't be able to afford the sort of money people want to do that. The videos on YouTube are more than enough for you to learn from. I'd strongly advise using C# too, as opposed to C++. Provided you are using windows and have no intention to use Linux, you have no requirement to use C++, and it will only complicate things for you.

ruffs
07-29-2013, 03:40 AM
well do you know what addresses i need to update in the tibiaAPI.dll file to be able to use it for current tibia? i have .net reflector to decompile it an recompile it

XtrmJash
07-29-2013, 06:21 AM
well do you know what addresses i need to update in the tibiaAPI.dll file to be able to use it for current tibia? i have .net reflector to decompile it an recompile it

You'd need to update whichever addresses you'd plan to use, but I'd advise taking an alternative route. It will be more effort than you'll see reward for, to update TibiaAPI, especially if you plan to develop for Zezenia.

Why on earth would you use reflector to decompile when you can just download the sources?

ruffs
07-29-2013, 03:12 PM
For practice in another area :)

ruffs
07-31-2013, 11:57 PM
ok i have a bot that is working for 7.72 and has all the addresses with 7.4 as well can someone help me to get it to work with 7.4 custom client?

ruffs
08-19-2013, 12:15 AM
well i have almost all info i need to do what i want, i just need help getting my buttons and boxes to work can someone help me?

XtrmJash
08-19-2013, 06:18 AM
well i have almost all info i need to do what i want, i just need help getting my buttons and boxes to work can someone help me?

How do you mean get them all to work? What are they doing / not doing?

ruffs
08-19-2013, 12:28 PM
i don't know what code is needed like make this box read this and do this upon needed, EX. textbox1 value scan to see if a value is below input in textbox and if so push this button until above value but using combobox.selected if checkbox is enabled i dont know if i said that clear enough but maybe that will give you a hint to what i need if not if you got skype caseylachney@gmail.com please add me i have teamveiwer as well thanks in advance i been reading alot of your threads just not getting anything i can use thanks again!

Ash Katchup
08-19-2013, 04:13 PM
Ruffs, you know the basics about programming? You cannot jump into memory reading and Tibia programming if you cannot handle simple logic.

ruffs
08-19-2013, 05:06 PM
.. i just want a reference of what functions to use something i can actually look at and read a description why do you think i am trying to get help. cause i cant find it.i dont know what all is needed to use.
no i am new to programing hence im asking for help in the bot development forum

Ash Katchup
08-19-2013, 05:14 PM
I see.

Well, as XTRM said, you cannot use that OCR reading on Tibia.

Let met try give you a path to look on:
-To get your health and mana values, you should use an API called ReadProcessMemory;
-To use hotkeys/spells, you can use an API called SendMessage;

Which language are you using?

ruffs
08-19-2013, 08:38 PM
vs 2012 using some sources of 7.4 bot classic bot for a start making bot for custom client

ruffs
08-19-2013, 08:39 PM
and not using ocr for tibia was using that for zezenia, but im trying to learn on tibia now that way i wont have to use ocr on zezenia i will know exactly what to do to continue my learning for other games as well, and hopefully something for proficient

ruffs
08-19-2013, 08:42 PM
also im searching but not finding enough info on api to make it work so im looking for extra help i been searching for a while probably just not knowing what to search for

XtrmJash
08-19-2013, 08:55 PM
If you select a button in the form editor, at the top of the "Properties" section of Visual Studio you will see a lightning bolt icon. Click it and a list of "Events" appears. These events are called when the user somehow interacts with the software. For instance, if you select a Button on your form, you will see "OnClick", so when the user clicks on the button the code which is linked to this is run. To generate the code automatically you can double click on the event you wish to use (or maybe just to the right of it) in that list. Alternatively, for the most common events you can double click on, or right click and select "View Code", and it automatically generates them. Most common events are these:

- OnClick for Button
- SelectionChanged for ListBox (if you select an item from a listbox
- SelectionChanged for ComboBox (again, same)
- FormLoad for the form itself (the background, behind boxes, this code is called once all your GUI has loaded)
- CheckStateChanged for CheckBox, this function is called if you check or uncheck a checkbox

There are more, but you should use the Events window to view them all and learn which ones you might want to use!

ruffs
08-19-2013, 09:50 PM
thank you very much bout look at that didnt see an events deal but thats more alone the lines what i needed thanks again

ruffs
08-27-2013, 12:29 AM
figured it out

ruffs
10-11-2013, 07:45 PM
Needing some help with my attacker C#


public string AttackName()
{

string res = "";
this.Invoke((MethodInvoker)delegate
{
foreach (Creature c in client.Battlelist.GetCreatures().Where(x => x.IsOnScreen))
{
foreach (System.Windows.Forms.DataGridViewColumn col in TibianicBot.FormObjects.targetForm.dataGridView1.C olumns)
{
res = col.Name.ToLower();
}
}
});
return res;
}

im trying to get it to read from my gridview in the name column just not sure how to do it i have 0 code errors but runtime isnt able to read the grid column boxes could someone help?

jah
10-17-2013, 07:19 AM
I guess you would better ask that in a C# board. Anyways, to get productive you will have to start working in a way that u dont need to wait for replys from other people. Everybody started at some point, but there are those who keep asking questions when they stumble across something and those that keep googling for examples on how to use something until they succeed. In my professional career, I have only seen the later one's surviving - as it is much more productive. You might have to google a few hours to get into something, but its still faster than waiting a few days for a reply on some board. Try to do it like that :) If you stumble across something tibia related, this boards search function covers many topics and theres still people that will help you out if u cant find something.

XtrmJash
10-17-2013, 04:56 PM
Needing some help with my attacker C#


public string AttackName()
{

string res = "";
this.Invoke((MethodInvoker)delegate
{
foreach (Creature c in client.Battlelist.GetCreatures().Where(x => x.IsOnScreen))
{
foreach (System.Windows.Forms.DataGridViewColumn col in TibianicBot.FormObjects.targetForm.dataGridView1.C olumns)
{
res = col.Name.ToLower();
}
}
});
return res;
}

im trying to get it to read from my gridview in the name column just not sure how to do it i have 0 code errors but runtime isnt able to read the grid column boxes could someone help?

You want to get one entry specifically or an array of entries? For what purpose do you want to read it? You can access the DataGridView.Rows as an array, and select a specific row from the datagrid (e.g dataGridView1.Rows[0] to select the first row), then access the name using a similar method I believe.

My strongest advice at this point would be to contemplate your future with WinForms. It looks like right now you would benefit endlessly from switching to WPF, as the data binding would mean you could use this data far more easily and manipulate it much better.

Also, as Jah said, googling is always better than posting. By all means post after a couple of bad result from google, but continue to search while waiting for replies. Chances are even if you don't find what you're looking for on Google, you'll at least learn something new. I learn something new almost every time I visit Google :)

Also, each row is just an array of strings, so you can then access the rows elements using the same method (treating each row as an array).

A useful page for you (first result on google for DataGridView): http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.aspx

Look right down the bottom of the page for examples.

ruffs
10-18-2013, 03:14 AM
just because i post doesnt mean i quit trying ;p, i just skip to the next part and come back later

ruffs
10-18-2013, 03:15 AM
and im not changing to wpf, im halfway done with my bot in c# why would i want to change, and i will figure it out thanks anyways, and i am constantly searching codeproj and other sites for info just not finding anything useful to work with my code ;p

jo3bingham
10-18-2013, 04:45 AM
Set a breakpoint on your attack function and step through it to make sure it's even looping through your grid columns. Also, it's been mentioned a few times recently, IsOnScreen in TibiaAPI seems to be broken, use something else here. Check my recent posts for sample code.

ruffs
10-19-2013, 02:23 AM
im not using tibiaapi im using mouse clicks as my attack on battlelist with big help from pBot creator thanks to him~

ruffs
10-19-2013, 02:42 AM
and it wont read the cell of the row, all i can get it to do is read how many rows or if i do the column way how many columns and what they are but i cant access the cell box