This commit is contained in:
2024-09-16 17:09:36 +08:00
commit 39d60b284e
47 changed files with 12314 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
/*
文件名:DrawHudMain.nut
路径:Base/CallBack/DrawHudMain.nut
创建日期:2024-08-29 09:39
文件用途:血槽绘制入口(图层在血槽层)
*/
function L_HUD_BloodBackground() {
local RootTab = getroottable();
local obj = sq_getMyCharacter();
if (!obj) return;
if (RootTab.rawin("HudUi_Obj")) {
RootTab.HudUi_Obj.BottomShow(obj);
}
if (RootTab.rawin("EventList_Obj")) {
foreach(win in EventList_Obj.Events) {
win.EventShow(obj);
}
}
}
getroottable().Camera_Pos <- 0;
function L_Sync_Camera_Pos(Xpos) {
getroottable().Camera_Pos = Xpos;
// print(Xpos);
}
function Sq_DrawChannel() {
// L_sq_DrawImg("interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer_calendarui.img", 0, 0, 0);
print(Clock());
}

162
Base/CallBack/DrawMain.nut Normal file
View File

@@ -0,0 +1,162 @@
/*
文件名:DrawMain.nut
路径:Base/CallBack/DrawMain.nut
创建日期:2024-08-06 18:58
文件用途:绘制回调
*/
//在DrawMain后面调用
function L_drawMainCustomUI_All() {
local obj = sq_getMyCharacter();
if (!obj) return;
local RootTab = getroottable();
//下帧执行任务事件
if (RootTab.rawin("LenheartNextFrameFuncTab")) {
foreach(Func in RootTab["LenheartNextFrameFuncTab"]) {
Func();
}
RootTab["LenheartNextFrameFuncTab"] = [];
} else {
RootTab.LenheartNextFrameFuncTab <- [];
}
//重载逻辑
try {
local Func = loadfile("Yosin_Game_Reloading.Sign", true);
Func();
L_Cmd("cmd.exe /c del Yosin_Game_Reloading.Sign");
//清空窗口
L_Windows_List = [];
//清空活动图标窗口
getroottable().rawdelete("EventList_Obj");
//清空插件初始化状态
getroottable().rawdelete("LenheartPluginsInitFlag");
getroottable().rawdelete("RINDRO_GET_ITEM_FLAG");
//特殊清空
getroottable().rawdelete("OnlineAnnouncement_Obj");
//血槽UI
getroottable().rawdelete("HudUi_Obj");
//战令
getroottable().rawdelete("AradPass_Obj");
//战斗力系统
getroottable().rawdelete("CombatRankC_Obj");
//刷图签到
getroottable().rawdelete("FightSign_Obj");
//希曼音乐会
getroottable().rawdelete("MidsummerParty_Obj");
//在线签到
getroottable().rawdelete("OnilneSign_Obj");
//全服竞拍
getroottable().rawdelete("ServerAuction_Obj");
} catch (exception) {
if (exception != "cannot open the file")
print("Reloading Script Fail !!! \n" + exception);
}
//
local RootTab = getroottable();
//尝试调用百级UI
// if (getroottable().rawin("Lenheart_100UI_Event_BackGround")) Lenheart_100UI_Event_BackGround();
// if (getroottable().rawin("Lenheart_100UI")) Lenheart_100UI(obj);
//初始化活动图标
Lenheart_EventList_Fun(obj);
//加载注册Base函数窗口
if (RootTab.rawin("LenheartBaseFuncTab")) {
if (RINDRO_INIT_FLAG) {
local LenheartFunc = RootTab["LenheartBaseFuncTab"];
foreach(Func in LenheartFunc) {
Func(obj);
}
}
}
//加载注册Ex函数窗口
if (RootTab.rawin("LenheartFuncTab")) {
if (RINDRO_INIT_FLAG) {
local LenheartFunc = RootTab["LenheartFuncTab"];
foreach(Func in LenheartFunc) {
Func(obj);
}
}
}
//所有插件初始化完毕
if (!getroottable().rawin("LenheartPluginsInitFlag")) {
if (RINDRO_INIT_FLAG) {
local T = {
op = 25001021,
}
Rindro_BaseToolClass.SendPackEx(T);
getroottable().LenheartPluginsInitFlag <- true;
}
}
//初始化Item信息
if (!getroottable().rawin("RINDRO_GET_ITEM_FLAG")) {
getroottable().RINDRO_GET_ITEM_FLAG <- true;
Rindro_BaseToolClass.SendPackEx({
op = 20069005,
md5 = Rindro_GetMd5()
});
}
// if (Clock() - getroottable().Lsnzz >= 50) {
// getroottable().Lsnzz = Clock();
// local T = {
// op = 25001021,
// }
// Rindro_BaseToolClass.SendPackEx(T);
// }
// if (!CNSquirrelAppendage.sq_IsAppendAppendage(obj, "appendage/curreny.nut")) {
// local appendage1 = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, 174, false, "appendage/curreny.nut", true);
// }
// print(format("%02X", L_sq_RA(0x1B474D4)));
// print(R_Mouse.IsLock());
// print(format("%02X", L_sq_RA(0x3431de00 + 0x14)));
// L_sq_WA(0x3431de00 + 0x14,200);
// print(format("%02X", L_sq_RA(0x1AE94C4, "0x590+0x44+")));
//外界主界面
// if(L_sq_RA(0x1B474D4) == 0x3C7FB100)print(true);
// else print(false);
// print(CheckInOldW());
// GetTownBaseBackgroundAddress();
// print(getroottable().WindowsShowABFlag);
// L_Sq_GetPlayerEachName();
// Sout("%L",L_Sq_GetPlayerEachName());
// print(Rindro_BaseToolClass.GetEachNpcId());
// local EachCount = 0;
// local EachClassObject = L_sq_RA(0x1ADE0E0);
// if (EachClassObject) {
// local FristChildOffset = (EachClassObject + 0x68);
// for (local i = 0; i< 74; i++) {
// local AddressBuf = FristChildOffset + (4 * i);
// local ChildAddress = L_sq_RA(AddressBuf);
// if (ChildAddress) {
// local OpenFlag = L_sq_RA(ChildAddress + 0xC);
// if (OpenFlag == 257) EachCount++;
// }
// }
// }
// print(EachCount);
// for (local i = 0; i< 400; i++) {
// local WindowAddress = L_sq_GetWindowById(i);
// if (WindowAddress != 0) print(format("%02X", WindowAddress));
// if (WindowAddress == 0x39F56000) print(i);
// }
}
// getroottable().Lsnzz <- Clock();

