OTCv8 / otclientv8

Clean, ready to use version of OTClientV8 - Alternative, highly optimized Tibia client
Other
254 stars 191 forks source link

small fix popup menu (where shows item's IDs) #230

Open felipepips opened 1 year ago

felipepips commented 1 year ago

modules\game_interface\gameinterface.lua Lines 567-575:

  if g_game.getFeature(GameBot) and useThing and useThing:isItem() then
    menu:addSeparator()
    local useThingId = useThing:getId()
    if useThing:getSubType() > 1 then
      menu:addOption("ID: " .. useThingId .. " SubType: " .. g_game..setClipboardText(useThingId), function() end)    
    else
      menu:addOption("ID: " .. useThingId, function() g_game.setClipboardText(useThingId) end)
    end
  end

on lines 571 and 573 instead of g_game.setClipboardText it should be: g_window.setClipboardText

felipepips commented 1 year ago

also, i saw now, line 571 have more errors, the correct is:

menu:addOption("ID: " .. useThingId .. " SubType: " .. useThing:getSubType(), function() g_window.setClipboardText(useThingId) end)