- UID
- 28524
- 阅读权限
- 40
- 回帖
- 155
- 喵币
- 0
- 有爱
- 96
- DKP
- 5043
- 金币
- 11317
- 在线时间
- 290 小时
- 注册时间
- 2021-4-18
- 最后登录
- 2026-2-7
声望: 1136   虚弱: 0

Lv.4(锻造者)
|
发表于 2023-10-28 12:48:51
|
显示全部楼层
print "Fxxxxxxxxxxxxxxxxxxx Loading...OK"
--local ITEM = 120006
local function OnEnchantmentCast(event, player, spell, skipCheck)
if spell:GetEntry() == 1000029 then
--player:SendBroadcastMessage("检测到法术")
local target = spell:GetTarget()
--player:SendBroadcastMessage("这是目标获取 " .. tostring(target)) -- 测试target
target:ClearEnchantment( 5 )
Roll = math.random(100)
if (Roll > 95) then
local a = math.random(8000, 8015)
target:SetEnchantment( a, 5 )
end
if (Roll > 85 and Roll < 96) then
local a = math.random(7000, 7015)
target:SetEnchantment( a, 5 )
end
if (Roll > 70 and Roll < 86) then
local a = math.random(6000, 6015)
target:SetEnchantment( a, 5 )
end
if (Roll > 40 and Roll < 71) then
local a = math.random(5000, 5015)
target:SetEnchantment( a, 5 )
end
if (Roll >= 0 and Roll < 41) then
local a = math.random(4000, 4015)
target:SetEnchantment( a, 5 )
end
player:RemoveItem(ITEM, 1)
end
end 大神我是一个初学者通过看别人的LUA和查看了下有爱的LUA文档写的 ,请问这样又什么问题吗?我制作了一个没用实际效果的附魔法术,从别的附魔法术改的,然后通过检测法术的对象获得ITEM添加随机附魔的ID,希望您有时间指点一二 |
|