Updated to OTCv8 3.1 rev 117

This commit is contained in:
OTCv8 2021-12-13 00:30:25 +00:00
parent 91f2c2da12
commit 8408102687
10 changed files with 16 additions and 12 deletions

View File

@ -100,7 +100,7 @@ InventoryButton < Button
text-align: center
font: cipsoftFont
color: white
size: 45 20
size: 45 18
text-offset: 2 2
SoulCapLabel < GameLabel

View File

@ -103,15 +103,18 @@ StaticMainWindow
Button
id: autoReconnect
!text: tr('Auto reconnect: On')
width: 140
anchors.left: parent.left
anchors.bottom: parent.bottom
image-color: green
$!on:
image-color: red
!text: tr('Auto reconnect: Off')
$on:
!text: tr('Auto reconnect: On')
image-color: green
Button
id: buttonOk
!text: tr('Ok')

View File

@ -140,6 +140,7 @@ function terminate()
end
end
local n = 0
function setUnsupportedSettings()
local t = {"slot1", "slot2", "slot3"}
for i, slot in pairs(t) do
@ -192,7 +193,7 @@ function show()
preyWindow:show()
preyWindow:raise()
preyWindow:focus()
--g_game.preyRequest() -- update preys, it's for tibia 12
g_game.preyRequest() -- update preys, it's for tibia 12
end
function toggle()
@ -205,7 +206,7 @@ end
function onPreyFreeRolls(slot, timeleft)
local prey = preyWindow["slot" .. (slot + 1)]
local percent = (timeleft / (20 * 60)) * 100
local desc = timeleftTranslation(timeleft * 60, true)
local desc = timeleftTranslation(timeleft * 60)
if not prey then return end
for i, panel in pairs({prey.active, prey.inactive}) do
local progressBar = panel.reroll.button.time
@ -213,7 +214,7 @@ function onPreyFreeRolls(slot, timeleft)
progressBar:setPercent(percent)
progressBar:setText(desc)
if timeleft == 0 then
price:setText("Free")
price:setText("0")
end
end
end
@ -421,7 +422,7 @@ function onItemBoxChecked(widget)
widget:setChecked(true)
end
function onPreyActive(slot, currentHolderName, currentHolderOutfit, bonusType, bonusValue, bonusGrade, timeLeft, timeUntilFreeReroll)
function onPreyActive(slot, currentHolderName, currentHolderOutfit, bonusType, bonusValue, bonusGrade, timeLeft, timeUntilFreeReroll, lockType) -- locktype always 0 for protocols <12
local tracker = preyTracker.contentsPanel["slot"..(slot + 1)]
currentHolderName = capitalFormatStr(currentHolderName)
local percent = (timeLeft / (2 * 60 * 60)) * 100
@ -493,8 +494,9 @@ function onPreySelection(slot, bonusType, bonusValue, bonusGrade, names, outfits
prey.inactive:show()
prey.title:setText(tr("Select monster"))
local rerollButton = prey.inactive.reroll.button.rerollButton
rerollButton:setImageSource("/images/game/prey/prey_reroll_blocked")
rerollButton:disable()
rerollButton.onClick = function()
g_game.preyAction(slot, PREY_ACTION_LISTREROLL, 0)
end
local list = prey.inactive.list
list:destroyChildren()
for i, name in ipairs(names) do

View File

@ -435,7 +435,6 @@ RerollButton < FlatPanel
$pressed:
image-clip: 0 46 60 47
GoldLabel
id: price
anchors.top: prev.bottom

View File

@ -299,7 +299,7 @@ end
function onLevelChange(localPlayer, value, percent)
setSkillValue('level', value)
local text = tr('You have %s percent to go', 100 - percent) .. '\n' ..
tr('%s of experience left', expToAdvance(localPlayer:getLevel(), localPlayer:getExperience()))
tr('%s of experience left', comma_value(expToAdvance(localPlayer:getLevel(), localPlayer:getExperience())))
if localPlayer.expSpeed ~= nil then
local expPerHour = math.floor(localPlayer.expSpeed * 3600)
@ -308,7 +308,7 @@ function onLevelChange(localPlayer, value, percent)
local hoursLeft = (nextLevelExp - localPlayer:getExperience()) / expPerHour
local minutesLeft = math.floor((hoursLeft - math.floor(hoursLeft))*60)
hoursLeft = math.floor(hoursLeft)
text = text .. '\n' .. tr('%d of experience per hour', expPerHour)
text = text .. '\n' .. tr('%d of experience per hour', comma_value(expPerHour))
text = text .. '\n' .. tr('Next level in %d hours and %d minutes', hoursLeft, minutesLeft)
end
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.