GithubHelp home page GithubHelp logo

hzqst / cgassistant Goto Github PK

View Code? Open in Web Editor NEW
77.0 7.0 50.0 92.97 MB

CGAssistant is a helper for you to play CrossGate with highly automated game experience.

License: MIT License

C++ 61.22% Python 0.08% QMake 0.05% Batchfile 0.08% C 38.35% CMake 0.19% Shell 0.02% Makefile 0.01%

cgassistant's Introduction

CGAssistant

中文说明

CGAssistant is a helper for you to play CrossGate with highly automated game experience.

Warning

This project is only for academic purposes, commercial use is prohibited.

You are prohibited to publish this project elsewhere than GitHub.

However we make no promises to your game accounts and so you have to use this project at your own risk, including taking any damage to your accounts from scripts and binaries.

This project is licensed under MIT License, however if it is otherwise stated before, the latter shall prevail.

Links

Source Code

Scripts

Download

Wiki

Build Requirement

  1. Visual Studio 2019, with vc142 toolset, with Windows SDK

  2. QT 5.15 win32 (x86) for msvc2019, with QtCreator

  3. NodeJS v20.11.1 LTS (32-bit)

  4. node-gyp

Build Instruction

Let's assume that you have all requirements installed correctly.

  1. Add Qt5.**\Tools\QtCreator\bin\, Qt5.*\5.**\msvc20**\bin\ and Qt5.**\Tools\QtCreator\bin\jom (if this folder exists) to your system environment variable "PATH" just like what is mentioned in the snapshot below.

  1. Run init-dep.bat, wait until all required submodules / dependencies are pulled. (this may takes couple of minutes, depending on your network connection and download speed)

  2. Run build-boost.bat, wait until all boost static libs are generated. (this may takes couple of minutes, depending on your CPU performance)

  3. Run build-CGAHook.bat, wait until CGAHook.dll is generated under build directory.

  4. Run build-qhttp.bat, wait until qhttp.dll generated under build directory.

  5. Run build-CGAssiatant.bat, wait until CGAssistant.exe generated under build directory.

  6. Run build-nodegyp.bat, wait until node_cga.node generated under build/Release directory.

  7. Run windeploy.bat

Now you have all compiled binaries copied into build directory if no error occured.

cgassistant's People

Contributors

hzqst avatar waiting avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cgassistant's Issues

关于message通用性的问题

你好,
我看到您在gameservice.h中定义了像窗口发送的messages。
我在怀旧中试着发送其中的一些message给窗口,但并没有返回预期的数据。
请问这些message代码是否只适用于时长或道具?

祝好,

怎样全部卖东西?

跟NPC卖东西时,怎样像手动一样,把物品栏里能卖的全部卖了?我看你在代码里定义的是魔石,带问号的卡片。
改成什么让它把物品栏里成组的东西都卖了。我现在是加filter,一次卖一种,不加的话直接sell ,就是只卖你定义的魔石和卡片。
请指点一下,谢谢了。

战斗后和NPC对话的问题

举个例子说明问题吧。
法兰城南门外,进维诺亚洞窟,挂机挖矿,每天都有和NPC对话失败,然后失败20次,自动退出游戏(20次失败退出游戏,是红叶在COM文件里定义的)的情况。
观察了几天,发现出现这种情况,都是人物走到NPC旁边的时候遇敌,发生了战斗,战斗结束后人物的方向发生了变化,

朝哪个方向好像也没有啥规律。这时候人物就会和空气对话,不停的对话失败。代码是和NPC坐标对话也没有用。
去方保盆地,莎莲娜洞窟,都有这个问题,也就是说只要是:会遇敌,在和NPC对话的情况,都可能会这样。这个问题怎么解决?有些玩家是通过修改红叶的COM文件,把对话失败20次退出游戏改为登出回城来解决。但这个是妥协的方法,而且那个失败20次登出游戏还有别的用处。
我想是不是加个判断,发生遇敌的情况,战斗后,人物再进行一个动作,比如再转向一次(战斗前后人物的位置是没有变化的),然后再和NPC对话。
谢谢你的辛苦付出!

编译出现问题,内有详细说明

反馈一下编译期间遇到的问题。

