后端Lua
后端Lua
后端Lua
local F_ = { msg = { keyid = "jnqh", npcid = 1112, data_func = "SendData", }, cfg = NPC.cfg_jnqh, dl = 1, -- ��½�ȼ�Ҫ�� } --������ function F_.main(actor, tbl) local cfg = F_.cfg local id = tbl.id
后端Lua
local itemObj = linkbodyitem(actor, param3) -- 创建一个表来存放所有的属性字符串片段 local attr_parts = {} for k, attr in ipairs(attributeTbl) do -- 血量 if attr.type == 1 and attr.hp_value > 0 then table.insert(attr_parts, "3#1#" .. attr.hp_value)
后端Lua
local itemObj = linkbodyitem(actor, param3) for k, attr in ipairs(attributeTbl) do -- 血量 if attr.type == 1 and attr.hp_value > 0 then local attrStr = tostring("3#1#"..attr.hp_value) setaddnewabil(actor,
后端Lua
玩家离线(下线)后,禁止其角色继续留在某个特定地图中(比如副本、活动地图等)
后端Lua
[2026/3/5 星期四 21:57:10] CallLua1 Func:run 1 luaErr:.\Envir\Market_Def\QFunction-0.lua:11: attempt to concatenate local 'v' (a function value) stack traceback: .\Envir\Market_Def\QFunction-0.lua:11: in function <.\Envir\Market_Def\QFunction-0.lua:6>
后端Lua
local itemObj = linkbodyitem(actor, param3) for i, attr in ipairs(attributeTbl) do -- 血量 if attr.type == 1 and attr.value > 0 then local attrStr = "3#1#"..attr.hp_value setaddnewabil(
后端Lua
local npc = {} EquipPos = {[0] = "衣服",[1] = "武器",[2] = "勋章",[3] = "头盔",[4] = "项链",[5] = "手镯(右)" , [6] = "手镯(左)",[7] = "戒指(右)",[8] = "戒指(左)",[10] = "腰带",[11] = "靴子"} npc.Attribute = { attName = { [1] = "血量", [3] = "攻击下限", [4] = "
后端Lua
local shuffled = Shuffle(attrPool) local result = "" for i = 1, maxCount do if i > 1 then result = result.."|" end local randomValue = math.random(1, 300) -- 1-300随机值 result = result.."3#"..shuffled[i].."#"..randomVa
后端Lua
setitemaddvalue
后端Lua
function ds_suijishu() local weights = { [1] = 500, [2] = 300, [3] = 100, [4] = 10, [5] = 5, [6] = 1 } -- 计算总权重 local totalWeight = 0 for _, w in pairs(weights) do totalWeig
后端Lua
我怎么能通过鉴定的颜色来给装备附等级名称
后端Lua
local colorList = {250, 154, 253, 151, 243, 249} local attrPool = {201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219} function GenerateRandomAttributes(maxCount) local function Shuffle(tbl) for i = #tbl, 2, -1 do
后端Lua
local colorList = {250, 154, 253, 151, 243, 249} local attrPool = {201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219}
后端Lua