|
发表于 2024-5-7 17:05:18
|
显示全部楼层
首先用 GetInventoryItemLink("unit", slot)获得主手或者副手武器的链接,slot主手16,副手17,例如local mainhand=GetInventoryItemLink("player", 16)
然后用GetItemInfo("itemLink")获得相应物品的类型,例如:local weapontype=select(7,GetItemInfo(mainhand))
随后用判断语句选择相应的磨刀石,例如
if weapontype=="单手锤" then
BeeRun("/use XXX")
elseif BeeRun("/use XXX")
end
上面的条件语句最好加入:
1、设定 BeeWeaponEnchantInfo(n)<0 在武器没有临时附魔的情况下再使用磨刀石,否则会一直使用。n为1表示主手,n为2表示副手
2. 如果BeeWeaponEnchantInfo(n)设定的不是小于0,注意需要设定点击覆盖附魔的提示确定按钮的语句 |
|