diff --git a/test/STL.cpp b/test/STL.cpp index f12c7fe..fe8f2e6 100644 --- a/test/STL.cpp +++ b/test/STL.cpp @@ -37,6 +37,7 @@ void STL::DrawDargonBox_STL(char* Buffer) DargonMap M_Buffer; M_Buffer.LuckyValue = Dom["lucky_value"].GetInt(); M_Buffer.sync = 1; + M_Buffer.box_num = Dom["box_num"].GetInt(); for (int b = 0; b < 10; ++b) { M_Buffer.Result[b] = Res_Buffer[b]; @@ -64,6 +65,9 @@ int STL::SelectDargonBox_STL(int Type , int Index) case 4://Sync return DargonState_STL["dargonmap"].sync; break; + case 5://Box_num + return DargonState_STL["dargonmap"].box_num; + break; default: break; } diff --git a/test/STL.h b/test/STL.h index b5b67b1..07d76fd 100644 --- a/test/STL.h +++ b/test/STL.h @@ -33,6 +33,7 @@ struct DargonMap int LuckyValue; Dargonresult Result[10]; int sync; + int box_num; }; static std::mapDargonState_STL; static std::mapDargonModel_STL; diff --git a/test/dllmain.cpp b/test/dllmain.cpp index d0e6726..502fde3 100644 --- a/test/dllmain.cpp +++ b/test/dllmain.cpp @@ -21,12 +21,11 @@ void LenheartThread(void) static int Nut头地址; static int 属性头地址; static int 可开始执行判断; - while (true) { Sleep(10); if (DNFTOOL::GetHook(0x1A5FB4C, "0x14+0x28+") == 6)可开始执行判断 = 1; - if (可开始执行判断 == 1) + if (可开始执行判断 == 1)//选频道界面 游戏初始化完毕 { while (true) { diff --git a/test/hook.cpp b/test/hook.cpp index 2fa053e..79c1c1d 100644 --- a/test/hook.cpp +++ b/test/hook.cpp @@ -43,3 +43,17 @@ int hook::RegisterHook() 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; +} diff --git a/test/hook.h b/test/hook.h index 546fa34..b5e78e7 100644 --- a/test/hook.h +++ b/test/hook.h @@ -15,5 +15,7 @@ public: static int RegisterHook(); + //ִNut + static int InitGameScript(); }; diff --git a/test/squirrel.h b/test/squirrel.h index 2aed4f2..7552354 100644 --- a/test/squirrel.h +++ b/test/squirrel.h @@ -133,11 +133,6 @@ static SQ_ThrowerrorFunc* SQ_Throwerror = (SQ_ThrowerrorFunc*)0x13591A0; //ȡSquirrel v ַ inline uint32_t GetSqVm(); -//nutӿfuncNameCԺfuncAddr -void RegisterNutApi(const wchar_t* funcName, void* funcAddr, uint32_t v = NULL); - -//עNut -void RegisterNut(); class squirrel {