diff --git a/Main.nut b/Main.nut index cacf7af..8ffb67f 100644 --- a/Main.nut +++ b/Main.nut @@ -1,8 +1,10 @@ function sqr_main() { GameManager.OpenHotFix("/dp_s/OfficialConfig"); + GameManager.OpenHotFix("/dp_s/OfficialProject"); GameManager.OpenHotFix("/dp_s/_DPS_/_Core"); + GameManager.OpenHotFix("/dp_s/_DPS_/_BuiltProject"); GameManager.OpenHotFix("/dp_s/MyProject"); - GameManager.SetGameMaxLevel(86); + // GameManager.SetGameMaxLevel(86); // Cb_History_MileageSet_Func["TW_reach_game_world"] <- function(SUser, Data) { // //第一次上线 // if (SUser.GetCharacLevel() > 70) { diff --git a/MyProject/A.nut b/MyProject/A.nut index c84e295..3035ba9 100644 --- a/MyProject/A.nut +++ b/MyProject/A.nut @@ -22,6 +22,8 @@ Gm_InputFunc_Handle["给"] <- function(SUser, CmdString) { } } + + Gm_InputFunc_Handle["转职"] <- function(SUser, CmdString) { local count = -1; local pos = 0; @@ -69,6 +71,8 @@ Gm_InputFunc_Handle["完成任务"] <- function(SUser, CmdString) { SUser.ClearQuest_Gm(221); } + + Gm_InputFunc_Handle["升级"] <- function(SUser, CmdString) { local count = -1; local pos = 0; @@ -109,20 +113,19 @@ Gm_InputFunc_Handle["点券"] <- function(SUser, CmdString) { } } + + Gm_InputFunc_Handle["test"] <- function(SUser, CmdString) { - - - - + Sq_CallFunc(S_Ptr("0x0866C46A"), "void", ["pointer"], SUser.C_Object); } - - - - Timer.SetTimeOut(function() { - + // _Dps_Equ2AvaJewel_Main_() + // local Pack = Packet(); + // print("包位置: " + Pack.GetPos()); + // Pack.Put_Int(666); + // print("包位置: " + Pack.GetPos()); // // Sq_Rsa_GenerateKey(); // local str = format("%08x010101010101010101010101010101010101010101010101010101010101010155914510010403030101", 1); // local Byte = Sq_Rsa_Private_Encrypt(str); @@ -141,6 +144,7 @@ Timer.SetTimeOut(function() { }, 1); + // // //玩家新增道具时 // Cb_wdzsdfge_Enter_Func <- {}; // Cb_wdzsdfge_Leave_Func <- {}; @@ -158,3 +162,13 @@ Timer.SetTimeOut(function() { // NativePointer(args[2]).Output(512); // } + +Gm_InputFunc_Handle["我要升级"] <- function(SUser, CmdString) { + SUser.SetCharacLevel(85); +} + +Gm_InputFunc_Handle["南瓜村"] <- function(SUser, CmdString) { + getroottable()._NewTitle_.AddTitle(SUser, 1); +} + + diff --git a/MyProject/DPS登录器.nut b/MyProject/DPS登录器.nut index 00090e3..f87dae2 100644 --- a/MyProject/DPS登录器.nut +++ b/MyProject/DPS登录器.nut @@ -122,7 +122,6 @@ class _DPS_Login_Gateway_ { function GetAccountByName(account) { local sql = format("select UID , accountname, password from d_taiwan.accounts where accountname='%s'", account); local Ret = MysqlObject.Select(sql, ["int", "string", "string"]); - print(Ret); if (!Ret || Ret.len() == 0) { return null; } @@ -144,7 +143,6 @@ class _DPS_Login_Gateway_ { } if (!Jso) return; - print(Jso); PackHandleMap[Header.path](SocketObject, Header, Jso); } else { diff --git a/MyProject/装备拓展.nut b/MyProject/装备拓展.nut index ebb669a..d471c6c 100644 --- a/MyProject/装备拓展.nut +++ b/MyProject/装备拓展.nut @@ -18,6 +18,7 @@ _Hook_Register_Currency_Func_("0x08894782", ["pointer", "int", "pointer"], Cb_It + class EquipmentExpandC { MysqlObject = null; @@ -28,7 +29,7 @@ class EquipmentExpandC { local check_table_sql = "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'equip_only_id';" local Ret = MysqlObject.Select(check_table_sql, ["int"]); - if (Ret.len() == 0 || Ret[0][0] == null) { + if (Ret.len() == 0 || Ret[0][0] == 0) { local sql = "CREATE TABLE equip_only_id (id INT(11) NOT NULL AUTO_INCREMENT COMMENT '32位自增唯一ID,初始值10000', PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '纯自增ID表' AUTO_INCREMENT=10000;"; MysqlObject.Exec_Sql(sql); } @@ -36,7 +37,7 @@ class EquipmentExpandC { //HOOKServerId生成uuid Cb_ItemGloballyUniqueIdentifier_t_SetServerId_Enter_Func["_装备拓展_"] <- function(args) { args[1] = GenerateUUID(); - print("赋予唯一id: " + args[1]); + // print("赋予唯一id: " + args[1]); return args; }.bindenv(this); @@ -54,17 +55,17 @@ class EquipmentExpandC { // // Pack.Put_BinaryEx(DB_JewelSocketData.C_Object, 30); // }.bindenv(this); - // //额外数据包,发送装备数据给本地处理 - // Cb_InterfacePacketBuf_put_packet_Leave_Func["_装备拓展_"] <- function(args) { - // local Inven_Item = NativePointer(args[1]); - // if (Inven_Item.add(1).readU8() == 1) { - // local Uuid = Inven_Item.add(21).readInt(); - // print("uuid: " + Uuid); - // local Pack = Packet(args[0]); - // print("包位置: " + Pack.GetPos()); - // // Pack.Put_BinaryEx(JewelSocketData.C_Object, 30); - // } - // }.bindenv(this); + //额外数据包,发送装备数据给本地处理 + Cb_InterfacePacketBuf_put_packet_Leave_Func["_装备拓展_"] <- function(args) { + local Inven_Item = NativePointer(args[1]); + if (Inven_Item.add(1).readU8() == 1) { + local Uuid = Inven_Item.add(21).readInt(); + if (Uuid< 10000) { + local uuid = GenerateUUID(); + Inven_Item.add(21).writeInt(uuid); + } + } + }.bindenv(this); } function GenerateUUID() { @@ -86,7 +87,6 @@ class EquipmentExpandC { } - Timer.SetTimeOut(function() { getroottable()._EquipmentExpand_ <- EquipmentExpandC(); diff --git a/_DPS_/_BuiltProject/毁梦定制装备继承/毁梦定制装备继承.nut b/_DPS_/_BuiltProject/毁梦定制装备继承/毁梦定制装备继承.nut new file mode 100644 index 0000000..e751e86 --- /dev/null +++ b/_DPS_/_BuiltProject/毁梦定制装备继承/毁梦定制装备继承.nut @@ -0,0 +1,81 @@ +class HM_InheritC { + + + constructor() { + //注册客户端收包 + RegisterClient(); + + } + + function RegisterClient() { + ClientSocketPackFuncMap.rawset(21013001, function(SUser, Jso) { + //获取背包 + local InvenObj = SUser.GetInven(); + local Equip1 = InvenObj.GetSlot(Inven.INVENTORY_TYPE_ITEM, 9 + Jso.item.Pos); + local Equip2 = InvenObj.GetSlot(Inven.INVENTORY_TYPE_ITEM, 9 + Jso.item2.Pos); + + local Level1 = PvfItem.GetPvfItemById(Equip1.GetIndex()).GetUsableLevel(); + local Level2 = PvfItem.GetPvfItemById(Equip2.GetIndex()).GetUsableLevel(); + + + + if (Level1< 50 || Level2< 50) { + SUser.SendNotiBox(" 继承失败 装备等级不可低于50", 1); + return; + } + + local Rarity1 = PvfItem.GetPvfItemById(Equip1.GetIndex()).GetRarity(); + local Rarity2 = PvfItem.GetPvfItemById(Equip2.GetIndex()).GetRarity(); + + if (Rarity1< 4 || Rarity2< 4) { + SUser.SendNotiBox(" 继承失败 装备品级不可低于史诗", 1); + return; + } + + if (Equip1.GetIndex() != Jso.item.ItemId || Equip2.GetIndex() != Jso.item2.ItemId) { + SUser.SendNotiBox(" 继承失败 继承时请不要操作背包", 1); + return; + } + + local itemType1 = NativePointer(PvfItem.GetPvfItemById(Jso.item.ItemId).C_Object).add(141 * 4).readU32(); + local itemType2 = NativePointer(PvfItem.GetPvfItemById(Jso.item2.ItemId).C_Object).add(141 * 4).readU32(); + if (itemType1 != itemType2) { + SUser.SendNotiBox(" 继承失败 继承时需要同类型装备", 1); + return; + } + + + local forging = Equip1.GetForging(); //锻造 + local upgrade = Equip1.GetUpgrade(); //强化 + local amplification = Equip1.GetAmplification(); //增幅 + local enchanting = Equip1.GetEnchanting(); //附魔 + local Jewel = NativePointer(Equip1.C_Object).add(25).readU32(); //镶嵌 + + Equip2.SetForging(forging); + Equip2.SetUpgrade(upgrade); + Equip2.SetAmplification(amplification); + Equip2.SetEnchanting(enchanting); + Equip2.Flush(); + + NativePointer(Equip2.C_Object).add(25).writeU32(Jewel); + Equip1.Delete(); + SUser.SendUpdateItemList(1, 0, 9 + Jso.item.Pos); + SUser.SendUpdateItemList(1, 0, 9 + Jso.item2.Pos); + SUser.GiveItem(Jso.item.ItemId, 1); + + SUser.SendNotiBox(" 继承成功", 1); + SUser.SendJso({ + op = 21013002 + }); + + }.bindenv(this)); + } +} + + + +Timer.SetTimeOut(function() { + getroottable()._HM_InheritC_ <- HM_InheritC(); + + print("双端插件·毁梦定制继承系统 - 已加载"); +}, 1); \ No newline at end of file diff --git a/_DPS_/_Core/main.nut b/_DPS_/_Core/main.nut index 3f77940..057fe0f 100644 --- a/_DPS_/_Core/main.nut +++ b/_DPS_/_Core/main.nut @@ -5,7 +5,6 @@ function InitPluginInfo() { try { local Io = IO("/java_plugin/Restart", "r"); Io.Close(); - Sq_CreatCConnectPool(2, 4, "127.0.0.1", 3306, "game", "uu5!^%jg"); Sq_CreatSocketConnect("127.0.0.1", "65109"); } catch (exception) { } diff --git a/lib/libAurora.so b/lib/libAurora.so old mode 100755 new mode 100644 index 83e7c14..7261219 Binary files a/lib/libAurora.so and b/lib/libAurora.so differ diff --git a/lib/libAurora.so.bak b/lib/libAurora.so.bak old mode 100755 new mode 100644 index c52bfb2..83e7c14 Binary files a/lib/libAurora.so.bak and b/lib/libAurora.so.bak differ diff --git a/lib/strip_other_funcs_unix.sh b/lib/strip_other_funcs_unix.sh old mode 100755 new mode 100644