111
This commit is contained in:
@@ -369,9 +369,26 @@ int squirrel::sq_Switching(uint32_t v)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
//typedef int sub_1206600(int a1,int a2, int a3, int a4 ,int a5,...);
|
||||
//static sub_1206600* Func1206600 = (sub_1206600*)0x1206600;
|
||||
int squirrel::sq_Test(uint32_t v)
|
||||
{
|
||||
//Func1206600(*(int*)0x1B45B94, 0x253, 0x1FD, 0xffffffff, *(int*)(0x19e868 + 0x1c));
|
||||
return 0;
|
||||
}
|
||||
|
||||
int squirrel::sq_OpenConsole(uint32_t v)
|
||||
{
|
||||
wchar_t* OutPutBuffer;
|
||||
SQGetString(v, 2, &OutPutBuffer);
|
||||
char* OutPutText = DNFTOOL::SquirrelU2W(OutPutBuffer);
|
||||
|
||||
AllocConsole();
|
||||
SetConsoleTitleA(OutPutText);
|
||||
//SetConsoleOutputCP(65001);
|
||||
freopen(("CONOUT$"), ("w"), stdout);
|
||||
freopen(("CONOUT$"), ("w"), stderr);
|
||||
freopen(("CONIN$"), ("r"), stdin);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2134,6 +2151,7 @@ void squirrel::RegisterNutApi(const wchar_t* funcName, void* funcAddr, uint32_t
|
||||
void squirrel::R_Register_Nut()
|
||||
{
|
||||
RegisterNutApi(L"L_sq_Test", squirrel::sq_Test);
|
||||
RegisterNutApi(L"L_sq_OpenConsole", squirrel::sq_OpenConsole);
|
||||
RegisterNutApi(L"L_sq_MoveMap", squirrel::sq_MoveMap);
|
||||
RegisterNutApi(L"L_Sq_Err", Sq_Err);
|
||||
|
||||
@@ -2284,12 +2302,17 @@ void squirrel::SqrCallBackFunc()
|
||||
void squirrel::InitGameScript()
|
||||
{
|
||||
uint32_t v = GetSqVm();
|
||||
|
||||
//消息框黏贴
|
||||
#ifdef COPY_MESSAGE
|
||||
* (WORD*)0x011C53B0 = 0x01B0;
|
||||
#endif // COPY_MESSAGE
|
||||
|
||||
//重复HOOK
|
||||
#ifdef RsHook
|
||||
auto Registerfunc = reinterpret_cast<register_pack_handler_t>(0x7186D0);
|
||||
Registerfunc(130, sock::Pack_Control, 0);
|
||||
#endif // RsHook
|
||||
|
||||
|
||||
#ifdef SELL
|
||||
SQPushRootTable(v);
|
||||
|
||||
Reference in New Issue
Block a user