项目简介
- 快速运行地图
- 【单位、物品】物编
- 修改启动魔兽参数
- 修改虚拟MPQ路径
- 添加运行地图需要加载的文件路径
- 配置War3路径注册表
魔兽环境
插件使用的环境
配套的YDWE(可不用)
右键使用CLua运行.lua脚本可提供
---region dll支持
local fs = require 'bee.filesystem'
local ffi = require 'ffi'
local ll = require 'ffi.loadlibrary'
local sleep = require 'ffi.sleep'
local unicode = require 'ffi.unicode'
local stormlib = require 'ffi.stormlib'
local messagebox = require 'ffi.messagebox'
---endregion
---@class Csharp.Task
---@field public Wait fun(self:self)
---@enum(value) Csharp.ImageFormat
ImageFormat = {
Png = true,
}
---@class Csharp.Font
---@overload fun(fontName:string,fontSize:integer):Csharp.Font
Font = {}
---@class Csharp.Color
---@field public [1] integer R
---@field public [2] integer G
---@field public [3] integer B
Color = {}
---@class Csharp.RectangleF
---@overload fun(x:number,y:number,w:number,h:number):Csharp.RectangleF
RectangleF = {}
---@class Csharp.Image
---@overload fun(path:string):Csharp.Image 从图片文件加载图片
---@overload fun(w:integer,h:integer):Csharp.Image 创建空白图片
---@field public W integer 宽度
---@field public H integer 高度
---@field public WriteText fun(self:self,text:string,font:Csharp.Font,colors:table<integer,Csharp.Color>,RectangleF:Csharp.RectangleF) 输出文本到图片@param colors 文本颜色
---@field public WriteBlockColor fun(self:self,R:integer,G:integer,B:integer) --填充背景色
---@field public AddBlend fun(self:self,inputPath:string,x:integer|nil,y:integer|nil,w:integer|nil,h:integer|nil) 合成 path 图片
---@field public Save fun(self:self,outPath:string,imageFormat:Csharp.ImageFormat) 保存图片
---@field public SaveBlp fun(self:self,outPath:string) 保存为BLP图片
---@field public Close fun(self:self) 关闭图片,一定要关闭图片
Image = {}
---@class Csharp.lni
---@field public Read fun(filePath:string):table 读取指定路径的ini文件
lni = {}
---@class DirectoryInfo
---@field public Name string
---@field public Exists string
---@field public Parent DirectoryInfo?
---@field public Root DirectoryInfo
---@field public Create fun(self:self)
---@field public CreateSubdirectory fun(self:self,path:string):DirectoryInfo
---@field public Delete fun(self:self)
---@class FileInfo
---@field public IsReadOnly boolean 是否只读
---@field public Exists boolean 是否存在
---@field public DirectoryName string?
---@field public Directory DirectoryInfo?
---@field public Length integer
---@field public Name string 文件名
---@field public FullName string 绝对路径
---@field public CopyTo fun(self:self,destFileName:string):FileInfo
---@field public Delete fun(self:self)
---@field public MoveTo fun(self:self,destFileName:string)
---@field public ToString fun(self:self):string 获取文件路径
---@class Csharp.IO
---@field public Read fun(filePath:string):string 读取指定路径的文件
---@field public Write fun(filePath:string,content:string):boolean 写入指定路径的文件
---@field public IsDirectoryExists fun(Directory:string):boolean 判断文件夹是否存在
---@field public IsFileExists fun(filePath:string):boolean 判断文件是否存在
---@field public Exists fun(filePathOrDirectory:string):boolean 判断文件或文件夹是否存在
---@field public Delete fun(filePath:string):boolean 删除文件
---@field public IsFileLocked fun(filePath:string):boolean 检查文件是否被占用
---@field public ForDirectoryInfo fun(filePath:string,callback:fun(filePath:FileInfo))
IO = {}
---@class Csharp.HttpGet
---@overload fun(url:string):Csharp.HttpGet 发起Get请求
---@field public SendLua fun(self:self,callback:fun(result:string)):Csharp.HttpGet 发起Get请求
---@field public Wait fun(self:self) 等待请求完成
---@field public DownloadStreamAsync fun(self:self,callback:fun(stream:string)) 下载文件
http_get = {}
---@class Csharp.HttpPost
---@overload fun(url:string,body:table?,headers:table?):Csharp.HttpPost
---@field public SendLua fun(self:self,callback:fun(result:string)):Csharp.HttpPost 发起Get请求
---@field public Wait fun(self:self) 等待请求完成
http_post = {}
---@class Csharp.Json
---@field public decode fun(json:string):table 解析json字符串为table
---@field public encode fun(data:table):table 转换table
json = {}
---@class Csharp.Cell
---@field public value any 值
---@field public type string 值类型
Cell = {}
---@class Csharp.Row
---@field public [integer] Csharp.Cell
---@field public Length integer 列数
Row = {}
---@class Csharp.Sheet
---@field public row_count integer 行数
---@field public column_count integer 列数
---@field public Name string 工作簿名字
---@field public row_data table<integer,Csharp.Row> 行数数据
---@field public GetCell fun(self:self,row:integer,col:integer):Csharp.Cell 获取指定单元格
---@field public GetRow fun(self:self,row:integer):Csharp.Row 获取指定行
---@field public Write fun(self:self,value:any,y:integer,x:integer):Csharp.Cell 输出数据到指定单元格
Sheet = {}
---@class Csharp.Xlsx
---@field public HasSheet fun(self:self,name:string):Csharp.Sheet 判断工作簿是否存在
---@field public sheet_count integer 工作簿数量
---@field public sheets table<integer,Csharp.Sheet> 工作簿列表
---@field public GetSheet fun(self:self,name:string):Csharp.Sheet? 获取工作簿
---@field public AddSheet fun(self:self,name:string):Csharp.Sheet? 添加工作簿
---@field public Save fun(self:self,filename:string):boolean 保存工作表
---@field public RealWPSId fun(excelId:string,callback:fun(xlsx:Csharp.Xlsx)):Csharp.Task
---@field public Dispose fun() 关闭表格
---@overload fun(stream:string):Csharp.Xlsx
---@overload fun():Csharp.Xlsx
Xlsx = {}
---@class Csharp.NetworkStream
---@class Csharp.Client
---@overload fun(ip:string|"127.0.0.1",port:integer):Csharp.Client
---@field public Connect fun(self:self) 发起连接
---@field public Send fun(self:self,message:string) 发送指令
---@field public OnMessage fun(self:self,callback:fun(result:string)) 接收消息
---@field public OnDisconnected fun(self:self,callback:fun()) 连接断开
Client = {}