Only cainiao can write LLK plug-ins (the title is taken from the Internet and does not represent my opinion)

Source: Internet
Author: User

Okay, brother, it's just a fat dish.

 

Hearing from JJ, Xiao Xue made a plug-in for continuous viewing, which was made by using-> image analysis-> searching. instantly worship. the image analysis is bright enough, but it is said that this is a small problem. I did a command line version yesterday. exposure

 

I think

1. directly open the process space to read the table, and automatically adapt to different operating systems to find the base address of the table (that is, the base address of the board, hard code encoding--). The analysis process is bright, and the following figure shows the truth.

2. The automatic reload function is enabled. When there is no solution, the reload function is automatically implemented, but only once (generally there are two reload items)

 

Learn the magic horse, um, Ce tool, invincible enhancement, memory breakpoint, nice ~ Interface... it means it is very tangled... after a while, worship JJ's students for the Division to learn C # (you can't afford to hurt people who are keen on the bottom layer)

 

Program ideas: 1. Read the table; 2. Find the path (reload if there is no solution); 3. output the solution script; 4. Simulate Mouse clicking by script;

Baseline:

 

 

 

 

A little look at the figure. Through analysis, we can know that the base address of the table is the stack address, and different operating systems are different. The base address of the table is located through EBP + 1770c in the program, the EBP value varies in different operating systems.

Recommended article for pathfinding algorithms: finding.

The following three implementation codes are described in the article:

Bool <br/> findline (<br/> uchar table [row] [col], <br/> llkpoint P1, <br/> llkpoint P2 <br/>) <br/> {<br/> int I = 0; <br/> int Max, min; <br/> If (p1.row = p2.row) <br/>{< br/> max = (p1.col> p2.col )? P1.col: p2.col; <br/> min = (p1.col <p2.col )? P1.col: p2.col; <br/> If (max = min + 1) <br/>{< br/> return true; <br/>}< br/> for (I = min + 1; I <Max; I ++) <br/>{< br/> If (Table [p1.row] [I]! = 0) <br/>{< br/> return false; <br/>}< br/> return true; <br/>}</P> <p> If (p1.col = p2.col) <br/>{< br/> max = (p1.row> p2.row )? P1.row: p2.row; <br/> min = (p1.row <p2.row )? P1.row: p2.row; <br/> If (max = min + 1) <br/>{< br/> return true; <br/>}< br/> for (I = min + 1; I <Max; I ++) <br/>{< br/> If (Table [I] [p1.col]! = 0) <br/>{< br/> return false; <br/>}< br/> return true; <br/>}</P> <p> return false; <br/>}</P> <p> bool <br/> findcorner (<br/> uchar table [row] [col], <br/> llkpoint P1, <br/> llkpoint P2 <br/>) <br/> {<br/> int ROW = 0; <br/> int Col = 0; <br/> llkpoint P = {0}; </P> <p> ROW = p1.row; <br/> Col = p2.col; <br/> If (Table [row] [col] = 0) <br/>{< br/> P. row = row; <br/> P. col = Col; <br/> If (findline (table, P1, P)/<br/> & findline (table, P, P2 )) <br/>{< br/> return true; <br/>}</P> <p> ROW = p2.row; <br/> Col = p1.col; <br/> If (Table [row] [col] = 0) <br/>{< br/> P. row = row; <br/> P. col = Col; <br/> If (findline (table, P1, P)/<br/> & findline (table, P, P2 )) <br/>{< br/> return true; <br/>}</P> <p> return false; <br/>}</P> <p> bool <br/> findtwocorner (<br/> uchar table [row] [col], <br/> llkpoint P1, <br/> llkpoint P2 <br/>) <br/>{< br/> int I; <br/> llkpoint TP1 = {0 }; <br/> llkpoint TP2 = {0}; </P> <p> // horizontal search <br/> for (I = 0; I <Col; I ++) <br/>{< br/> if (I = p1.col) <br/>{< br/> continue; <br/>}< br/> tp1.row = p1.row; <br/> tp1.col = I; <br/> If (Table [tp1.row] [tp1.col] = 0) <br/>{< br/> If (findline (table, p1, TP1) <br/>{< br/> tp2.row = p2.row; <br/> tp2.col = I; <br/> If (Table [tp2.row] [tp2.col] = 0) <br/> {<br/> If (findline (table, P2, TP2 )) <br/>{< br/> If (findline (table, TP1, TP2) <br/>{< br/> return true; <br/>}</P> <p> // portrait search <br/> for (I = 0; I <row; I ++) <br/>{< br/> if (I = p1.row) <br/>{< br/> continue; <br/>}< br/> tp1.col = p1.col; <br/> tp1.row = I; <br/> If (Table [tp1.row] [tp1.col] = 0) <br/>{< br/> If (findline (table, P1, TP1) <br/>{< br/> tp2.col = p2.col; <br/> tp2.row = I; <br/> If (Table [tp2.row] [tp2.col] = 0) <br/>{< br/> If (findline (table, p2, TP2) <br/>{< br/> If (findline (table, TP1, TP2) <br/>{< br/> return true; <br/>}</P> <p> return false; <br/>}

 

He has been testing it in practice all the time. He played two games with real people to test the real effect.

What brother enjoys is the write process, the test success process, rather than the abuse process ..

 

Finally, on behalf of the Party and the people, I would like to thank JJ for the opportunity )..

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.