首先说下我这边的requirement情况:

  1. vs2017、vs2019、vs2022以及msvc141、142、143的x64/x86生成工具,均选择最新。
  2. Windows SDK 10按照要求使用了version 10.0.17763.0
  3. QT我在你的链接只找到了https://download.qt.io/archive/qt/5.12/5.12.0/single/qt-everywhere-src-5.12.0.zip,不知是否正确。
  4. NodeJS v14.16.0. (32位),https://nodejs.org/download/release/v14.16.0/node-v14.16.0-win-x86.zip
  5. QT:https://download.qt.io/archive/qt/5.12/5.12.12/qt-opensource-windows-x86-5.12.12.exe
  6. 按照你的图片理解
    image
    这里QT和QTcreator均为一个主目录下的东西,所以我并没有单独安装QTcreator(https://download.qt.io/archive/qtcreator/5.0/5.0.3/qt-creator-opensource-windows-x86_64-5.0.3.exe)
  7. node-gyp:https://github.com/nodejs/node-gyp/archive/refs/tags/v9.4.0.zip
  8. 我的网络环境有proxy,可正常下载各种依赖包

以上为我的环境配置,在环境变量配置好之后,在build时出现了一些问题:

  1. 首先是Visual Studio的问题,如果同时安装vs2017、vs2019、vs2022的话,在运行build-boost.bat时,会报找不到b2.exe的错误。并提示我更新vs2017。我在log中发现一个名为vswhere的程序,将我的path定位到vs2022的安装目录下。我怀疑vs2022干扰了vswhere寻找vs2017的路径,将vs2022卸载,保留vs2017、vs2019时,build-boost.bat运行正常。但是卸载vs2022肯定是有问题的,这个我无法处理。
  2. 在生成build-CGAssistant.bat时,控制台出现了【jom不是可用命令】这一错误。我在Qt5.12.12\Tools\QtCreator\bin\jom中找到了jom.exe,我猜测可能是这个,遂将其添加进环境变量中,并成功生成CGAssistant.exe。
  3. 在1的前提下(卸载vs2022,保留vs2017、vs2019)。build-CGAHook.bat、build-qhttp.bat均可在build目录下生成目标文件。但是build-nodegyp.bat则出现了问题:
    image

目前这3个问题无法解决。现在无法使用CGA了。

打开CGA导致游戏程序未响应的问题

使用步骤 首先打开游戏并且登录了账号和人物 打开CGA后 造成游戏程序 未响应 尝试多次都是这样 如果我不勾选管理员运行 则不会造成游戏未响应 同时无法挂接游戏!
OS WIN10
CPU 11900K
显卡 3080
64G内存

运行时会出现客户端闪退,从CGA中可以看到JS out of memory的错误

我的电脑是WIndows 10,64 bit,内存64G
运行脚本一段时间后会出现客户端忽然消失的情况,从CGA脚本的日志里有时可以看到如下错误:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
我看我的内存使用率一直不高,是否有办法加大Javascript的内存设置来解决这个问题?

打开CGA导致游戏程序未响应的问题

使用步骤 首先打开游戏并且登录了账号和人物 打开CGA后 造成游戏程序 未响应 尝试多次都是这样 如果我不勾选管理员运行 则不会造成游戏未响应 同时无法挂接游戏!
OS WIN10
CPU 11900K
显卡 3080
64G内存

卖不出去的问题

春节的时候,发现采集鹿皮的代码回城卖不出去。没有找出来原因。昨晚去写了一段代码奇利村外采集胡椒和牛肉的混点,胡椒正常卖出,牛肉又卖不出去了。
弹出对话窗口,不会选择牛肉,可在代码里明明filter 里有牛肉。还是找不到原因,困惑中。
image
一模一样的sell代码,胡椒能卖,牛肉就不能买,请指点一下问题在哪里?
await leo.autoWalk([31,77]) //城堡出售物品NPC坐标
await leo.sell(30, 77, (item)=>{return item.name == '胡椒' && item.count == 40})
await leo.sell(30, 77, (item)=>{return item.name == '牛肉' && item.count >= 20})
牛肉的数目改成40也不行,想不通的是去地上捡了20个蕃茄,把字符串里的牛肉改成蕃茄,又可以卖掉了......。
春节的时候是去新城采集鹿皮,也是上面的代码,卖不掉,百思不得其解。

银行API有一个小问题

image
在使用cga.GetBankItemsInfo()时,银行中的物品会出现itemid全为0的情况。

在尝试寻找问题的时候,找到一个疑似问题的地方:
image
而与其相似的GetItemsInfo(),则没有此问题:
image

但由于我没有CPP基础,没有能力修改,遂提出此issue。

关于料理

您好,可以增加一个寿喜锅的多人联动制作吗,类似10A鱼翅 料理的那种制作,十分感谢

战斗中被击飞问题

CGA和游戏最小化的时候,如果游戏角色组队练级或者打BOSS被击飞了,就会卡战斗画面。大佬能不能帮忙解决一下这个问题。

关于自动登录

建议给自动登录加上等待时间,不然练级的时候所有队员都在一条线上,一般情况下不会设置自动换线,如果某一个队员掉线,不断登录这条线会导致其他人物也都掉线。

通用挂机采集治疗的问题

首先感谢您的辛苦付出和无私分享!
我在使用CGA通用挂机脚本进行采集的时候,发现当人物采集受伤,自己治疗恶化成粉伤甚至红伤的时候。现在的道具服自己一般是治疗不成功的,人物会进入不间断治疗失败---魔用完回城---补给---去采集点---继续治疗---治疗失败无魔回城 这一循环中。
尤其是人物的采集等级很高的时候,一受伤就是黄色(偶尔还见过粉色),会有治疗恶化的情况。能不能加一个判断,受伤后健康程度达到粉色,红色伤,回城找医生治疗?如果不方便加这个判断,是否有其他解决办法?
虽然这游戏已经很没落了,但我看到这开源的科技,还是非常佩服你的**觉悟,大多数人包括我,做不到。
你有时间了,回复一下。再次表示感谢!

node进程异常重启

一些性能比较差的机器,即使只有2,3开,node进程会经常崩掉。这个一般是什么原因么?大佬有计划修复么

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.