更新毁梦定制战力系统
This commit is contained in:
parent
d18a352187
commit
36d66526c7
|
|
@ -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);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,11 @@
|
|||
"定制-交易行/Exchange.nut"
|
||||
]
|
||||
},
|
||||
"毁梦定制战力系统": {
|
||||
"Script": [
|
||||
"毁梦定制战力系统/毁梦定制战力系统.nut"
|
||||
]
|
||||
},
|
||||
"卢克": {
|
||||
"Script": [
|
||||
"卢克/LukeClass.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);
|
||||
Loading…
Reference in New Issue