View File

@@ -0,0 +1,72 @@
/*
文件名:GetDamageRate.nut
路径:Base/CallBack/GetDamageRate.nut
创建日期:2024-08-09 14:10
文件用途:获取伤害倍率
*/
function L_getCurrentModuleDamageRate(obj) {
if (!obj)
return 1.0;
local rate;
if (getroottable().rawin("LenheartCurrentModuleDamageRate")) {
rate = 1.0 + getroottable()["LenheartCurrentModuleDamageRate"];
} else {
rate = 1.0;
}
//超时空伤害
if (getroottable().rawin("LenheartFiendModuleDamageRate")) {
rate *= getroottable()["LenheartFiendModuleDamageRate"];
} else {
rate *= 1.0;
}
//pvf伤害
local ClientRat = 1.0;
try {
ClientRat = getCurrentModuleDamageRate(obj).tofloat();
} catch (exception) {
ClientRat = 1.0;
}
//副本伤害控制
try {
local stage = sq_GetGlobaludpModuleStage();
local dungeon = sq_GetDungeonByStage(stage);
local dungeonIndex = sq_GetDuegonIndex(dungeon);
local fbsh = 100;
foreach(id in DungeonIndex) {
if (dungeonIndex == id[0]) {
fbsh = id[1];
}
}
local nrate = fbsh.tofloat() / 100.0;
rate = rate.tofloat() * nrate;
} catch (exception) {
}
//职业伤害控制
try {
local LLJob = sq_getJob(obj);
local LLGrowT = sq_getGrowType(obj);
local LLLen = GrowType.len();
for (local i = 0; i< 11; ++i) {
if (i == LLLen) break;
if (LLJob == i) {
foreach(GR in GrowType[i]) {
if (LLGrowT == GR[0])
rate = rate.tofloat() * GR[1].tofloat();
}
}
}
} catch (exception) {
}
return (rate * ClientRat);
}

