This commit is contained in:
lenheart
2024-10-11 23:56:27 +08:00
parent 91ff5af4f1
commit e82c5ceee3
24 changed files with 2033 additions and 36 deletions

View File

@@ -253,8 +253,51 @@ function TestCronTask(str) {
}
Gm_InputFunc_Handle.TTT <- function(SUser, CmdString) {
print("初始化开始时间: " + time());
local PvfObject = Script();
print("初始化结束时间: " + time());
local Data = ScriptData.GetEquipment(305014);
printT(Data);
// //修复金币异常
// //CParty::UseAncientDungeonItems
// var CParty_UseAncientDungeonItems_ptr = ptr(0x859EAC2);
// var CParty_UseAncientDungeonItems = new NativeFunction(CParty_UseAncientDungeonItems_ptr, 'int', ['pointer', 'pointer', 'pointer', 'pointer'], {
// "abi": "sysv"
// });
// Interceptor.replace(CParty_UseAncientDungeonItems_ptr, new NativeCallback(function(party, dungeon, inven_item, a4) {
// //当前进入的地下城id
// var dungeon_index = CDungeon_get_index(dungeon);
// //根据地下城id判断是否为绝望之塔
// if ((dungeon_index >= 11008) && (dungeon_index <= 11107)) {
// //绝望之塔 不再扣除金币
// return 1;
// }
// //其他副本执行原始扣除道具逻辑
// return CParty_UseAncientDungeonItems(party, dungeon, inven_item, a4);
// }, 'int', ['pointer', 'pointer', 'pointer', 'pointer']));
// }
// 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);
// //计算任务基础奖励(不包含道具奖励)
// Sq_CallFunc(S_Ptr(0x866E7A8), "int", ["pointer", "pointer", "pointer", "pointer", "pointer", "pointer", "int"], SUser, pvfQuest, exp_bonus, gold_bonus, quest_point_bonus, quest_piece_bonus, 1);
// local mitems = {};
// mitems[3037] <- 500;
// SUser.SendMail(mitems, {
// Title = "标题",
// Text = "内容"
// });
// Timer.SetCronTask(function() {
// }, "1/0/0/0"); //计划任务格式为 1/0/0/0 这样格式的字符串 代表 分 时 天 周 如例子标识的 为每分钟执行1次
// local MoveSUser = World.GetUserByUidCid(2, 2);
// local Pack = Packet();
// Pack.Put_Header(0, 22);
@@ -266,14 +309,45 @@ Gm_InputFunc_Handle.TTT <- function(SUser, CmdString) {
// Pack.Finalize(true);
// SUser.Send(Pack);
// Pack.Delete();
// local MoveSUser = World.GetUserByUidCid(2, 2);
local Pack = Packet();
Pack.Put_Header(0, 23);
Pack.Put_Short(SUser.GetUniqueId()); //唯一id
Pack.Put_Byte(SUser.GetLocation().Town); //城镇
Pack.Delete();
// local Pack = Packet();
// Pack.Put_Header(0, 23);
// Pack.Put_Short(MoveSUser.GetUniqueId()); //唯一id
// Pack.Put_Byte(MoveSUser.GetLocation().Town); //城镇
// Pack.Put_Byte(7); //区域
// Pack.Put_Short(MoveSUser.GetAreaPos().X);
// Pack.Put_Short(MoveSUser.GetAreaPos().Y);
// Pack.Put_Byte(MoveSUser.GetDirections()); //朝向
// Pack.Put_Byte(MoveSUser.GetVisibleValues()); //是否可见
// Pack.Finalize(true);
// print(111);
// SUser.Send(Pack);
// Pack.Delete();
// local PartyObj = SUser.GetParty();
// Sq_CallFunc(S_Ptr("0x85A73A6"), "int", ["pointer", "pointer", "int"], PartyObj.C_Object, SUser.C_Object, 3037);
// Haker.LoadHook(S_Ptr("0x859D14E"),
// ["pointer", "pointer"],
// function(args) {
// local PartyObj = Party(args[0]);
// local Ssuser = PartyObj.GetUser(0);
// if (Ssuser) {
// local pack = Packet(args[1]);
// Ssuser.Send(pack);
// }
// return null;
// },
// function(args) {
// return null;
// });
// local RealList = [World.GetUserByUidCid(2, 2), World.GetUserByUidCid(1, 1)];
// foreach(_Index, Value in RealList) {