11111
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
文件名:DrawHudMain.nut
|
||||
路径:Base/CallBack/DrawHudMain.nut
|
||||
创建日期:2024-08-29 09:39
|
||||
文件用途:血槽绘制入口(图层在血槽层)
|
||||
文件用途:
|
||||
*/
|
||||
//血槽背景
|
||||
function L_HUD_BloodBackground() {
|
||||
local RootTab = getroottable();
|
||||
local obj = sq_getMyCharacter();
|
||||
@@ -21,6 +22,7 @@ function L_HUD_BloodBackground() {
|
||||
|
||||
getroottable().Camera_Pos <- {};
|
||||
|
||||
//城镇摄像机
|
||||
function L_Sync_Camera_Pos(Camera_Object) {
|
||||
// print(Camera_Object);
|
||||
// print(Camera_Object);
|
||||
@@ -31,5 +33,5 @@ function L_Sync_Camera_Pos(Camera_Object) {
|
||||
|
||||
function Sq_DrawChannel() {
|
||||
// L_sq_DrawImg("interface2/cs_shop/cs_packageevent/2021_summer/hearoursummer_calendarui.img", 0, 0, 0);
|
||||
print(Clock());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,17 +9,18 @@ function L_drawMainCustomUI_All() {
|
||||
local obj = sq_getMyCharacter();
|
||||
if (!obj) return;
|
||||
|
||||
local RootTab = getroottable();
|
||||
|
||||
//获取与上一帧的dt
|
||||
if (!(getroottable().rawin("Rindro_DurationFlag"))) {
|
||||
if (!(RootTab.rawin("Rindro_DurationFlag"))) {
|
||||
Rindro_DurationFlag <- L_Getmicroseconds();
|
||||
Rindro_Duration <- 0;
|
||||
} else {
|
||||
local NowM = L_Getmicroseconds();
|
||||
Rindro_Duration = NowM - Rindro_DurationFlag;
|
||||
Rindro_Duration = (NowM - Rindro_DurationFlag) / 2;
|
||||
Rindro_DurationFlag = NowM;
|
||||
}
|
||||
|
||||
local RootTab = getroottable();
|
||||
//下帧执行任务事件
|
||||
if (RootTab.rawin("LenheartNextFrameFuncTab")) {
|
||||
foreach(Func in RootTab["LenheartNextFrameFuncTab"]) {
|
||||
@@ -31,158 +32,119 @@ function L_drawMainCustomUI_All() {
|
||||
}
|
||||
|
||||
//重载逻辑
|
||||
try {
|
||||
local Func = loadfile("Yosin_Game_Reloading.Sign", true);
|
||||
Func();
|
||||
L_Cmd("cmd.exe /c del Yosin_Game_Reloading.Sign");
|
||||
//清空窗口
|
||||
L_Windows_List = [];
|
||||
//清空所有注册包
|
||||
Pack_Control = {};
|
||||
|
||||
PushDamageFontDataFuncTab <- {};
|
||||
PushDamageFontFuncTab <- {};
|
||||
|
||||
//清空活动图标窗口
|
||||
getroottable().rawdelete("EventList_Obj");
|
||||
//清空插件初始化状态
|
||||
getroottable().rawdelete("LenheartPluginsInitFlag");
|
||||
|
||||
getroottable().rawdelete("RINDRO_GET_ITEM_FLAG");
|
||||
//特殊清空
|
||||
getroottable().rawdelete("OnlineAnnouncement_Obj");
|
||||
//血槽UI
|
||||
getroottable().rawdelete("HudUi_Obj");
|
||||
//交互UI
|
||||
getroottable().rawdelete("L_Each_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");
|
||||
//秒伤统计
|
||||
getroottable().rawdelete("DamagePerSecond_Obj");
|
||||
//皮肤仓库
|
||||
getroottable().rawdelete("SkinHub_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);
|
||||
Sq_ReloadLogic();
|
||||
|
||||
//初始化活动图标
|
||||
Lenheart_EventList_Fun(obj);
|
||||
|
||||
//加载注册Base函数窗口
|
||||
if (RootTab.rawin("LenheartBaseFuncTab")) {
|
||||
if (RINDRO_INIT_FLAG) {
|
||||
local LenheartFunc = RootTab["LenheartBaseFuncTab"];
|
||||
foreach(Func in LenheartFunc) {
|
||||
Func(obj);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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;
|
||||
local T = {
|
||||
op = 25001021,
|
||||
}
|
||||
Rindro_BaseToolClass.SendPackEx(T);
|
||||
getroottable().LenheartPluginsInitFlag <- true;
|
||||
}
|
||||
|
||||
//初始化Item信息
|
||||
if (!getroottable().rawin("RINDRO_GET_ITEM_FLAG")) {
|
||||
RINDRO_CONFIG <- Rindro_GetLocalConfig();
|
||||
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());
|
||||
|
||||
|
||||
|
||||
|
||||
// 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);
|
||||
// }
|
||||
|
||||
// if (Clock() - getroottable().SINNU >= 10) {
|
||||
// getroottable().SINNU = Clock();
|
||||
// L_sq_MoveTown(1, 1, 474, 249);
|
||||
// }
|
||||
|
||||
// print(sq_GetCurrentModuleType());
|
||||
// Rindro_BaseToolClass.T_DrawDynamicAni(obj, "common/luke/newtile/02_success_back_1.ani", 430, 210 + 26, "卢克阻截开始" + AHSJKDNJKA);
|
||||
}
|
||||
|
||||
// AHSJKDNJKA <- Clock();
|
||||
// getroottable().SINNU <- Clock();
|
||||
// L_NewWindows("Lenheart", 56, 0x1);
|
||||
// L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], 0x01ADE090, 56, 0, 0);
|
||||
// getroottable().Lsnzz <- Clock();
|
||||
|
||||
// dofile("sqr/Base/_Tool/Json.nut");
|
||||
|
||||
// print(T);
|
||||
// print(T);
|
||||
|
||||
|
||||
|
||||
// Register_DPS_Pack(1, function(Jso) {
|
||||
// printT(Jso);
|
||||
// });
|
||||
|
||||
|
||||
// local asos = sq_CreateAICharacter(900);
|
||||
// asos.setCurrentPos(sq_getMyCharacter().getXPos() + 100, sq_getMyCharacter().getYPos(), 0);
|
||||
// sq_AddObject(sq_getMyCharacter(), asos, OBJECTTYPE_VIRTUALCHARACTER, false);
|
||||
// sq_ChangeDrawLayer(asos, ENUM_DRAWLAYER_CLOSEBACK);
|
||||
|
||||
|
||||
// L_sq_GoDungeon(1504);
|
||||
|
||||
CargoType <- 0;
|
||||
Sq_GetExeStr_Map[21910] <- function(Index) {
|
||||
CargoType = 0;
|
||||
return 21910;
|
||||
}
|
||||
Sq_GetExeStr_Map[21911] <- function(Index) {
|
||||
CargoType = 1;
|
||||
return 21911;
|
||||
}
|
||||
Rindro_Haker.LoadHook(0xE67800, ["int", "int"],
|
||||
function(args) {
|
||||
//点击了仓库转移物品
|
||||
if (args[0] == 0x2B) {
|
||||
if (CargoType == 0) {
|
||||
printf("点击个人仓库转移物品");
|
||||
local T = {
|
||||
op = 21091001,
|
||||
type = 0,
|
||||
}
|
||||
Rindro_BaseToolClass.SendPackEx(T);
|
||||
return [0];
|
||||
}
|
||||
if (CargoType == 1) {
|
||||
printf("点击账号仓库转移物品");
|
||||
local T = {
|
||||
op = 21091001,
|
||||
type = 1,
|
||||
}
|
||||
Rindro_BaseToolClass.SendPackEx(T);
|
||||
return [0];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
function(args) {
|
||||
// print(666);
|
||||
// print(format("%02x", args.pop()));
|
||||
// TTTAni <- args.pop();
|
||||
return null;
|
||||
});
|
||||
|
||||
|
||||
|
||||
// function onAttack_Swordman(obj, damager, boundingBox, isStuck)
|
||||
// {
|
||||
// local Mon = sq_GetCNRDObjectToActiveObject(damager);
|
||||
// Mon.setHp(0, null, true);
|
||||
// }
|
||||
|
||||
// function getCurrentModuleDamageRate(obj) {
|
||||
// local LLJob = sq_getJob(obj);
|
||||
// local LLGrowT = sq_getGrowType(obj);
|
||||
// if (LLJob == 0 && LLGrowT == 2)
|
||||
// return 2100000000.0;
|
||||
|
||||
// return 1.0;
|
||||
// }
|
||||
|
||||
// function onStartDungeon_Swordman(obj) {
|
||||
// print(666);
|
||||
// obj.setEnableDamageBox(false);
|
||||
// }
|
||||
@@ -35,4 +35,50 @@ function SetDamageRateCallBack(Chunk) {
|
||||
}
|
||||
Pack_Control.rawset(2024110902, SetDamageRateCallBack);
|
||||
|
||||
getroottable()["LenheartFuncTab"].rawset("GetDamageRateFuncN", Lenheart_GetDamageRate_Fun);
|
||||
getroottable()["LenheartFuncTab"].rawset("GetDamageRateFuncN", Lenheart_GetDamageRate_Fun);
|
||||
|
||||
|
||||
// ModuleDamageTable <- {
|
||||
// //这个1是 副本编号
|
||||
// [1] = {
|
||||
// //这个0是大职业编号 比如说鬼剑士就是 0 女格斗家就是 1 在character/character.lst 这个文件里可以看
|
||||
// [0] = {
|
||||
// //这个0 和 1 是转职编号 0就是未转职 1 就是转了剑魂
|
||||
// [0] = 1.0,
|
||||
// [1] = 3.0
|
||||
// }
|
||||
// },
|
||||
// //2号副本
|
||||
// [2] ={
|
||||
// //女格斗家职业
|
||||
// [1] = {
|
||||
// [0] = 1.0,
|
||||
// [1] = 3.0
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// function getCurrentModuleDamageRate(obj)
|
||||
// {
|
||||
// local Rate = 1.0;
|
||||
// local stage = sq_GetGlobaludpModuleStage();
|
||||
// local dungeon = sq_GetDungeonByStage(stage);
|
||||
// local dungeonIndex = sq_GetDuegonIndex(dungeon);
|
||||
|
||||
// local LLJob = sq_getJob(obj);
|
||||
// local LLGrowT = sq_getGrowType(obj);
|
||||
|
||||
// //处于生效副本中
|
||||
// if(ModuleDamageTable.rawin(dungeonIndex)){
|
||||
// //自己是生效职业
|
||||
// if(ModuleDamageTable[dungeonIndex].rawin(LLJob)){
|
||||
// //是生效转职
|
||||
// if(ModuleDamageTable[dungeonIndex][LLJob].rawin(LLGrowT)){
|
||||
// Rate += ModuleDamageTable[dungeonIndex][LLJob][LLGrowT].tofloat();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// return Rate;
|
||||
// }
|
||||
157
Base/CallBack/PackControl.nut
Normal file
157
Base/CallBack/PackControl.nut
Normal file
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
文件名:PackControl.nut
|
||||
路径:Base/PackControl/PackControl.nut
|
||||
创建日期:2024-08-06 22:13
|
||||
文件用途:
|
||||
*/
|
||||
Pack_Control <- {}
|
||||
Pack_DPS_Control <- {}
|
||||
|
||||
function Register_DPS_Pack(Id, Func) {
|
||||
Pack_DPS_Control.rawset(Id, Func);
|
||||
}
|
||||
|
||||
function Sq_Pack_Control(Chunk) {
|
||||
try {
|
||||
local Pack_Json = Json.Decode(Chunk);
|
||||
if (Pack_Json.op == 2147483646) {
|
||||
if (Pack_DPS_Control.rawin(Pack_Json.dps_id)) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
Jso.rawdelete("op");
|
||||
Pack_DPS_Control[Pack_Json.dps_id](Jso);
|
||||
}
|
||||
} else {
|
||||
if (Pack_Control.rawin(Pack_Json.op)) {
|
||||
try {
|
||||
Pack_Control[Pack_Json.op](Chunk);
|
||||
} catch (exception) {
|
||||
print("error pack: " + Pack_Json.op);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (exception) {
|
||||
print("error packmsg: " + Pack_Json.op);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function Sq_Pack_ControlLocal(Chunk) {
|
||||
local Pack_Json = Json.Decode(Chunk);
|
||||
if (Pack_Json.op == 2147483646) {
|
||||
if (Pack_DPS_Control.rawin(Pack_Json.dps_id)) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
Jso.rawdelete("op");
|
||||
Pack_DPS_Control[Pack_Json.dps_id](Jso);
|
||||
}
|
||||
} else {
|
||||
if (Pack_Control.rawin(Pack_Json.op)) {
|
||||
Pack_Control[Pack_Json.op](Chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function SendPackToDP_S(Id, T) {
|
||||
T.op <- 2147483646;
|
||||
T.dps_id <- Id;
|
||||
Rindro_BaseToolClass.SendPackEx(T);
|
||||
}
|
||||
|
||||
|
||||
//进入副本回调
|
||||
function LenheartGotoDgnCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
local DgnId = Jso.map.id;
|
||||
local DgnRate = Jso.map.ra;
|
||||
L_sq_GoDungeon(DgnId);
|
||||
}
|
||||
Pack_Control.rawset(2024041602, LenheartGotoDgnCallBack);
|
||||
|
||||
|
||||
//进入副本增加属性
|
||||
function LenheartAdditionalAttributes(obj) {
|
||||
//在副本中
|
||||
if (sq_GetCurrentModuleType() == 3) {
|
||||
if (!CNSquirrelAppendage.sq_IsAppendAppendage(obj, "appendage/lenheartap.nut")) {
|
||||
if ("LenheartAttributesTable" in getroottable()) {
|
||||
local Abarr = {};
|
||||
foreach(AtObj in getroottable()["LenheartAttributesTable"]) {
|
||||
foreach(Apos, At in AtObj) {
|
||||
if(!Abarr.rawin(Apos))Abarr[Apos] <- At;
|
||||
else Abarr[Apos]+= At;
|
||||
}
|
||||
}
|
||||
|
||||
local appendage = CNSquirrelAppendage.sq_AppendAppendage(obj, obj, -1, false, "appendage/lenheartap.nut", true);
|
||||
CNSquirrelAppendage.sq_Append(appendage, obj, obj);
|
||||
local change_appendage = appendage.sq_getChangeStatus("Yosin_LenheartDgnBuff");
|
||||
if (!change_appendage) {
|
||||
change_appendage = appendage.sq_AddChangeStatusAppendageID(obj, obj, 0,
|
||||
CHANGE_STATUS_TYPE_COOLTIME_DECLINE,
|
||||
false, 0, 115514);
|
||||
}
|
||||
if (change_appendage) {
|
||||
change_appendage.clearParameter();
|
||||
|
||||
foreach(Key, Value in Abarr) {
|
||||
if (Key == 0) change_appendage.addParameter(13, false, Value.tofloat()); //HP
|
||||
else if (Key == 1) change_appendage.addParameter(48, false, Value.tofloat()); //MP
|
||||
else if (Key == "strength") change_appendage.addParameter(0, false, Value.tofloat()); //力量
|
||||
else if (Key == "intelligence") change_appendage.addParameter(1, false, Value.tofloat()); //智力
|
||||
else if (Key == "vitality") change_appendage.addParameter(2, false, Value.tofloat()); //体力
|
||||
else if (Key == "spirit") change_appendage.addParameter(3, false, Value.tofloat()); //精神
|
||||
else if (Key == "physicalAttack") change_appendage.addParameter(4, false, Value.tofloat()); //物攻
|
||||
else if (Key == "magicAttack") change_appendage.addParameter(31, false, Value.tofloat()); //魔攻
|
||||
else if (Key == "independentAttack") {
|
||||
change_appendage.addParameter(53, false, Value.tofloat()); //独立
|
||||
change_appendage.addParameter(54, false, Value.tofloat()); //独立
|
||||
} else if (Key == "physicalDefense") change_appendage.addParameter(5, false, Value.tofloat()); //物理防御
|
||||
else if (Key == "magicDefense") change_appendage.addParameter(32, false, Value.tofloat()); //魔法防御
|
||||
else if (Key == "physicalCritical") change_appendage.addParameter(15, false, Value.tofloat() / 10.0); //物理暴击
|
||||
else if (Key == "magicCritical") change_appendage.addParameter(16, false, Value.tofloat() / 10.0); //魔法暴击
|
||||
else if (Key == "attackSpeed") change_appendage.addParameter(10, false, Value.tofloat()); //攻速
|
||||
else if (Key == "releaseSpeed") change_appendage.addParameter(12, false, Value.tofloat()); //释放
|
||||
else if (Key == "moveSpeed") change_appendage.addParameter(11, false, Value.tofloat()); //移速
|
||||
else if (Key == "resistance") change_appendage.addParameter(39, false, Value.tofloat()); //抗磨
|
||||
else if (Key == "hitRate") change_appendage.addParameter(33, false, Value.tofloat()); //命中
|
||||
else if (Key == "avoidance") change_appendage.addParameter(27, false, Value.tofloat()); //闪避
|
||||
else if (Key == "hpRecovery") change_appendage.addParameter(14, false, Value.tofloat()); //HP恢复
|
||||
else if (Key == "mpRecovery") change_appendage.addParameter(29, false, Value.tofloat()); //MP恢复
|
||||
else if (Key == "stun") change_appendage.addParameter(41, false, Value.tofloat()); //僵直
|
||||
else if (Key == "hardStun") change_appendage.addParameter(34, false, Value.tofloat()); //硬直
|
||||
else if (Key == "fire") change_appendage.addParameter(42, false, Value.tofloat()); //火强
|
||||
else if (Key == "fireResistance") change_appendage.addParameter(20, false, Value.tofloat()); //火抗
|
||||
else if (Key == "water") change_appendage.addParameter(43, false, Value.tofloat()); //冰强
|
||||
else if (Key == "waterResistance") change_appendage.addParameter(21, false, Value.tofloat()); //冰抗
|
||||
else if (Key == "light") change_appendage.addParameter(45, false, Value.tofloat()); //光强
|
||||
else if (Key == "lightResistance") change_appendage.addParameter(23, false, Value.tofloat()); //光抗
|
||||
else if (Key == "dark") change_appendage.addParameter(44, false, Value.tofloat()); //暗强
|
||||
else if (Key == "darkResistance") change_appendage.addParameter(22, false, Value.tofloat()); //暗抗
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (getroottable().rawin("LenheartFuncTab")) {
|
||||
getroottable()["LenheartFuncTab"].rawset("LenheartAdditionalAttributesFunc", LenheartAdditionalAttributes);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("LenheartAdditionalAttributesFunc", LenheartAdditionalAttributes);
|
||||
getroottable().rawset("LenheartFuncTab", T);
|
||||
}
|
||||
|
||||
|
||||
//进入副本增加属性
|
||||
function LenheartAdditionalCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
if ("LenheartAttributesTable" in getroottable()) {
|
||||
local T = getroottable()["LenheartAttributesTable"];
|
||||
T.rawset("LenheartCollectBoxAb", Jso.Attribute);
|
||||
} else {
|
||||
local T = {};
|
||||
T.rawset("LenheartCollectBoxAb", Jso.Attribute);
|
||||
getroottable().rawset("LenheartAttributesTable", T);
|
||||
}
|
||||
}
|
||||
Pack_Control.rawset(20069016, LenheartAdditionalCallBack);
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
文件名: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));
|
||||
// }
|
||||
}
|
||||
21
Base/Interface.nut
Normal file
21
Base/Interface.nut
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
文件名:Interface.nut
|
||||
路径:Base/Interface.nut
|
||||
创建日期:2025-05-01 07:39
|
||||
文件用途:所有基础文件加载以后 将会执行的逻辑 用于初始化一些接口和默认设置
|
||||
*/
|
||||
|
||||
//消息框黏贴
|
||||
NativePointer(0x011C53B0).writeShort(0x1B0);
|
||||
|
||||
//修复233号弹窗
|
||||
NativePointer(0x00727017).writeByteArray([0xEB, 0x11, 0x90, 0x90, 0x90, 0x90, 0x90]);
|
||||
|
||||
//反遍历函数
|
||||
NativePointer(0x1370FD7).writeInt(0);
|
||||
|
||||
//全局的道具信息
|
||||
if (!getroottable().rawin("Rindro_ItemInfoObject")) Rindro_ItemInfoObject <- {};
|
||||
|
||||
//开启热重载目录
|
||||
if(getroottable().rawin("RINDROLOCAL"))Sq_AutoReload("sqr");
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
文件名:PackControl.nut
|
||||
路径:Base/PackControl/PackControl.nut
|
||||
创建日期:2024-08-06 22:13
|
||||
文件用途:
|
||||
*/
|
||||
Pack_Control <- {}
|
||||
|
||||
function Sq_Pack_Control(Chunk) {
|
||||
try {
|
||||
local Pack_Json = Json.Decode(Chunk);
|
||||
if (Pack_Control.rawin(Pack_Json.op)) {
|
||||
try {
|
||||
Pack_Control[Pack_Json.op](Chunk);
|
||||
} catch (exception) {
|
||||
print("error pack: " + Pack_Json.op);
|
||||
}
|
||||
}
|
||||
} catch (exception) {
|
||||
print("error packmsg: " + Pack_Json.op);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function Sq_Pack_ControlLocal(Chunk) {
|
||||
local Pack_Json = Json.Decode(Chunk);
|
||||
if (Pack_Control.rawin(Pack_Json.op)) {
|
||||
Pack_Control[Pack_Json.op](Chunk);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//进入副本回调
|
||||
function LenheartGotoDgnCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
local DgnId = Jso.map.id;
|
||||
local DgnRate = Jso.map.ra;
|
||||
L_sq_GoDungeon(DgnId);
|
||||
}
|
||||
Pack_Control.rawset(2024041602, LenheartGotoDgnCallBack);
|
||||
@@ -4,6 +4,7 @@
|
||||
创建日期:2024-08-27 12:13
|
||||
文件用途:个人信息属性面板
|
||||
*/
|
||||
return;
|
||||
class Lenheart_Character_Info_ClassC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
@@ -372,6 +373,7 @@ DrawCodeCallBackFunc.Rindro_Character_Info <- function(Args) {
|
||||
|
||||
//个人信息窗口逻辑
|
||||
function L_Character_Info_Window(WindowObject) {
|
||||
return false;
|
||||
// //返回Flase 原逻辑继续执行 返回Tue 原逻辑终止执行
|
||||
// local Flag = false;
|
||||
// if (getroottable().rawin("Lenheart_Character_Info_Class_Obj")) {
|
||||
@@ -487,6 +489,7 @@ class Lenheart_Other_Character_Info_ClassC extends Lenheart_Character_Info_Class
|
||||
|
||||
//他人信息窗口逻辑
|
||||
function L_Other_Character_Info_Window(WindowObject) {
|
||||
return false;
|
||||
//返回Flase 原逻辑继续执行 返回Tue 原逻辑终止执行
|
||||
local Flag = false;
|
||||
if (getroottable().rawin("Lenheart_Other_Character_Info_Class_Obj")) {
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
*/
|
||||
class Rindro_Cursor {
|
||||
|
||||
//强制锁
|
||||
ForceLockState = false;
|
||||
|
||||
|
||||
//是否启用
|
||||
UseState = 0;
|
||||
|
||||
TypeState = 0;
|
||||
|
||||
@@ -238,13 +238,181 @@ function Lenheart_Each_Fun(obj) {
|
||||
getroottable()["LenheartFuncTab"].rawset("Lenheart_EachN", Lenheart_Each_Fun);
|
||||
|
||||
|
||||
// Rindro_Haker.LoadHook(0x10041D0, ["int", "int", "int"],
|
||||
// function(args) {
|
||||
// if (getroottable().rawin("L_Each_Obj")) {
|
||||
// getroottable()["L_Each_Obj"].BottomShow();
|
||||
// }
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
|
||||
class Lenheart_PlayerEachC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
|
||||
//不是窗口
|
||||
NoWindow = true;
|
||||
|
||||
//是否可见
|
||||
// Visible = false;
|
||||
|
||||
Info = null;
|
||||
Basic = null;
|
||||
|
||||
//当前交互角色姓名
|
||||
PlayerEach_Name = null;
|
||||
PlayerEach_Flag = false;
|
||||
PlayerEach_ButtonMap = null;
|
||||
|
||||
//通用按钮
|
||||
PlayerEach_CommonButtonMap = null;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
PlayerEach_ButtonMap = {};
|
||||
PlayerEach_CommonButtonMap = {};
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
}
|
||||
|
||||
function RegisterWidget() {}
|
||||
|
||||
function Show(obj) {}
|
||||
|
||||
function TopShow(obj) {}
|
||||
|
||||
function DrawMain(obj) {}
|
||||
|
||||
function MySelfShow() {
|
||||
if (PlayerEach_Name) {
|
||||
local obj = sq_getMyCharacter();
|
||||
LenheartNewUI_Windows.Show(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化NPC按钮
|
||||
function InitNpcButton() {
|
||||
Childrens = [];
|
||||
if (PlayerEach_ButtonMap.rawin(PlayerEach_Name)) {
|
||||
foreach(Func in PlayerEach_ButtonMap[PlayerEach_Name]) {
|
||||
Func(this);
|
||||
}
|
||||
}
|
||||
foreach(Func in PlayerEach_CommonButtonMap) {
|
||||
Func(this);
|
||||
}
|
||||
this.Visible = true;
|
||||
}
|
||||
|
||||
function AddEachForCommon(Index, Func) {
|
||||
PlayerEach_CommonButtonMap.rawset(Index, Func);
|
||||
}
|
||||
|
||||
function RemoveEachForCommon(Index) {
|
||||
PlayerEach_CommonButtonMap.rawdelete(Index);
|
||||
}
|
||||
|
||||
function AddEachForPlayerName(Index, Func) {
|
||||
if (PlayerEach_ButtonMap.rawin(Index)) {
|
||||
PlayerEach_ButtonMap[Index].append(Func);
|
||||
return;
|
||||
}
|
||||
PlayerEach_ButtonMap.rawset(Index, [Func]);
|
||||
}
|
||||
|
||||
function RemoveEachForPlayerName(Index) {
|
||||
PlayerEach_ButtonMap.rawdelete(Index);
|
||||
}
|
||||
|
||||
function CloseAllEach() {
|
||||
if (Basic) {
|
||||
L_sq_WA(L_sq_P2I(Basic) + 0xC, 256);
|
||||
}
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(obj) {
|
||||
LenheartNewUI_Windows.SyncPos(X, Y);
|
||||
|
||||
local Str = L_Sq_GetPlayerEachName();
|
||||
if (Str.len() > 0) {
|
||||
PlayerEach_Name = Str;
|
||||
}
|
||||
if (PlayerEach_Name) {
|
||||
if (!PlayerEach_Flag) {
|
||||
PlayerEach_Flag = true;
|
||||
InitNpcButton();
|
||||
}
|
||||
} else {
|
||||
PlayerEach_Flag = false;
|
||||
}
|
||||
}
|
||||
|
||||
//override
|
||||
//鼠标左键弹起回调
|
||||
function OnMouseLbUp(MousePos_X, MousePos_Y) {
|
||||
LenheartNewUI_Windows.OnMouseLbUp(MousePos_X, MousePos_Y);
|
||||
}
|
||||
|
||||
function SelfSyncPos(gInfo) {
|
||||
//读取交互坐标数据
|
||||
Info = gInfo;
|
||||
Basic = gInfo.BasicAdd;
|
||||
|
||||
X = Info.X;
|
||||
Y = Info.Y + (21 * Info.Count);
|
||||
//宽度
|
||||
Width = 100;
|
||||
//高度
|
||||
Height = (21 * Childrens.len());
|
||||
//同步子对象坐标
|
||||
foreach(pos, winobj in Childrens) {
|
||||
winobj.X = Info.X;
|
||||
winobj.Y = Info.Y + (21 * (Info.Count + pos));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RindroPlayerEachDrawFlag <- false;
|
||||
RindroPlayerEachDrawCountBuffer <- 0;
|
||||
RindroPlayerEachDrawCount <- 0;
|
||||
Rindro_Haker.LoadHook(0x10002A0, ["pointer", "int", "int"],
|
||||
function(args) {
|
||||
if (L_Sq_GetPlayerEachName().len() <= 0) return;
|
||||
local Xpos = L_sq_RA(L_sq_P2I(args[0]) + 0x14);
|
||||
local Ypos = L_sq_RA(L_sq_P2I(args[0]) + 0x18);
|
||||
|
||||
if (!RindroPlayerEachDrawFlag) {
|
||||
local RootTab = getroottable();
|
||||
RindroPlayerEachDrawFlag = true;
|
||||
if (RootTab.rawin("L_PlayerEach_Obj")) {
|
||||
RootTab["L_PlayerEach_Obj"].SelfSyncPos({
|
||||
X = Xpos,
|
||||
Y = Ypos,
|
||||
Count = RindroPlayerEachDrawCount,
|
||||
BasicAdd = args[0]
|
||||
});
|
||||
RootTab["L_PlayerEach_Obj"].MySelfShow();
|
||||
}
|
||||
}
|
||||
RindroPlayerEachDrawCountBuffer++;
|
||||
// print(args[0]);
|
||||
return null;
|
||||
|
||||
},
|
||||
function(args) {
|
||||
return null;
|
||||
});
|
||||
|
||||
|
||||
function Lenheart_PlayerEach_Fun(obj) {
|
||||
local RootTab = getroottable();
|
||||
RindroPlayerEachDrawFlag = false;
|
||||
RindroPlayerEachDrawCount = RindroPlayerEachDrawCountBuffer;
|
||||
RindroPlayerEachDrawCountBuffer = 0;
|
||||
if (!RootTab.rawin("L_PlayerEach_Obj")) {
|
||||
RootTab.rawset("L_PlayerEach_Obj", LenheartNewUI_CreateWindow(Lenheart_PlayerEachC, "玩家与玩家交互界面窗口", 0, 0, 0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
getroottable()["LenheartFuncTab"].rawset("Lenheart_PlayerEachN", Lenheart_PlayerEach_Fun);
|
||||
@@ -88,6 +88,9 @@ class Rindro_Event extends LenheartNewUI_Windows {
|
||||
//是否可见
|
||||
Visible = true;
|
||||
|
||||
//主要Button
|
||||
MainButton = null;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
@@ -127,13 +130,17 @@ class Rindro_Event extends LenheartNewUI_Windows {
|
||||
|
||||
function TopShow(obj) {
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 20, 20)) {
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 0, X - 7, Y - 24);
|
||||
local Len = ObjectId.len() / 3;
|
||||
for (local i = 0; i< Len; i++) {
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 1, X - 2 + (15 * i), Y - 24);
|
||||
local XposOffset = 0;
|
||||
local Len = LenheartTextClass.GetStringLength(MainButton.ShowName);
|
||||
local Count = ((Len - 10) / 15) + 1;
|
||||
XposOffset = (-(10 + Count * 15) / 2) + 10;
|
||||
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 0, X + XposOffset, Y - 24);
|
||||
for (local i = 0; i< Count; i++) {
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 1, X + XposOffset + 5 + (15 * i), Y - 24);
|
||||
}
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 2, X - 2 + (15 * Len - 1), Y - 24);
|
||||
L_sq_DrawCode(ObjectId, X + 5, Y - 17, sq_RGBA(255, 255, 255, 250), 0, 1);
|
||||
L_sq_DrawImg("interface2/yosin/eventsystem.img", 2, X + XposOffset + 5 + (15 * Count), Y - 24);
|
||||
L_sq_DrawCode(MainButton.ShowName, X - Len / 2 + 12, Y - 17, sq_RGBA(255, 255, 255, 250), 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,6 +165,7 @@ class Rindro_EventList {
|
||||
|
||||
//活动数组
|
||||
Events = null;
|
||||
EventsMap = null;
|
||||
|
||||
function YosinEventIconInfoCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
@@ -175,12 +183,14 @@ class Rindro_EventList {
|
||||
constructor() {
|
||||
|
||||
Events = [];
|
||||
EventsMap = {};
|
||||
Pack_Control.rawset(30002, YosinEventIconInfoCallBack.bindenv(this));
|
||||
|
||||
}
|
||||
|
||||
//添加活动
|
||||
function AddEvent(Name, Idx, WindowObject, ...) {
|
||||
if (EventsMap.rawin(Name)) return EventsMap.rawget(Name);
|
||||
local Window = LenheartNewUI_CreateWindow(Rindro_Event, Name, 0, 0, 20, 20, 0)
|
||||
local Flag = Events.len();
|
||||
local ImgPath = "interface2/yosin/eventsystemlist.img";
|
||||
@@ -193,7 +203,10 @@ class Rindro_EventList {
|
||||
}.bindenv(this);
|
||||
Window.AddChild(ButtonBuf);
|
||||
Window.PosIdx = Events.len();
|
||||
Window.MainButton = ButtonBuf;
|
||||
Events.append(Window);
|
||||
EventsMap.rawset(Name, Window);
|
||||
return Window;
|
||||
}
|
||||
|
||||
//检测是否悬停活动图标
|
||||
|
||||
@@ -21,12 +21,13 @@ class R_Mouse {
|
||||
}
|
||||
//锁定鼠标
|
||||
function Lock() {
|
||||
|
||||
_Rindro_Cusor_.UseState = 1;
|
||||
L_sq_WAB(0x1B46886, 1);
|
||||
//技能描述窗口
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0x4CC47E), [0xE9, 0xA0, 0x00, 0x00, 0x00, 0x90]);
|
||||
//物品描述窗口
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0xF63DDA), [0x90, 0x90, 0x90, 0x90, 0x90, 0x90]);
|
||||
// Sq_Memory_WriteByteArr(L_sq_I2P(0xF63DDA), [0x90, 0x90, 0x90, 0x90, 0x90, 0x90]);
|
||||
//buff信息描述窗口
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0x4BF532), [0x90, 0x90, 0x90, 0x90]);
|
||||
//原生商城 个人信息等按钮的悬停
|
||||
@@ -36,10 +37,11 @@ class R_Mouse {
|
||||
}
|
||||
//解锁鼠标
|
||||
function UnLock() {
|
||||
|
||||
_Rindro_Cusor_.UseState = 0;
|
||||
L_sq_WAB(0x1B46886, 0);
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0x4CC47E), [0x39, 0x05, 0xE0, 0xF6, 0xA3, 0x01]);
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0xF63DDA), [0x56, 0xE8, 0x10, 0xFE, 0xFF, 0xFF]);
|
||||
// Sq_Memory_WriteByteArr(L_sq_I2P(0xF63DDA), [0x56, 0xE8, 0x10, 0xFE, 0xFF, 0xFF]);
|
||||
Sq_Memory_WriteByteArr(L_sq_I2P(0x4BF532), [0x75, 0x07, 0x32, 0xC0]);
|
||||
L_sq_WAB(0x4C4690, 0x55);
|
||||
L_sq_WAB(0x11C6510, 0x55);
|
||||
@@ -51,6 +53,7 @@ class R_Mouse {
|
||||
}
|
||||
//设置鼠标工作类型
|
||||
function SetType(Type) {
|
||||
|
||||
_Rindro_Cusor_.TypeState = Type;
|
||||
// L_sq_WAB(0x1b46898, Type);
|
||||
}
|
||||
@@ -61,6 +64,7 @@ class R_Mouse {
|
||||
}
|
||||
//鼠标0状态设置是否按下
|
||||
function SetBaseState(Flag) {
|
||||
|
||||
_Rindro_Cusor_.SubState = Flag;
|
||||
// return L_sq_WAB(0x1B46874, Flag);
|
||||
}
|
||||
@@ -145,6 +149,15 @@ class LenheartNewUI_BaseWindow extends Rindro_BaseToolClass {
|
||||
Window.SyncPos(X, Y);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @函数作用: 添加子对象
|
||||
* @参数 name
|
||||
*/
|
||||
function AddChild(gChild) {
|
||||
this.Childrens.append(gChild);
|
||||
gChild.Parent = this;
|
||||
}
|
||||
}
|
||||
|
||||
//游戏窗口类
|
||||
@@ -473,18 +486,17 @@ function CheackMouseInOldWindows() {
|
||||
local Flag = L_sq_RA(WindowAddress);
|
||||
foreach(value in OldBaseWindowArr) {
|
||||
if (Flag == value) {
|
||||
// if ((L_sq_RA(WindowAddress + 0x14) == 0 && L_sq_RA(WindowAddress + 0x18) == 0) || Flag == 0x184D0C4) {
|
||||
// print(false);
|
||||
|
||||
// }
|
||||
|
||||
//空地
|
||||
if (Flag == 0x184D0C4 || Flag == 0x0184CF6C) {
|
||||
//都为0的时候城镇背景 508是血槽那一块的逻辑 坐标Y是508
|
||||
if ((L_sq_RA(WindowAddress + 0x14) == 0 && (L_sq_RA(WindowAddress + 0x18) == 0 || L_sq_RA(WindowAddress + 0x18) == 508))) {
|
||||
return false;
|
||||
}
|
||||
} else return false;
|
||||
} else {
|
||||
//原生窗口里的按钮
|
||||
if(Flag == 0x184D174)return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -547,7 +559,8 @@ function L_MouseCallBack(MouseState, MouseFlag, MousePos_X, MousePos_Y) {
|
||||
// }
|
||||
if (MouseState == 0x200) {
|
||||
//常规事件就要设定鼠标是否锁定逻辑
|
||||
RunMouseLogic(MousePos_X, MousePos_Y);
|
||||
if (_Rindro_Cusor_.ForceLockState == false)
|
||||
RunMouseLogic(MousePos_X, MousePos_Y);
|
||||
}
|
||||
|
||||
//判断是否悬停活动图标 没悬停在老窗口上 没在选图界面
|
||||
@@ -615,7 +628,8 @@ function L_MouseCallBack(MouseState, MouseFlag, MousePos_X, MousePos_Y) {
|
||||
//打开原生窗口回调
|
||||
function L_OpenOldWindowCallBack(WindowIndex) {
|
||||
//将新窗口渲染队列改为下层 抵消窗口 Esc窗口 登录可能显示的任务窗口
|
||||
if (WindowIndex != 170 && WindowIndex != 176 && WindowIndex != 276 && WindowIndex != 275 && WindowIndex != 278 && WindowIndex != 283 && WindowIndex != 36) {
|
||||
if (WindowIndex != 170 && WindowIndex != 176 && WindowIndex != 276 && WindowIndex != 275 && WindowIndex != 278 && WindowIndex != 279 && WindowIndex != 283 && WindowIndex != 36) {
|
||||
|
||||
getroottable().WindowsShowABFlag <- false;
|
||||
}
|
||||
}
|
||||
@@ -865,6 +879,48 @@ class LenheartNewUI_Button extends LenheartNewUI_CommonUi {
|
||||
}
|
||||
}
|
||||
|
||||
class LenheartNewUI_VerticalButton extends LenheartNewUI_CommonUi {
|
||||
State = 0;
|
||||
BaseIdx = 29;
|
||||
DHeight = null; // 改为高度
|
||||
Path = "interface/lenheartwindowcommon.img";
|
||||
Idx = 172;
|
||||
FillHeight = 2; // 改为填充高度
|
||||
FirstHeight = 28; // 改为首节高度
|
||||
Width = 24; // 固定宽度,垂直按钮宽度通常是固定的
|
||||
|
||||
constructor(X, Y, H) {
|
||||
this.DHeight = H;
|
||||
LenheartNewUI_CommonUi.constructor(X, Y, 24, H + 28 * 2); // 宽度固定,高度动态
|
||||
}
|
||||
|
||||
function SetFrame(gPath, gIdx) {
|
||||
if (gPath) Path = gPath;
|
||||
Idx = gIdx;
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//不可用
|
||||
if (State == 8) {
|
||||
L_sq_Draw3Image_Vertical(X + 1, Y, this.Width, this.DHeight, Path, Idx + 9, FillHeight, FirstHeight);
|
||||
} else {
|
||||
//按下
|
||||
if (isLBDown) {
|
||||
L_sq_Draw3Image_Vertical(X + 1, Y, this.Width, this.DHeight, Path, Idx + 3, FillHeight, FirstHeight);
|
||||
}
|
||||
//悬停
|
||||
else if (isInRect) {
|
||||
L_sq_Draw3Image_Vertical(X, Y, this.Width, this.DHeight, Path, Idx + 3, FillHeight, FirstHeight);
|
||||
}
|
||||
//普通
|
||||
else {
|
||||
L_sq_Draw3Image_Vertical(X, Y, this.Width, this.DHeight, Path, Idx, FillHeight, FirstHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class LenheartNewUI_ButtonText extends LenheartNewUI_Button {
|
||||
TextStr = null;
|
||||
TextX = null;
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
创建日期:2024-08-06 22:09
|
||||
文件用途:按键枚举类
|
||||
*/
|
||||
//反遍历
|
||||
L_sq_WA(0x1370FD7, 0);
|
||||
DIK_ESCAPE <- 0x01
|
||||
DIK_1 <- 0x02
|
||||
DIK_2 <- 0x03
|
||||
@@ -150,7 +148,144 @@ DIK_WEBBACK <- 0xEA /* Web Back */
|
||||
DIK_MYCOMPUTER <- 0xEB /* My Computer */
|
||||
DIK_MAIL <- 0xEC /* Mail */
|
||||
DIK_MEDIASELECT <- 0xED /* Media Select */
|
||||
FFI_FIRST_ABI <- 0;
|
||||
FFI_SYSV <- 1;
|
||||
FFI_STDCALL <- 2;
|
||||
FFI_THISCALL <- 3;
|
||||
FFI_FASTCALL <- 4;
|
||||
FFI_MS_CDECL <- 5;
|
||||
FFI_PASCAL <- 6;
|
||||
FFI_REGISTER <- 7;
|
||||
|
||||
|
||||
function Sq_L_Medal(x, y) {}
|
||||
|
||||
function Sq_SettingWindowCallBack(x, y) {}
|
||||
|
||||
function Sq_BuffSwitchingCallBack(x, y) {}
|
||||
|
||||
function Sq_SwitchingCallBack(x, y) {}
|
||||
|
||||
function Sq_UpgradeCallBack(x, y) {}
|
||||
|
||||
function Sq_RecoveryCallBack(x, y) {}
|
||||
|
||||
function Sq_RecoveryTypeSetCallBack(Type) {}
|
||||
|
||||
function Sq_DrawMainMaxLayerCustomUI(pack) {}
|
||||
|
||||
function Lenheart(VmTop) {}
|
||||
|
||||
function Sq_MouseEventCallBack(Lb, Rb, Mb) {}
|
||||
|
||||
function Sq_SelectCharacter(Chunk) {}
|
||||
|
||||
function Sq_DrawMainTopLayerCustomUI(pack) {}
|
||||
|
||||
function Sq_GetExeStr_Event(StrIndex) {
|
||||
return StrIndex;
|
||||
}
|
||||
|
||||
function Sq_CreatChr(chunk) {}
|
||||
|
||||
function Sq_SendPackType_Event(Type) {}
|
||||
|
||||
function Sq_SendPackByte_Event(Parm) {}
|
||||
|
||||
function Sq_SendPackWord_Event(Parm) {}
|
||||
|
||||
function Sq_SendPackDWord_Event(Parm) {}
|
||||
|
||||
function Sq_SendPackChar_Event(Parm) {}
|
||||
|
||||
function Sq_SendPack_Event() {}
|
||||
|
||||
function Sq_DrawItemBack(Xpos, Ypos, Image) {}
|
||||
|
||||
function Sq_DrawItemFront(Xpos, Ypos, Image) {}
|
||||
|
||||
function Sq_GetDrawMonBloodSw() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function Sq_DrawMonsterBlood(Object, X, Y) {}
|
||||
|
||||
function Sq_Set_Inventory_M_Pos(This) {}
|
||||
|
||||
function Sq_Get_Ex_IntData(SkillAddress, Idx, objAddress) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function Sq_Get_Ex_SkillCoolTime(SkillAddress, Idx, objAddress) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function Sq_Get_Ex_LevelData(SkillAddress, Idx, objAddress) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function Sq_PlayerEachPos(x, y) {}
|
||||
|
||||
function Sq_DrawMainMaxLayerCustomUI(pack) {}
|
||||
|
||||
function Sq_PushDamageFontData(ObjAddress, X, Y, Z, Value, Type, A8, A9) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function Sq_PushDamageData(ObjAddress, MySelfAddress, Value);
|
||||
|
||||
function Sq_Pack_Control(chunk) {}
|
||||
|
||||
function Sq_MessageWindowDraw(a, c) {}
|
||||
|
||||
function Sq_Get_Event_Pos_X() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
function Sq_Get_Event_Pos_Y() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
function Sq_L_OtherPlayerInfo(x, y, Type, Value, ImgBuf) {
|
||||
local str = Value.tostring();
|
||||
local lenght = L_sq_GetStringDrawLength(str);
|
||||
L_sq_DrawImg(ImgBuf, x + 70 - lenght, y + 5);
|
||||
return Value;
|
||||
}
|
||||
|
||||
function Sq_DrawMiniMapUI(a) {}
|
||||
|
||||
function Sq_CompleteTask(a1, a2, a3) {}
|
||||
|
||||
function L_drawMainCustomUI_All() {}
|
||||
|
||||
function L_MouseCallBack(a, b, c, d) {}
|
||||
|
||||
function L_DrawWindow_A() {}
|
||||
|
||||
function L_DrawWindow_B() {}
|
||||
|
||||
function L_OpenOldWindowCallBack(WindowIndex) {}
|
||||
|
||||
function L_Old_Window_Get(WindowObject) {}
|
||||
|
||||
function L_Character_Info_Window(WindowObject) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function L_Other_Character_Info_Window(WindowObject) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function L_Old_Window_Visible(WindowObject, Flag) {}
|
||||
|
||||
|
||||
getroottable().LenheartBaseFuncTab <- {};
|
||||
getroottable().LenheartFuncTab <- {};
|
||||
getroottable().Rindro_Scr_Width <- L_sq_RA(0x4D848E);
|
||||
getroottable().Rindro_Scr_High <- L_sq_RA(0x4D8495);
|
||||
|
||||
//获取装备偏移
|
||||
function Rindro_GetEquAddr(addr) {
|
||||
switch (addr) {
|
||||
case 1:
|
||||
@@ -238,4 +373,7 @@ function Rindro_GetEquAddr(addr) {
|
||||
break;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
//本地模式
|
||||
if(!getroottable().rawin("RINDROLOCAL"))RINDROLOCAL <- false;
|
||||
@@ -62,8 +62,8 @@ class Rindro_Animation {
|
||||
foreach(FrameObj in FrameList) {
|
||||
//如果有附加处理 格式化
|
||||
if (AdditionalOptions && AdditionalOptions.rawin("ImgFormat")) FrameObj.Img_Path = AdditionalOptions["ImgFormat"](FrameObj.Img_Path);
|
||||
local Png = Rindro_Image.Load(FrameObj.Img_Path).GetPng(FrameObj.Img_Index);
|
||||
Png.Draw(-500, -500);
|
||||
local Png = Rindro_Image.Load(FrameObj.Img_Path);
|
||||
// Png.Draw(-500, -500);
|
||||
|
||||
//如果有附加处理 坐标
|
||||
if (AdditionalOptions && AdditionalOptions.rawin("Pos")) {
|
||||
@@ -75,7 +75,22 @@ class Rindro_Animation {
|
||||
PngList.append(Png);
|
||||
}
|
||||
} else {
|
||||
error("创建Ani失败,找不到Ani数据");
|
||||
AnimationFlag = {};
|
||||
FrameList.append({
|
||||
AttackBox = [],
|
||||
DamageBox = [],
|
||||
Delay = 800,
|
||||
Flag = {},
|
||||
Img_Index = 0,
|
||||
Img_Path = "",
|
||||
Pos = {
|
||||
x = -248,
|
||||
y = -331
|
||||
}
|
||||
})
|
||||
|
||||
// print(Data);
|
||||
// print("创建Ani失败,找不到Ani数据");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,6 +107,7 @@ class Rindro_Animation {
|
||||
}
|
||||
|
||||
function FlushFrame(Index) {
|
||||
if (PngList.len() <= 0) return;
|
||||
//同步当前帧
|
||||
CurrentFrameIndex = Index;
|
||||
//当前帧更换为本帧
|
||||
@@ -110,13 +126,12 @@ class Rindro_Animation {
|
||||
|
||||
//绘制
|
||||
function DrawFrame(X, Y) {
|
||||
// local NowDrawPng = CurrentFrame;
|
||||
local FrameObj = FrameList[CurrentFrameIndex];
|
||||
|
||||
//线性减淡
|
||||
if ("GRAPHIC_EFFECT_LINEARDODGE" in FrameObj.Flag) {
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
}
|
||||
// local NowDrawPng = CurrentFrame;
|
||||
if (FrameList.len() <= 0) return;
|
||||
local FrameObj = FrameList[CurrentFrameIndex];
|
||||
// printT(FrameObj);
|
||||
|
||||
|
||||
//坐标偏移
|
||||
local XOffset = FrameObj.Pos.x;
|
||||
@@ -138,8 +153,17 @@ class Rindro_Animation {
|
||||
YRate = Fbuf.y;
|
||||
}
|
||||
|
||||
if (CurrentFrame) CurrentFrame.DrawEx(X + XOffset, Y + YOffset, Angle, RGBA, XRate, YRate);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
//线性减淡
|
||||
if ("GRAPHIC_EFFECT_LINEARDODGE" in FrameObj.Flag) {
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
}
|
||||
|
||||
if (CurrentFrame) CurrentFrame.DrawExPng(FrameObj.Img_Index, X + XOffset, Y + YOffset, Angle, RGBA, XRate, YRate);
|
||||
|
||||
//线性减淡
|
||||
if ("GRAPHIC_EFFECT_LINEARDODGE" in FrameObj.Flag) {
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -172,6 +196,14 @@ class Rindro_Animation {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DrawIndex(X, Y, Index) {
|
||||
// return;
|
||||
if (IsUsability) {
|
||||
FlushFrame(Index);
|
||||
DrawFrame(X, Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -246,6 +278,65 @@ class Rindro_Draw_Character {
|
||||
},
|
||||
];
|
||||
|
||||
ENUM_RINDRO_JOB_FACE_HEIGHT = [
|
||||
//男鬼剑士
|
||||
{
|
||||
x = 11,
|
||||
y = 111
|
||||
},
|
||||
//女格斗
|
||||
{
|
||||
x = 9,
|
||||
y = 103
|
||||
},
|
||||
//男神枪手
|
||||
{
|
||||
x = 13,
|
||||
y = 131
|
||||
},
|
||||
//女魔法师
|
||||
{
|
||||
x = 14,
|
||||
y = 87
|
||||
},
|
||||
//男圣职者
|
||||
{
|
||||
x = 16,
|
||||
y = 126
|
||||
},
|
||||
//女神枪手
|
||||
{
|
||||
x = 11,
|
||||
y = 119
|
||||
},
|
||||
|
||||
//女暗夜使者
|
||||
{
|
||||
x = 12,
|
||||
y = 115
|
||||
},
|
||||
//男格斗家
|
||||
{
|
||||
x = 13,
|
||||
y = 119
|
||||
},
|
||||
//男魔法师
|
||||
{
|
||||
x = 13,
|
||||
y = 101
|
||||
},
|
||||
//黑暗武士
|
||||
{
|
||||
x = -42,
|
||||
y = -154
|
||||
},
|
||||
//缔造者
|
||||
{
|
||||
x = -46,
|
||||
y = -126
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
//获取角色AniBy装备
|
||||
function GetCharacAniByEqu(Job, Equ, AniName) {
|
||||
@@ -379,8 +470,15 @@ class Rindro_Draw_Character {
|
||||
L_sq_DrawCode(Name, 44 + X + ENUM_RINDRO_JOB_TITLE_HEIGHT[Job].x - (LenheartTextClass.GetStringLength(Name) / 2), Y + ENUM_RINDRO_JOB_TITLE_HEIGHT[Job].y + 24, sq_RGBA(255, 255, 255, 250), 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DrawFace(X, Y) {
|
||||
setClip(X, Y, X + 22, Y + 18); //开始裁切
|
||||
foreach(AniInfo in DrawInfo) {
|
||||
AniInfo.Ani.DrawIndex(X + ENUM_RINDRO_JOB_FACE_HEIGHT[Job].x, Y + ENUM_RINDRO_JOB_FACE_HEIGHT[Job].y, 0);
|
||||
}
|
||||
releaseClip(); //裁切结束
|
||||
}
|
||||
}
|
||||
//鬼剑士
|
||||
//601580026 101550559
|
||||
// Sassq <- {};
|
||||
|
||||
@@ -192,21 +192,22 @@ class MemoryTool {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//解密读取内存地址的数据
|
||||
function DecodeMemoryData(Address) {
|
||||
local nEax, nEcx8, nEsi, nEdx, nTmp;
|
||||
nEax = L_sq_RA(Address);
|
||||
nEax = NativePointer(L_sq_I2P(Address)).readInt();
|
||||
if (nEax == -1) return nEax;
|
||||
nEcx8 = L_sq_RA(Address + 8);
|
||||
nEcx8 = NativePointer(L_sq_I2P(Address + 8)).readInt();
|
||||
if (nEcx8 == -1) return nEcx8;
|
||||
nEsi = L_sq_RA(0x1AF8D78);
|
||||
nEsi = NativePointer(L_sq_I2P(0x1AF8D78)).readInt();
|
||||
nEdx = nEax >> 16;
|
||||
nTmp = (nEdx << 2) + nEsi + 36;
|
||||
nEdx = L_sq_RA(nTmp);
|
||||
nEdx = NativePointer(L_sq_I2P(nTmp)).readInt();
|
||||
if (nEdx == -1) return nEdx;
|
||||
nEax = nEax & 65535;
|
||||
nTmp = (nEax << 2) + nEdx + 8468;
|
||||
nEax = L_sq_RA(nTmp);
|
||||
nEax = NativePointer(L_sq_I2P(nTmp)).readInt();
|
||||
if (nEax == -1) return nEax;
|
||||
nEdx = nEax & 0xFFFF;
|
||||
nEsi = nEdx << 16;
|
||||
@@ -285,4 +286,47 @@ class MemoryTool {
|
||||
Bl.seek(0);
|
||||
return Bl.readn('f');
|
||||
}
|
||||
}
|
||||
|
||||
//大数字
|
||||
class longlong {
|
||||
Value = null;
|
||||
//构造函数 不管是不是string类型都要转成string类型
|
||||
constructor(StrValue) {
|
||||
Value = StrValue.tostring();
|
||||
}
|
||||
|
||||
function _add(other) {
|
||||
return longlong(L_sq_LongLongOperation(this.Value, other.Value, "+"));
|
||||
}
|
||||
|
||||
function _sub(other) {
|
||||
return longlong(L_sq_LongLongOperation(this.Value, other.Value, "-"));
|
||||
}
|
||||
|
||||
function _mul(other) {
|
||||
return longlong(L_sq_LongLongOperation(this.Value, other.Value, "*"));
|
||||
}
|
||||
|
||||
function _div(other) {
|
||||
return L_sq_LongLongOperation(this.Value, other.Value, "/");
|
||||
}
|
||||
|
||||
function _unm() {
|
||||
return longlong(L_sq_LongLongOperation(longlong("0"), this.Value, "-"));
|
||||
}
|
||||
|
||||
function _modulo(other) {
|
||||
return longlong(L_sq_LongLongOperation(this.Value, other.Value, "%"));
|
||||
}
|
||||
|
||||
function GetFormat(FType) {
|
||||
local Buf = L_sq_LongLongOperation(this.Value, FType, "format");
|
||||
if (Buf.len()< 2) return Buf + ".0";
|
||||
local Value = Buf.slice(0, -1);
|
||||
local Unit = Buf.slice(-1);
|
||||
local RetStr = format(FType + Unit, Value.tofloat());
|
||||
return RetStr;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -42,4 +42,19 @@ Rindro_Haker.LoadHook(0x674350, ["pointer", "int"],
|
||||
function(args) {
|
||||
|
||||
return null;
|
||||
});
|
||||
});
|
||||
|
||||
OnSetCharacter_Control.MarrySystem <- function() {
|
||||
if (getroottable().rawin("Yosin_14SkillXpos1") &&
|
||||
getroottable().rawin("Yosin_14SkillXpos2") &&
|
||||
getroottable().rawin("Yosin_14SkillYpos1") &&
|
||||
getroottable().rawin("Yosin_14SkillYpos2")
|
||||
) {
|
||||
for (local i = 6; i< 7; i++) {
|
||||
L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x30 + (i * 0x4)) + 0x14, Yosin_14SkillXpos1 + (i * 31));
|
||||
L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x30 + (i * 0x4)) + 0x18, Yosin_14SkillYpos1);
|
||||
L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x60 + (i * 0x4)) + 0x14, Yosin_14SkillXpos2 + (i * 31));
|
||||
L_sq_WA(L_sq_RA(L_sq_RA(0x01ADE0CC) + 0x60 + (i * 0x4)) + 0x18, Yosin_14SkillYpos2);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -100,6 +100,49 @@ class R_Utils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//获取Lst文件的返回Array
|
||||
function GetLstArr(Path, Header) {
|
||||
local Arr = [];
|
||||
local LstBuf = R_Utils.GetScriptFileReader(Path);
|
||||
if (LstBuf) {
|
||||
local IO = Sq_Point2Blob(L_sq_P2I(LstBuf.Buffer.C_Object), LstBuf.Size);
|
||||
local i = 2;
|
||||
while (i< LstBuf.Size) {
|
||||
if ((LstBuf.Size - i) >= 10) {
|
||||
IO.seek(i + 6); //内容指示位
|
||||
local FindKey = IO.readn('i');
|
||||
local Key = Rindro_Script.GetBinString(FindKey);
|
||||
if (Key) {
|
||||
local StrFilePath = Header + Key.tolower();
|
||||
Arr.append(StrFilePath);
|
||||
}
|
||||
} else break;
|
||||
i += 10;
|
||||
}
|
||||
}
|
||||
return Arr;
|
||||
}
|
||||
|
||||
//通过处理函数获取文件Table
|
||||
function GetFileTableByHandle(Path, Func) {
|
||||
local Data = {};
|
||||
local FileData = R_Utils.GetScriptFileReader(Path);
|
||||
if (FileData) {
|
||||
if (FileData.Size >= 7) {
|
||||
//创建Blob对象
|
||||
local IO = Sq_Point2Blob(L_sq_P2I(FileData.Buffer.C_Object), FileData.Size);
|
||||
//以5为单步从第二位开始遍历字节
|
||||
local i = 2;
|
||||
while (true) {
|
||||
if (i< FileData.Size && FileData.Size - i >= 5) {
|
||||
i = Func(Data, IO, i);
|
||||
} else break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -158,11 +201,11 @@ getroottable().DrawCodeCallBackFunc <- {};
|
||||
// // print("nut:" + format("%02x", args[3]));
|
||||
|
||||
// if (args[3]) {
|
||||
// // for (local i = 0; i< 10000; i++) {
|
||||
// local DrawCode = NativePointer((args[3])).readUnicodeString();
|
||||
// // print(DrawCode);
|
||||
// if (DrawCode in DrawCodeCallBackFunc)
|
||||
// DrawCodeCallBackFunc[DrawCode](args);
|
||||
// // print(args[3]);
|
||||
// // }
|
||||
// }
|
||||
// return null;
|
||||
// },
|
||||
@@ -173,6 +216,7 @@ getroottable().DrawCodeCallBackFunc <- {};
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
//绘制城镇回调
|
||||
getroottable().DrawTownCallBackFunc <- {};
|
||||
Rindro_Haker.LoadHook(0x1108700, ["int", "void"],
|
||||
@@ -193,8 +237,65 @@ Rindro_Haker.LoadHook(0x1108700, ["int", "void"],
|
||||
|
||||
|
||||
//顺图
|
||||
function Rindro_Gm_MoveMap()
|
||||
{
|
||||
|
||||
function Rindro_Gm_MoveMap(obj) {
|
||||
if (sq_IsKeyDown(OPTION_HOTKEY_PAUSE_IN_TOWER, ENUM_SUBKEY_TYPE_ALL) && RINDROLOCAL) {
|
||||
if (KeyPress.isKeyPress(0)) L_sq_MoveMap(2);
|
||||
if (KeyPress.isKeyPress(1)) L_sq_MoveMap(0);
|
||||
if (KeyPress.isKeyPress(2)) L_sq_MoveMap(3);
|
||||
if (KeyPress.isKeyPress(3)) L_sq_MoveMap(1);
|
||||
}
|
||||
}
|
||||
getroottable()["LenheartFuncTab"].rawset("Rindro_Gm_MoveMapFuncN", Rindro_Gm_MoveMap);
|
||||
getroottable()["LenheartFuncTab"].rawset("Rindro_Gm_MoveMapFuncN", Rindro_Gm_MoveMap);
|
||||
|
||||
|
||||
//丢弃物品回调
|
||||
getroottable().DiscardItemCallBackFunc <- {};
|
||||
|
||||
function Sq_DiscardItem(Item) {
|
||||
local Flag = true;
|
||||
foreach(Func in DiscardItemCallBackFunc) {
|
||||
local Ret = Func(Item);
|
||||
if (!Ret) Flag = false;
|
||||
}
|
||||
return Flag;
|
||||
}
|
||||
|
||||
//从exe获取字符串
|
||||
getroottable()["Sq_GetExeStr_Map"] <- {};
|
||||
function Sq_GetExeStr_Event(Index)
|
||||
{
|
||||
if(Index in getroottable()["Sq_GetExeStr_Map"]){
|
||||
return getroottable()["Sq_GetExeStr_Map"][Index](Index);
|
||||
}
|
||||
return Index;
|
||||
}
|
||||
|
||||
|
||||
// //hook打开窗口
|
||||
// Rindro_Haker.LoadHook(0xE6E070, ["int","int","int","int","void"],
|
||||
// function(args) {
|
||||
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(666);
|
||||
// // print(format("%02x", args.pop()));
|
||||
// // TTTAni <- args.pop();
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
// Rindro_Haker.LoadHook(0xE6E070, ["int", "int", "int", "int", "int"],
|
||||
// function(args) {
|
||||
// print("nut:" + format("%02x", args[0]));
|
||||
// print("nut:" + format("%02x", args[1]));
|
||||
// print("nut:" + format("%02x", args[2]));
|
||||
// print("nut:" + format("%02x", args[3]));
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(666);
|
||||
// // print(format("%02x", args.pop()));
|
||||
// // TTTAni <- args.pop();
|
||||
// return null;
|
||||
// });
|
||||
@@ -6,8 +6,12 @@
|
||||
*/
|
||||
class Rindro_Png {
|
||||
C_Object = null;
|
||||
Path = null;
|
||||
Idx = null;
|
||||
|
||||
constructor(Object) {
|
||||
constructor(Object, Path, Idx) {
|
||||
this.Path = Path;
|
||||
this.Idx = Idx;
|
||||
this.C_Object = Object;
|
||||
}
|
||||
|
||||
@@ -22,15 +26,18 @@ class Rindro_Png {
|
||||
class Rindro_Image {
|
||||
|
||||
Img = null;
|
||||
Path = null;
|
||||
|
||||
constructor(Path) {
|
||||
this.Path = Path;
|
||||
//读取Img
|
||||
Img = L_Sq_CallFunc(0x11C0410, "int", FFI_THISCALL, ["int", "int", "int"], NativePointer(0x1B4684C).readInt(), 0, L_sq_P2I(Memory.allocUtf8String(Path).C_Object));
|
||||
}
|
||||
|
||||
function GetPng(Idx) {
|
||||
if (Img) {
|
||||
return Rindro_Png(L_Sq_CallFunc(0x11AA190, "int", FFI_THISCALL, ["int", "int"], Img, Idx));
|
||||
local PngObject = L_Sq_CallFunc(0x11AA190, "int", FFI_THISCALL, ["int", "int"], Img, Idx);
|
||||
return Rindro_Png(PngObject, Path, Idx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class JSONParser {
|
||||
if (vargc > 0) converter = vargc[0];
|
||||
|
||||
|
||||
// actions for string tokens
|
||||
|
||||
local string = {
|
||||
go = function() {
|
||||
state = "ok";
|
||||
@@ -55,7 +55,7 @@ class JSONParser {
|
||||
}.bindenv(this)
|
||||
};
|
||||
|
||||
// the actions for number tokens
|
||||
|
||||
local number = {
|
||||
go = function() {
|
||||
state = "ok";
|
||||
@@ -75,8 +75,8 @@ class JSONParser {
|
||||
};
|
||||
|
||||
|
||||
// action table
|
||||
// describes where the state machine will go from each given state
|
||||
|
||||
|
||||
local action = {};
|
||||
|
||||
|
||||
@@ -188,9 +188,9 @@ class JSONParser {
|
||||
|
||||
action[":"] <- {
|
||||
colon = function() {
|
||||
// Check if the key already exists
|
||||
// NOTE previous code used 'if (key in container)...'
|
||||
// but this finds table ('container') member methods too
|
||||
|
||||
|
||||
|
||||
local err = false;
|
||||
foreach(akey, avalue in container) {
|
||||
if (akey == key) err = true;
|
||||
@@ -271,11 +271,11 @@ class JSONParser {
|
||||
|
||||
|
||||
|
||||
//
|
||||
|
||||
state = "go";
|
||||
stack = [];
|
||||
|
||||
// current tokenizeing position
|
||||
|
||||
local start = 0;
|
||||
|
||||
try {
|
||||
@@ -285,14 +285,14 @@ class JSONParser {
|
||||
while (token = tokenizer.nextToken(str, start)) {
|
||||
|
||||
if ("ptfn" == token.type) {
|
||||
// punctuation/true/false/null
|
||||
|
||||
action[token.value][state]();
|
||||
} else if ("number" == token.type) {
|
||||
// number
|
||||
|
||||
value = token.value;
|
||||
number[state]();
|
||||
} else if ("string" == token.type) {
|
||||
// string
|
||||
|
||||
value = tokenizer.unescape(token.value);
|
||||
string[state]();
|
||||
}
|
||||
@@ -322,11 +322,11 @@ class JSONParser {
|
||||
function _convert(value, type, converter) {
|
||||
if ("function" == typeof converter) {
|
||||
|
||||
// # of params for converter function
|
||||
|
||||
|
||||
local parametercCount = 2;
|
||||
|
||||
// .getinfos() is missing on ei platform
|
||||
|
||||
if ("getinfos" in converter) {
|
||||
parametercCount = converter.getinfos().parameters.len() -
|
||||
1;
|
||||
@@ -361,19 +361,19 @@ class _JSONTokenizer {
|
||||
_unescapeRegex = null;
|
||||
|
||||
constructor() {
|
||||
// punctuation/true/false/null
|
||||
|
||||
this._ptfnRegex = regexp("^(?:\\,|\\:|\\[|\\]|\\{|\\}|true|false|null)");
|
||||
|
||||
// numbers
|
||||
|
||||
this._numberRegex = regexp("^(?:\\-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)");
|
||||
|
||||
// strings
|
||||
|
||||
this._stringRegex = regexp("^(?:\\\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\\\")");
|
||||
|
||||
// ltrim pattern
|
||||
|
||||
this._ltrimRegex = regexp("^[\\s\\t\\n\\r]*");
|
||||
|
||||
// string unescaper tokenizer pattern
|
||||
|
||||
this._unescapeRegex = regexp("\\\\(?:(?:u\\d{4})|[\\\"\\\\/bfnrt])");
|
||||
}
|
||||
|
||||
@@ -389,20 +389,20 @@ class _JSONTokenizer {
|
||||
length,
|
||||
whitespaces;
|
||||
|
||||
// count # of left-side whitespace chars
|
||||
|
||||
whitespaces = this._leadingWhitespaces(str, start);
|
||||
start += whitespaces;
|
||||
|
||||
if (m = this._ptfnRegex.capture(str, start)) {
|
||||
// punctuation/true/false/null
|
||||
|
||||
value = str.slice(m[0].begin, m[0].end);
|
||||
type = "ptfn";
|
||||
} else if (m = this._numberRegex.capture(str, start)) {
|
||||
// number
|
||||
|
||||
value = str.slice(m[0].begin, m[0].end);
|
||||
type = "number";
|
||||
} else if (m = this._stringRegex.capture(str, start)) {
|
||||
// string
|
||||
|
||||
value = str.slice(m[1].begin, m[1].end);
|
||||
type = "string";
|
||||
} else {
|
||||
@@ -429,7 +429,7 @@ class _JSONTokenizer {
|
||||
}
|
||||
}
|
||||
|
||||
// unesacape() replacements table
|
||||
|
||||
_unescapeReplacements = {
|
||||
b = "\b",
|
||||
f = "\f",
|
||||
@@ -449,7 +449,7 @@ class _JSONTokenizer {
|
||||
if (m) {
|
||||
local token = str.slice(m[0].begin, m[0].end);
|
||||
|
||||
// append chars before match
|
||||
|
||||
local pre = str.slice(start, m[0].begin);
|
||||
res += pre;
|
||||
|
||||
@@ -482,8 +482,8 @@ class JSONEncoder {
|
||||
|
||||
static VERSION = "2.0.0";
|
||||
|
||||
// max structure depth
|
||||
// anything above probably has a cyclic ref
|
||||
|
||||
|
||||
static _maxDepth = 32;
|
||||
|
||||
|
||||
@@ -495,7 +495,7 @@ class JSONEncoder {
|
||||
function _encode(val, ...) {
|
||||
local depth = 0;
|
||||
if (vargc > 0) depth = vargv[0];
|
||||
// detect cyclic reference
|
||||
|
||||
if (depth > this._maxDepth) {
|
||||
throw "Possible cyclic reference";
|
||||
}
|
||||
@@ -511,7 +511,7 @@ class JSONEncoder {
|
||||
case "class":
|
||||
s = "";
|
||||
|
||||
// serialize properties, but not functions
|
||||
|
||||
foreach(k, v in val) {
|
||||
if (typeof v != "function") {
|
||||
s += ",\"" + k + "\":" + this._encode(v, depth + 1);
|
||||
@@ -547,12 +547,12 @@ class JSONEncoder {
|
||||
|
||||
if ("_serializeRaw" in val && typeof val._serializeRaw == "function") {
|
||||
|
||||
// include value produced by _serializeRaw()
|
||||
|
||||
r += val._serializeRaw().tostring();
|
||||
|
||||
} else if ("_serialize" in val && typeof val._serialize == "function") {
|
||||
|
||||
// serialize instances by calling _serialize method
|
||||
|
||||
r += this._encode(val._serialize(), depth + 1);
|
||||
|
||||
} else {
|
||||
@@ -561,15 +561,15 @@ class JSONEncoder {
|
||||
|
||||
try {
|
||||
|
||||
// iterate through instances which implement _nexti meta-method
|
||||
|
||||
foreach(k, v in val) {
|
||||
s += ",\"" + k + "\":" + this._encode(v, depth + 1);
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
|
||||
// iterate through instances w/o _nexti
|
||||
// serialize properties, but not functions
|
||||
|
||||
|
||||
foreach(k, v in val.getclass()) {
|
||||
if (typeof v != "function") {
|
||||
s += ",\"" + k + "\":" + this._encode(val[k], depth + 1);
|
||||
@@ -585,13 +585,13 @@ class JSONEncoder {
|
||||
break;
|
||||
|
||||
case "blob":
|
||||
// This is a workaround for a known bug:
|
||||
// on device side Blob.tostring() returns null
|
||||
// (instaead of an empty string)
|
||||
|
||||
|
||||
|
||||
r += "\"" + (val.len() ? this._escape(val.tostring()) : "") + "\"";
|
||||
break;
|
||||
|
||||
// strings and all other
|
||||
|
||||
default:
|
||||
r += "\"" + this._escape(val.tostring()) + "\"";
|
||||
break;
|
||||
@@ -608,7 +608,7 @@ class JSONEncoder {
|
||||
local ch1 = (str[i] & 0xFF);
|
||||
|
||||
if ((ch1 & 0x80) == 0x00) {
|
||||
// 7-bit Ascii
|
||||
|
||||
|
||||
ch1 = format("%c", ch1);
|
||||
|
||||
@@ -637,16 +637,16 @@ class JSONEncoder {
|
||||
} else {
|
||||
|
||||
if ((ch1 & 0xE0) == 0xC0) {
|
||||
// 110xxxxx = 2-byte unicode
|
||||
|
||||
local ch2 = (str[++i] & 0xFF);
|
||||
res += format("%c%c", ch1, ch2);
|
||||
} else if ((ch1 & 0xF0) == 0xE0) {
|
||||
// 1110xxxx = 3-byte unicode
|
||||
|
||||
local ch2 = (str[++i] & 0xFF);
|
||||
local ch3 = (str[++i] & 0xFF);
|
||||
res += format("%c%c%c", ch1, ch2, ch3);
|
||||
} else if ((ch1 & 0xF8) == 0xF0) {
|
||||
// 11110xxx = 4 byte unicode
|
||||
|
||||
local ch2 = (str[++i] & 0xFF);
|
||||
local ch3 = (str[++i] & 0xFF);
|
||||
local ch4 = (str[++i] & 0xFF);
|
||||
|
||||
@@ -24,6 +24,14 @@ class BlobEx extends blob {
|
||||
return readn('w');
|
||||
}
|
||||
|
||||
function charPtrToInt(arr) {
|
||||
local value = ((arr[0]) << 0) |
|
||||
((arr[1]) << 8) |
|
||||
((arr[2]) << 16) |
|
||||
((arr[3]) << 24);
|
||||
return value;
|
||||
}
|
||||
|
||||
function GetInt() {
|
||||
local CurTPos = tell();
|
||||
local Ret = charPtrToInt([this[CurTPos], this[CurTPos + 1], this[CurTPos + 2], this[CurTPos + 3]]);
|
||||
@@ -55,6 +63,59 @@ class BlobEx extends blob {
|
||||
|
||||
Rindro_Script_Bin_Data <- [];
|
||||
|
||||
class _PVF_Data_ {
|
||||
//数据
|
||||
Data = null;
|
||||
//位置
|
||||
Pos = 0;
|
||||
//最大值
|
||||
Max = 0;
|
||||
|
||||
function _typeof() {
|
||||
return "pvf_data";
|
||||
}
|
||||
|
||||
constructor(gData) {
|
||||
Data = gData;
|
||||
Max = gData.len();
|
||||
}
|
||||
|
||||
function Last() {
|
||||
if (Pos > 0) {
|
||||
Pos--;
|
||||
return Get();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function Seek(i) {
|
||||
if (Pos > 0 && Pos<(Max - 1)) {
|
||||
Pos = i;
|
||||
}
|
||||
}
|
||||
|
||||
function Get() {
|
||||
local Ret = Data[Pos];
|
||||
if (Pos<(Max - 1)) {
|
||||
Pos++;
|
||||
}
|
||||
return Ret;
|
||||
}
|
||||
|
||||
function Eof() {
|
||||
if (Pos == Max - 1)
|
||||
return true;
|
||||
}
|
||||
|
||||
function Next() {
|
||||
if (Pos<(Max - 1)) {
|
||||
Pos++;
|
||||
return Get();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Rindro_Script {
|
||||
|
||||
function Get_Ani_Flip_Type(data) {
|
||||
@@ -215,6 +276,8 @@ class Rindro_Script {
|
||||
if (Len > 0) {
|
||||
local Str = Ro.GetString(Len);
|
||||
Rindro_Script_Bin_Data.append(Str);
|
||||
} else {
|
||||
Rindro_Script_Bin_Data.append("");
|
||||
}
|
||||
CurrentIndex++;
|
||||
}
|
||||
@@ -222,8 +285,12 @@ class Rindro_Script {
|
||||
}
|
||||
|
||||
function GetBinString(Index) {
|
||||
if (Index< Rindro_Script_Bin_Data.len()) return Rindro_Script_Bin_Data[Index];
|
||||
return "";
|
||||
if (!(getroottable().rawin("ENUM_TW_GROWTYPE_VERS")) || ENUM_TW_GROWTYPE_VERS >= 24112901) //24112901更新了新的读取bin文件的方式
|
||||
return L_sq_StringBinById(Index);
|
||||
else {
|
||||
if (Index< Rindro_Script_Bin_Data.len()) return Rindro_Script_Bin_Data[Index];
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
function GetLoadString(Key) {
|
||||
@@ -235,7 +302,7 @@ class Rindro_Script {
|
||||
local out = "";
|
||||
IO.seek(i); //内容指示位
|
||||
local currentByte = IO.readn('c'); //内容指示位
|
||||
local after = IO.readn('i');
|
||||
local after = IO.GetInt();
|
||||
switch (currentByte) {
|
||||
case 10: {
|
||||
IO.seek(i - 4);
|
||||
@@ -251,8 +318,9 @@ class Rindro_Script {
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
out += after + '\t';
|
||||
break;
|
||||
IO.seek(-4, 'c');
|
||||
local ret = IO.readn('i');
|
||||
return ret;
|
||||
}
|
||||
case 4: {
|
||||
local Bbuf = blob(4);
|
||||
@@ -289,7 +357,8 @@ class Rindro_Script {
|
||||
local EquipmentAtt = {};
|
||||
if (ReadObject.Size >= 7) {
|
||||
//创建Blob对象
|
||||
local IO = Sq_Point2Blob(L_sq_P2I(ReadObject.Buffer.C_Object), ReadObject.Size);
|
||||
local IOBUF = Sq_Point2Blob(L_sq_P2I(ReadObject.Buffer.C_Object), ReadObject.Size);
|
||||
local IO = BlobEx(IOBUF.readblob(IOBUF.len()));
|
||||
//以5为单步从第二位开始遍历字节
|
||||
local i = 2;
|
||||
while (true) {
|
||||
@@ -320,10 +389,10 @@ class Rindro_Script {
|
||||
EquipmentAtt["Aurora"] <- {};
|
||||
EquipmentAtt["Aurora"].Back <- [];
|
||||
EquipmentAtt["Aurora"].Front <- [];
|
||||
local Count = Rindro_Script.UnpackData(IO, i).tointeger() - 9;
|
||||
local Count = Rindro_Script.UnpackData(IO, i);
|
||||
i += 5;
|
||||
for (local z = 0; z< Count; z++) {
|
||||
local Layer = Rindro_Script.UnpackData(IO, i).tointeger() - 9;
|
||||
local Layer = Rindro_Script.UnpackData(IO, i);
|
||||
i += 5;
|
||||
local Path = Rindro_Script.UnpackData(IO, i).tolower();
|
||||
i += 5;
|
||||
@@ -343,9 +412,9 @@ class Rindro_Script {
|
||||
EquipmentAtt["Ani_" + Job] <- {};
|
||||
i += 5;
|
||||
|
||||
local Index1 = Rindro_Script.UnpackData(IO, i).tointeger() - 9;
|
||||
local Index1 = Rindro_Script.UnpackData(IO, i);
|
||||
i += 5;
|
||||
local Index2 = Rindro_Script.UnpackData(IO, i).tointeger() - 9;
|
||||
local Index2 = Rindro_Script.UnpackData(IO, i);
|
||||
i += 5;
|
||||
EquipmentAtt["Ani_" + Job].variation <- [Index1, Index2];
|
||||
EquipmentAtt["Ani_" + Job].layer_variation <- [];
|
||||
@@ -358,7 +427,7 @@ class Rindro_Script {
|
||||
break;
|
||||
} else if (Ret == "[layer variation]") {
|
||||
local InfoBuf = {};
|
||||
InfoBuf.Zorder <- Rindro_Script.UnpackData(IO, i).tointeger() - 9;
|
||||
InfoBuf.Zorder <- Rindro_Script.UnpackData(IO, i);
|
||||
i += 5;
|
||||
InfoBuf.Path <- Rindro_Script.UnpackData(IO, i);
|
||||
i += 5;
|
||||
@@ -594,6 +663,39 @@ class Rindro_Script {
|
||||
}
|
||||
return AniObject;
|
||||
}
|
||||
|
||||
//获取文件并处理
|
||||
function GetFileData(Path, Func) {
|
||||
local N_Buffer = R_Utils.GetScriptFileReader(Path);
|
||||
if (N_Buffer) {
|
||||
local IO = Sq_Point2Blob(L_sq_P2I(N_Buffer.Buffer.C_Object), N_Buffer.Size);
|
||||
IO = BlobEx(IO.readblob(IO.len()));
|
||||
return Rindro_Script.ResolvingData(IO, Func, Path);
|
||||
} else {
|
||||
print(Path + "找不到文件!");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function ResolvingData(IO, Func, Path) {
|
||||
local DataTable = {};
|
||||
DataTable.filepath <- Path;
|
||||
local DataArr = [];
|
||||
local Length = IO.len();
|
||||
if (Length >= 7) {
|
||||
local i = 2;
|
||||
while (true) {
|
||||
if (i< Length && Length - i >= 5) {
|
||||
local str = Rindro_Script.UnpackData(IO, i);
|
||||
i += 5;
|
||||
DataArr.push(str);
|
||||
} else break;
|
||||
}
|
||||
Func(DataTable, _PVF_Data_(DataArr));
|
||||
return DataTable;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Rindro_Script.GetBin();
|
||||
// Rindro_Script.GetBin();
|
||||
Rindro_Script.InitLoad_String();
|
||||
@@ -104,10 +104,10 @@ function Lenheart_Character_GetAttribute(Address) {
|
||||
return Info;
|
||||
}
|
||||
|
||||
function Rindro_GetCharacterInfoCallBack(Chunk) {
|
||||
local Jso = Json.Decode(Chunk);
|
||||
Jso.op <- 20069011;
|
||||
Jso.Info <- Lenheart_Character_GetAttribute(null);
|
||||
Rindro_BaseToolClass.SendPackEx(Jso);
|
||||
}
|
||||
Pack_Control.rawset(20069010, Rindro_GetCharacterInfoCallBack);
|
||||
// function Rindro_GetCharacterInfoCallBack(Chunk) {
|
||||
// local Jso = Json.Decode(Chunk);
|
||||
// Jso.op <- 20069011;
|
||||
// Jso.Info <- Lenheart_Character_GetAttribute(null);
|
||||
// Rindro_BaseToolClass.SendPackEx(Jso);
|
||||
// }
|
||||
// Pack_Control.rawset(20069010, Rindro_GetCharacterInfoCallBack);
|
||||
@@ -1,483 +0,0 @@
|
||||
/*
|
||||
文件名:ItemData.nut
|
||||
路径:Base/_Z_Data/ItemData.nut
|
||||
创建日期:2024-08-06 23:58
|
||||
文件用途:用于存放Item数据
|
||||
*/
|
||||
if (!getroottable().rawin("Rindro_ItemInfoObject")) Rindro_ItemInfoObject <- {};
|
||||
if (!getroottable().rawin("Rindro_ItemInfoBuf")) Rindro_ItemInfoBuf <- "";
|
||||
if (!getroottable().rawin("RINDRO_INIT_FLAG")) RINDRO_INIT_FLAG <- true;
|
||||
|
||||
//获取本地配置
|
||||
function Rindro_GetLocalConfig() {
|
||||
// local Buf = L_sq_GetLocalConfig();
|
||||
// if (!Buf) {
|
||||
// return {
|
||||
// md5 = -1
|
||||
// };
|
||||
// } else return dofile("Rindro_Config.cfg");
|
||||
}
|
||||
|
||||
//获取本地信息版本
|
||||
function Rindro_GetMd5() {
|
||||
// return RINDRO_CONFIG.md5;
|
||||
return -1;
|
||||
}
|
||||
|
||||
//初始化各种信息
|
||||
function Rindro_Init() {
|
||||
// //道具信息
|
||||
// local ItemArray = getroottable().RINDRO_CONFIG.itemInfo;
|
||||
// Rindro_ItemInfoBuf = "";
|
||||
// foreach(Value in ItemArray) {
|
||||
// if (Value.Name2.len() == 0)
|
||||
// Value.Name2 = "Rindro-Team";
|
||||
// getroottable().Rindro_ItemInfoObject[Value.Id] <- Value;
|
||||
// }
|
||||
// RINDRO_INIT_FLAG = true;
|
||||
}
|
||||
//更新本地配置
|
||||
function Rindro_ItemInfoCallBack(Chunk) {
|
||||
// local Jso = Json.Decode(Chunk);
|
||||
// if ("ZipSEnd" in Jso) {
|
||||
// getroottable().Rindro_ItemInfoObject <- {};
|
||||
// Rindro_ItemInfoBuf += Jso.ZipS;
|
||||
// local ZlibStrBuf = L_sq_Dezlib(Rindro_ItemInfoBuf);
|
||||
// if (ZlibStrBuf == "null") {
|
||||
// Rindro_ItemInfoBuf = "";
|
||||
// return;
|
||||
// }
|
||||
// ZlibStrBuf = L_sq_DecondeJson(ZlibStrBuf);
|
||||
// L_sq_SetLocalConfig("return " + ZlibStrBuf);
|
||||
// getroottable().RINDRO_CONFIG <- dofile("Rindro_Config.cfg");
|
||||
// Rindro_Init();
|
||||
// } else {
|
||||
// Rindro_ItemInfoBuf += Jso.ZipS;
|
||||
// }
|
||||
}
|
||||
Pack_Control.rawset(20240422, Rindro_ItemInfoCallBack);
|
||||
//无需更新本地配置
|
||||
Pack_Control.rawset(20240424, function(Chunk) {
|
||||
Rindro_Init();
|
||||
});
|
||||
|
||||
|
||||
//道具绘制类
|
||||
class ItemInfoClass {
|
||||
|
||||
//Gm模式
|
||||
GmModel = true;
|
||||
|
||||
Info = null;
|
||||
PageLength = 0;
|
||||
|
||||
//静态品级颜色
|
||||
static RarityColor = [
|
||||
0xFFFFFFFF, //白
|
||||
0xFFEDD568, //蓝
|
||||
0xFFFF6BB3, //紫
|
||||
0xFFF000FF, //粉
|
||||
0xFF00B1FF, //黄
|
||||
0xFF6666FF, //红
|
||||
0xFF0055FF, //橙
|
||||
];
|
||||
|
||||
//我的品级颜色
|
||||
MyRarityColor = null;
|
||||
//我的售价长度
|
||||
MyPriceLength = null;
|
||||
//我的冷却时间长度
|
||||
MyCoolTimeLength = null;
|
||||
|
||||
//获取真实类型
|
||||
function GetRealType(Type) {
|
||||
switch (Type) {
|
||||
case "[material]":
|
||||
return "材料";
|
||||
case "[recipe]":
|
||||
return "设计图";
|
||||
case "[upgradable legacy]":
|
||||
return "袖珍罐";
|
||||
case "[quest]":
|
||||
return "任务";
|
||||
case "[booster random]":
|
||||
case "[multi upgradable legacy]":
|
||||
case "[booster selection]":
|
||||
case "[cera booster]":
|
||||
case "[unlimited waste]":
|
||||
case "[usable cera package]":
|
||||
case "[only effect]":
|
||||
return "消耗品";
|
||||
case "[weapon]":
|
||||
return "武器";
|
||||
case "[title name]":
|
||||
return "称号";
|
||||
case "[coat]":
|
||||
return "上衣";
|
||||
case "[pants]":
|
||||
return "下衣";
|
||||
case "[hat]":
|
||||
return "帽子";
|
||||
case "[shoulder]":
|
||||
return "护肩";
|
||||
case "[waist]":
|
||||
return "腰带";
|
||||
case "[shoes]":
|
||||
return "鞋子";
|
||||
case "[amulet]":
|
||||
return "项链";
|
||||
case "[wrist]":
|
||||
return "手镯";
|
||||
case "[ring]":
|
||||
return "戒指";
|
||||
case "[support]":
|
||||
return "辅助装备";
|
||||
case "[aurora avatar]":
|
||||
return "光环";
|
||||
case "[magic stone]":
|
||||
return "魔法石";
|
||||
case "[creature]":
|
||||
return "寵物";
|
||||
case "[artifact red]":
|
||||
return "宠物装备 红";
|
||||
case "[artifact blue]":
|
||||
return "宠物装备 蓝";
|
||||
case "[artifact green]":
|
||||
return "宠物装备 绿";
|
||||
case "[skin avatar]":
|
||||
return "皮肤";
|
||||
case "[hair avatar]":
|
||||
return "头部装扮";
|
||||
case "[waist avatar]":
|
||||
return "腰部装扮";
|
||||
case "[hat avatar]":
|
||||
return "帽子装扮";
|
||||
case "[coat avatar]":
|
||||
return "上衣装扮";
|
||||
case "[face avatar]":
|
||||
return "脸部装扮";
|
||||
case "[breast avatar]":
|
||||
return "胸部装扮";
|
||||
case "[pants avatar]":
|
||||
return "下装装扮";
|
||||
case "[shoes avatar]":
|
||||
return "鞋装扮";
|
||||
default:
|
||||
return "道具";
|
||||
}
|
||||
}
|
||||
|
||||
constructor(gInfo) {
|
||||
Info = clone(gInfo);
|
||||
|
||||
//Gm模式显示编号
|
||||
if (GmModel) Info.Name += "[" + Info.Id + "]";
|
||||
|
||||
//配置品级颜色
|
||||
if (Info.Rarity< 0 || Info.Rarity > 6) {
|
||||
MyRarityColor = Info.Rarity;
|
||||
} else {
|
||||
MyRarityColor = RarityColor[Info.Rarity];
|
||||
}
|
||||
|
||||
//配置售价长度
|
||||
if ("Price" in Info) {
|
||||
MyPriceLength = LenheartTextClass.GetStringLength(Info.Price.tostring());
|
||||
}
|
||||
|
||||
//配置冷却时间长度
|
||||
if ("CoolTime" in Info) {
|
||||
MyCoolTimeLength = LenheartTextClass.GetStringLength((Info.CoolTime / 1000.0).tostring());
|
||||
}
|
||||
|
||||
//配置类型
|
||||
if ("Type" in Info) {
|
||||
Info.Type = GetRealType(Info.Type);
|
||||
}
|
||||
//配置装备类型
|
||||
else if ("EquipmentType" in Info) {
|
||||
Info.Type <- GetRealType(Info.EquipmentType);
|
||||
}
|
||||
|
||||
PageLength += 72;
|
||||
CheckStrLength();
|
||||
}
|
||||
|
||||
function CheckInfoLength(TableKey, AddLength) {
|
||||
if (TableKey in Info) {
|
||||
PageLength += AddLength;
|
||||
}
|
||||
}
|
||||
|
||||
function CheckStrLength() {
|
||||
if ("Explain" in Info) {
|
||||
// local Buf = LenheartTextClass.GetStringLength(Info.Explain.tostring());
|
||||
// local Pn = (Buf / 211.0);
|
||||
// if (Pn< 1) PageLength += 12;
|
||||
// if (Pn > 1) Pn = Pn.tointeger() + 1;
|
||||
// PageLength += (16 * Pn);
|
||||
|
||||
local Buf = L_sq_GetStringDrawArray(Info.Explain, 220);
|
||||
PageLength += (Buf.len() * 16);
|
||||
// PageLength += 12;
|
||||
}
|
||||
}
|
||||
|
||||
//高级绘制文字(带换行)
|
||||
function L_sq_DrawCode_Ex(str, x, y, rgba, mb, jc, hl) {
|
||||
local strarr = [];
|
||||
if (str.find("\n") == null) L_sq_DrawCode(str, x, y, rgba, mb, jc);
|
||||
else {
|
||||
local Bpos = 0;
|
||||
while (true) {
|
||||
local Npos = str.find("\n", Bpos);
|
||||
if (!Npos) {
|
||||
local strbuff = str.slice(Bpos, str.len());
|
||||
strarr.append(strbuff);
|
||||
break;
|
||||
}
|
||||
local strbuff = str.slice(Bpos, Npos);
|
||||
strarr.append(strbuff);
|
||||
Bpos = Npos + 1;
|
||||
}
|
||||
for (local z = 0; z< strarr.len(); z++) {
|
||||
L_sq_DrawCode(strarr[z], x, y + (z * 14), rgba, mb, jc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(X, Y) {
|
||||
if (X< 0) X = 0;
|
||||
if ((X + 211) > 800) X = (800 - 211);
|
||||
if (Y< 0) Y = 0;
|
||||
if (Y + PageLength > 600) Y = 600 - PageLength;
|
||||
|
||||
//Item信息框一般为211的宽度
|
||||
L_sq_DrawWindow(X, Y, 211, PageLength, "interface2/popup/popup.img", 134, 6, 12, 6, 13);
|
||||
|
||||
//绘制名字 和 图标
|
||||
if ("Id" in Info) L_Sq_DrawItem(X + 8 + 174, Y + 8, Info.Id, 1, 0, 0, 0);
|
||||
if ("Name2" in Info) L_sq_DrawCode(Info.Name2, X + 8, Y + 9, MyRarityColor, 1, 1);
|
||||
if ("Name" in Info) L_sq_DrawCode(Info.Name, X + 8, Y + 23, MyRarityColor, 1, 1);
|
||||
|
||||
|
||||
//绘制线
|
||||
L_sq_DrawImg("interface2/popup/popup.img", 270, X + 7, Y + 26 + 16);
|
||||
|
||||
//绘制重量
|
||||
if ("Weight" in Info) {
|
||||
L_sq_DrawCode((Info.Weight.tofloat() / 1000.0).tostring() + "kg", X + 7, Y + 24 + 24, 0xFFFFFFFF, 1, 1);
|
||||
}
|
||||
|
||||
//绘制售价
|
||||
if ("Price" in Info) {
|
||||
L_sq_DrawCode("金币", X + 186, Y + 24 + 24, 0xFFFFFFFF, 1, 1);
|
||||
L_sq_DrawCode(Info.Price.tostring(), X - MyPriceLength + 186, Y + 24 + 24, 0xFFFFFFFF, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
//绘制类型
|
||||
if ("Type" in Info) {
|
||||
L_sq_DrawCode(Info.Type.tostring(), X + 7, Y + 48 + 16, 0xFFFFFFFF, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//绘制冷却时间
|
||||
if ("CoolTime" in Info) {
|
||||
L_sq_DrawCode("秒", X + 186 + 12, Y + 48 + 16, 0xFFFFFFFF, 1, 1);
|
||||
L_sq_DrawCode((Info.CoolTime / 1000.0).tostring(), X - MyCoolTimeLength + 214 - 18, Y + 48 + 16, 0xFFFFFFFF, 1, 1);
|
||||
}
|
||||
|
||||
//绘制普通描述
|
||||
if ("Explain" in Info) {
|
||||
local a = L_sq_GetStringDrawArray(Info.Explain, 220);
|
||||
foreach(Pos, va in a) {
|
||||
L_sq_DrawCode(va, X + 7, Y + 48 + 12 + 24 + (Pos * 16), 0xFFEDD568, 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// print(L_sq_P2I(Memory.allocUtf8String("interface2/event/chn_event_2016/160927_joustmatches/joustmatches_ui.img").C_Object));
|
||||
// local Npk = L_Sq_CallFunc(0x11C0410, "int", FFI_THISCALL, ["int", "int", "int"], L_sq_RA(0x1B4684C), 0, L_sq_P2I(Memory.allocUtf8String("interface2/event/chn_event_2016/160927_joustmatches/joustmatches_ui.img").C_Object));
|
||||
// print(Npk);
|
||||
// local Img = L_Sq_CallFunc(0x11AA190, "int", FFI_THISCALL, ["int", "int"], Npk, 0);
|
||||
// print(format("%02x", Img));
|
||||
// print("width: " + NativePointer(Img).add(0x1C).readShort());
|
||||
// print("height: " + NativePointer(Img).add(0x20).readShort());
|
||||
|
||||
// local ReadPath = L_sq_P2I(Memory.allocUtf8String("etc/rindro/horseguessing/horseguessing.dat").C_Object);
|
||||
// print(format("%02x", ReadPath));
|
||||
// local Reader = Memory.alloc(1024);
|
||||
// local ReadBuffer = L_sq_P2I(Reader.C_Object);
|
||||
// print(format("%02x", ReadBuffer));
|
||||
// L_Sq_CallFunc(0x11A2030, "int", FFI_FASTCALL, ["int", "int", "int", "int", "int", "int"], 0x1D17638, 0, ReadPath, ReadBuffer, 0x100000, 0x19DAF4);
|
||||
// // print(Reader.readUtf8String());
|
||||
// local Func = compilestring(Reader.readUtf8String());
|
||||
// local Ret = Func();
|
||||
// print(Ret);
|
||||
|
||||
// local Tabs = dofile("aw.nut");
|
||||
// print(Tabs.itemInfo.len());
|
||||
// local Address = L_Sq_GetExportByName("fopen");
|
||||
// print(Address);
|
||||
// L_Sq_CallFunc(0xE6E070, "void", 4, ["int", "int", "int", "int", "char"], L_sq_RA(0x1A5FB20), 0, 33, "", 0x65535);
|
||||
|
||||
// Rindro_Haker.LoadHook(0x4C9FA0, ["pointer", "int", "void"],
|
||||
// function(args) {
|
||||
// // print(555);
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(666);
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
// print(L_sq_StringBinById(435110));
|
||||
|
||||
// Rindro_Haker.LoadHook(0x4017F0, ["int", "int", "int", "int"],
|
||||
// function(args) {
|
||||
// print(args[0]);
|
||||
// print(args[1]);
|
||||
// print(args[2]);
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
// 0x121a1e2
|
||||
//this 0x1D17638
|
||||
// local Read = Memory.alloc(10000);
|
||||
// print(Read);
|
||||
// L_Sq_CallFunc(0x11A2030, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], 0x1D17638, Memory.allocUtf8String("sqr/a.nut").C_Object, Read.C_Object, 0x100000,0x19DAF4);
|
||||
// local Str = Read.readUtf8String();
|
||||
// print(Str);
|
||||
|
||||
// local A = IRDSQRCharacter.pushScriptFiles("a.nut");
|
||||
// local Read = Memory.alloc(10000);
|
||||
// print(Read);
|
||||
// L_Sq_CallFunc(0x121A100, "char", FFI_MS_CDECL, ["int", "int", "int", "int", "int"], Memory.allocUtf8String("").C_Object, Memory.allocUtf8String("sqr/a.nut").C_Object, Read.C_Object, 0x100000,0x19DAF4);
|
||||
// local Str = Read.readUtf8String();
|
||||
// print(Str);
|
||||
|
||||
// L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 79, 0, 0);
|
||||
|
||||
// local Old = L_sq_RA(0x1AB7CDC);
|
||||
// Old = L_sq_RA(Old + 0x3038);
|
||||
// local ItemObject = L_sq_GetItem(27582);
|
||||
// //移除
|
||||
// L_Sq_CallFunc(0x825AD0, "void", FFI_THISCALL, ["int","int"], L_sq_RA(0x1AB7CDC),Old);
|
||||
// //移除Ani
|
||||
// L_Sq_CallFunc(0x84CD10, "void", FFI_THISCALL, ["int","int"], L_sq_RA(0x1AB7CDC),Old);
|
||||
// //穿戴
|
||||
// L_Sq_CallFunc(0x825570, "void", FFI_THISCALL, ["int","int"], L_sq_RA(0x1AB7CDC),ItemObject);
|
||||
|
||||
// local ItemObject = L_sq_GetItem(101020037);
|
||||
// // print(ItemObject);
|
||||
// // L_Sq_CallFunc(0x4B0F10, "int", FFI_THISCALL, ["int"], L_sq_RA(0x1AE45B4));
|
||||
// local Hs = L_Sq_CallFunc(0x779EB0, "pointer", FFI_THISCALL, ["int"], L_sq_RA(0x1AE45B4));
|
||||
// print(Hs);
|
||||
// Hs = L_sq_P2I(Hs);
|
||||
// print(format("%02x", Hs));
|
||||
// L_Sq_CallFunc(0x825AD0, "void", FFI_THISCALL, ["int","int"], Hs, ItemObject);
|
||||
// L_Sq_CallFunc(0x84CD10, "void", FFI_THISCALL, ["int","int"], L_sq_RA(0x1AB7CDC), ItemObject);
|
||||
// local PP = L_Sq_CallFunc(0x65DE50, "pointer", FFI_THISCALL, ["pointer"], 0xE8675E97, 0);
|
||||
// print("PP: " + PP);
|
||||
|
||||
// local WuseAdd = L_Sq_CallFunc(0x972220, "int", FFI_MS_CDECL, ["int", "int", "int"], 27582, 0x19E990, 0);
|
||||
// print("MY: " + WuseAdd);
|
||||
// print(L_sq_Test());
|
||||
// local Address = L_sq_Test(26058);
|
||||
// print(Address);
|
||||
// local Ret = L_Sq_CallFunc(0xE6E070, "int", FFI_THISCALL, ["int", "int", "int", "int"], L_sq_RA(0x1A5FB20), 275, Address, 41);
|
||||
// print(Ret);
|
||||
// L_Sq_CallFunc(0xF3B3B0, "int", FFI_THISCALL, ["int", "int", "int", "int", "int"], Ret, 600, 200, 28, 28);
|
||||
|
||||
|
||||
// Rindro_Haker.LoadHook(0x8265A0, ["int", "int", "int", "void"],
|
||||
// function(args) {
|
||||
// // print(args[0]);
|
||||
// // print(args[1]);
|
||||
// print(format("%02x", args[0]));
|
||||
|
||||
|
||||
// // print(args[0]);
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(args.pop());
|
||||
// // print(">>>>>>");
|
||||
// return null;
|
||||
// });
|
||||
|
||||
|
||||
// Rindro_Haker.LoadHook(0x7B64BA, ["int", "int", "int", "int", "int", "int", "char"],
|
||||
// function(args) {
|
||||
// // print("args[0] : " + args[0]);
|
||||
// // print("args[1] : " + format("%02x", args[1]));
|
||||
// // print("args[2] : " + format("%02x", args[2]));
|
||||
// // print("args[3] : " + args[3]);
|
||||
// // print("args[4] : " + args[4]);
|
||||
// // print("args[5] : " + args[5]);
|
||||
// // print(args[1]);
|
||||
// // print(args[2]);
|
||||
|
||||
|
||||
// // print(args[0]);
|
||||
// return null;
|
||||
// },
|
||||
// function(args) {
|
||||
// // print(args.pop());
|
||||
// // print(">>>>>>");
|
||||
// return null;
|
||||
// });
|
||||
|
||||
// local Str = "{\"stringValue\":\"thisiszifuchuan\",\"numberValue\":123.45,\"integerValue\":42,\"booleanValue\":true,\"arrayValue\":[1,\"two\",true,{\"key\":\"value\"}],\"objectValue\":{\"name\":\"John Doe\",\"age\":30,\"address\":{\"street\":\"123 Main St\",\"city\":\"Anytown\",\"state\":\"CA\",\"zip\":\"12345\"}}}";
|
||||
// print("***********************");
|
||||
// print(Str);
|
||||
// print(Str.len());
|
||||
// local JsonObj = JSONParser();
|
||||
// local T = JsonObj.parse(Str);
|
||||
// print(">>>>>>>>>>>>>>");
|
||||
// print(T);
|
||||
// print(">>>>>>>>>>>>>>");
|
||||
// local Str2 = Json.Encode(T);
|
||||
// print("***********************");
|
||||
// print(Str2);
|
||||
// print(Str2.len());
|
||||
|
||||
function getScrollBasisPos_Swordman(obj) {
|
||||
print(111);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function drawAppend_VirtualCharacter(ChrJob, GrowJob, Sc_Xpos, Sc_Ypos, Front_After_Flag, f) {
|
||||
// local obj = sq_GetMyMasterCharacter();
|
||||
// print(Clock());
|
||||
// Sout("a: %L",a);
|
||||
// Sout("b: %L",b);
|
||||
// Sout("c: %L",c);
|
||||
// Sout("d: %L",d);
|
||||
// Sout("e: %L",e);
|
||||
// Sout("f: %L",f);
|
||||
// print(a);
|
||||
// print(b);
|
||||
// print(c);
|
||||
// print(d);
|
||||
// print(e);
|
||||
// print(f);
|
||||
|
||||
// if (!e) {
|
||||
// BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3/Chivalry_S3_Bottom_00.ani", c, d, "Server_AuctionSystemTimeP22");
|
||||
// BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3_2/Chivalry_S3_Text.ani", c, d, "Server_AuctionSystemTimeP");
|
||||
// BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3/Chivalry_S3_Text.ani", c, d - 50, "Server_AuctionSystemTimeP2");
|
||||
// BasicsDrawTool.T_DrawDynamicAni(obj, "Character/Common/Animation/Aura/chn_2021_chivarly_system3_3/Chivalry_S3_Text.ani", c, d - 100, "Server_AuctionSystemTimeP3");
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user