View File

@@ -0,0 +1,39 @@
/*
文件名:PushDamage.nut
路径:Base/CallBack/PushDamage.nut
创建日期:2024-08-30 14:41
文件用途:发生伤害时
*/
PushDamageFontDataFuncTab <- {};
PushDamageFontFuncTab <- {};
function Sq_PushDamageData(ObjAddress, MySelfAddress, Value) {
// print("MyCharacter: " + format("%02x", L_sq_RA(0x1AB7CDC)));
// print("ObjAddress: " + format("%02x", ObjAddress));
// print("A1: " + format("%02x", A1));
// print("A2: " + format("%02x", A2));
// print(" ");
foreach(Func in PushDamageFontFuncTab) {
Func(ObjAddress, MySelfAddress, Value);
}
}
function Sq_PushDamageFontData(ObjAddress, X, Y, Z, Value, Type, A1, A2) {
// print("MyCharacter: " + format("%02x", L_sq_RA(0x1AB7CDC)));
// print("ObjAddress: " + format("%02x", ObjAddress));
// print("A1: " + format("%02x", A1));
// print("A2: " + format("%02x", A2));
// print(" ");
// if (A2)
// print(format("%02x", L_Sq_GetObjectIsCharacter(A2)));
local Flag = true;
foreach(Func in PushDamageFontDataFuncTab) {
local Ret = Func(ObjAddress, X, Y, Z, Value, Type, A1, A2);
if (Ret == false) {
Flag = false;
}
}
return Flag;
}

View File

@@ -0,0 +1,71 @@
/*
文件名:Window_Get.nut
路径:Base/CallBack/Window_Get.nut
创建日期:2024-08-08 13:38
文件用途:窗口被获取时经过的函数
*/
getroottable().RindroOneRunTable <- {};
function OneRunCode(Func, Key, Window_Obj) {
if (!RindroOneRunTable.rawin(Key)) {
Func(Window_Obj);
RindroOneRunTable.rawset(Key, true);
}
}
function L_Old_Window_Get(Window_Obj) {
// print(L_sq_RA(Window_Obj + 0xC));
// L_sq_WA(Window_Obj + 0xC,257);
// L_sq_RA(Window_Obj, "0xC+");
// if (L_sq_RA(Window_Obj + 0x14) == 0) {
// print(L_sq_RA(Window_Obj + 0x18));
// print(format("%02x", Window_Obj));
// }
// if (0x422e2100 == Window_Obj) {
// print(L_sq_RA(Window_Obj + 0x14));
// }
// OneRunCode(function(Window_Obj) {
// if (0x185242C == L_sq_RA(Window_Obj)) {
// //任务提示
// if (L_sq_RAB(Window_Obj + 0x78) == 131 && L_sq_RAB(Window_Obj + 0x79) == 2) {
// L_sq_WA(Window_Obj + 0x14, 144);
// L_sq_WA(Window_Obj + 0x18, 53);
// }
// }
// }, "任务提示设置", Window_Obj);
// //任务提示
// if (0x185242C == L_sq_RA(Window_Obj)) {
// if (L_sq_RA(Window_Obj + 0x44) == 131 && L_sq_RAB(Window_Obj + 0x79) == 2) {
// L_sq_WA(Window_Obj + 0x14, 144);
// L_sq_WA(Window_Obj + 0x18, 53);
// }
// }
// if(369 == L_sq_RA(Window_Obj + 0x78))
// print(format("%02X", Window_Obj));
}
//窗口是否打开
function L_Old_Window_Visible(WindowObject, Flag) {
// print(format("%02X", WindowObject));
// if (Character_Info_Window_Address.rawin(WindowObject)) {
// L_sq_WAB(WindowObject + 0xc, 0);
// // print(L_sq_RA(WindowObject + 0x14));
// // print(format("%02X", WindowObject));
// }
// print(1213);
// foreach(Key, Table in Character_Info_Window_Address) {
// L_sq_WA(Key + 0xC, 256);
// // print(format("%02X", Key));
// }
}