Reuse item

Description

This script will start crosshair to use the same item again after using it once.

Requirements

OTCv8 version: 1.7
Tibia version: 8.00-11.00

Usage

Copy script to your config.

Script
function clickReuse(parent)
  if not parent then
    parent = panel
  end
  local ui = setupUI([[
Panel
  height: 20
  margin-top: 2

  BotSwitch
    id: title
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.top: parent.top
    text-align: center
    text: Click Reuse
    ]], parent)
  ui:setId("clickReuse")

  ui.title:setOn(storage.clickReuse)
  ui.title.onClick = function(widget)
    storage.clickReuse = not storage.clickReuse
    widget:setOn(storage.clickReuse)
  end
  onUseWith(function(pos, itemId, target, subType)
    if storage.clickReuse then
      schedule(50, function()
        item = findItem(itemId)
        if item then
          modules.game_interface.startUseWith(item)
        end
      end)
    end
  end)
end
clickReuse()

 

Author

Discord: Vincent#1766

feel free to donate btc :) 16yc7aH6KYxCgqHqpaW1KvbL4ztq5tnvU2