diff --git a/MyProject/A.nut b/MyProject/A.nut index 2246728..0fe1d4e 100644 --- a/MyProject/A.nut +++ b/MyProject/A.nut @@ -111,11 +111,8 @@ Gm_InputFunc_Handle["点券"] <- function(SUser, CmdString) { Gm_InputFunc_Handle["test"] <- function(SUser, CmdString) { - local Gm = GameManager(); - local PartyObj = Gm.GetParty(); - PartyObj.Create(SUser); - Sq_CallFunc(S_Ptr("0x859D718"), "int", ["pointer", "pointer"], PartyObj.C_Object, SUser.C_Object); - Sq_CallFunc(S_Ptr("0x85A0954"), "int", ["pointer", "pointer", "int", "int"], PartyObj.C_Object, S_Ptr("2"), 0, 0); + + } diff --git a/_DPS_/FileConfig.json b/_DPS_/FileConfig.json index 6f09233..8542644 100644 --- a/_DPS_/FileConfig.json +++ b/_DPS_/FileConfig.json @@ -73,6 +73,11 @@ "定制-交易行/Exchange.nut" ] }, + "毁梦定制战力系统": { + "Script": [ + "毁梦定制战力系统/毁梦定制战力系统.nut" + ] + }, "卢克": { "Script": [ "卢克/LukeClass.nut" diff --git a/_DPS_/_BuiltProject/毁梦定制战力系统/毁梦定制战力系统.nut b/_DPS_/_BuiltProject/毁梦定制战力系统/毁梦定制战力系统.nut new file mode 100644 index 0000000..048d5f7 --- /dev/null +++ b/_DPS_/_BuiltProject/毁梦定制战力系统/毁梦定制战力系统.nut @@ -0,0 +1,85 @@ +/* +文件名:毁梦定制战力系统.nut +路径:MyProject/毁梦定制战力系统.nut +创建日期:2025-12-25 22:54 +文件用途: +*/ + +class WarehouseLockC { + + MysqlObject = null; + + + constructor() { + MysqlObject = Mysql(Str_Ptr("127.0.0.1"), 3306, Str_Ptr("taiwan_cain"), Str_Ptr("game"), Str_Ptr("uu5!^%jg")); + MysqlObject.Exec_Sql(format("SET NAMES %s", "latin1")); + + + + Cb_reach_game_world_Func["HM_reach_game_world"] <- function(SUser) { + local cid = SUser.GetCID(); + local Ranking = CheckCidIsRankingTop(cid); + if (Ranking != -1) { + WorldNoti(SUser, Ranking); + } else { + local InvenObj = SUser.GetInven(); + local Weapon = InvenObj.GetSlot(Inven.INVENTORY_TYPE_BODY, 10); + local Upgrade = Weapon.GetUpgrade(); + if (Upgrade >= 15) { + WorldNoti(SUser, -1); + } + } + }.bindenv(this); + } + + function CheckCidIsRankingTop(cid) { + local Rank = MysqlObject.Select("SELECT cid FROM zyk.phb2 ORDER BY zdl DESC LIMIT 3", ["int"]); + local List = {}; + if (Rank && Rank.len() > 0) { + List.rawset(Rank[0][0], 1); + List.rawset(Rank[1][0], 2); + List.rawset(Rank[2][0], 3); + } + if (List.rawin(cid)) return List[cid]; + return -1; + } + + + function WorldNoti(SUser, Ranking) { + local InvenObj = SUser.GetInven(); + local Weapon = InvenObj.GetSlot(Inven.INVENTORY_TYPE_BODY, 10); + local Upgrade = Weapon.GetUpgrade(); + local UpgradeStr = Upgrade > 0 ? ("+" + Upgrade) : ""; + local WeaponName = PvfItem.GetNameById(Weapon.GetIndex()); + local PvfItem = PvfItem.GetPvfItemById(Weapon.GetIndex()); + local Rarity = PvfItem.GetRarity(); + + local HeaderStr = "战力榜第" + Ranking + "名"; + if (Ranking == -1) HeaderStr = "超强武器持有者"; + + local LoginMsgObj = AdMsg(); + LoginMsgObj.PutType(14); + LoginMsgObj.PutImoticon(63); + LoginMsgObj.PutColorString(HeaderStr, [255, 191, 0]); + LoginMsgObj.PutColorString(" [" + SUser.GetCharacName() + "] ", [255, 107, 101]); + LoginMsgObj.PutColorString("携带", [255, 191, 0]); + LoginMsgObj.PutEquipment(" [" + UpgradeStr + WeaponName + "] ", Weapon, AdMsg.RarityColor[Rarity]); + LoginMsgObj.PutColorString("上线了!", [255, 191, 0]); + LoginMsgObj.Finalize(); + local PackObject = LoginMsgObj.MakePack(); + World.SendAll(PackObject); + SUser.Send(PackObject); + LoginMsgObj.Delete(); + } +} + + + + + +Timer.SetTimeOut(function() { + + getroottable()._WarehouseLock_ <- WarehouseLockC(); + + print("双端插件·毁梦定制战力系统 - 已加载"); +}, 1); \ No newline at end of file