新增UI修改
This commit is contained in:
258
test/函数块.cpp
258
test/函数块.cpp
@@ -343,49 +343,24 @@ static int SQdofile(uint32_t v, const wchar_t* filename, bool retval, bool print
|
||||
|
||||
|
||||
|
||||
/*
|
||||
void gonggao(char* str,int ctype,int ccolor)
|
||||
{
|
||||
int shop, gonggao, type, color;
|
||||
char*addr;
|
||||
if (ctype == NULL)
|
||||
ctype = 16;
|
||||
if (ccolor == NULL)
|
||||
ccolor = 0x65535;
|
||||
shop = 0x1A5FB20;
|
||||
gonggao = 0x9536c0;
|
||||
type = ctype;
|
||||
color = ccolor;
|
||||
addr = str;
|
||||
|
||||
_asm
|
||||
{
|
||||
pushad
|
||||
mov ecx, dword ptr[ebp - 0x04]
|
||||
mov ecx, dword ptr[ecx]
|
||||
mov ecx, dword ptr[ecx + 0x40]
|
||||
push 0x00000000
|
||||
push 0x00000000
|
||||
push 0x00000000
|
||||
push 0x00000000
|
||||
push dword ptr[ebp - 0x0c]
|
||||
push dword ptr[ebp - 0x10]
|
||||
push dword ptr[ebp - 0x14]
|
||||
call dword ptr[ebp - 0x08]
|
||||
popad
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//窗口公告
|
||||
//窗口公告 0x10d
|
||||
void WindowsNotice(char* str ,int type = 0x10d ,int b = 0x0)
|
||||
{
|
||||
DWORD thisc = 0x1A5FB20;
|
||||
thisc = *(DWORD*)thisc;
|
||||
_NoticeTcall(thisc, 0, type, str, b);
|
||||
}
|
||||
|
||||
//GM公告
|
||||
void GMNotice(char* str, int type,int color)
|
||||
{
|
||||
if (type == NULL)type = 14;
|
||||
if (color == NULL)color = 0x65535;
|
||||
DWORD thisc = 0x1A5FB20;
|
||||
thisc = *(DWORD*)thisc;
|
||||
thisc = *(DWORD*)(thisc + 0x40);
|
||||
_Noticecall(thisc, 0, str, color, type, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -410,24 +385,8 @@ void RegisterNutApi(const wchar_t* funcName, void* funcAddr, uint32_t v)
|
||||
static int sq_Test(uint32_t v)
|
||||
{
|
||||
|
||||
/*
|
||||
DWORD thisc = 0x1A5FB20;
|
||||
|
||||
|
||||
|
||||
thisc = *(DWORD*)thisc;
|
||||
thisc = *(DWORD*)(thisc + 0x40);
|
||||
|
||||
char *str = (char*)u"test";
|
||||
|
||||
|
||||
_Noticecall(thisc, NULL, str, 0x66535, 14, 0, 0, 0, 0);
|
||||
*/
|
||||
|
||||
//char* str = (char*)u"test";
|
||||
//gonggao(str, 14,NULL);
|
||||
|
||||
WindowsNotice((char*)u"我的天");
|
||||
//GMNotice((char*)u"我的天");
|
||||
//WindowsNotice((char*)u"我的天");
|
||||
|
||||
SQPopTop(v);
|
||||
SQPushInt(v, 1);
|
||||
@@ -706,6 +665,194 @@ static int LDofile(uint32_t v)
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Lcout
|
||||
static int Lcout(uint32_t v)
|
||||
{
|
||||
char* str = NULL;
|
||||
int type = NULL;
|
||||
int color = NULL;
|
||||
int num = SQGetTop(v);
|
||||
|
||||
if (num == 2 || num == 3 || num == 4)
|
||||
{
|
||||
switch (num)
|
||||
{
|
||||
case 2:
|
||||
SQGetStringc(v, 2, &str);
|
||||
break;
|
||||
case 3:
|
||||
SQGetStringc(v, 2, &str);
|
||||
SQGetInt(v, 3, &type);
|
||||
break;
|
||||
case 4:
|
||||
SQGetStringc(v, 2, &str);
|
||||
SQGetInt(v, 3, &type);
|
||||
SQGetInt(v, 4, &color);
|
||||
break;
|
||||
}
|
||||
|
||||
SQPopTop(v);
|
||||
|
||||
GMNotice(str, type, color);
|
||||
|
||||
SQPushBool(v, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SQPushBool(v, false);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Lcout
|
||||
static int NewWindows(uint32_t v)
|
||||
{
|
||||
char* str = NULL;
|
||||
int type = NULL;
|
||||
int color = NULL;
|
||||
int num = SQGetTop(v);
|
||||
|
||||
if (num == 2 || num == 3 || num == 4)
|
||||
{
|
||||
switch (num)
|
||||
{
|
||||
case 2:
|
||||
SQGetStringc(v, 2, &str);
|
||||
break;
|
||||
case 3:
|
||||
SQGetStringc(v, 2, &str);
|
||||
SQGetInt(v, 3, &type);
|
||||
break;
|
||||
case 4:
|
||||
SQGetStringc(v, 2, &str);
|
||||
SQGetInt(v, 3, &type);
|
||||
SQGetInt(v, 4, &color);
|
||||
break;
|
||||
}
|
||||
|
||||
SQPopTop(v);
|
||||
|
||||
WindowsNotice(str, type, color);
|
||||
|
||||
SQPushBool(v, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SQPushBool(v, false);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Lcout
|
||||
static int SetSlot(uint32_t v)
|
||||
{
|
||||
int Type = NULL;
|
||||
int Index = NULL;
|
||||
int Xpos = NULL;
|
||||
int Ypos = NULL;
|
||||
|
||||
|
||||
int OneAddr = NULL;
|
||||
int* xpos = NULL;
|
||||
int* ypos = NULL;
|
||||
|
||||
int ParameterNum = SQGetTop(v);
|
||||
|
||||
if (ParameterNum == 5)
|
||||
{
|
||||
SQGetInt(v, 2, &Type);
|
||||
SQGetInt(v, 3, &Index);
|
||||
SQGetInt(v, 4, &Xpos);
|
||||
SQGetInt(v, 5, &Ypos);
|
||||
|
||||
SQPopTop(v);
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
case 0://拓展技能栏
|
||||
OneAddr = *(int*)0x1ADE0CC;
|
||||
OneAddr = *(int*)(OneAddr + (0x60 + (4 * Index)));
|
||||
xpos = (int*)(OneAddr + (0x14));
|
||||
ypos = (int*)(OneAddr + (0x18));
|
||||
*xpos = Xpos;
|
||||
*ypos = Ypos;
|
||||
break;
|
||||
case 1://基础技能栏
|
||||
OneAddr = *(int*)0x1ADE0CC;
|
||||
OneAddr = *(int*)(OneAddr + (0x30 + (4 * Index)));
|
||||
xpos = (int*)(OneAddr + (0x14));
|
||||
ypos = (int*)(OneAddr + (0x18));
|
||||
*xpos = Xpos;
|
||||
*ypos = Ypos;
|
||||
break;
|
||||
case 2://切换技能栏
|
||||
OneAddr = *(int*)0x1ADE0CC;
|
||||
OneAddr = *(int*)(OneAddr + (0x124 + (4 * Index)));
|
||||
xpos = (int*)(OneAddr + (0x14));
|
||||
ypos = (int*)(OneAddr + (0x18));
|
||||
*xpos = Xpos;
|
||||
*ypos = Ypos;
|
||||
break;
|
||||
case 3://快捷物品栏
|
||||
OneAddr = *(int*)0x1ADE0CC;
|
||||
OneAddr = *(int*)(OneAddr + (0x18 + (4 * Index)));
|
||||
xpos = (int*)(OneAddr + (0x14));
|
||||
ypos = (int*)(OneAddr + (0x18));
|
||||
*xpos = Xpos;
|
||||
*ypos = Ypos;
|
||||
break;
|
||||
case 4://特性技能展开栏
|
||||
OneAddr = *(int*)0x1ADE0CC;
|
||||
OneAddr = *(int*)(OneAddr + 0xC);
|
||||
OneAddr = *(int*)(OneAddr + 0x4);
|
||||
OneAddr = *(int*)(OneAddr + 0x0);
|
||||
OneAddr = *(int*)(OneAddr + 0x34);
|
||||
OneAddr = *(int*)(OneAddr + 0x4);
|
||||
OneAddr = *(int*)(OneAddr + 0x28);
|
||||
OneAddr = *(int*)(OneAddr + 0x4);
|
||||
|
||||
xpos = (int*)(OneAddr + (0x394));
|
||||
ypos = (int*)(OneAddr + (0x398));
|
||||
*xpos = Xpos;
|
||||
*ypos = Ypos;
|
||||
break;
|
||||
case 5://特性技能技能栏
|
||||
OneAddr = *(int*)(0x16E95AC + 0x400000);
|
||||
OneAddr = *(int*)(OneAddr + 0x68);
|
||||
OneAddr = *(int*)(OneAddr + 0x0);
|
||||
OneAddr = *(int*)(OneAddr + 0x8);
|
||||
OneAddr = *(int*)(OneAddr + 0x64);
|
||||
OneAddr = *(int*)(OneAddr + 0x0);
|
||||
OneAddr = *(int*)(OneAddr + 0x1C);
|
||||
OneAddr = *(int*)(OneAddr + 0x0);
|
||||
|
||||
xpos = (int*)(OneAddr + (0x1794));
|
||||
ypos = (int*)(OneAddr + (0x1798));
|
||||
*xpos = Xpos;
|
||||
*ypos = Ypos;
|
||||
break;
|
||||
case 6://菜单栏
|
||||
OneAddr = *(int*)0x1ADE0CC;
|
||||
OneAddr = *(int*)(OneAddr + (0x84 + (4 * Index)));
|
||||
xpos = (int*)(OneAddr + (0x14));
|
||||
ypos = (int*)(OneAddr + (0x18));
|
||||
*xpos = Xpos;
|
||||
*ypos = Ypos;
|
||||
break;
|
||||
}
|
||||
|
||||
SQPushBool(v, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SQPushBool(v, false);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void RegisterNut()
|
||||
{
|
||||
RegisterNutApi(L"L_sq_Test", sq_Test);
|
||||
@@ -724,6 +871,9 @@ void RegisterNut()
|
||||
RegisterNutApi(L"L_sq_GivePlayerEqu", GivePlayerEqu);
|
||||
RegisterNutApi(L"L_sq_GoDungeon", GoDungeon);
|
||||
RegisterNutApi(L"L_sq_Dofile", LDofile);
|
||||
RegisterNutApi(L"L_cout", Lcout);
|
||||
RegisterNutApi(L"L_NewWindows", NewWindows);
|
||||
RegisterNutApi(L"L_SetSlot", SetSlot);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user