龙盒 上线版

This commit is contained in:
Lenheart 2022-03-16 10:03:39 +08:00
parent 2e11642e49
commit b727d126ae
6 changed files with 22 additions and 7 deletions

View File

@ -37,6 +37,7 @@ void STL::DrawDargonBox_STL(char* Buffer)
DargonMap M_Buffer; DargonMap M_Buffer;
M_Buffer.LuckyValue = Dom["lucky_value"].GetInt(); M_Buffer.LuckyValue = Dom["lucky_value"].GetInt();
M_Buffer.sync = 1; M_Buffer.sync = 1;
M_Buffer.box_num = Dom["box_num"].GetInt();
for (int b = 0; b < 10; ++b) for (int b = 0; b < 10; ++b)
{ {
M_Buffer.Result[b] = Res_Buffer[b]; M_Buffer.Result[b] = Res_Buffer[b];
@ -64,6 +65,9 @@ int STL::SelectDargonBox_STL(int Type , int Index)
case 4://Sync case 4://Sync
return DargonState_STL["dargonmap"].sync; return DargonState_STL["dargonmap"].sync;
break; break;
case 5://Box_num
return DargonState_STL["dargonmap"].box_num;
break;
default: default:
break; break;
} }

View File

@ -33,6 +33,7 @@ struct DargonMap
int LuckyValue; int LuckyValue;
Dargonresult Result[10]; Dargonresult Result[10];
int sync; int sync;
int box_num;
}; };
static std::map<std::string, DargonMap>DargonState_STL; static std::map<std::string, DargonMap>DargonState_STL;
static std::map<std::string, int>DargonModel_STL; static std::map<std::string, int>DargonModel_STL;

View File

@ -21,12 +21,11 @@ void LenheartThread(void)
static int Nut头地址; static int Nut头地址;
static int ; static int ;
static int ; static int ;
while (true) while (true)
{ {
Sleep(10); Sleep(10);
if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") == 6) = 1; if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") == 6) = 1;
if ( == 1) if ( == 1)//选频道界面 游戏初始化完毕
{ {
while (true) while (true)
{ {

View File

@ -43,3 +43,17 @@ int hook::RegisterHook()
return 0; return 0;
} }
int hook::InitGameScript()
{
uint32_t v = GetSqVm();
SQPushRootTable(v);
SQPushString(v, L"SetHudUI", -1);
SQ_Get(v, -2);
SQPushRootTable(v);
//SQPushString(v, L"1.cpp", -1);
SQ_Call(v, 2, 1, 0);
SQPop(v, 2);
std::cout << u8"调用成功" << std::endl;
return 0;
}

View File

@ -15,5 +15,7 @@ public:
static int RegisterHook(); static int RegisterHook();
//插件执行Nut
static int InitGameScript();
}; };

View File

@ -133,11 +133,6 @@ static SQ_ThrowerrorFunc* SQ_Throwerror = (SQ_ThrowerrorFunc*)0x13591A0;
//»ñÈ¡Squirrel v »ùÖ· //»ñÈ¡Squirrel v »ùÖ·
inline uint32_t GetSqVm(); inline uint32_t GetSqVm();
//新增nut接口funcName绑定C语言函数funcAddr
void RegisterNutApi(const wchar_t* funcName, void* funcAddr, uint32_t v = NULL);
//注册Nut函数
void RegisterNut();
class squirrel class squirrel
{ {