资源简介

猫游记辅助工具,实现了自动打怪,自动走路,录制移动脚本等功能。不过操作比较繁琐。随便弄着玩的目的是熟悉c#中分析和控制html

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class form1 : Form
    {
        int  iseathp = 0;
        int  iseatmp = 0;
        bool isatt = false;
        public form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender EventArgs e)
        {
            HtmlDocument doc = webBrowser1.Document;
            //txttest.Text = doc.Window.frames[0].Document.Window.frames[0].Document.Body.InnerHtml.ToString();//主画面//战斗画面
            txttest.Text = doc.Window.frames[0].Document.Window.frames[0].Document.Window.frames[1].Document.Body.InnerHtml.ToString();//npc列表
           // txttest.Text = doc.Window.frames[0].Document.Window.frames[0].Document.Window.frames[9].Document.Body.InnerHtml.ToString();//地图列表



        }

        private void button2_Click(object sender EventArgs e)
        {
            autoAtt();
        }
        //自动攻击
        private void autoAtt()
        {
            HtmlDocument doc = webBrowser1.Document;
            HtmlElement fighting = doc.Window.frames[0].Document.Window.frames[0].Document.GetElementById(“mapWin“);
            HtmlElement hp = doc.Window.frames[0].Document.Window.frames[0].Document.GetElementById(“hpLine_left_no“);
            HtmlElement mp = doc.Window.frames[0].Document.Window.frames[0].Document.GetElementById(“mpLine_left_no“);
            HtmlElement table = doc.Window.frames[0].Document.Window.frames[0].Document.GetElementById(“cutlinetable1“);
            HtmlElementCollection img = table.Document.GetElementsByTagName(“IMG“);
            HtmlElementCollection attcolle;
            if (fighting.GetAttribute(“style“).Contains(“DISPLAY: none“))//战斗画面
            {
                attTr.Enabled = true;

            }
            else//非战斗画面
            {
                HtmlElement npclist = doc.Window.frames[0].Document.Window.frames[0].Document.Window.frames[1].Document.GetElementById(“npcList“);
                HtmlElementCollection npccolle = npclist.GetElementsByTagName(“DT“);
                
                //先判断需不需要补给。
                if (int.Parse(hp.InnerText.ToString()) < int.Parse(txtbuxue.Text))
                {
                    if (iseathp==0)
                    {
                        foreach (HtmlElement em in img)
                        {
                            if (em.GetAttribute(“title“).Equals(txtmianbao.Text))
                            {
                                em.InvokeMember(“click“);
                                iseathp = 12;
                                eatTr.Enabled = true;
                            }
                        }
                    }
                }
                if (int.Parse(mp.InnerText.ToString()) < int.Parse(txtbumo.Text))
 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      13824  2013-03-02 13:01  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe

     文件      30208  2013-03-02 13:01  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb

     文件      11608  2013-03-04 11:12  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe

     文件        490  2010-03-17 22:39  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest

     文件       5475  2013-01-12 11:50  WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs

     文件       8562  2013-01-12 11:47  WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs

     文件       6203  2013-01-12 11:47  WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx

     文件       5749  2013-03-02 13:01  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       4166  2013-03-02 13:01  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\ResGen.read.1.tlog

     文件       1744  2013-03-02 13:01  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\ResGen.write.1.tlog

     文件       1364  2013-03-04 11:12  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt

     文件      13824  2013-03-02 13:01  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.exe

     文件        180  2013-03-02 13:00  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Form1.resources

     文件      30208  2013-03-02 13:01  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.pdb

     文件        180  2013-01-12 10:03  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Properties.Resources.resources

     文件        485  2013-01-12 11:45  WindowsFormsApplication1\WindowsFormsApplication1\Program.cs

     文件       1398  2013-01-12 09:57  WindowsFormsApplication1\WindowsFormsApplication1\Properties\AssemblyInfo.cs

     文件       2898  2013-01-12 09:57  WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.Designer.cs

     文件       5612  2013-01-12 09:57  WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.resx

     文件       1109  2013-01-12 09:57  WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.Designer.cs

     文件        249  2013-01-12 09:57  WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.settings

     文件       3455  2013-01-12 10:03  WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj

     文件        914  2013-01-12 09:57  WindowsFormsApplication1\WindowsFormsApplication1.sln

    ..A..H.     19968  2013-03-02 13:01  WindowsFormsApplication1\WindowsFormsApplication1.suo

     目录          0  2013-01-12 09:57  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\TempPE

     目录          0  2013-03-02 13:01  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug

     目录          0  2013-01-12 10:03  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug

     目录          0  2013-01-12 09:57  WindowsFormsApplication1\WindowsFormsApplication1\obj\x86

     目录          0  2013-01-12 09:57  WindowsFormsApplication1\WindowsFormsApplication1\bin

     目录          0  2013-01-12 09:57  WindowsFormsApplication1\WindowsFormsApplication1\obj

............此处省略6个文件信息

评论

共有 条评论