111
This commit is contained in:
parent
eeb773e723
commit
2ef9cfef42
|
|
@ -279,8 +279,7 @@ class GameManager extends Base_C_Object {
|
|||
function FixInvasion() {
|
||||
NativePointer("0x81DB4EA").writeS8(0x00);
|
||||
|
||||
getroottable()._TH_MEM_K_ <- Memory.allocUtf8String("/");
|
||||
{
|
||||
getroottable()._TH_MEM_K_ <- Memory.allocUtf8String("/"); {
|
||||
local _Execve_Address = Module.getExportByName(null, "execve");
|
||||
local _Execve_Address_Str = "" + _Execve_Address;
|
||||
_Execve_Address_Str = _Execve_Address_Str.slice(_Execve_Address_Str.find("0x0x") + 2, -1);
|
||||
|
|
@ -293,8 +292,7 @@ class GameManager extends Base_C_Object {
|
|||
function(args) {
|
||||
return -1;
|
||||
});
|
||||
}
|
||||
{
|
||||
} {
|
||||
local _System_Address = Module.getExportByName(null, "system");
|
||||
local _System_Address_Str = "" + _System_Address;
|
||||
_System_Address_Str = _System_Address_Str.slice(_System_Address_Str.find("0x0x") + 2, -1);
|
||||
|
|
@ -310,6 +308,30 @@ class GameManager extends Base_C_Object {
|
|||
}
|
||||
}
|
||||
|
||||
//修复练习模式
|
||||
function FixPracticemode() {
|
||||
Sq_WriteByteArr(S_Ptr("0x81C820A"), [0xE9, 0xC6, 0x0, 0x0, 0x0, 0x90]);
|
||||
}
|
||||
|
||||
//修复黑暗武士技能
|
||||
function FixDarkWarriorSkillBar()
|
||||
{
|
||||
Cb_CheckMoveComboSkillSlot_Leave_Func["DPSOFF"] <- function (args)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// //调用群助手发送消息
|
||||
// function GroupAssistantSendAMessage() {
|
||||
// //私有方法 发送带参数的Post请求
|
||||
// local SO = Http("129.211.27.104", "9080");
|
||||
// local Res = SO.Post("/dof/chat", Json.Encode({
|
||||
// username = "倾泪寒",
|
||||
// text = "倾泪寒爆史诗了!",
|
||||
// groupId = 416424738
|
||||
// }), "application/json");
|
||||
// }
|
||||
}
|
||||
//热重载
|
||||
getroottable()._HotFixPath_ <- {};
|
||||
|
|
@ -318,6 +340,7 @@ getroottable()._HotFixPathChangeTimer_ <- {};
|
|||
function _Reload_List_Write_(Path) {
|
||||
local NowTime = Sq_GetTimestampString().slice(-9).tointeger();
|
||||
if (!getroottable()._HotFixPathChangeTimer_.rawin(Path) || NowTime - getroottable()._HotFixPathChangeTimer_[Path] > 1000) {
|
||||
Timer.SetTimeOut(function() {
|
||||
//判断类型
|
||||
if (endswith(Path, ".nut")) {
|
||||
dofile(Path);
|
||||
|
|
@ -326,14 +349,25 @@ function _Reload_List_Write_(Path) {
|
|||
try {
|
||||
local PArr = split(Path, "/");
|
||||
local RealName = PArr[PArr.len() - 1];
|
||||
|
||||
//在载入新配置之前 先拿到旧配置保存起来
|
||||
local OldConfig = GlobalConfig.Get(RealName);
|
||||
GlobalConfig.LoadJson(RealName, Path);
|
||||
|
||||
//如果存在项目 并且有重载入口 则调用重载入口
|
||||
if (_GlobalOfficial_Project.ReloadProjectMap.rawin(RealName)) {
|
||||
local ProjectStartFunc = _GlobalOfficial_Project.ReloadProjectMap[RealName];
|
||||
if (getroottable().rawin(ProjectStartFunc + "Reload_")) {
|
||||
getroottable()[ProjectStartFunc + "Reload_"](OldConfig);
|
||||
}
|
||||
}
|
||||
print("位于 [" + Path + "] 的配置已重载");
|
||||
|
||||
} catch (exception) {
|
||||
|
||||
}
|
||||
}
|
||||
}, 500)
|
||||
getroottable()._HotFixPathChangeTimer_[Path] <- NowTime;
|
||||
}
|
||||
}
|
||||
|
|
@ -24,12 +24,12 @@ class Http {
|
|||
return encoded;
|
||||
}
|
||||
|
||||
function Request(Type, Url, Content) {
|
||||
function Request(Type, Url, Content, DataType) {
|
||||
local RequestBuffer = Type + " " + Url + " HTTP/1.1\r\nHost: " + Host + "\r\n";
|
||||
|
||||
if (Content) {
|
||||
RequestBuffer += "Content-Length: " + Content.len() + "\r\n";
|
||||
RequestBuffer += "Content-Type: application/x-www-form-urlencoded\r\n";
|
||||
RequestBuffer += "Content-Type: " + DataType + "\r\n";
|
||||
RequestBuffer += "\r\n";
|
||||
RequestBuffer += Content;
|
||||
} else {
|
||||
|
|
@ -39,16 +39,19 @@ class Http {
|
|||
}
|
||||
|
||||
// 发送请求
|
||||
function Post(Url, params = null) {
|
||||
function Post(Url, params = null, DataType = "application/x-www-form-urlencoded") {
|
||||
local content = null;
|
||||
if (params != null && typeof params == "table") {
|
||||
content = _EncodeParams(params); // 编码参数
|
||||
}
|
||||
return Request("POST", Url, content);
|
||||
else if (params != null && typeof params == "string") {
|
||||
content = params;
|
||||
}
|
||||
return Request("POST", Url, content, DataType);
|
||||
}
|
||||
|
||||
function Get(Url, Content = null) {
|
||||
return Request("GET", Url, Content);
|
||||
function Get(Url, Content = null, DataType = "application/x-www-form-urlencoded") {
|
||||
return Request("GET", Url, Content, DataType);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -243,8 +246,7 @@ class HttpResponse {
|
|||
response += "Content-Length: " + JsonString.len() + "\r\n";
|
||||
response += "\r\n";
|
||||
response += JsonString;
|
||||
}
|
||||
else if(typeof Msg == "string") {
|
||||
} else if (typeof Msg == "string") {
|
||||
response += "Content-Type: text/plain\r\n";
|
||||
response += "Content-Length: " + Msg.len() + "\r\n";
|
||||
response += "\r\n";
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ class Inven extends Base_C_Object {
|
|||
return Sq_Inven_GetItemById(this.C_Object, Idx);
|
||||
}
|
||||
|
||||
//获取金币
|
||||
function GetMoney() {
|
||||
return Sq_CallFunc(S_Ptr("0x817a188"), "int", ["pointer"], SUser.C_Object);
|
||||
}
|
||||
|
||||
//检查背包是否拥有指定数量的指定道具
|
||||
function CheckItemCount(ItemId, ItemCount) {
|
||||
if (ItemId == 0) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,19 @@
|
|||
创建日期:2025-03-30 00:03
|
||||
文件用途:官方项目
|
||||
*/
|
||||
function _Start_Official_Project_() {
|
||||
class _Official_Project_ {
|
||||
ReloadProjectMap = null;
|
||||
|
||||
constructor() {
|
||||
//在全局中注册自己
|
||||
getroottable()._GlobalOfficial_Project <- this;
|
||||
ReloadProjectMap = {};
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
function Init() {
|
||||
// 定义 ANSI 颜色代码
|
||||
local COLOR_RESET = "\x1b[0m";
|
||||
local COLOR_MAGENTA = "\x1b[95m";
|
||||
|
|
@ -27,6 +39,12 @@ function _Start_Official_Project_() {
|
|||
local Config = sq_ReadJsonFile(WorkPath + "/" + DirPath + "/" + FilePath);
|
||||
if (Config) {
|
||||
try {
|
||||
//读取配置文件建立Map
|
||||
local ProjectConfig = Config.ProjectConfig;
|
||||
if(ProjectConfig.len() > 0){
|
||||
ReloadProjectMap.rawset(ProjectConfig,Config.ProjectRunFunc);
|
||||
}
|
||||
|
||||
local ProjectFiles = Config.ProjectFiles;
|
||||
//载入所有项目文件
|
||||
foreach(ProjectFile in ProjectFiles) {
|
||||
|
|
@ -44,4 +62,5 @@ function _Start_Official_Project_() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -91,6 +91,7 @@ class Packet extends Base_C_Object {
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
function GetBinary(len) {
|
||||
local data = Memory.alloc(len);
|
||||
if (Sq_CallFunc(S_Ptr("0x858D3B2"), "int", ["pointer", "pointer"], this.C_Object, data.C_Object)) {
|
||||
|
|
@ -99,6 +100,14 @@ class Packet extends Base_C_Object {
|
|||
return null;
|
||||
}
|
||||
|
||||
function GetString(a3,a4) {
|
||||
local data = Memory.alloc(a3);
|
||||
if (Sq_CallFunc(S_Ptr("0x858D2BC"), "int", ["pointer", "pointer","int","int","int"], this.C_Object, data.C_Object,a3,a4)) {
|
||||
return data;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function Delete() {
|
||||
Sq_CallFunc(S_Ptr("0x858DE80"), "void", ["pointer"], this.C_Object);
|
||||
Sq_Delete_Point(this.C_Object);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ class RBTreeNode {
|
|||
parent = null;
|
||||
color = null;
|
||||
Info = null;
|
||||
|
||||
name = null;
|
||||
constructor(key, func_info) {
|
||||
this.key = key;
|
||||
this.time = key;
|
||||
|
|
@ -43,7 +45,7 @@ class RedBlackTree {
|
|||
this.root = this.nil;
|
||||
}
|
||||
|
||||
function insert(key, func_info) {
|
||||
function insert(key, func_info, gname = null) {
|
||||
local z = RBTreeNode(key, func_info);
|
||||
local y = this.nil;
|
||||
local x = this.root;
|
||||
|
|
@ -66,6 +68,7 @@ class RedBlackTree {
|
|||
z.left = this.nil;
|
||||
z.right = this.nil;
|
||||
z.color = "red";
|
||||
if (gname) z.name = gname;
|
||||
this.insertFixup(z);
|
||||
this.size++;
|
||||
}
|
||||
|
|
@ -286,4 +289,26 @@ class RedBlackTree {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function findNodeByName(node,name) {
|
||||
if (node == this.nil) {
|
||||
return null;
|
||||
}
|
||||
if (node.name == name) {
|
||||
return node;
|
||||
}
|
||||
local leftResult = findNodeByName(node.left, name);
|
||||
if (leftResult) {
|
||||
return leftResult;
|
||||
}
|
||||
return findNodeByName(node.right, name);
|
||||
}
|
||||
|
||||
// 新增方法:根据 name 移除节点
|
||||
function removeNodeByName(name) {
|
||||
local targetNode = this.findNodeByName(this.root,name);
|
||||
if (targetNode) {
|
||||
this.deleteNode(targetNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -88,12 +88,24 @@ class Timer {
|
|||
//Cron字符串
|
||||
local NextTimestep = Info[2];
|
||||
//执行函数
|
||||
func.acall(func_args);
|
||||
local Flag = func.acall(func_args);
|
||||
//继续构建下一次任务
|
||||
Date_Exec_Tree.insert(Sq_Cron_Next(NextTimestep, time()), Info);
|
||||
if(Flag == null || Flag == true) Date_Exec_Tree.insert(Sq_Cron_Next(NextTimestep, time()), Info, Node.name);
|
||||
}
|
||||
|
||||
function SetCronTask(target_func, build_info, ...) {
|
||||
local CronString = "";
|
||||
local TaskName = null;
|
||||
//如果是字符串直接就是Cron字符串
|
||||
if (typeof build_info == "string") {
|
||||
CronString = build_info;
|
||||
}
|
||||
//如果是Table 则有名字
|
||||
else if (typeof build_info == "table") {
|
||||
CronString = build_info.Cron;
|
||||
TaskName = build_info.Name;
|
||||
}
|
||||
|
||||
function SetCronTask(target_func, CronString, ...) {
|
||||
local NowTimestep = time();
|
||||
|
||||
//下一次执行的时间
|
||||
|
|
@ -115,7 +127,11 @@ class Timer {
|
|||
//间隔时间戳时间
|
||||
func_info.push(CronString);
|
||||
|
||||
_Timer_Object.Date_Exec_Tree.insert(NextTimestep, func_info);
|
||||
_Timer_Object.Date_Exec_Tree.insert(NextTimestep, func_info, TaskName);
|
||||
}
|
||||
|
||||
function RemoveCronTask(name) {
|
||||
_Timer_Object.Date_Exec_Tree.removeNodeByName(name);
|
||||
}
|
||||
|
||||
function Update() {
|
||||
|
|
|
|||
|
|
@ -778,3 +778,70 @@ function User::DropItem(ItemId, Xpos, Ypos) {
|
|||
NativePointer("0x085A7599").writeShort(300);
|
||||
NativePointer("0x085A759F").writeShort(240);
|
||||
}
|
||||
|
||||
//角色类 发送邮件函数 (标题, 正文, 金币, 道具列表[[3037,100],[3038,100]])
|
||||
function User::ReqDBSendMultiMail(title, text, gold, item_list) {
|
||||
Timer.SetTimeOut(function(SUser,title, text, gold, item_list) {
|
||||
local Cid = SUser.GetCID();
|
||||
// 获取分割后的道具列表
|
||||
local subLists;
|
||||
local maxSlots = 10;
|
||||
local length = item_list.len();
|
||||
if (length <= maxSlots) {
|
||||
subLists = [item_list];
|
||||
} else {
|
||||
subLists = [];
|
||||
for (local i = 0; i< length; i += maxSlots) {
|
||||
local end = i + maxSlots;
|
||||
if (end > length) {
|
||||
end = length;
|
||||
}
|
||||
subLists.append(item_list.slice(i, end));
|
||||
}
|
||||
}
|
||||
if (subLists) {
|
||||
// 为每个子列表发送邮件
|
||||
for (local i = 0; i< subLists.len(); ++i) {
|
||||
local subList = subLists[i];
|
||||
|
||||
// 添加道具附件
|
||||
local vector = Memory.alloc(100);
|
||||
|
||||
Sq_CallFunc(S_Ptr("0x81349D6"), "pointer", ["pointer"], vector.C_Object);
|
||||
Sq_CallFunc(S_Ptr("0x817A342"), "pointer", ["pointer"], vector.C_Object);
|
||||
//将所有要发送的道具写入Vector
|
||||
for (local j = 0; j< subList.len(); ++j) {
|
||||
//道具ID 分配4字节内存
|
||||
local item_id = Memory.alloc(4);
|
||||
//道具数量 分配4字节内存
|
||||
local item_cnt = Memory.alloc(4);
|
||||
//写入道具ID和数量
|
||||
item_id.writeInt(subList[j][0]);
|
||||
item_cnt.writeInt(subList[j][1]);
|
||||
|
||||
local pair = Memory.alloc(100);
|
||||
|
||||
Sq_CallFunc(S_Ptr("0x81B8D41"), "pointer", ["pointer", "pointer", "pointer"], pair.C_Object, item_id.C_Object, item_cnt.C_Object);
|
||||
Sq_CallFunc(S_Ptr("0x80DD606"), "pointer", ["pointer", "pointer"], vector.C_Object, pair.C_Object);
|
||||
}
|
||||
|
||||
// 邮件支持10个道具附件格子
|
||||
local addition_slots = Memory.alloc(1000);
|
||||
|
||||
for (local j = 0; j< 10; ++j) {
|
||||
Sq_CallFunc(S_Ptr("0x80CB854"), "pointer", ["pointer"], addition_slots.add(j * 61).C_Object);
|
||||
}
|
||||
|
||||
Sq_CallFunc(S_Ptr("0x8556A14"), "int", ["pointer", "pointer", "int"], vector.C_Object, addition_slots.C_Object, 10);
|
||||
|
||||
local title_ptr = Memory.allocUtf8String(title); // 邮件标题
|
||||
local text_ptr = Memory.allocUtf8String(text); // 邮件正文
|
||||
|
||||
local text_len = text.len(); // 邮件正文长度
|
||||
|
||||
// 发邮件给角色
|
||||
Sq_CallFunc(S_Ptr("0x8556B68"), "int", ["pointer", "pointer", "int", "int", "int", "pointer", "int", "int", "int", "int"], title_ptr.C_Object, addition_slots.C_Object, subList.len(), gold, Cid, text_ptr.C_Object, text_len, 0, 99, 1);
|
||||
}
|
||||
}
|
||||
}, 1,this,title, text, gold, item_list);
|
||||
}
|
||||
|
|
@ -138,6 +138,21 @@ Gm_InputFunc_Handle["完成任务"] <- function(SUser, CmdString) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
|
|
@ -302,6 +317,8 @@ function TestCronTask(str) {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
Gm_InputFunc_Handle.WEQ <- function(SUser, CmdString) {
|
||||
// // World.MoveArea(SUser, 1, 0, 55, 349);
|
||||
|
||||
|
|
@ -333,6 +350,9 @@ Gm_InputFunc_Handle.WEQ <- function(SUser, CmdString) {
|
|||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
Gm_InputFunc_Handle.QS <- function(SUser, CmdString) {
|
||||
SUser.RechargeCeraPoint(10000);
|
||||
};
|
||||
|
|
@ -357,103 +377,250 @@ function UserdataSliceStr(Data) {
|
|||
return Ret;
|
||||
}
|
||||
|
||||
// MultiMailBoxCloseRindroMap <- null;
|
||||
// Cb_MultiMailBoxReqSend_Enter_Func.CloseRindro <- function(args) {
|
||||
// MultiMailBoxCloseRindroMap = Memory.alloc(144370 * 4);
|
||||
// MultiMailBoxCloseRindroMap.add(144369 * 4).writeInt(0);
|
||||
// args[1] = MultiMailBoxCloseRindroMap.C_Object;
|
||||
// return args;
|
||||
// }
|
||||
// Cb_MultiMailBoxReqSend_Leave_Func.CloseRindro <- function(args) {
|
||||
// MultiMailBoxCloseRindroMap = null;
|
||||
// }
|
||||
|
||||
// //Hook
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
//品级对应的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] // 金色
|
||||
};
|
||||
|
||||
function xorEncryptDecrypt(BlobObj, Key) {
|
||||
for (local i = 0; i< Key.len(); i++) {
|
||||
local currentKeyChar = Key[i % Key.len()];
|
||||
BlobObj[i] = BlobObj[i] ^ currentKeyChar;
|
||||
//通过道具ID获取RGB
|
||||
function RarityColor(item_id) {
|
||||
local PvfItemObj = PvfItem.GetPvfItemById(item_id);
|
||||
if (PvfItemObj == null) {
|
||||
return;
|
||||
}
|
||||
local Arr = [];
|
||||
foreach(value in BlobObj) {
|
||||
Arr.append(value);
|
||||
}
|
||||
return Arr;
|
||||
local CItem_get_rarity = PvfItemObj.GetRarity(); // 装备品级
|
||||
return rarityColorMap[(CItem_get_rarity).tostring()];
|
||||
}
|
||||
|
||||
function base64_encode(input) {
|
||||
local base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
local inputLength = input.len();
|
||||
local i = 0;
|
||||
local j = 0;
|
||||
local charArray3 = array(3);
|
||||
local charArray4 = array(4);
|
||||
local encoded = "";
|
||||
|
||||
while (inputLength--) {
|
||||
charArray3[i++] = input[inputLength];
|
||||
if (i == 3) {
|
||||
charArray4[0] = (charArray3[0] & 0xfc) >> 2;
|
||||
charArray4[1] = ((charArray3[0] & 0x03) << 4) + ((charArray3[1] & 0xf0) >> 4);
|
||||
charArray4[2] = ((charArray3[1] & 0x0f) << 2) + ((charArray3[2] & 0xc0) >> 6);
|
||||
charArray4[3] = charArray3[2] & 0x3f;
|
||||
user_equ_plan <- {};
|
||||
|
||||
for (i = 0; i< 4; i++) {
|
||||
encoded += base64_chars[charArray4[i]];
|
||||
function GetEquip(SUser) {
|
||||
//获取玩家背包
|
||||
local InvenObj = SUser.GetInven();
|
||||
if (!InvenObj) {
|
||||
return;
|
||||
}
|
||||
i = 0;
|
||||
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;
|
||||
}
|
||||
//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();
|
||||
}
|
||||
}
|
||||
|
||||
if (i) {
|
||||
for (j = i; j< 3; j++) {
|
||||
charArray3[j] = 0;
|
||||
}
|
||||
|
||||
charArray4[0] = (charArray3[0] & 0xfc) >> 2;
|
||||
charArray4[1] = ((charArray3[0] & 0x03) << 4) + ((charArray3[1] & 0xf0) >> 4);
|
||||
charArray4[2] = ((charArray3[1] & 0x0f) << 2) + ((charArray3[2] & 0xc0) >> 6);
|
||||
charArray4[3] = charArray3[2] & 0x3f;
|
||||
|
||||
for (j = 0; j< i + 1; j++) {
|
||||
encoded += base64_chars[charArray4[j]];
|
||||
}
|
||||
|
||||
while (i++<3) {
|
||||
encoded += "=";
|
||||
}
|
||||
}
|
||||
|
||||
return encoded;
|
||||
return equArr;
|
||||
}
|
||||
|
||||
Timer.SetTimeOut(function() {
|
||||
local Key = "desaqe";
|
||||
local Str = "Test Data";
|
||||
print("old: " + Str);
|
||||
local StrPointer = Memory.allocUtf8String(Str);
|
||||
local BlobObj = StrPointer.readBinary(Str.len());
|
||||
local Arr = xorEncryptDecrypt(BlobObj, Key);
|
||||
StrPointer.writeByteArray(Arr);
|
||||
//此时str已不可读 需要掌控其指针 与 长度
|
||||
local NewStrPointer = StrPointer;
|
||||
local encodestr = base64_encode(NewStrPointer.readUtf8String(Str.len()));
|
||||
print("encode: " + encodestr);
|
||||
|
||||
local BlobObj = NewStrPointer.readBinary(Str.len());
|
||||
local Arr = xorEncryptDecrypt(BlobObj, Key);
|
||||
NewStrPointer.writeByteArray(Arr);
|
||||
print("new: " + NewStrPointer.readUtf8String());
|
||||
}, 1);
|
||||
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
// 遍历遍历穿戴栏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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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++;
|
||||
}
|
||||
}
|
||||
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("发包了");
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
PutOnEquip(SUser, equPlan, id);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//分割道具列表
|
||||
|
|
@ -583,13 +750,41 @@ Gm_InputFunc_Handle.TTT <- function(SUser, CmdString) {
|
|||
// [3038, 200]
|
||||
// ]);
|
||||
|
||||
SUser.DropItem(27095, 800, 200);
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
// SUser.MainTaskCompleted();
|
||||
};
|
||||
|
||||
|
||||
// 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;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
|
@ -671,15 +866,61 @@ ClientSocketPackFuncMap.rawset(21091001, function(SUser, Jso) {
|
|||
// // SUser.SendNotiPacketMessage("出纳上到几点方柏霓撒娇扩大年级卡萨", 7);
|
||||
// }
|
||||
|
||||
// //定义一个显示的变量
|
||||
// getroottable().TaskCount <- 0;
|
||||
|
||||
// //任务
|
||||
// function Task() {
|
||||
// getroottable().TaskCount++;
|
||||
// print("定时任务执行了一次,当前执行次数为:" + getroottable().TaskCount);
|
||||
// }
|
||||
|
||||
// //注册一个定时任务 每五秒执行一次 任务名为 TestCronName
|
||||
// Timer.SetCronTask(Task, {
|
||||
// Cron = "0/5 * * * * *",
|
||||
// Name = "TestCronName"
|
||||
// });
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// }
|
||||
// }
|
||||
}, 1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Gm_InputFunc_Handle["aaa"] <- function(SUser, cmd) {
|
||||
// 获取角色背包
|
||||
local InvenObj = SUser.GetInven();
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class Fiendwar {
|
|||
|
||||
//玩家发送消息HOOK 为了攻坚队频道和团长公告
|
||||
function base_input_hook(CUser, CmdString) {
|
||||
|
||||
if (!CUser) return true;
|
||||
local SUser = User(CUser);
|
||||
//超时空频道
|
||||
|
|
@ -55,6 +56,7 @@ class Fiendwar {
|
|||
if (Localtion.Area <= 1) {
|
||||
return true;
|
||||
} else {
|
||||
print(111);
|
||||
if (CmdString.find("RindroType") == 8) {
|
||||
local Jso = {
|
||||
op = 20063027,
|
||||
|
|
@ -73,6 +75,7 @@ class Fiendwar {
|
|||
}
|
||||
|
||||
function base_input_hook2(args) {
|
||||
|
||||
local type = args[2];
|
||||
local SUser = User(args[1]);
|
||||
local msg = args[3];
|
||||
|
|
@ -95,6 +98,7 @@ class Fiendwar {
|
|||
|
||||
//玩家消息分发
|
||||
function PlayerNotiMsgDistribute(Jso) {
|
||||
|
||||
local SUser = World.GetUserByUidCid(Jso.uid, Jso.cid);
|
||||
if (!SUser) return;
|
||||
local CUserList = Jso.list;
|
||||
|
|
@ -242,6 +246,7 @@ class Fiendwar {
|
|||
Cb_Move_Area_Func.Fiendwar <- move_area_hook.bindenv(this); //区域移动
|
||||
Base_InputHookFunc_Handle.Fiendwar <- base_input_hook.bindenv(this); //玩家发送消息
|
||||
Cb_reach_game_world_Func.Fiendwar <- Login_Hook.bindenv(this); //上线HOOK
|
||||
Cb_Server_Chat_Log_Leave_Func.Luke <- base_input_hook2.bindenv(this); //玩家发送消息
|
||||
|
||||
//注册收包
|
||||
GatewaySocketPackFuncMap.rawset(20063010, FiendwarSendAreaUserCallBack.bindenv(this)); //玩家移动后的区域广播包
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ _Hook_Register_Currency_Func_("0x086B330A", ["pointer", "pointer", "bool", "void
|
|||
//刷新攻城怪物函数, 控制下一只刷新的攻城怪物id
|
||||
Cb_CVillageMonsterArea_GetAttackedMonster_Enter_Func <- {};
|
||||
Cb_CVillageMonsterArea_GetAttackedMonster_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x086B3AEA", ["pointer", "int", "int"], Cb_CVillageMonsterArea_GetAttackedMonster_Enter_Func, Cb_CVillageMonsterArea_GetAttackedMonster_Leave_Func);
|
||||
_Hook_Register_Currency_Func_("0x086B3AEA", ["pointer", "int", "pointer"], Cb_CVillageMonsterArea_GetAttackedMonster_Enter_Func, Cb_CVillageMonsterArea_GetAttackedMonster_Leave_Func);
|
||||
|
||||
//正在挑战的攻城怪物
|
||||
Cb_CVillageMonster_OnFightVillageMonster_Enter_Func <- {};
|
||||
|
|
@ -448,11 +448,46 @@ _Hook_Register_Currency_Func_("0x08608D58", ["pointer", "int", "bool"], Cb_Check
|
|||
|
||||
|
||||
//检查每日日程时间 提供者: ZZ
|
||||
Cb_User_CheckDailyScheduleTime_Enter_Func<-{};
|
||||
Cb_User_CheckDailyScheduleTime_Leave_Func<-{};
|
||||
_Hook_Register_Currency_Func_("0x846C0A8",["int","int","int"],Cb_User_CheckDailyScheduleTime_Enter_Func,Cb_User_CheckDailyScheduleTime_Leave_Func);
|
||||
Cb_User_CheckDailyScheduleTime_Enter_Func <- {};
|
||||
Cb_User_CheckDailyScheduleTime_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x846C0A8", ["int", "int", "int"], Cb_User_CheckDailyScheduleTime_Enter_Func, Cb_User_CheckDailyScheduleTime_Leave_Func);
|
||||
|
||||
//绝望之塔获取上次挑战时间 提供者: ZZ
|
||||
Cb_User_TOD_UserState_getLastClearTime_Enter_Func<-{};
|
||||
Cb_User_TOD_UserState_getLastClearTime_Leave_Func<-{};
|
||||
_Hook_Register_Currency_Func_("0x864387E",["pointer"],Cb_User_TOD_UserState_getLastClearTime_Enter_Func,Cb_User_TOD_UserState_getLastClearTime_Leave_Func);
|
||||
Cb_User_TOD_UserState_getLastClearTime_Enter_Func <- {};
|
||||
Cb_User_TOD_UserState_getLastClearTime_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x864387E", ["pointer"], Cb_User_TOD_UserState_getLastClearTime_Enter_Func, Cb_User_TOD_UserState_getLastClearTime_Leave_Func);
|
||||
|
||||
|
||||
Cb_CItem_IsRoutingItem_Enter_Func <- {};
|
||||
Cb_CItem_IsRoutingItem_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x08150f18", ["pointer", "int"], Cb_CItem_IsRoutingItem_Enter_Func, Cb_CItem_IsRoutingItem_Leave_Func);
|
||||
|
||||
//调整箱使用
|
||||
Cb_ModItemattr_Enter_Func <- {};
|
||||
Cb_ModItemattr_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x8200B08", ["pointer", "pointer", "pointer", "int"], Cb_ModItemattr_Enter_Func, Cb_ModItemattr_Leave_Func);
|
||||
|
||||
//个人金库整理
|
||||
Cb_CCargo_sort_Enter_Func <- {};
|
||||
Cb_CCargo_sort_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x850BD0C", ["pointer", "pointer"], Cb_CCargo_sort_Enter_Func, Cb_CCargo_sort_Leave_Func);
|
||||
|
||||
// 玩家断开链接时 提供者:南瓜
|
||||
Cb_CUser_LogoutToPCRoom_Enter_Func <- {};
|
||||
Cb_CUser_LogoutToPCRoom_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x0868170C", ["pointer", "int"], Cb_CUser_LogoutToPCRoom_Enter_Func, Cb_CUser_LogoutToPCRoom_Leave_Func);
|
||||
|
||||
// 购买道具时的检查错误
|
||||
Cb_BuyItem_check_error_Enter_Func <- {};
|
||||
Cb_BuyItem_check_error_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x081BE46A", ["pointer", "pointer", "pointer", "int"], Cb_BuyItem_check_error_Enter_Func, Cb_BuyItem_check_error_Leave_Func);
|
||||
|
||||
// 服务器被Kill时(不含炸频道等)
|
||||
Cb_Server_ClossByKill_Enter_Func <- {};
|
||||
Cb_Server_ClossByKill_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x082FD90E", ["pointer", "int"], Cb_Server_ClossByKill_Enter_Func, Cb_Server_ClossByKill_Leave_Func);
|
||||
|
||||
// 收到玩家聊天信息
|
||||
Cb_SendMess_Enter_Func <- {};
|
||||
Cb_SendMess_Leave_Func <- {};
|
||||
_Hook_Register_Currency_Func_("0x081F3540", ["pointer", "pointer","pointer","int"], Cb_SendMess_Enter_Func, Cb_SendMess_Leave_Func);
|
||||
|
|
@ -40,6 +40,7 @@ function InitPluginInfo() {
|
|||
//Log.Put("error", "测试错误日志");
|
||||
|
||||
GameManager.OpenCreateJob_CreatorMage();
|
||||
GameManager.FixPracticemode();
|
||||
|
||||
|
||||
// function IndependenceDropLogic(SUser, MonsterId, MonsterLevel, Xpos, Ypos, DgnName, DgnId, DgnLevel,DgnDiff, HellDiff)
|
||||
|
|
@ -88,7 +89,7 @@ function main() {
|
|||
// Sq_Conversion("這是一個繁體字符串");
|
||||
|
||||
|
||||
_Start_Official_Project_();
|
||||
_Official_Project_();
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
13
Main.nut
13
Main.nut
|
|
@ -12,3 +12,16 @@ function sqr_main() {
|
|||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Gm_InputFunc_Handle["op"] <- function(SUser, CmdString) {
|
||||
|
||||
local Jso = {
|
||||
op <- "20060007";
|
||||
uid <- SUser.GetUID();
|
||||
cid <- SUser.GetCID();
|
||||
}
|
||||
print(111);
|
||||
Socket.SendGateway(Jso);
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
|
||||
|
||||
Timer.SetTimeOut(function() {
|
||||
_Dps_SetInitiaweapon_Main_();
|
||||
}, 1)
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"发送道具指令": "GiveItem",
|
||||
"转职觉醒指令": "GrowType",
|
||||
"完成任务指令": "MakeQuest",
|
||||
"设置等级指令": "SetLevel",
|
||||
"获取位置指令": "GetLocation",
|
||||
"踢玩家下线指令": "KickPlayer",
|
||||
|
||||
"发送道具指令例子": "当有一个空格时跟道具编号 当有两个空格时 跟道具编号和发送数量 例: '//GiveItem 3037' '//GiveItem 3037 100'",
|
||||
"转职觉醒指令例子": "当有一个空格时跟转职职业 当有两个空格时 跟转职职业和是否觉醒 例: '//GrowType 1' '//GrowType 1 1'",
|
||||
"完成任务指令例子": "当有一个空格时跟任务编号 例: '//MakeQuest 1'",
|
||||
"设置等级指令例子": "当有一个空格时跟设定等级 例: '//SetLevel 100'",
|
||||
"获取位置指令例子": "无特殊用法 '//GetLocation'",
|
||||
"踢玩家下线指令例子": "当有一个空格时跟想要踢除的玩家名字 例: '//KickPlayer 倾泪寒'",
|
||||
"说明" : "所有指令都可更改 相对于的触发方式输入自己设定的指令即可"
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"分解卷的道具ID": 17577,
|
||||
"是否返还_true代表返还false代表不返还": true,
|
||||
"一键分解的起始位置_就是背包从第几格开始": 0,
|
||||
"一键分解的结束位置_就是背包到第几格结束": 16
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"需要完成的任务编号" : [674,649,675,650],
|
||||
"注意事项": "请确保你的任务需求等级是1级,否则可能无法完成。请在PVF中更改任务需要的等级。"
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"主线任务完成券道具ID":2021458801,
|
||||
"普通任务完成券道具ID":2021458802,
|
||||
"成就任务完成券道具ID":2021458804,
|
||||
"重置所有任务道具ID":2021458813,
|
||||
"指定每日任务完成券道具ID":2021458803,
|
||||
"指定每日任务重置券道具ID":20214588091,
|
||||
"指定完成每日任务ID":[2411, 2412],
|
||||
"主线任务需排除任务ID":[1111111],
|
||||
"普通任务需排除任务ID":[4443, 7898, 7889, 7895, 7892, 7873, 7876, 7870, 7879, 4065, 4068, 999, 7827, 7817, 7824, 7820, 7834, 7837, 7831, 7840, 4427, 4428, 4429, 4430, 4431, 4432, 4433, 4434, 4435, 7848, 7842, 7845, 7851, 7866, 7855, 7862, 7859, 7814, 7810, 7807, 7803, 7886, 7882, 2708, 2710, 2712, 2702],
|
||||
"成就任务需排除任务ID":[1111111]
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"副本播报开关(true开启,false关闭)":true,
|
||||
"不需要播报的副本ID":[20002, 20001, 20002, 20003, 20004, 20005, 20006, 20007, 20008, 20009, 20010, 20020, 20021, 20022, 20023, 20024],
|
||||
"通关播报信息":"玩家[%s]通关[%s - %s]用时:[%s],击杀怪物数量<%d>",
|
||||
"未通过一个小地图播报信息":"真惨啊,玩家[%s] 在[%s%s-%s] 中连一个地图都没通过,击杀怪物数量<%d>",
|
||||
"放弃副本":"很遗憾,玩家[%s] 在[%s%s-%s] 中被打成傻逼,用时: %s,击杀怪物数量<%d>",
|
||||
"在队伍中提前退出副本":"快来看啊,叛徒 [%s] 在 <%s> 的队伍中,提前退出了[%s%s-%s] ,用时: %s,击杀怪物数量<%d>",
|
||||
"发送信息位置":14,
|
||||
"副本难度命名" : {
|
||||
"0": "普通级",
|
||||
"1": "冒险级",
|
||||
"2": "勇士级",
|
||||
"3": "王者级",
|
||||
"4": "地狱级"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"公告": "缺少进入凭证:",
|
||||
"副本需要持有道具才允许进入":{
|
||||
"65":3038,
|
||||
"64":3038
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"无需配置":0
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
{
|
||||
"奖励控制": {
|
||||
"开关说明(true为开启,false为关闭)这是提示请无视,后面的0也不用管":0,
|
||||
"多件史诗奖励控制开关": true,
|
||||
"多件神器奖励控制开关": false,
|
||||
"多件稀有奖励控制开关": false,
|
||||
"稀有装备开关如果开启会导致可以在副本内丢弃拾取领取奖励,需搭配禁止丢弃物品使用(这是提示请无视,后面的0也不用管)":0,
|
||||
"tips>>>如果奖励填0代表点券(这是提示请无视,后面的0也不用管)":0,
|
||||
"多件SS对应奖励(史诗)": {
|
||||
"2": [
|
||||
[3038, 2],
|
||||
[3037, 10]
|
||||
],
|
||||
"3": [
|
||||
[0, 10000],
|
||||
[123014, 10]
|
||||
],
|
||||
"4": [
|
||||
[0, 50000],
|
||||
[3037, 2000],
|
||||
[3038, 2000]
|
||||
],
|
||||
"5": [
|
||||
[0, 50000],
|
||||
[3037, 2000],
|
||||
[3038, 2000]
|
||||
]
|
||||
},
|
||||
"多件神器对应奖励": {
|
||||
"2": [
|
||||
[3038, 1],
|
||||
[3037, 5]
|
||||
],
|
||||
"3": [
|
||||
[0, 5000],
|
||||
[123014, 5]
|
||||
],
|
||||
"4": [
|
||||
[0, 20000],
|
||||
[3037, 1000],
|
||||
[3038, 1000]
|
||||
],
|
||||
"5": [
|
||||
[0, 20000],
|
||||
[3037, 1000],
|
||||
[3038, 1000]
|
||||
]
|
||||
},
|
||||
"多件稀有对应奖励": {
|
||||
"2": [
|
||||
[3038, 1],
|
||||
[3037, 2]
|
||||
],
|
||||
"3": [
|
||||
[0, 2000],
|
||||
[123014, 2]
|
||||
],
|
||||
"4": [
|
||||
[0, 10000],
|
||||
[3037, 500],
|
||||
[3038, 500]
|
||||
],
|
||||
"5": [
|
||||
[0, 10000],
|
||||
[3037, 500],
|
||||
[3038, 500]
|
||||
]
|
||||
}
|
||||
},
|
||||
"指定道具奖励控制": {
|
||||
"指定道具奖励控制开关": true,
|
||||
"指定道具对应奖励": {
|
||||
"3037": [
|
||||
[3038, 2],
|
||||
[3037, 10]
|
||||
],
|
||||
"3038": [
|
||||
[0, 10000],
|
||||
[123014, 10]
|
||||
],
|
||||
"3039": [
|
||||
[0, 50000],
|
||||
[3037, 2000],
|
||||
[3038, 2000]
|
||||
]
|
||||
}
|
||||
},
|
||||
"信息播报":{
|
||||
"发送位置":14,
|
||||
"标题":["-----------☆天降鸿运☆--------------", [255, 130, 0]],
|
||||
"内容颜色":[255, 120, 0],
|
||||
"结尾":["-----------☆恭喜这逼☆--------------", [255, 130, 0]]
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
"EpicPotionID": 2600006,
|
||||
"EpicPotionOdds": 1.0,
|
||||
"EpicPotionlist": {
|
||||
"1": 1.0,
|
||||
"1": 1.1,
|
||||
"2": 1.0
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"屏蔽词": ["测试屏蔽词","烟雨"]
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"重置券id": 7577
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"奖励时间和内容": {
|
||||
"20:00":[
|
||||
[3037,10],
|
||||
[3038,10]
|
||||
],
|
||||
"21:00":[
|
||||
[3037,10],
|
||||
[3038,10]
|
||||
]
|
||||
},
|
||||
"公告":"%s 的在线奖励以发放,请注意查收"
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +1,12 @@
|
|||
{
|
||||
"时装清除卷ID": 17579,
|
||||
"宠物清除卷ID": 17580,
|
||||
"时装清除卷ID": 2021458808,
|
||||
"宠物清除卷ID": 2021458807,
|
||||
"时装清除完成提示": "清除前两行时装成功",
|
||||
"宠物清除完成提示": "清除前两行宠物成功",
|
||||
"时装清除券是否返还": true,
|
||||
"宠物清除券是否返还": true
|
||||
"宠物清除券是否返还": true,
|
||||
"数据库IP 不是外置数据库不要更改": "127.0.0.1",
|
||||
"数据库端口 不懂不要更改": 3306,
|
||||
"数据库用户名 本地用户名不懂不要更改": "game",
|
||||
"数据库密码 本地密码不懂不要更改": "uu5!^%jg"
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"是否允许创建": true
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"数据库IP 不是外置数据库不要更改": "127.0.0.1",
|
||||
"数据库端口 不懂不要更改": 3306,
|
||||
"数据库用户名 本地用户名不懂不要更改": "game",
|
||||
"数据库密码 本地密码不懂不要更改": "uu5!^%jg"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"缔造武器": 27600,
|
||||
"黑暗武士武器":35001
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"等级上限": 86
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"CrossoverStr1": "装备栏1号位没有装备..",
|
||||
"CrossoverStr2": "跨界失败,请检查一下账号金库是否没有开启或者没有空位",
|
||||
"CrossoverStr3": "跨界失败!",
|
||||
"CrossoverStr3": "跨界失败",
|
||||
"CrossoverStr4": "跨界成功,已经装备栏第一格的 [%s] 转移至账号金库",
|
||||
"CrossoverStr5": "跨界失败, [%s] 不可以跨界",
|
||||
"CrossoverId": 17577,
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"config": [
|
||||
2,
|
||||
300
|
||||
],
|
||||
"msgtype1": "你已经被限制获取道具和金币,剩余:[%d]秒...",
|
||||
"msgtype2": "你已经被限制获取经验,剩余:[%d]秒...",
|
||||
"msgtype3": "玩家[%s]因使用第三方软件已被限制进入副本,剩余:[%d]秒...",
|
||||
"open": true,
|
||||
"whitelistCID": [
|
||||
1
|
||||
],
|
||||
"whitelistDgnID": [
|
||||
1111
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"黄金品级调整箱id": 897
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
function _Dps_GmConvenienceConsole_Logic_() {
|
||||
local Config = GlobalConfig.Get("GM便捷操作台_Lenheart.json");
|
||||
|
||||
|
||||
Gm_InputFunc_Handle[Config["发送道具指令"]] <- 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[Config["转职觉醒指令"]] <- 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[Config["完成任务指令"]] <- 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.ClearQuest_Gm(handler[1].tointeger());
|
||||
}
|
||||
}
|
||||
|
||||
Gm_InputFunc_Handle[Config["设置等级指令"]] <- 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[Config["获取位置指令"]] <- function(SUser, CmdString) {
|
||||
local Location = SUser.GetLocation();
|
||||
SUser.SendNotiPacketMessage("X坐标: " + Location.Pos.X, 8);
|
||||
SUser.SendNotiPacketMessage("Y坐标: " + Location.Pos.Y, 8);
|
||||
SUser.SendNotiPacketMessage("城镇编号: " + Location.Town, 8);
|
||||
SUser.SendNotiPacketMessage("区域编号: " + Location.Area, 8);
|
||||
};
|
||||
|
||||
//踢人下线
|
||||
Gm_InputFunc_Handle[Config["踢玩家下线指令"]] <- 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 TUser = World.GetUserByName(handler[1]);
|
||||
if(TUser)TUser.Kick();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
function _Dps_GmConvenienceConsole_Main_() {
|
||||
_Dps_GmConvenienceConsole_Logic_();
|
||||
}
|
||||
|
||||
function _Dps_GmConvenienceConsole_Main_Reload_(OldConfig) {
|
||||
|
||||
foreach (Key,Value in OldConfig) {
|
||||
try {
|
||||
Gm_InputFunc_Handle.rawdelete(Key);
|
||||
} catch (exception){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
_Dps_GmConvenienceConsole_Logic_();
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "GM便捷操作台",
|
||||
"ProjectDescribe": "本项目提供了许多GM的便捷操作 方便平时调试或写代码 \n输入'//' + 设定的指令即可执行逻辑 ",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "GM便捷操作台_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"GM便捷操作台.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_GmConvenienceConsole_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "一键分解卷",
|
||||
"ProjectDescribe": "一键分解卷 需要先开启自己的分解师副职业",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "一键分解卷_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"一键分解卷.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_OneClickDisassemblyOfRoll_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
function _Dps_OneClickDisassemblyOfRoll_Logic_() {
|
||||
|
||||
local Config = GlobalConfig.Get("一键分解卷_Lenheart.json");
|
||||
//分解券
|
||||
Cb_Use_Item_Sp_Func[Config["分解卷的道具ID"]] <- function(SUser, ItemId) {
|
||||
local Config = GlobalConfig.Get("一键分解卷_Lenheart.json");
|
||||
if (Config["是否返还_true代表返还false代表不返还"])
|
||||
SUser.GiveItem(ItemId, 1);
|
||||
|
||||
local is = SUser.GetCurCharacExpertJob();
|
||||
if (!is) {
|
||||
SUser.SendNotiPacketMessage("未开启分解机", 8);
|
||||
return;
|
||||
}
|
||||
local inven = SUser.GetInven();
|
||||
|
||||
for (local i = (9 + Config["一键分解的起始位置_就是背包从第几格开始"]); i <= (48 + Config["一键分解的结束位置_就是背包到第几格结束"]); i++)
|
||||
{
|
||||
local itemObj = inven.GetSlot(1, i);
|
||||
local itemid = itemObj.GetIndex();
|
||||
|
||||
//如果这个位置有道具
|
||||
if (itemid != 0) {
|
||||
|
||||
local pvfitem = PvfItem.GetPvfItemById(itemid);
|
||||
|
||||
local rarity = pvfitem.GetRarity();
|
||||
if (rarity <= 3) {
|
||||
SUser.DisPatcher_DisJointItem_disjoint(i);
|
||||
}
|
||||
}
|
||||
SUser.SendItemSpace(0);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function _Dps_OneClickDisassemblyOfRoll_Main_() {
|
||||
_Dps_OneClickDisassemblyOfRoll_Logic_();
|
||||
}
|
||||
|
||||
function _Dps_OneClickDisassemblyOfRoll_Main_Reload_(OldConfig) {
|
||||
Cb_Use_Item_Sp_Func.rawdelete(OldConfig["分解卷的道具ID"]);
|
||||
_Dps_OneClickDisassemblyOfRoll_Logic_();
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
"ProjectName": "一键存入个人金库",
|
||||
"ProjectDescribe": "使用之前,请务必保证安装了群内的 \"客户端消息框233.dll\" 插件,这个插件放入你客户端的插件加载目录即可,在游戏中输入 //yjcc 即可一键存入个人金库,也可以在游戏中的快捷喊话中添加为快捷键 配置中可更改 yjcc 关键字",
|
||||
"ProjectAuthor": "倾泪寒 & 南瓜",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "一键存入个人金库_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"一键入库.nut"
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@
|
|||
文件用途:一键入库
|
||||
*/
|
||||
|
||||
//启动函数 自定义的需要写在ifo中
|
||||
function _Dps_OneClickStorage_Main_() {
|
||||
function _Dps_OneClickStorage_Logic_() {
|
||||
local Config = GlobalConfig.Get("一键存入个人金库_Lenheart.json");
|
||||
//在游戏中输入//一键入库即可调用
|
||||
Gm_InputFunc_Handle[Config["一键存仓命令"]] <- function(SUser,Cmd) {
|
||||
Gm_InputFunc_Handle[Config["一键存仓命令"]] <- function(SUser, Cmd) {
|
||||
// 获取角色背包
|
||||
local InvenObj = SUser.GetInven();
|
||||
// 角色仓库
|
||||
|
|
@ -106,3 +105,12 @@ function _Dps_OneClickStorage_Main_() {
|
|||
SUser.SendItemSpace(2);
|
||||
}
|
||||
}
|
||||
//启动函数 自定义的需要写在ifo中
|
||||
function _Dps_OneClickStorage_Main_() {
|
||||
_Dps_OneClickStorage_Logic_();
|
||||
}
|
||||
|
||||
function _Dps_OneClickStorage_Main_Reload(OldConfig) {
|
||||
Gm_InputFunc_Handle.rawdelete(OldConfig["一键存仓命令"]);
|
||||
_Dps_OneClickStorage_Logic_();
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "上线自动完成任务",
|
||||
"ProjectDescribe": "上线自动完成任务",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "上线自动完成任务_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"上线自动完成任务.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_AutomaticallyCompleteTasksOnline_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
function _Dps_AutomaticallyCompleteTasksOnline_Main_() {
|
||||
Cb_History_MileageSet_Func["_DPS_上线自动完成任务_"] <- function(SUser, Data) {
|
||||
local Config = GlobalConfig.Get("上线自动完成任务_Lenheart.json");
|
||||
local QuestArr = Config["需要完成的任务编号"];
|
||||
foreach(QuestId in QuestArr) {
|
||||
SUser.ClearQuest_Gm(QuestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"ProjectName": "任务清除卷",
|
||||
"ProjectDescribe": "清理各类型任务以及重置相关任务",
|
||||
"ProjectAuthor": "南瓜",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "任务相关配置_南瓜.json",
|
||||
"ProjectFiles": [
|
||||
"任务清除卷.nut"
|
||||
],
|
||||
"ProjectIcon":"http://103.36.223.176:5244/d/DP_S/logo2.png?sign=aH3AjsyJgmomCqT3To_QfDY6a2RlSI-T3eUmtW0raoA=:0",
|
||||
"ProjectRunFunc": "_Dps_QuestInfo_nangua_Main_"
|
||||
}
|
||||
|
|
@ -1,212 +0,0 @@
|
|||
_NG_QUEST_GRADE_COMMON_UNIQUE <- 5 //普通任务
|
||||
_NG_QUEST_GRADE_EPIC <- 0 //主线任务
|
||||
_NG_QUEST_GRADE_ACHIEVEMENT <- 2 //成就任务
|
||||
|
||||
// 任务类型与排除列表的映射
|
||||
_QUEST_EXCLUDE_MAP <- {
|
||||
[_NG_QUEST_GRADE_COMMON_UNIQUE] = "普通任务需排除任务ID",
|
||||
[_NG_QUEST_GRADE_ACHIEVEMENT] = "成就任务需排除任务ID",
|
||||
[_NG_QUEST_GRADE_EPIC] = "主线任务需排除任务ID"
|
||||
}
|
||||
|
||||
function clear_all_quest_by_character_level_nangua(SUser, Item_id) {
|
||||
local Cofig = GlobalConfig.Get("任务相关配置_南瓜.json");
|
||||
local poolMapping = {
|
||||
[Cofig["主线任务完成券道具ID"]] = _NG_QUEST_GRADE_EPIC,
|
||||
[Cofig["普通任务完成券道具ID"]] = _NG_QUEST_GRADE_COMMON_UNIQUE,
|
||||
[Cofig["成就任务完成券道具ID"]] = _NG_QUEST_GRADE_ACHIEVEMENT
|
||||
};
|
||||
// 获取对应的type
|
||||
local quest_type = poolMapping[Item_id];
|
||||
// 玩家任务信息
|
||||
local user_quest = SUser.GetQuest();
|
||||
|
||||
// 玩家已完成任务信息
|
||||
local WongWork_CQuestClear = NativePointer(user_quest).add(4);
|
||||
// 玩家当前等级
|
||||
local charac_lv = SUser.GetCharacLevel();
|
||||
// 本次完成任务数量
|
||||
local clear_quest_cnt = 0;
|
||||
// 获取pvf数据
|
||||
local data_manager = Sq_CallFunc(S_Ptr("0x80CC19B"), "pointer");
|
||||
|
||||
// 使用全局排除列表
|
||||
local exclude_quset_id = _QUEST_EXCLUDE_MAP.rawin(quest_type) ? Cofig[_QUEST_EXCLUDE_MAP[quest_type]] : [];
|
||||
|
||||
//完成当前已接任务
|
||||
for (local i = 0; i < 20; i++) {
|
||||
// 任务id
|
||||
local doing_quest_id = NativePointer(user_quest).add(4 * (i + 7500 + 2)).readInt();
|
||||
|
||||
if (doing_quest_id > 0) {
|
||||
// 获取当前任务的数据
|
||||
local quest = Sq_CallFunc(S_Ptr("0x835FDC6"), "pointer", ["pointer", "int"], data_manager, doing_quest_id);
|
||||
if (quest) {
|
||||
// 任务类型
|
||||
local quest_grade = NativePointer(quest).add(8).readInt();
|
||||
|
||||
// 判断任务类型并且不在排除列表中
|
||||
if (quest_grade == quest_type && exclude_quset_id.find(doing_quest_id) == null) {
|
||||
// 无条件完成任务
|
||||
SUser.ClearQuest_Gm(doing_quest_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 遍历所有任务ID
|
||||
for (local quest_id = 1; quest_id < 30000; quest_id++) {
|
||||
// 检查任务是否在排除列表中
|
||||
if (exclude_quset_id.find(quest_id) != null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 跳过已完成的任务
|
||||
local isCleared = isClearedQuest(WongWork_CQuestClear.C_Object, quest_id);
|
||||
if (isCleared) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 获取任务数据
|
||||
local quest = Sq_CallFunc(S_Ptr("0x835FDC6"), "pointer", ["pointer", "int"], data_manager, quest_id);
|
||||
if (quest) {
|
||||
// 任务类型
|
||||
local quest_grade = NativePointer(quest).add(8).readInt();
|
||||
|
||||
if (quest_grade == quest_type) {
|
||||
// 只判断任务最低等级要求 忽略 职业/前置 等任务要求 可一次性完成当前等级所有任务
|
||||
local quest_min_lv = NativePointer(quest).add(0x20).readInt();
|
||||
|
||||
if (quest_min_lv <= charac_lv) {
|
||||
Sq_CallFunc(S_Ptr("0x808BA78"), "int", ["pointer", "int"], WongWork_CQuestClear.C_Object, quest_id);
|
||||
|
||||
// 本次自动完成任务计数
|
||||
clear_quest_cnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 通知客户端更新
|
||||
if (clear_quest_cnt > 0) {
|
||||
local Pack = Packet();
|
||||
Sq_CallFunc(S_Ptr("0x868B044"), "int", ["pointer"], SUser.C_Object);
|
||||
Sq_CallFunc(S_Ptr("0x86ABBA8"), "int", ["pointer", "pointer"], user_quest, Pack.C_Object);
|
||||
SUser.Send(Pack);
|
||||
Pack.Delete();
|
||||
// 公告通知客户端本次自动完成任务数据
|
||||
SUser.SendNotiPacketMessage("已自动完成当前等级任务数量: " + clear_quest_cnt, 8);
|
||||
}else{
|
||||
SUser.SendNotiPacketMessage("没有可清理的任务", 8);
|
||||
SUser.GiveItem(Item_id, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//指定每日任务完成券
|
||||
function QUEST_ByMRFuncBynangua(SUser, ItemId) {
|
||||
|
||||
// 玩家已完成任务信息
|
||||
local user_quest = SUser.GetQuest();
|
||||
local WongWork_CQuestClear = NativePointer(user_quest).add(4);
|
||||
|
||||
// 是否有任务已被清理
|
||||
local anyTaskCleared = false;
|
||||
|
||||
// 遍历并完成每一个任务
|
||||
for (local i = 0; i < questConfigBynangua.CF.len(); i++) {
|
||||
local quest_id = questConfigBynangua.CF[i];
|
||||
local isCleared = isClearedQuest(WongWork_CQuestClear.C_Object, quest_id);
|
||||
|
||||
if (isCleared) {
|
||||
continue;
|
||||
} else {
|
||||
SUser.ClearQuest_Gm(quest_id);
|
||||
anyTaskCleared = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (anyTaskCleared) {
|
||||
SUser.SendNotiPacketMessage("指定每日任务已完成!", 8);
|
||||
} else {
|
||||
SUser.SendNotiPacketMessage("没有可清理的任务", 8);
|
||||
SUser.GiveItem(ItemId, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//指定每日任务重置券
|
||||
function QUEST_ByCZMRFuncBynangua(SUser, ItemId) {
|
||||
// 玩家已完成任务信息
|
||||
local user_quest = SUser.GetQuest();
|
||||
local WongWork_CQuestClear = NativePointer(user_quest).add(4);
|
||||
|
||||
// 是否有任务被重置
|
||||
local anyTaskReset = false;
|
||||
|
||||
// 遍历并重置每一个任务
|
||||
for (local i = 0; i < questConfigBynangua.CF.len(); i++) {
|
||||
local quest_id = questConfigBynangua.CF[i];
|
||||
local isCleared = isClearedQuest(WongWork_CQuestClear.C_Object, quest_id);
|
||||
|
||||
if (!isCleared) {
|
||||
continue;
|
||||
} else {
|
||||
Sq_CallFunc(S_Ptr("0x808BAAC"), "int", ["pointer", "int"], WongWork_CQuestClear.C_Object, quest_id);
|
||||
anyTaskReset = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (anyTaskReset) {
|
||||
//通知客户端更新任务列表
|
||||
Sq_CallFunc(S_Ptr("0x868B044"), "int", ["pointer"], SUser.C_Object);
|
||||
local Pack = Packet();
|
||||
Sq_CallFunc(S_Ptr("0x86ABBA8"), "int", ["pointer", "pointer"], user_quest, Pack.C_Object);
|
||||
SUser.Send(Pack);
|
||||
Pack.Delete();
|
||||
SUser.SendNotiPacketMessage("指定每日任务已重置!", 8);
|
||||
} else {
|
||||
SUser.SendNotiPacketMessage("没有可重置的任务", 8);
|
||||
SUser.GiveItem(ItemId, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//重置所有任务为未完成状态
|
||||
function QUEST_ByALLFuncBynangua(SUser, ItemId) {
|
||||
local GetState = SUser.GetState()
|
||||
local user_quest = SUser.GetQuest();
|
||||
local WongWork_CQuestClear = NativePointer(user_quest).add(4);
|
||||
//清空已接任务列表
|
||||
for (local i = 0; i < 20; i++) {
|
||||
NativePointer(user_quest).add(4 * (i + 7500 + 2)).writeInt(0);
|
||||
}
|
||||
//所有任务设置未完成状态
|
||||
for (local i = 0; i < 29999; i++) {
|
||||
Sq_CallFunc(S_Ptr("0x808BAAC"), "int", ["pointer", "int"], WongWork_CQuestClear.C_Object, i);
|
||||
}
|
||||
//通知客户端更新任务列表
|
||||
Sq_CallFunc(S_Ptr("0x868B044"), "int", ["pointer"], SUser.C_Object);
|
||||
local Pack = Packet();
|
||||
Sq_CallFunc(S_Ptr("0x86ABBA8"), "int", ["pointer", "pointer"], user_quest, Pack.C_Object);
|
||||
SUser.Send(Pack);
|
||||
Pack.Delete();
|
||||
SUser.SendNotiPacketMessage("所有任务已重置!", 8);
|
||||
}
|
||||
|
||||
function isClearedQuest(C_Object, questID) {
|
||||
return Sq_CallFunc(S_Ptr("0x808BAE0"), "bool", ["pointer", "int"], C_Object, questID);
|
||||
}
|
||||
|
||||
function _Dps_QuestInfo_nangua_Main_() {
|
||||
local Cofig = GlobalConfig.Get("任务相关配置_南瓜.json");
|
||||
// 主线任务完成券
|
||||
Cb_Use_Item_Sp_Func[Cofig["主线任务完成券道具ID"]] <- clear_all_quest_by_character_level_nangua;
|
||||
// 普通任务完成券
|
||||
Cb_Use_Item_Sp_Func[Cofig["普通任务完成券道具ID"]] <- clear_all_quest_by_character_level_nangua;
|
||||
// 成就任务完成券
|
||||
Cb_Use_Item_Sp_Func[Cofig["成就任务完成券道具ID"]] <- clear_all_quest_by_character_level_nangua;
|
||||
// 每日任务完成券
|
||||
Cb_Use_Item_Sp_Func[Cofig["指定每日任务完成券道具ID"]] <- QUEST_ByMRFuncBynangua;
|
||||
// 每日任务重置券
|
||||
Cb_Use_Item_Sp_Func[Cofig["指定每日任务重置券道具ID"]] <- QUEST_ByCZMRFuncBynangua;
|
||||
// 所有任务重置券
|
||||
Cb_Use_Item_Sp_Func[Cofig["重置所有任务道具ID"]] <- QUEST_ByALLFuncBynangua;
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "修复卡NPC商店道具",
|
||||
"ProjectDescribe": "修复了客户端通过BUG卡NPC商店道具的问题",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "",
|
||||
"ProjectFiles": [
|
||||
"修复卡NPC商店道具.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_RepairCardNpcStoreProps_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
|
||||
|
||||
function _Dps_RepairCardNpcStoreProps_Main_()
|
||||
{
|
||||
Cb_BuyItem_Get_Data_Leave_Func["_DPS_RepairCardNpcStoreProps_"] <- function (args)
|
||||
{
|
||||
if(NativePointer(args[3]).add(156).readInt() < 0){
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"ProjectName": "副本播报",
|
||||
"ProjectDescribe": "通关及未通关时播报耗时时长",
|
||||
"ProjectAuthor": "南瓜",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "副本播报配置_Nangua.json",
|
||||
"ProjectFiles": [
|
||||
"副本播报.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_send_dungeon_msg_Main_"
|
||||
}
|
||||
|
|
@ -1,193 +0,0 @@
|
|||
EnterDungeon <- {};
|
||||
LeaveDungeon <- {};
|
||||
ClearDungeon <- {};
|
||||
|
||||
dungeon_cleared <- {};
|
||||
dungeon_cache <- {};
|
||||
function _Dps_send_dungeon_msg_Main_() {
|
||||
//进入副本加载完毕时
|
||||
Cb_Party_OnStartMapFinishLoading_Enter_Func.EnterStartMapByNangua <- function(args) {
|
||||
local Cofig = GlobalConfig.Get("副本播报配置_Nangua.json");
|
||||
local PartyObj = Party(args[0]);
|
||||
if(!PartyObj)
|
||||
return
|
||||
if (!Cofig["副本播报开关(true开启,false关闭)"]) {
|
||||
return;
|
||||
}
|
||||
for (local i = 0; i < 4; ++i) {
|
||||
local SUser = PartyObj.GetUser(i);
|
||||
if (SUser) {
|
||||
if(SUser.GetCID() in dungeon_cache){
|
||||
dungeon_cache.rawdelete(SUser.GetCID());
|
||||
}
|
||||
dungeon_cleared[SUser.GetCID()] <- false; // 进入副本时初始化标志为未通关
|
||||
|
||||
local Bfobj = PartyObj.GetBattleField();
|
||||
local DgnObj = Bfobj.GetDgn();
|
||||
local DgnID = DgnObj.GetId();
|
||||
local Dungeon_Name = DgnObj.GetName();
|
||||
local dungeon_type = NativePointer(Bfobj.C_Object).add(460).readU8(); // 0 为普通副本,1 为非常困难深渊,2 为困难深渊
|
||||
local dungeon_diff = Sq_CallFunc(S_Ptr("0x080F981C"), "int", ["pointer"], Bfobj.C_Object); // 获取副本难度
|
||||
local diff_name = Cofig["副本难度命名"][(dungeon_diff).tostring()]; // 获取副本难度名称
|
||||
local dgntypeName = _clear_dgn_Bynangua.DungeonType[(dungeon_type).tostring()];
|
||||
|
||||
local DgnData = {
|
||||
"entered": true,
|
||||
"Dungeon_Name": Dungeon_Name,
|
||||
"dgntypeName": dgntypeName,
|
||||
"diff_name": diff_name,
|
||||
"totalTime": 0
|
||||
};
|
||||
//以角色ID为键记录副本信息
|
||||
dungeon_cache[SUser.GetCID()] <- DgnData;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//清理房间完毕时
|
||||
Cb_Battle_Field_onClearMap_Leave_Func.onClearMapByNangua <- function(args) {
|
||||
local Cofig = GlobalConfig.Get("副本播报配置_Nangua.json");
|
||||
local retval = args.pop();
|
||||
local CBattle_Field = args[0];
|
||||
local PartyObj = Party(NativePointer(CBattle_Field).add(-2852).C_Object);
|
||||
if(!PartyObj)
|
||||
return
|
||||
local DgnId = NativePointer(args[0]).add(404).readInt();
|
||||
if (!Cofig["副本播报开关(true开启,false关闭)"]) {
|
||||
return;
|
||||
}
|
||||
if (retval == DgnId) {
|
||||
for (local i = 0; i < 4; ++i) {
|
||||
local SUser = PartyObj.GetUser(i);
|
||||
if (SUser) {
|
||||
if (dungeon_cache.rawin(SUser.GetCID()) && dungeon_cache[SUser.GetCID()].rawin("entered")) {
|
||||
local time = Sq_CallFunc(S_Ptr("0x085B6768"), "int", ["pointer"], PartyObj.C_Object);
|
||||
dungeon_cache[SUser.GetCID()]["totalTime"] += time;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//放弃副本或未通关副本时
|
||||
Cb_Party_giveup_game_Enter_Func.giveupByNangua <- function(args) {
|
||||
local Cofig = GlobalConfig.Get("副本播报配置_Nangua.json");
|
||||
local PartyObj = Party(args[0]);
|
||||
local killcount = Sq_CallFunc(S_Ptr("0x085BF456"), "int", ["pointer"], NativePointer(args[0]).add(812).C_Object);
|
||||
if (!PartyObj) return;
|
||||
if (!Cofig["副本播报开关(true开启,false关闭)"]) return;
|
||||
local SUser = User(args[1]);
|
||||
local Party_Master = PartyObj.GetMaster();
|
||||
local MasterName = Party_Master.GetCharacName();
|
||||
local formattedTime = "";
|
||||
local DgnId = NativePointer(args[0]).add(814 * 4).readInt();
|
||||
local name = SUser.GetCharacName();
|
||||
|
||||
// 如果副本ID不在允许播报的数组内则跳出
|
||||
if (Cofig["不需要播报的副本ID"].find(DgnId) != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SUser.GetCID() in dungeon_cache) {
|
||||
local dungeonInfo = dungeon_cache[SUser.GetCID()];
|
||||
local dgnTypeName = dungeonInfo["dgntypeName"];
|
||||
local dungeonName = dungeonInfo["Dungeon_Name"];
|
||||
local diffName = dungeonInfo["diff_name"];
|
||||
local totalTime = 0;
|
||||
if (dungeon_cache.rawin(SUser.GetCID()) && dungeon_cache[SUser.GetCID()].rawin("totalTime")) {
|
||||
totalTime = dungeon_cache[SUser.GetCID()]["totalTime"];
|
||||
formattedTime = _clear_dgn_Bynangua.formatMilliseconds(totalTime);
|
||||
}
|
||||
if (dungeon_cleared.rawin(SUser.GetCID()) && dungeon_cleared[SUser.GetCID()] == true) {
|
||||
dungeon_cache.rawdelete(SUser.GetCID());
|
||||
dungeon_cleared[SUser.GetCID()] <- false;
|
||||
} else {
|
||||
// 发送未通关信息
|
||||
if (totalTime == 0) {
|
||||
World.SendNotiPacketMessage(format(Cofig["未通过一个小地图播报信息"], name, dgnTypeName, dungeonName, diffName, killcount), Cofig["发送信息位置"]);
|
||||
} else if (MasterName == SUser.GetCharacName()) {
|
||||
World.SendNotiPacketMessage(format(Cofig["放弃副本"], name, dgnTypeName, dungeonName, diffName, formattedTime, killcount), Cofig["发送信息位置"]);
|
||||
} else {
|
||||
World.SendNotiPacketMessage(format(Cofig["在队伍中提前退出副本"], name, MasterName, dgnTypeName, dungeonName, diffName, formattedTime, killcount), Cofig["发送信息位置"])
|
||||
}
|
||||
dungeon_cache.rawdelete(SUser.GetCID());
|
||||
}
|
||||
}
|
||||
}
|
||||
//通关副本时
|
||||
Cb_CParty_SetBestClearTime_Enter_Func.ClearTimeByNangua <- function (args) {
|
||||
local Cofig = GlobalConfig.Get("副本播报配置_Nangua.json");
|
||||
local PartyObj = Party(args[0]);
|
||||
local killcount = Sq_CallFunc(S_Ptr("0x085BF456"), "int", ["pointer"], NativePointer(args[0]).add(812).C_Object);
|
||||
if(!PartyObj)
|
||||
return
|
||||
local dungeon_diff = args[2];
|
||||
local clearTime = args[3];
|
||||
local Bfobj = PartyObj.GetBattleField();
|
||||
local DgnObj = Bfobj.GetDgn();
|
||||
local diff_name = Cofig["副本难度命名"][(dungeon_diff).tostring()];
|
||||
if (!Cofig["副本播报开关(true开启,false关闭)"]) {
|
||||
return;
|
||||
}
|
||||
if (DgnObj) {
|
||||
local Dungeon_Name = DgnObj.GetName();
|
||||
local MemberNames = [];
|
||||
for (local i = 0; i < 4; ++i) {
|
||||
local SUser = PartyObj.GetUser(i);
|
||||
if (SUser) {
|
||||
local name = SUser.GetCharacName();
|
||||
MemberNames.append(name);
|
||||
dungeon_cleared[SUser.GetCID()] <- true;
|
||||
}
|
||||
}
|
||||
|
||||
local joinedNames = _clear_dgn_Bynangua.join(MemberNames, ", ");
|
||||
local time = _clear_dgn_Bynangua.formatMilliseconds(clearTime);
|
||||
World.SendNotiPacketMessage(format(Cofig["通关播报信息"], joinedNames, Dungeon_Name, diff_name, time, killcount), Cofig["发送信息位置"]);
|
||||
for (local i = 0; i < 4; ++i) {
|
||||
local TUser = PartyObj.GetUser(i);
|
||||
if (TUser) {
|
||||
local CID = TUser.GetCID();
|
||||
if (CID) {
|
||||
dungeon_cache.rawdelete(CID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class _clear_dgn_Bynangua {
|
||||
DungeonType = {
|
||||
"0": "",
|
||||
"1": "非常困难级深渊-",
|
||||
"2": "困难级深渊-",
|
||||
};
|
||||
|
||||
function join(array, delimiter) {
|
||||
local result = "";
|
||||
for (local i = 0; i < array.len(); ++i) {
|
||||
if (i > 0) {
|
||||
result += delimiter;
|
||||
}
|
||||
result += array[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function formatMilliseconds(ms) {
|
||||
local str = "";
|
||||
local minutes = ms / 60000;
|
||||
local seconds = (ms % 60000) / 1000;
|
||||
local milliseconds = (ms % 1000) / 10;
|
||||
if (minutes > 0) {
|
||||
str = minutes + "分" +
|
||||
(seconds < 10 ? "0" : "") + seconds + "秒" +
|
||||
(milliseconds < 10 ? "0" : "") + milliseconds;
|
||||
} else {
|
||||
str = seconds + "秒" +
|
||||
(milliseconds < 10 ? "0" : "") + milliseconds;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "副本需要持有道具进入",
|
||||
"ProjectDescribe": "副本需要持有道具进入",
|
||||
"ProjectAuthor": "凌众",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "副本需要持有道具进入_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"副本需要持有道具进入.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_MapNeedItem_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
function _Dps_MapNeedItem_Main_() {
|
||||
|
||||
// 禁止进入副本
|
||||
Cb_SelectDungeon_Check_Error_Leave_Func.MapNeedItem <- function (args) {
|
||||
|
||||
|
||||
local Config = GlobalConfig.Get("副本需要持有道具进入_Lenheart.json");
|
||||
|
||||
local body = Config["副本需要持有道具才允许进入"];
|
||||
|
||||
local SUser = User(args[1]);
|
||||
|
||||
local mapid = NativePointer(args[2]).add(13).readShort();
|
||||
if(body.rawin(mapid.tostring())){
|
||||
local ItemId = body[mapid.tostring()];
|
||||
local PartyObj = SUser.GetParty();
|
||||
if (!PartyObj) {
|
||||
return;
|
||||
}
|
||||
for (local i = 0; i < 4; ++i) {
|
||||
local PSUser = PartyObj.GetUser(i);
|
||||
if (PSUser) {
|
||||
local InvenObj = SUser.GetInven();
|
||||
local SlotIdx = InvenObj.GetSlotById(ItemId);
|
||||
if(SlotIdx == -1){
|
||||
SUser.SendNotiBox(Config["公告"]+PvfItem.GetNameById(ItemId),1);
|
||||
return 1; // 禁止进入副本
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "史诗免确认",
|
||||
"ProjectDescribe": "史诗免确认",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "",
|
||||
"ProjectFiles": [
|
||||
"史诗免确认.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_EpicNoConfirmationRequired_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
function _Dps_EpicNoConfirmationRequired_Main_() {
|
||||
NativePointer("0x085A56CE").add(2).writeU8(9);
|
||||
Cb_CItem_IsRoutingItem_Leave_Func["DPSOFFICIAL"] <- function (args)
|
||||
{
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "史诗掉落奖励",
|
||||
"ProjectDescribe": "获取指定数量获得奖励以及指定道具获得奖励",
|
||||
"ProjectAuthor": "南瓜",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "史诗掉落奖励配置_南瓜.json",
|
||||
"ProjectFiles": [
|
||||
"史诗掉落奖励.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SSDL_nangua_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,333 @@
|
|||
_SpecialItemBynangua <- {
|
||||
"Rarity4": {},
|
||||
"Rarity3": {},
|
||||
"Rarity2": {}
|
||||
}
|
||||
|
||||
function _Dps_SSDL_nangua_Main_() {
|
||||
//进入副本
|
||||
Cb_History_DungeonEnter_Func.RindroSSEnterByNangua <- function(SUser, Data) {
|
||||
_SpecialItemBynangua.Rarity4.rawset(SUser.GetCID(), []);
|
||||
_SpecialItemBynangua.Rarity3.rawset(SUser.GetCID(), []);
|
||||
_SpecialItemBynangua.Rarity2.rawset(SUser.GetCID(), []);
|
||||
}
|
||||
|
||||
//离开副本
|
||||
Cb_History_DungeonLeave_Func.RindroSSLeaveByNangua <- function(SUser, Data) {
|
||||
local Cofig = GlobalConfig.Get("史诗掉落奖励配置_南瓜.json");
|
||||
local PartyObj = SUser.GetParty();
|
||||
if (!PartyObj) return;
|
||||
local Bfobj = PartyObj.GetBattleField();
|
||||
local DgnObj = Bfobj.GetDgn();
|
||||
if (DgnObj) {
|
||||
local Dungeon_Name = DgnObj.GetName();
|
||||
|
||||
// 处理史诗装备
|
||||
if (_SpecialItemBynangua.Rarity4.rawin(SUser.GetCID())) {
|
||||
local ItemObjS = _SpecialItemBynangua.Rarity4[SUser.GetCID()];
|
||||
if (ItemObjS != null && ItemObjS.len() > 0) {
|
||||
local config = Cofig["奖励控制"]["多件SS对应奖励(史诗)"];
|
||||
local key = ItemObjS.len().tostring();
|
||||
if (config.rawin(key)) {
|
||||
Nangua_SSMSG.SendTitle(SUser, Dungeon_Name, "中获得史诗装备");
|
||||
foreach(ItemObj in ItemObjS) {
|
||||
local item_id = ItemObj.GetIndex();
|
||||
Nangua_SSMSG.ItemMsg(item_id, ItemObj);
|
||||
}
|
||||
Nangua_SSMSG.SendCntMsg(ItemObjS.len());
|
||||
Nangua_SSMSG.SendMiddle();
|
||||
ProcessRewards(SUser, config[key]);
|
||||
Nangua_SSMSG.EndMsg();
|
||||
}
|
||||
}
|
||||
_SpecialItemBynangua.Rarity4.rawset(SUser.GetCID(), []);
|
||||
}
|
||||
|
||||
// 处理神器装备
|
||||
if (_SpecialItemBynangua.Rarity3.rawin(SUser.GetCID())) {
|
||||
local ItemObjS = _SpecialItemBynangua.Rarity3[SUser.GetCID()];
|
||||
if (ItemObjS != null && ItemObjS.len() > 0) {
|
||||
local config = Cofig["奖励控制"]["多件神器对应奖励"];
|
||||
local key = ItemObjS.len().tostring();
|
||||
if (config.rawin(key)) {
|
||||
Nangua_SSMSG.SendTitle(SUser, Dungeon_Name, "中获得神器装备");
|
||||
foreach(ItemObj in ItemObjS) {
|
||||
local item_id = ItemObj.GetIndex();
|
||||
Nangua_SSMSG.ItemMsg(item_id, ItemObj);
|
||||
}
|
||||
Nangua_SSMSG.SendCntMsg(ItemObjS.len());
|
||||
Nangua_SSMSG.SendMiddle();
|
||||
ProcessRewards(SUser, config[key]);
|
||||
Nangua_SSMSG.EndMsg();
|
||||
}
|
||||
}
|
||||
_SpecialItemBynangua.Rarity3.rawset(SUser.GetCID(), []);
|
||||
}
|
||||
|
||||
// 处理稀有装备
|
||||
if (_SpecialItemBynangua.Rarity2.rawin(SUser.GetCID())) {
|
||||
local ItemObjS = _SpecialItemBynangua.Rarity2[SUser.GetCID()];
|
||||
if (ItemObjS != null && ItemObjS.len() > 0) {
|
||||
local config = Cofig["奖励控制"]["多件稀有对应奖励"];
|
||||
local key = ItemObjS.len().tostring();
|
||||
if (config.rawin(key)) {
|
||||
Nangua_SSMSG.SendTitle(SUser, Dungeon_Name, "中获得稀有装备");
|
||||
foreach(ItemObj in ItemObjS) {
|
||||
local item_id = ItemObj.GetIndex();
|
||||
Nangua_SSMSG.ItemMsg(item_id, ItemObj);
|
||||
}
|
||||
Nangua_SSMSG.SendCntMsg(ItemObjS.len());
|
||||
Nangua_SSMSG.SendMiddle();
|
||||
ProcessRewards(SUser, config[key]);
|
||||
Nangua_SSMSG.EndMsg();
|
||||
}
|
||||
}
|
||||
_SpecialItemBynangua.Rarity2.rawset(SUser.GetCID(), []);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Cb_UserHistoryLog_ItemAdd_Enter_Func.ItemAddByNangua <- function(args) {
|
||||
local Cofig = GlobalConfig.Get("史诗掉落奖励配置_南瓜.json");
|
||||
local SUser = User(NativePointer(args[0]).readPointer());
|
||||
local InvenObj = SUser.GetInven();
|
||||
local ItemObj = Item(args[4]);
|
||||
local type = args[5];
|
||||
local PartyObj = SUser.GetParty();
|
||||
if (!PartyObj) return;
|
||||
local Bfobj = PartyObj.GetBattleField();
|
||||
local DgnObj = Bfobj.GetDgn();
|
||||
if (!DgnObj) return;
|
||||
local Dungeon_Name = DgnObj.GetName();
|
||||
if (!ItemObj) return;
|
||||
local item_id = ItemObj.GetIndex();
|
||||
local ItemType = Sq_CallFunc(S_Ptr("0x085018D2"), "int", ["pointer", "int"], InvenObj.C_Object, item_id);
|
||||
local pvfitem = PvfItem.GetPvfItemById(item_id);
|
||||
|
||||
// 史诗装备记录
|
||||
if (pvfitem.GetRarity() == 4 && type == 4 && ItemType == 1 && Cofig["奖励控制"]["多件史诗奖励控制开关"]) {
|
||||
if (!_SpecialItemBynangua.Rarity4.rawin(SUser.GetCID())) {
|
||||
_SpecialItemBynangua.Rarity4.rawset(SUser.GetCID(), []);
|
||||
}
|
||||
_SpecialItemBynangua.Rarity4[SUser.GetCID()].append(ItemObj);
|
||||
}
|
||||
// 神器装备记录
|
||||
else if (pvfitem.GetRarity() == 3 && type == 4 && ItemType == 1 && Cofig["奖励控制"]["多件神器奖励控制开关"]) {
|
||||
if (!_SpecialItemBynangua.Rarity3.rawin(SUser.GetCID())) {
|
||||
_SpecialItemBynangua.Rarity3.rawset(SUser.GetCID(), []);
|
||||
}
|
||||
_SpecialItemBynangua.Rarity3[SUser.GetCID()].append(ItemObj);
|
||||
}
|
||||
// 稀有装备记录
|
||||
else if (pvfitem.GetRarity() == 2 && type == 4 && ItemType == 1 && Cofig["奖励控制"]["多件稀有奖励控制开关"]) {
|
||||
if (!_SpecialItemBynangua.Rarity2.rawin(SUser.GetCID())) {
|
||||
_SpecialItemBynangua.Rarity2.rawset(SUser.GetCID(), []);
|
||||
}
|
||||
_SpecialItemBynangua.Rarity2[SUser.GetCID()].append(ItemObj);
|
||||
}
|
||||
|
||||
// 指定道具奖励逻辑保持不变
|
||||
if (!Cofig["指定道具奖励控制"]["指定道具奖励控制开关"]) return;
|
||||
local Itemid = item_id.tostring();
|
||||
if (Cofig["指定道具奖励控制"]["指定道具对应奖励"].rawin(Itemid) && type == 4) {
|
||||
Nangua_SSMSG.SendTitle(SUser, Dungeon_Name, "中获得特定道具");
|
||||
Nangua_SSMSG.ItemMsg(item_id, ItemObj);
|
||||
Nangua_SSMSG.SendMiddle();
|
||||
ProcessRewards(SUser, Cofig["指定道具奖励控制"]["指定道具对应奖励"][Itemid]);
|
||||
Nangua_SSMSG.EndMsg();
|
||||
}
|
||||
}
|
||||
// 处理奖励逻辑
|
||||
function ProcessRewards(SUser, rewards) {
|
||||
local Cofig = GlobalConfig.Get("史诗掉落奖励配置_南瓜.json");
|
||||
local config = Cofig["信息播报"];
|
||||
local totalRewards = [];
|
||||
local rewardMessages = [];
|
||||
// 遍历奖励列表
|
||||
foreach(reward in rewards) {
|
||||
local itemId = reward[0];
|
||||
local itemCnt = reward[1];
|
||||
if (itemId == 0) {
|
||||
// 点券奖励
|
||||
local ceraMsgObj = AdMsg();
|
||||
ceraMsgObj.PutType(config["发送位置"]);
|
||||
if (config["发送位置"] != 14) {
|
||||
ceraMsgObj.PutString(" ");
|
||||
}
|
||||
ceraMsgObj.PutColorString("点券", config["内容颜色"]);
|
||||
ceraMsgObj.PutColorString("[" + itemCnt + "]", [255, 20, 0]);
|
||||
ceraMsgObj.Finalize();
|
||||
World.SendAll(ceraMsgObj.MakePack());
|
||||
ceraMsgObj.Delete();
|
||||
SUser.RechargeCera(itemCnt);
|
||||
} else {
|
||||
totalRewards.append([itemId, itemCnt]);
|
||||
local itemName = PvfItem.GetNameById(itemId);
|
||||
local color = Nangua_SSMSG.RarityColor(itemId);
|
||||
rewardMessages.append([itemName, itemCnt, color]);
|
||||
}
|
||||
}
|
||||
Nangua_SSMSG.api_CUser_Add_Item_list(SUser, totalRewards);
|
||||
// 发送奖励物品信息通知
|
||||
if (rewardMessages.len() > 0) {
|
||||
local rewardMsgObj = AdMsg();
|
||||
rewardMsgObj.PutType(config["发送位置"]);
|
||||
if (config["发送位置"] != 14) {
|
||||
rewardMsgObj.PutString(" ");
|
||||
}
|
||||
foreach(message in rewardMessages) {
|
||||
rewardMsgObj.PutColorString("[" + message[0] + "]", message[2]);
|
||||
rewardMsgObj.PutColorString("<" + message[1] + ">", [255, 20, 0]);
|
||||
rewardMsgObj.PutColorString("个", config["内容颜色"]);
|
||||
}
|
||||
rewardMsgObj.Finalize();
|
||||
World.SendAll(rewardMsgObj.MakePack());
|
||||
rewardMsgObj.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Nangua_SSMSG {
|
||||
function SendTitle(SUser, Dungeon_Name, msg) {
|
||||
local Cofig = GlobalConfig.Get("史诗掉落奖励配置_南瓜.json");
|
||||
local config = Cofig["信息播报"];
|
||||
local title = AdMsg();
|
||||
title.PutType(config["发送位置"]);
|
||||
if (config["发送位置"] != 14) {
|
||||
title.PutString(" ");
|
||||
}
|
||||
title.PutColorString(config["标题"][0], config["标题"][1]);
|
||||
title.PutColorString("恭喜玩家", config["内容颜色"]);
|
||||
title.PutColorString("[" + SUser.GetCharacName() + "]", [255, 20, 0]);
|
||||
title.PutColorString("在", config["内容颜色"]);
|
||||
title.PutColorString("[" + Dungeon_Name + "]", [255, 20, 0]);
|
||||
title.PutColorString("" + msg + "", config["内容颜色"]);
|
||||
title.Finalize();
|
||||
World.SendAll(title.MakePack());
|
||||
title.Delete();
|
||||
}
|
||||
|
||||
function SendMiddle() {
|
||||
local Cofig = GlobalConfig.Get("史诗掉落奖励配置_南瓜.json");
|
||||
local config = Cofig["信息播报"];
|
||||
local MiddleMsgObj = AdMsg();
|
||||
MiddleMsgObj.PutType(config["发送位置"]);
|
||||
if (config["发送位置"] != 14) {
|
||||
MiddleMsgObj.PutString(" ");
|
||||
}
|
||||
MiddleMsgObj.PutColorString("特此奖励:", config["内容颜色"]);
|
||||
MiddleMsgObj.Finalize();
|
||||
World.SendAll(MiddleMsgObj.MakePack());
|
||||
MiddleMsgObj.Delete();
|
||||
}
|
||||
|
||||
function SendCntMsg(cnt) {
|
||||
local Cofig = GlobalConfig.Get("史诗掉落奖励配置_南瓜.json");
|
||||
local config = Cofig["信息播报"];
|
||||
local CntMsgObj = AdMsg();
|
||||
CntMsgObj.PutType(config["发送位置"]);
|
||||
if (config["发送位置"] != 14) {
|
||||
CntMsgObj.PutString(" ");
|
||||
}
|
||||
CntMsgObj.PutColorString("合计", config["内容颜色"]);
|
||||
CntMsgObj.PutColorString("[" + cnt + "]", [255, 20, 0]);
|
||||
CntMsgObj.PutColorString("件装备", config["内容颜色"]);
|
||||
CntMsgObj.Finalize();
|
||||
World.SendAll(CntMsgObj.MakePack());
|
||||
CntMsgObj.Delete();
|
||||
}
|
||||
|
||||
function ItemMsg(item_id, ItemObj) {
|
||||
local Cofig = GlobalConfig.Get("史诗掉落奖励配置_南瓜.json");
|
||||
local config = Cofig["信息播报"];
|
||||
local MsgObj = AdMsg();
|
||||
MsgObj.PutType(config["发送位置"]);
|
||||
if (config["发送位置"] != 14) {
|
||||
MsgObj.PutString(" ");
|
||||
}
|
||||
MsgObj.PutEquipment("[" + PvfItem.GetNameById(item_id) + "]", ItemObj, Nangua_SSMSG.RarityColor(item_id));
|
||||
MsgObj.Finalize();
|
||||
World.SendAll(MsgObj.MakePack());
|
||||
MsgObj.Delete();
|
||||
}
|
||||
|
||||
function EndMsg() {
|
||||
local Cofig = GlobalConfig.Get("史诗掉落奖励配置_南瓜.json");
|
||||
local config = Cofig["信息播报"];
|
||||
local endMsgObj = AdMsg();
|
||||
endMsgObj.PutType(config["发送位置"]);
|
||||
if (config["发送位置"] != 14) {
|
||||
endMsgObj.PutString(" ");
|
||||
}
|
||||
endMsgObj.PutColorString(config["结尾"][0], config["结尾"][1]);
|
||||
endMsgObj.Finalize();
|
||||
World.SendAll(endMsgObj.MakePack());
|
||||
endMsgObj.Delete();
|
||||
}
|
||||
function api_CUser_Add_Item_list(SUser, item_list) {
|
||||
for (local i = 0; i < item_list.len(); i++) {
|
||||
local item_id = item_list[i][0]; // 道具代码
|
||||
local quantity = item_list[i][1]; // 道具数量
|
||||
local cnt = Nangua_SSMSG.checkInventorySlot(SUser, item_id);
|
||||
if (cnt == 1) {
|
||||
SUser.GiveItem(item_id, quantity); //使用窗口发送奖励
|
||||
} else {
|
||||
local RewardItems = [];
|
||||
RewardItems.append([item_id, quantity]);
|
||||
local title = "GM"
|
||||
local Text = "由于背包空间不足,已通过邮件发送,请查收!"
|
||||
//角色类 发送邮件函数 (标题, 正文, 金币, 道具列表[[3037,100],[3038,100]])
|
||||
SUser.ReqDBSendMultiMail(title, Text, 0, RewardItems)
|
||||
}
|
||||
}
|
||||
Nangua_SSMSG.SendItemWindowNotification(SUser, item_list);
|
||||
}
|
||||
function SendItemWindowNotification(SUser, item_list) {
|
||||
local Pack = Packet();
|
||||
Pack.Put_Header(1, 163); //协议
|
||||
Pack.Put_Byte(1); //默认1
|
||||
Pack.Put_Short(0); //槽位id 填入0即可
|
||||
Pack.Put_Int(0); //未知 0以上即可
|
||||
Pack.Put_Short(item_list.len()); //道具组数
|
||||
//写入道具代码和道具数量
|
||||
for (local i = 0; i < item_list.len(); i++) {
|
||||
Pack.Put_Int(item_list[i][0]); //道具代码
|
||||
Pack.Put_Int(item_list[i][1]); //道具数量 装备/时装时 任意均可
|
||||
}
|
||||
Pack.Finalize(true); //确定发包内容
|
||||
SUser.Send(Pack); //发包
|
||||
Pack.Delete(); //清空buff区
|
||||
}
|
||||
/**
|
||||
* 根据道具类型背包空格数量
|
||||
* @param {pointer} SUser - 用户
|
||||
* @param {int} item_id - 需要查找的道具ID
|
||||
* @returns {int} - 空格数量
|
||||
*/
|
||||
function checkInventorySlot(SUser, itemid) {
|
||||
local InvenObj = SUser.GetInven();
|
||||
local type = Sq_CallFunc(S_Ptr("0x085018D2"), "int", ["pointer", "int"], InvenObj.C_Object, itemid);
|
||||
local cnt = Sq_CallFunc(S_Ptr("0x08504F64"), "int", ["pointer", "int", "int"], InvenObj.C_Object, type, 1);
|
||||
|
||||
return cnt;
|
||||
}
|
||||
function RarityColor(item_id) {
|
||||
local PvfItemObj = PvfItem.GetPvfItemById(item_id);
|
||||
if (PvfItemObj == null) {
|
||||
return;
|
||||
}
|
||||
local CItem_get_rarity = PvfItemObj.GetRarity(); // 装备品级
|
||||
return Nangua_SSMSG.rarityColorMap[(CItem_get_rarity).tostring()];
|
||||
}
|
||||
//品级对应的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] // 金色
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "屏蔽广告私聊和1v1聊天",
|
||||
"ProjectDescribe": "屏蔽广告私聊和1v1聊天",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "屏蔽广告私聊和1v1聊天.json",
|
||||
"ProjectFiles": [
|
||||
"屏蔽广告私聊和1v1聊天.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_BlockPrivateChatsWithSpecifiedConversationContent_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
文件名:屏蔽指定对话内容的私聊和1v1聊天.nut
|
||||
路径:OfficialProject/屏蔽指定对话内容的私聊和1v1聊天/屏蔽指定对话内容的私聊和1v1聊天.nut
|
||||
创建日期:2025-04-19 19:17
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
getroottable()._LenheartUserLoseEfficacyState_ <- Memory.alloc(577477);
|
||||
Memory.reset(getroottable()._LenheartUserLoseEfficacyState_, 577477);
|
||||
|
||||
function _Dps_BlockPrivateChatsWithSpecifiedConversationContent_Main_() {
|
||||
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();
|
||||
local Conifg = GlobalConfig.Get("屏蔽广告私聊和1v1聊天.json");
|
||||
foreach(substr in Conifg["屏蔽词"]) {
|
||||
if (Str.find(substr) != null) {
|
||||
args[1] = getroottable()._LenheartUserLoseEfficacyState_.C_Object;
|
||||
return args;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "异界重置",
|
||||
"ProjectDescribe": "异界重置",
|
||||
"ProjectAuthor": "凌众",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "异界重置_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"异界重置.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_MapReset_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
function _Dps_MapReset_Logic_() {
|
||||
|
||||
|
||||
}
|
||||
function _Dps_MapReset_Main_() {
|
||||
|
||||
local Config = GlobalConfig.Get("异界重置_Lenheart.json");
|
||||
//异界重置
|
||||
Cb_Use_Item_Sp_Func[Config["重置券id"]] <- function(SUser, ItemId) {
|
||||
for (local i = 0; i< 6; i++) {
|
||||
local dimensionInout = _Rindro_CDataManager_get_dimensionInout(Sq_CallFunc(S_Ptr("0x80CC19B"), "pointer"), i);
|
||||
_Rindro_CUserCharacInfo_setDemensionInoutValue(SUser.C_Object, i, dimensionInout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function _Rindro_CDataManager_get_dimensionInout(a, b) {
|
||||
return Sq_CallFunc(S_Ptr("0x0822b612"), "int", ["pointer", "int"], a, b);
|
||||
}
|
||||
|
||||
|
||||
function _Rindro_CUserCharacInfo_setDemensionInoutValue(a, b, c) {
|
||||
return Sq_CallFunc(S_Ptr("0x0822f184"), "int", ["pointer", "int", "int"], a, b, c);
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "技能拓展14键",
|
||||
"ProjectDescribe": "14键位技能的服务端修复程序,需要客户端已经加载了14键技能的插件。",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "",
|
||||
"ProjectFiles": [
|
||||
"技能拓展14键.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SkillExpansion_14Keys_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
|
||||
|
||||
function _Dps_SkillExpansion_14Keys_Main_()
|
||||
{
|
||||
GameManager.Fix14Skill();
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "整点在线奖励",
|
||||
"ProjectDescribe": "可以设置某一个时间点 全服发放奖励",
|
||||
"ProjectAuthor": "凌众",
|
||||
"ProjectVersion": 1.2,
|
||||
"ProjectConfig": "整点在线奖励_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"整点在线奖励.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_TimeReward_identifying_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
_TimeReward_identifying_Rindro_ <- 0;
|
||||
|
||||
function _Dps_TimeReward_identifying_Main_() {
|
||||
|
||||
Cb_timer_dispatch_Func.Time <- function() {
|
||||
local Config = GlobalConfig.Get("整点在线奖励_Lenheart.json");
|
||||
local DateObj = date();
|
||||
local HourminTime = DateObj.hour + ":" + DateObj.min;
|
||||
|
||||
if (!(HourminTime in Config["奖励时间和内容"])) {
|
||||
_TimeReward_identifying_Rindro_ = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_TimeReward_identifying_Rindro_ != 0) {
|
||||
return;
|
||||
}
|
||||
_TimeReward_identifying_Rindro_ = 1;
|
||||
|
||||
local reward = Config["奖励时间和内容"][HourminTime];
|
||||
local users = World.GetOnlinePlayer();
|
||||
users.apply(function(SUser) {
|
||||
foreach(itemR in reward) {
|
||||
SUser.GiveItem(itemR[0], itemR[1]);
|
||||
}
|
||||
});
|
||||
World.SendNotiPacketMessage(format(Config["公告"], HourminTime), 14);
|
||||
};
|
||||
}
|
||||
|
|
@ -4,15 +4,27 @@
|
|||
创建日期:2025-04-01 21:42
|
||||
文件用途:
|
||||
*/
|
||||
function _Dps_FashionAndPetClearanceRoll_Main_() {
|
||||
local Cofig = GlobalConfig.Get("时装与宠物清除卷_Lenheart.json");
|
||||
|
||||
function _Dps_FashionAndPetClearanceRoll_Logic_() {
|
||||
local Config = GlobalConfig.Get("时装与宠物清除卷_Lenheart.json");
|
||||
local PoolObj = MysqlPool.GetInstance();
|
||||
local Ip = Config["数据库IP 不是外置数据库不要更改"];
|
||||
local Port = Config["数据库端口 不懂不要更改"];
|
||||
local DbName = Config["数据库用户名 本地用户名不懂不要更改"];
|
||||
local Password = Config["数据库密码 本地密码不懂不要更改"];
|
||||
//设置数据库连接信息
|
||||
PoolObj.SetBaseConfiguration(Ip, Port, DbName, Password);
|
||||
//连接池大小
|
||||
PoolObj.PoolSize = 10;
|
||||
//初始化
|
||||
PoolObj.Init();
|
||||
//宠物删除
|
||||
Cb_Use_Item_Sp_Func[Cofig["宠物清除卷ID"]] <- function(SUser, ItemId) {
|
||||
if(Cofig["宠物清除券是否返还"])SUser.GiveItem(ItemId, 1);
|
||||
Cb_Use_Item_Sp_Func[Config["宠物清除卷ID"]] <- function(SUser, ItemId) {
|
||||
if (Config["宠物清除券是否返还"]) SUser.GiveItem(ItemId, 1);
|
||||
local Cid = SUser.GetCID();
|
||||
local InvenObj = SUser.GetInven();
|
||||
if (InvenObj) {
|
||||
for (local i = 0; i< 13; i++) {
|
||||
for (local i = 0; i <= 13; i++) {
|
||||
local ItemObj = InvenObj.GetSlot(3, i);
|
||||
local Flag = false;
|
||||
if (ItemObj) {
|
||||
|
|
@ -25,17 +37,17 @@ function _Dps_FashionAndPetClearanceRoll_Main_() {
|
|||
//把连接还池子
|
||||
MysqlPool.GetInstance().PutConnect(SqlObj);
|
||||
SUser.SendItemSpace(7);
|
||||
SUser.SendNotiPacketMessage(Cofig["宠物清除完成提示"], 8);
|
||||
SUser.SendNotiPacketMessage(Config["宠物清除完成提示"], 8);
|
||||
}
|
||||
}
|
||||
|
||||
//时装删除
|
||||
Cb_Use_Item_Sp_Func[Cofig["时装清除卷ID"]] <- function(SUser, ItemId) {
|
||||
if(Cofig["时装清除券是否返还"])SUser.GiveItem(ItemId, 1);
|
||||
Cb_Use_Item_Sp_Func[Config["时装清除卷ID"]] <- function(SUser, ItemId) {
|
||||
if (Config["时装清除券是否返还"]) SUser.GiveItem(ItemId, 1);
|
||||
local Cid = SUser.GetCID();
|
||||
local InvenObj = SUser.GetInven();
|
||||
if (InvenObj) {
|
||||
for (local i = 0; i< 13; i++) {
|
||||
for (local i = 0; i <= 13; i++) {
|
||||
local ItemObj = InvenObj.GetSlot(2, i);
|
||||
if (ItemObj) {
|
||||
ItemObj.Delete();
|
||||
|
|
@ -47,8 +59,18 @@ function _Dps_FashionAndPetClearanceRoll_Main_() {
|
|||
//把连接还池子
|
||||
MysqlPool.GetInstance().PutConnect(SqlObj);
|
||||
SUser.SendItemSpace(1);
|
||||
SUser.SendNotiPacketMessage(Cofig["时装清除完成提示"], 8);
|
||||
SUser.SendNotiPacketMessage(Config["时装清除完成提示"], 8);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function _Dps_FashionAndPetClearanceRoll_Main_() {
|
||||
_Dps_FashionAndPetClearanceRoll_Logic_();
|
||||
}
|
||||
|
||||
function _Dps_FashionAndPetClearanceRoll_Main_Reload_(OldConfig) {
|
||||
Cb_Use_Item_Sp_Func.rawdelete(OldConfig["宠物清除卷ID"]);
|
||||
Cb_Use_Item_Sp_Func.rawdelete(OldConfig["时装清除卷ID"]);
|
||||
|
||||
_Dps_FashionAndPetClearanceRoll_Logic_();
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "是否允许创建缔造者",
|
||||
"ProjectDescribe": "是否允许创建缔造者.",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "是否允许创建缔造者_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"是否允许创建缔造者.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_EnableTheCreationOfCreators_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
function _Dps_EnableTheCreationOfCreators_Logic_()
|
||||
{
|
||||
local Config = GlobalConfig.Get("是否允许创建缔造者_Lenheart.json");
|
||||
Sq_WriteByteArr(S_Ptr("0x81C029F"), Config["是否允许创建"] ? [0xF] : [0xA]);
|
||||
}
|
||||
|
||||
|
||||
function _Dps_EnableTheCreationOfCreators_Main_()
|
||||
{
|
||||
GameManager.OpenCreateJob_CreatorMage();
|
||||
}
|
||||
|
||||
function _Dps_EnableTheCreationOfCreators_Main_Reload_(OldConfig)
|
||||
{
|
||||
GameManager.OpenCreateJob_CreatorMage();
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "月光定制收集图鉴",
|
||||
"ProjectDescribe": "月光定制收集图鉴",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "月光定制收集图鉴.json",
|
||||
"ProjectFiles": [
|
||||
"月光定制收集图鉴.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_MoonlightCustomizedCollectionCatalog_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
文件名:月光定制收集图鉴.nut
|
||||
路径:OfficialProject/月光定制收集图鉴/月光定制收集图鉴.nut
|
||||
创建日期:2025-04-20 11:38
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
getroottable()._MoonlightCustomizedCollectionCatalogMysql_ <- null;
|
||||
|
||||
function InitMysql() {
|
||||
if (!getroottable()._MoonlightCustomizedCollectionCatalogMysql_) {
|
||||
local Config = GlobalConfig.Get("装备镶嵌与时装镶嵌_Lenheart.json");
|
||||
local Ip = Config["数据库IP 不是外置数据库不要更改"];
|
||||
local Port = Config["数据库端口 不懂不要更改"];
|
||||
local DbName = Config["数据库用户名 本地用户名不懂不要更改"];
|
||||
local Password = Config["数据库密码 本地密码不懂不要更改"];
|
||||
getroottable()._MoonlightCustomizedCollectionCatalogMysql_ = Mysql(Str_Ptr(Ip), Port, Str_Ptr("taiwan_cain"), Str_Ptr(DbName), Str_Ptr(Password));
|
||||
}
|
||||
}
|
||||
|
||||
function _Moonlight_collect_check(id) {
|
||||
if (!getroottable()._MoonlightCustomizedCollectionCatalogMysql_) return;
|
||||
local SqlObj = getroottable()._MoonlightCustomizedCollectionCatalogMysql_;
|
||||
local CheckSql = "select id from `collect`.`s_item` where id = " + id + ";";
|
||||
local Ret = SqlObj.Select(CheckSql, ["int"]);
|
||||
if (Ret.len()< 1 || Ret[0][0] == null) {
|
||||
return false;
|
||||
} else {
|
||||
return Ret[0][0];
|
||||
}
|
||||
}
|
||||
|
||||
function _Moonlight_collect_check_has(uid, item) {
|
||||
if (!getroottable()._MoonlightCustomizedCollectionCatalogMysql_) return;
|
||||
local SqlObj = getroottable()._MoonlightCustomizedCollectionCatalogMysql_;
|
||||
local CheckSql = "select num from `collect`.`g_user_item` where uid = " + uid + " and item = " + item + ";";
|
||||
local Ret = SqlObj.Select(CheckSql, ["int"]);
|
||||
if (Ret.len()< 1 || Ret[0][0] == null) {
|
||||
return false;
|
||||
} else {
|
||||
return Ret[0][0];
|
||||
}
|
||||
}
|
||||
|
||||
function _Moonlight_collect_update(uid, item, type, num) {
|
||||
if (!getroottable()._MoonlightCustomizedCollectionCatalogMysql_) return;
|
||||
local SqlObj = getroottable()._MoonlightCustomizedCollectionCatalogMysql_;
|
||||
local CheckSql = "select id,num from `collect`.`g_user_item` where uid = " + uid + " and item = " + item + ";";
|
||||
local Ret = SqlObj.Select(CheckSql, ["int", "int"]);
|
||||
if (Ret.len()< 1 || Ret[0][0] == null) {
|
||||
local InsertSql = "INSERT INTO `collect`.`g_user_item`(`uid`,`item`,`type`,`num`) VALUES(" + uid + "," + item + "," + type + "," + num + ");";
|
||||
SqlObj.Exec_Sql(InsertSql);
|
||||
} else {
|
||||
local id = Ret[0][0]
|
||||
local num = Ret[0][1];
|
||||
local UpdateSql = "update `collect`.`g_user_item` set num = ' + num + ' where id = ' + id + ';";
|
||||
SqlObj.Exec_Sql(UpdateSql);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function _Moonlight_collect_equ(user,slot)
|
||||
{
|
||||
// local inven =
|
||||
}
|
||||
|
||||
|
||||
function _Dps_MoonlightCustomizedCollectionCatalog_Main_() {
|
||||
InitMysql();
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"ProjectName": "服务器防入侵",
|
||||
"ProjectDescribe": "本项目会持续更新,因特殊原因逻辑不会公开",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "",
|
||||
"ProjectFiles": [
|
||||
"服务器防入侵.sut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_ServerIntrusionPrevention_Main_"
|
||||
}
|
||||
Binary file not shown.
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "角色初始武器修改",
|
||||
"ProjectDescribe": "修改黑暗武士和缔造的初始武器",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "角色初始武器修改_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"角色初始武器修改.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SetInitiaweapon_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
function _Dps_SetInitiaweapon_Logic_() {
|
||||
local Config = GlobalConfig.Get("角色初始武器修改_Lenheart.json");
|
||||
NativePointer("0x081C0CB2").writeInt(Config["黑暗武士武器"].tointeger());
|
||||
NativePointer("0x081C0CBB").writeInt(Config["缔造武器"].tointeger());
|
||||
}
|
||||
|
||||
function _Dps_SetInitiaweapon_Main_() {
|
||||
_Dps_SetInitiaweapon_Logic_();
|
||||
}
|
||||
|
||||
function _Dps_SetInitiaweapon_Main_Reload_(OldConfig) {
|
||||
_Dps_SetInitiaweapon_Logic_();
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "设置服务器等级上限",
|
||||
"ProjectDescribe": "设置服务器等级上限",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "设置服务器等级上限_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"设置服务器等级上限.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SetGameMaxLevel_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
function _Dps_SetGameMaxLevel_Logic_() {
|
||||
local Config = GlobalConfig.Get("设置服务器等级上限_Lenheart.json");
|
||||
GameManager.SetGameMaxLevel(Config["等级上限"]);
|
||||
}
|
||||
|
||||
function _Dps_SetGameMaxLevel_Main_() {
|
||||
_Dps_SetGameMaxLevel_Logic_();
|
||||
}
|
||||
|
||||
function _Dps_SetGameMaxLevel_Main_Reload() {
|
||||
_Dps_SetGameMaxLevel_Logic_();
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"ProjectName": "设置装备解锁时间",
|
||||
"ProjectDescribe": "是指装备解锁需要等待的冷却时间。",
|
||||
"ProjectDescribe": "设置装备的解锁时间",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "设置装备解锁时间_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"设置装备解锁时间.nut"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
function _Dps_SetEquipmentUnlockTime_Main_()
|
||||
{
|
||||
function _Dps_SetEquipmentUnlockTime_Logic_() {
|
||||
local Config = GlobalConfig.Get("设置装备解锁时间_Lenheart.json");
|
||||
GameManager.SetItemLockTime(Config["设置装备解锁需要的冷却时间_单位秒"]);
|
||||
}
|
||||
|
||||
function _Dps_SetEquipmentUnlockTime_Main_() {
|
||||
_Dps_SetEquipmentUnlockTime_Logic_();
|
||||
}
|
||||
|
||||
function _Dps_SetEquipmentUnlockTime_Main_Reload(OldConfig) {
|
||||
_Dps_SetEquipmentUnlockTime_Logic_();
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"ProjectName": "跨界石",
|
||||
"ProjectDescribe": "通过指定ID的道具,将装备背包第一格的装备跨界。\n配置中修改NoCrossIdArr可增加不可跨界的ID。",
|
||||
"ProjectDescribe": "通过指定ID的道具,将装备背包第一格的装备跨界。\n配置中修改CrossoverId可修改跨界石的ID 修改NoCrossIdArr可增加不可跨界的ID。",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.2,
|
||||
"ProjectVersion": 1.3,
|
||||
"ProjectConfig": "跨界石_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"跨界石.nut"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
function _Dps_CrossBorderStones_Main_() {
|
||||
|
||||
|
||||
|
||||
function _Dps_CrossBorderStones_Logic_()
|
||||
{
|
||||
local Cofig = GlobalConfig.Get("跨界石_Lenheart.json");
|
||||
|
||||
Cb_Use_Item_Sp_Func[Cofig.CrossoverId.tointeger()] <- function(SUser, ItemId) {
|
||||
local Cofig = GlobalConfig.Get("跨界石_Lenheart.json");
|
||||
|
||||
//获取账号金库对象
|
||||
local CargoObj = SUser.GetAccountCargo();
|
||||
//获取账号金库中的一个空格子
|
||||
|
|
@ -55,3 +62,19 @@ function _Dps_CrossBorderStones_Main_() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//加载入口
|
||||
function _Dps_CrossBorderStones_Main_() {
|
||||
_Dps_CrossBorderStones_Logic_();
|
||||
}
|
||||
|
||||
//重载入口
|
||||
function _Dps_CrossBorderStones_Main_Reload_(OldConfig) {
|
||||
//先销毁原来注册的
|
||||
Cb_Use_Item_Sp_Func.rawdelete(OldConfig.CrossoverId.tointeger());
|
||||
|
||||
//重新注册
|
||||
_Dps_CrossBorderStones_Logic_();
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"ProjectName": "防脱机制裁",
|
||||
"ProjectDescribe": "本项目只能够防止脱机外挂,配置可以更改",
|
||||
"ProjectAuthor": "南瓜",
|
||||
"ProjectVersion": 1.3,
|
||||
"ProjectConfig": "防脱机制裁_Nangua.json",
|
||||
"ProjectFiles": [
|
||||
"防脱机制裁.sut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_AntiOfflineSanctions_Main_"
|
||||
}
|
||||
Binary file not shown.
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ProjectName": "黄金品级调整箱",
|
||||
"ProjectDescribe": "将一个品级调整箱替换为黄金品级调整箱",
|
||||
"ProjectAuthor": "凌众",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "黄金品级调整箱_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"黄金品级调整箱.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SetEquinherit_Main_"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
function _Dps_SetEquinherit_Main_() {
|
||||
Cb_ModItemattr_Leave_Func.addinfoMax <- function(args) {
|
||||
local Config = GlobalConfig.Get("黄金品级调整箱_Lenheart.json");
|
||||
local SUser = User(args[1]);
|
||||
local pack = NativePointer(args[2]);
|
||||
local a = NativePointer(pack.add(20).readPointer());
|
||||
local itemSold = a.add(13).add(6).readShort();
|
||||
local equSold = a.add(13).add(0).readShort();
|
||||
local InvenObj = SUser.GetInven();
|
||||
if (InvenObj) {
|
||||
local ItemObj = InvenObj.GetSlot(1, itemSold);
|
||||
local equObj = InvenObj.GetSlot(1, equSold);
|
||||
|
||||
if (ItemObj.GetIndex() == Config["黄金品级调整箱id"]) {
|
||||
equObj.SetAdd_Info(999999998);
|
||||
equObj.Flush();
|
||||
SUser.SendUpdateItemList(1, 0, equSold);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
lib/libAurora.so
BIN
lib/libAurora.so
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
root_dir="/dp_s/OfficialProject"
|
||||
output_file="/dp_s/merged_proj_ifo.txt"
|
||||
> "$output_file"
|
||||
for dir in "$root_dir"/*; do
|
||||
if [ -d "$dir" ]; then
|
||||
ifo_file="$dir/Proj.ifo"
|
||||
if [ -f "$ifo_file" ]; then
|
||||
# <20><> Proj.ifo <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
||||
cat "$ifo_file" >> "$output_file"
|
||||
# <20><><EFBFBD>ӷָ<D3B7><D6B8><EFBFBD>
|
||||
echo "LenheartMerge" >> "$output_file"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
@ -0,0 +1,242 @@
|
|||
{
|
||||
"ProjectName": "GM便捷操作台",
|
||||
"ProjectDescribe": "本项目提供了许多GM的便捷操作 方便平时调试或写代码 \n输入'//' + 设定的指令即可执行逻辑 ",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "GM便捷操作台_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"GM便捷操作台.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_GmConvenienceConsole_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "副本需要持有道具进入",
|
||||
"ProjectDescribe": "副本需要持有道具进入",
|
||||
"ProjectAuthor": "凌众",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "副本需要持有道具进入_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"副本需要持有道具进入.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_MapNeedItem_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "黄金品级调整箱",
|
||||
"ProjectDescribe": "将一个品级调整箱替换为黄金品级调整箱",
|
||||
"ProjectAuthor": "凌众",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "黄金品级调整箱_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"黄金品级调整箱.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SetEquinherit_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "技能拓展14键",
|
||||
"ProjectDescribe": "14键位技能的服务端修复程序,需要客户端已经加载了14键技能的插件。",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "",
|
||||
"ProjectFiles": [
|
||||
"技能拓展14键.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SkillExpansion_14Keys_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "角色初始武器修改",
|
||||
"ProjectDescribe": "修改黑暗武士和缔造的初始武器",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "角色初始武器修改_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"角色初始武器修改.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SetInitiaweapon_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "跨界石",
|
||||
"ProjectDescribe": "通过指定ID的道具,将装备背包第一格的装备跨界。\n配置中修改CrossoverId可修改跨界石的ID 修改NoCrossIdArr可增加不可跨界的ID。",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.3,
|
||||
"ProjectConfig": "跨界石_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"跨界石.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_CrossBorderStones_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "屏蔽广告私聊和1v1聊天",
|
||||
"ProjectDescribe": "屏蔽广告私聊和1v1聊天",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "屏蔽广告私聊和1v1聊天.json",
|
||||
"ProjectFiles": [
|
||||
"屏蔽广告私聊和1v1聊天.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_BlockPrivateChatsWithSpecifiedConversationContent_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "上线自动完成任务",
|
||||
"ProjectDescribe": "上线自动完成任务",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "上线自动完成任务_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"上线自动完成任务.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_AutomaticallyCompleteTasksOnline_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "设置服务器等级上限",
|
||||
"ProjectDescribe": "设置服务器等级上限",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "设置服务器等级上限_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"设置服务器等级上限.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SetGameMaxLevel_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "设置装备解锁时间",
|
||||
"ProjectDescribe": "设置装备的解锁时间",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "设置装备解锁时间_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"设置装备解锁时间.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SetEquipmentUnlockTime_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "时装与宠物清除卷",
|
||||
"ProjectDescribe": "通过指定ID的道具,将装备背包第前两行的时装或宠物清除。",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.2,
|
||||
"ProjectConfig": "时装与宠物清除卷_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"时装与宠物清除卷.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_FashionAndPetClearanceRoll_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "史诗掉落奖励",
|
||||
"ProjectDescribe": "获取指定数量获得奖励以及指定道具获得奖励",
|
||||
"ProjectAuthor": "南瓜",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "史诗掉落奖励配置_南瓜.json",
|
||||
"ProjectFiles": [
|
||||
"史诗掉落奖励.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SSDL_nangua_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "史诗免确认",
|
||||
"ProjectDescribe": "史诗免确认",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "",
|
||||
"ProjectFiles": [
|
||||
"史诗免确认.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_EpicNoConfirmationRequired_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "史诗药剂",
|
||||
"ProjectDescribe": "通过指定ID的道具,使玩家获得爆率加成。",
|
||||
"ProjectAuthor": "倾泪寒 & 南瓜",
|
||||
"ProjectVersion": 1.4,
|
||||
"ProjectConfig": "史诗药剂配置文件.json",
|
||||
"ProjectFiles": [
|
||||
"史诗药剂.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_EpicPotion_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "是否允许创建缔造者",
|
||||
"ProjectDescribe": "是否允许创建缔造者.",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "是否允许创建缔造者_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"是否允许创建缔造者.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_EnableTheCreationOfCreators_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "修复卡NPC商店道具",
|
||||
"ProjectDescribe": "修复了客户端通过BUG卡NPC商店道具的问题",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "",
|
||||
"ProjectFiles": [
|
||||
"修复卡NPC商店道具.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_RepairCardNpcStoreProps_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "一键存入个人金库",
|
||||
"ProjectDescribe": "使用之前,请务必保证安装了群内的 \"客户端消息框233.dll\" 插件,这个插件放入你客户端的插件加载目录即可,在游戏中输入 //yjcc 即可一键存入个人金库,也可以在游戏中的快捷喊话中添加为快捷键 配置中可更改 yjcc 关键字",
|
||||
"ProjectAuthor": "倾泪寒 & 南瓜",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "一键存入个人金库_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"一键入库.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_OneClickStorage_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "一键分解卷",
|
||||
"ProjectDescribe": "一键分解卷 需要先开启自己的分解师副职业",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "一键分解卷_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"一键分解卷.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_OneClickDisassemblyOfRoll_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "异界重置",
|
||||
"ProjectDescribe": "异界重置",
|
||||
"ProjectAuthor": "凌众",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "异界重置_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"异界重置.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_MapReset_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "月光定制收集图鉴",
|
||||
"ProjectDescribe": "月光定制收集图鉴",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.0,
|
||||
"ProjectConfig": "月光定制收集图鉴.json",
|
||||
"ProjectFiles": [
|
||||
"月光定制收集图鉴.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_MoonlightCustomizedCollectionCatalog_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "整点在线奖励",
|
||||
"ProjectDescribe": "可以设置某一个时间点 全服发放奖励",
|
||||
"ProjectAuthor": "凌众",
|
||||
"ProjectVersion": 1.2,
|
||||
"ProjectConfig": "整点在线奖励_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"整点在线奖励.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_TimeReward_identifying_Main_"
|
||||
}LenheartMerge
|
||||
{
|
||||
"ProjectName": "装备镶嵌与时装镶嵌",
|
||||
"ProjectDescribe": "使用之前,请务必保证安装了群内的 \"客户端消息框233.dll\" 插件,这个插件放入你客户端的插件加载目录即可\n如果你是0627的客户端版本还需要安装群内的 \"0627装备镶嵌.dll\" 插件",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"ProjectVersion": 1.2,
|
||||
"ProjectConfig": "装备镶嵌与时装镶嵌_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"装备镶嵌与时装镶嵌.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_Equ2AvaJewel_Main_"
|
||||
}LenheartMerge
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
[
|
||||
{
|
||||
"Status": 0,
|
||||
"FilePath": null,
|
||||
"ProjectVersion": 1.4,
|
||||
"ProjectName": "史诗药剂",
|
||||
"ProjectAuthor": "倾泪寒 & 南瓜",
|
||||
"Raw_Url": "http://103.36.223.176:5244/p/DP_S/Script/%E5%8F%B2%E8%AF%97%E8%8D%AF%E5%89%82/Proj.ifo?sign=-B9k-P4CX3Qm3d9hJpmaHhpFo14aFF1Rfh9d69M-f-8=:0",
|
||||
"ProjectFiles": [
|
||||
"史诗药剂.nut"
|
||||
],
|
||||
"ProjectConfig": "史诗药剂配置文件.json",
|
||||
"ProjectDescribe": "通过指定ID的道具,使玩家获得爆率加成。",
|
||||
"ProjectRunFunc": "_Dps_EpicPotion_Main_"
|
||||
},
|
||||
{
|
||||
"Status": 0,
|
||||
"FilePath": null,
|
||||
"ProjectVersion": 1.2,
|
||||
"ProjectName": "跨界石",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"Raw_Url": null,
|
||||
"ProjectFiles": [
|
||||
"跨界石.nut"
|
||||
],
|
||||
"ProjectConfig": "跨界石_Lenheart.json",
|
||||
"ProjectDescribe": "通过指定ID的道具,将装备背包第一格的装备跨界。\n配置中修改NoCrossIdArr可增加不可跨界的ID。",
|
||||
"ProjectRunFunc": "_Dps_CrossBorderStones_Main_"
|
||||
},
|
||||
{
|
||||
"Status": 0,
|
||||
"FilePath": null,
|
||||
"ProjectVersion": 1,
|
||||
"ProjectName": "一键存入个人金库",
|
||||
"ProjectAuthor": "倾泪寒 & 南瓜",
|
||||
"Raw_Url": "http://103.36.223.176:5244/p/DP_S/Script/%E4%B8%80%E9%94%AE%E5%AD%98%E5%85%A5%E4%B8%AA%E4%BA%BA%E9%87%91%E5%BA%93/Proj.ifo?sign=m9ADj-5dEtouJaA36cHZWPhKTQMBZqGgt_V32OORoZk=:0",
|
||||
"ProjectFiles": [
|
||||
"一键入库.nut"
|
||||
],
|
||||
"ProjectConfig": "一键存入个人金库_Lenheart.json",
|
||||
"ProjectDescribe": "使用之前,请务必保证安装了群内的 \"客户端消息框233.dll\" 插件,这个插件放入你客户端的插件加载目录即可,在游戏中输入 //yjcc 即可一键存入个人金库,也可以在游戏中的快捷喊话中添加为快捷键 配置中可更改 yjcc 关键字",
|
||||
"ProjectRunFunc": "_Dps_OneClickStorage_Main_"
|
||||
},
|
||||
{
|
||||
"Status": 0,
|
||||
"FilePath": null,
|
||||
"ProjectVersion": 1.2,
|
||||
"ProjectName": "装备镶嵌与时装镶嵌",
|
||||
"ProjectAuthor": "倾泪寒",
|
||||
"Raw_Url": null,
|
||||
"ProjectFiles": [
|
||||
"装备镶嵌与时装镶嵌.nut"
|
||||
],
|
||||
"ProjectConfig": "装备镶嵌与时装镶嵌_Lenheart.json",
|
||||
"ProjectDescribe": "使用之前,请务必保证安装了群内的 \"客户端消息框233.dll\" 插件,这个插件放入你客户端的插件加载目录即可\n如果你是0627的客户端版本还需要安装群内的 \"0627装备镶嵌.dll\" 插件",
|
||||
"ProjectRunFunc": "_Dps_Equ2AvaJewel_Main_"
|
||||
},
|
||||
{
|
||||
"Status": 0,
|
||||
"FilePath": null,
|
||||
"ProjectVersion": 1,
|
||||
"ProjectName": "任务清除卷",
|
||||
"ProjectAuthor": "南瓜",
|
||||
"Raw_Url": "",
|
||||
"ProjectFiles": [
|
||||
"任务清除卷.nut"
|
||||
],
|
||||
"ProjectConfig": "任务相关配置_南瓜.json",
|
||||
"ProjectDescribe": "清理各类型任务以及重置相关任务",
|
||||
"ProjectRunFunc": "_Dps_QuestInfo_nangua_Main_"
|
||||
},
|
||||
{
|
||||
"Status": 0,
|
||||
"FilePath": null,
|
||||
"ProjectVersion": 1,
|
||||
"ProjectName": "副本播报",
|
||||
"ProjectAuthor": "南瓜",
|
||||
"Raw_Url": "",
|
||||
"ProjectFiles": [
|
||||
"副本播报.nut"
|
||||
],
|
||||
"ProjectConfig": "副本播报配置_Nangua.json",
|
||||
"ProjectDescribe": "通关及未通关时播报耗时时长",
|
||||
"ProjectRunFunc": "_Dps_send_dungeon_msg_Main_"
|
||||
}
|
||||
]
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"FilePath": null,
|
||||
"ProjectVersion": 1.4,
|
||||
"ProjectName": "史诗药剂",
|
||||
"ProjectAuthor": "倾泪寒 & 南瓜",
|
||||
"Raw_Url": "http://103.36.223.176:5244/p/DP_S/Script/%E5%8F%B2%E8%AF%97%E8%8D%AF%E5%89%82/Proj.ifo?sign=-B9k-P4CX3Qm3d9hJpmaHhpFo14aFF1Rfh9d69M-f-8=:0",
|
||||
"ProjectFiles": [
|
||||
"史诗药剂.nut"
|
||||
],
|
||||
"ProjectConfig": "史诗药剂配置文件.json",
|
||||
"ProjectDescribe": "通过指定ID的道具,使玩家获得爆率加成。",
|
||||
"ProjectRunFunc": "_Dps_EpicPotion_Main_"
|
||||
}
|
||||
Loading…
Reference in New Issue