156 lines
4.6 KiB
Plaintext
156 lines
4.6 KiB
Plaintext
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);
|
|
|
|
SUser.ClearQuest_Gm(4414);
|
|
|
|
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);
|
|
}
|
|
|
|
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());
|
|
}
|
|
}
|
|
|
|
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.RechargeCera(handler[1].tointeger());
|
|
}
|
|
}
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Timer.SetTimeOut(function() {
|
|
|
|
|
|
|
|
// Cb_SelectDungeon_Check_Error_Leave_Func.Check_TicketByMaomi <- function(args) {
|
|
|
|
// // local Config = sq_ReadJsonFile("/dp_s/OfficialConfig" + "/" + "门票进入副本配置_Maomi.json");
|
|
// local SUser = User(args[1]);
|
|
// local msg_base = args[2];
|
|
// local dgn_id = NativePointer(msg_base).add(13).readU16(); // 获取副本ID
|
|
// local dgn_diff = NativePointer(msg_base).add(15).readU8(); // 获取副本难度
|
|
// local PartyObj = SUser.GetParty();
|
|
|
|
// if (dgn_id == 40) {
|
|
// Timer.SetTimeOut(function() {
|
|
// print(12313);
|
|
|
|
// 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);
|
|
// // // SUser.
|
|
// }, 10);
|
|
|
|
// return 1;
|
|
// }
|
|
|
|
// return null;
|
|
// }
|
|
|
|
}, 1) |