I have a simple RoM macro I built into one of my personal add-ons that will report the current weapon skill level for each slot as well as the weapon type. This could be modified and used in the in-game functions file, or code could be added directly into the bot to achieve the same goal.
Code: Select all
-- Prints the player's current equipped weapon skills to the local chat window.
function GetWeaponSkill()
local WSlots = {"MainHandSlot","SecondaryHandSlot","RangedSlot"}
local WSlotNames = {"Main Hand","Off Hand","Ranged"}
local WSkills = {"Unarmed","Sword","Dagger","Wand","Axe","Bludgeon","2-H Sword","Staff","2-H Axe","2-H Hammer","Polearm","Bow","Crossbow","Gun"}
local WSkillNames = {"Unarmed","1-H Sword","Dagger","Wand","Axe","1-H Hammer","2-H Sword","Staff","2-H Axe","2-H Hammer","Polearm","Bow","Crossbow","Gun"}
for k = 1, 3 do
local id, id2, id3 = GetInventorySlotInfo(WSlots[k])
if id ~= nil and GetInventoryItemTexture("player",id) then
OTCGetDataTooltip:SetInventoryItem("player", id)
OTCGetDataTooltip:Hide()
for i = 2, 8 do
leftSide = getglobal("OTCGetDataTooltipTextLeft" .. i)
leftText = ""
if leftSide:IsVisible() then
leftText = leftSide:GetText()
end
if left == nil then
left = ""
end
CurrWeap = 0
for j = 1, 13 do
if string.find(leftText, WSkills[j]) ~= nil then
CurrWeap = j
end
end
if CurrWeap > 0 then
for a,b in pairs(PRACTICEDFRAME_ITEMS) do
if a == CurrWeap then
local CurrSkill, _, MaxSkill = GetPlayerSkilled(b)
CurrLvl = math.floor(CurrSkill)
local PctLvl = math.floor((CurrSkill - CurrLvl)*10000+0.5)/100
Msg(WSlotNames[k].." Skill: "..WSkillNames[CurrWeap].." = "..CurrLvl.."/"..MaxSkill.." ("..PctLvl.."%)")
end
end
end
end
end
end
end