mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-04-29 10:49:21 +02:00
Updated to OTCv8 3.0 rev 80
This commit is contained in:
parent
6c1d9f194f
commit
5e90b45dce
Binary file not shown.
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 340 KiB After Width: | Height: | Size: 376 KiB |
@ -156,7 +156,27 @@ function setupAction(action)
|
|||||||
if type(config.hotkey) == 'string' and config.hotkey:len() > 0 then
|
if type(config.hotkey) == 'string' and config.hotkey:len() > 0 then
|
||||||
local gameRootPanel = modules.game_interface.getRootPanel()
|
local gameRootPanel = modules.game_interface.getRootPanel()
|
||||||
g_keyboard.bindKeyPress(config.hotkey, action.callback, gameRootPanel)
|
g_keyboard.bindKeyPress(config.hotkey, action.callback, gameRootPanel)
|
||||||
action.hotkeyLabel:setText(config.hotkey)
|
local text = config.hotkey
|
||||||
|
-- formatting similar to cip Tibia 12
|
||||||
|
local values = {
|
||||||
|
{"Shift", "S"},
|
||||||
|
{"Ctrl", "C"},
|
||||||
|
{"+", ""},
|
||||||
|
{"PageUp", "PgUp"},
|
||||||
|
{"PageDown", "PgDown"},
|
||||||
|
{"Enter", "Return"},
|
||||||
|
{"Insert", "Ins"},
|
||||||
|
{"Delete", "Del"},
|
||||||
|
{"Escape", "Esc"}
|
||||||
|
}
|
||||||
|
for i, v in pairs(values) do
|
||||||
|
text = text:gsub(v[1], v[2])
|
||||||
|
end
|
||||||
|
if text:len() > 6 then
|
||||||
|
text = text:sub(text:len()-3,text:len())
|
||||||
|
text = "..."..text
|
||||||
|
end
|
||||||
|
action.hotkeyLabel:setText(text)
|
||||||
else
|
else
|
||||||
action.hotkeyLabel:setText("")
|
action.hotkeyLabel:setText("")
|
||||||
end
|
end
|
||||||
@ -283,7 +303,8 @@ function actionOnMouseRelease(action, mousePosition, mouseButton)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
assignWindow.addButton.onClick = function()
|
assignWindow.addButton.onClick = function()
|
||||||
updateAction(action, {hotkey=tostring(assignWindow.comboPreview.keyCombo)})
|
local text = tostring(assignWindow.comboPreview.keyCombo)
|
||||||
|
updateAction(action, {hotkey=text})
|
||||||
assignWindow:destroy()
|
assignWindow:destroy()
|
||||||
end
|
end
|
||||||
hotkeyAssignWindow = assignWindow
|
hotkeyAssignWindow = assignWindow
|
||||||
@ -319,7 +340,7 @@ function onSpellGroupCooldown(groupId, duration)
|
|||||||
for index, panel in ipairs({actionPanel1, actionPanel2}) do
|
for index, panel in ipairs({actionPanel1, actionPanel2}) do
|
||||||
for i, child in ipairs(panel.tabBar:getChildren()) do
|
for i, child in ipairs(panel.tabBar:getChildren()) do
|
||||||
if child.spell and child.spell.group then
|
if child.spell and child.spell.group then
|
||||||
for group, duration in pairs(child.spell.group) do
|
for group, dur in pairs(child.spell.group) do
|
||||||
if groupId == group then
|
if groupId == group then
|
||||||
startCooldown(child, duration)
|
startCooldown(child, duration)
|
||||||
end
|
end
|
||||||
@ -344,9 +365,19 @@ function updateCooldown(action)
|
|||||||
if timeleft <= 30 then
|
if timeleft <= 30 then
|
||||||
action.cooldown:setPercent(100)
|
action.cooldown:setPercent(100)
|
||||||
action.cooldownEvent = nil
|
action.cooldownEvent = nil
|
||||||
|
action.cooldown:setText("")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local duration = action.cooldownTill - action.cooldownStart
|
local duration = action.cooldownTill - action.cooldownStart
|
||||||
|
local formattedText
|
||||||
|
if timeleft > 60000 then
|
||||||
|
formattedText = math.floor(timeleft / 60000) .. "m"
|
||||||
|
else
|
||||||
|
formattedText = timeleft/1000
|
||||||
|
formattedText = math.floor(formattedText * 10) / 10
|
||||||
|
formattedText = math.floor(formattedText) .. "." .. math.floor(formattedText * 10) % 10
|
||||||
|
end
|
||||||
|
action.cooldown:setText(formattedText)
|
||||||
action.cooldown:setPercent(100 - math.floor(100 * timeleft / duration))
|
action.cooldown:setPercent(100 - math.floor(100 * timeleft / duration))
|
||||||
action.cooldownEvent = scheduleEvent(function() updateCooldown(action) end, 30)
|
action.cooldownEvent = scheduleEvent(function() updateCooldown(action) end, 30)
|
||||||
end
|
end
|
||||||
|
@ -37,13 +37,14 @@ ActionButton < Panel
|
|||||||
Label
|
Label
|
||||||
id: hotkeyLabel
|
id: hotkeyLabel
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.right: parent.right
|
||||||
margin: 2 3 3 3
|
margin: 2 3 3 3
|
||||||
text-auto-resize: true
|
text-auto-resize: true
|
||||||
text-wrap: false
|
text-wrap: false
|
||||||
phantom: true
|
phantom: true
|
||||||
font: small-9px
|
font: cipsoftFont
|
||||||
color: yellow
|
color: white
|
||||||
|
background: #292A2A
|
||||||
|
|
||||||
UIProgressRect
|
UIProgressRect
|
||||||
id: cooldown
|
id: cooldown
|
||||||
@ -53,6 +54,8 @@ ActionButton < Panel
|
|||||||
phantom: true
|
phantom: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
margin: 1 1 1 1
|
margin: 1 1 1 1
|
||||||
|
font: verdana-11px-rounded
|
||||||
|
color: white
|
||||||
|
|
||||||
Panel
|
Panel
|
||||||
id: actionBar
|
id: actionBar
|
||||||
|
@ -167,6 +167,13 @@ function onContainerOpen(container, previousContainer)
|
|||||||
containerWindow:setContentMinimumHeight(cellSize.height)
|
containerWindow:setContentMinimumHeight(cellSize.height)
|
||||||
containerWindow:setContentMaximumHeight(cellSize.height*layout:getNumLines())
|
containerWindow:setContentMaximumHeight(cellSize.height*layout:getNumLines())
|
||||||
|
|
||||||
|
if container:hasPages() then
|
||||||
|
local height = containerWindow.miniwindowScrollBar:getMarginTop() + containerWindow.pagePanel:getHeight()+17
|
||||||
|
if containerWindow:getHeight() < height then
|
||||||
|
containerWindow:setHeight(height)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if not previousContainer then
|
if not previousContainer then
|
||||||
local filledLines = math.max(math.ceil(container:getItemsCount() / layout:getNumColumns()), 1)
|
local filledLines = math.max(math.ceil(container:getItemsCount() / layout:getNumColumns()), 1)
|
||||||
containerWindow:setContentHeight(filledLines*cellSize.height)
|
containerWindow:setContentHeight(filledLines*cellSize.height)
|
||||||
|
@ -185,6 +185,7 @@ function onSpellCooldown(iconId, duration)
|
|||||||
else
|
else
|
||||||
progressRect:setPercent(0)
|
progressRect:setPercent(0)
|
||||||
end
|
end
|
||||||
|
local spell, profile, spellName = Spells.getSpellByIcon(iconId)
|
||||||
progressRect:setTooltip(spellName)
|
progressRect:setTooltip(spellName)
|
||||||
|
|
||||||
local updateFunc = function()
|
local updateFunc = function()
|
||||||
|
@ -140,7 +140,22 @@ SpellInfo = {
|
|||||||
['Avalanche'] = {id = 115, words = 'adori mas frigo', exhaustion = 2000, premium = false, type = 'Conjure', icon = 'avalanche', mana = 530, level = 30, soul = 3, group = {[3] = 2000}, vocations = {2, 6}},
|
['Avalanche'] = {id = 115, words = 'adori mas frigo', exhaustion = 2000, premium = false, type = 'Conjure', icon = 'avalanche', mana = 530, level = 30, soul = 3, group = {[3] = 2000}, vocations = {2, 6}},
|
||||||
['Stone Shower'] = {id = 116, words = 'adori mas tera', exhaustion = 2000, premium = false, type = 'Conjure', icon = 'stoneshower', mana = 430, level = 28, soul = 3, group = {[3] = 2000}, vocations = {2, 6}},
|
['Stone Shower'] = {id = 116, words = 'adori mas tera', exhaustion = 2000, premium = false, type = 'Conjure', icon = 'stoneshower', mana = 430, level = 28, soul = 3, group = {[3] = 2000}, vocations = {2, 6}},
|
||||||
['Thunderstorm'] = {id = 117, words = 'adori mas vis', exhaustion = 2000, premium = false, type = 'Conjure', icon = 'thunderstorm', mana = 430, level = 28, soul = 3, group = {[3] = 2000}, vocations = {1, 5}},
|
['Thunderstorm'] = {id = 117, words = 'adori mas vis', exhaustion = 2000, premium = false, type = 'Conjure', icon = 'thunderstorm', mana = 430, level = 28, soul = 3, group = {[3] = 2000}, vocations = {1, 5}},
|
||||||
['Holy Missile'] = {id = 130, words = 'adori san', exhaustion = 2000, premium = false, type = 'Conjure', icon = 'holymissile', mana = 350, level = 27, soul = 3, group = {[3] = 2000}, vocations = {3, 7}}
|
['Holy Missile'] = {id = 130, words = 'adori san', exhaustion = 2000, premium = false, type = 'Conjure', icon = 'holymissile', mana = 350, level = 27, soul = 3, group = {[3] = 2000}, vocations = {3, 7}},
|
||||||
|
-- newest tibia spells
|
||||||
|
['Summon Paladin Familiar'] = {id = 171, words = 'utevo gran res sac', exhaustion = 1800000,premium = true, type = 'Instant', icon = 'summonpaladinfamiliar', mana = 2000, level = 200,soul = 0, group = {[3] = 2000}, vocations = {3, 7}},
|
||||||
|
['Summon Knight Familiar'] = {id = 170, words = 'utevo gran res eq', exhaustion = 1800000,premium = true, type = 'Instant', icon = 'summonknightfamiliar', mana = 1000, level = 200,soul = 0, group = {[3] = 2000}, vocations = {3, 7}},
|
||||||
|
['Summon Druid Familiar'] = {id = 172, words = 'utevo gran res dru', exhaustion = 1800000,premium = true, type = 'Instant', icon = 'summondruidfamiliar', mana = 3000, level = 200,soul = 0, group = {[3] = 2000}, vocations = {3, 7}},
|
||||||
|
['Summon Sorcerer Familiar'] = {id = 173, words = 'utevo gran res eq', exhaustion = 1800000,premium = true, type = 'Instant', icon = 'summonsorcererfamiliar', mana = 3000, level = 200,soul = 0, group = {[3] = 2000}, vocations = {3, 7}},
|
||||||
|
['Chivalrous Challenge'] = {id = 101, words = "exeta amp res", exhaustion = 2000, premium = true, type = 'Instant', icon = 'chivalrouschallange', mana = 80, level = 150,soul = 0, group = {[3] = 2000}, vocations = {8}},
|
||||||
|
['Fair Wound Cleansing'] = {id = 102, words = 'exura med ico', exhaustion = 1000, premium = true, type = 'Instant', icon = 'fairwoundcleansing', mana = 90, level = 300,soul = 0, group = {[2] = 1000}, vocations = {8}},
|
||||||
|
['Conjure Wand of Darkness'] = {id = 92, words = 'exevo gran mort', exhaustion = 1800000,premium = true, type = 'Conjure', icon = 'conjurewandofdarkness', mana = 250, level = 41, soul = 0, group = {[3] = 2000}, vocations = {1, 5}},
|
||||||
|
['Expose Weakness'] = {id = 106, words = 'exori moe', exhaustion = 12000, premium = true, type = 'Instant', icon = 'exposeweakness', mana = 400, level = 275,soul = 0, group = {[5] = 12000, [3] = 2000}, vocations = {1, 5}},
|
||||||
|
['Sap Strenght'] = {id = 105, words = 'exori kor', exhaustion = 12000, premium = true, type = 'Instant', icon = 'sapstrenght', mana = 300, level = 175,soul = 0, group = {[5] = 12000, [3] = 2000}, vocations = {1, 5}},
|
||||||
|
['Great Fire Wave'] = {id = 100, words = 'exevo gran flam hur', exhaustion = 4000, premium = true, type = 'Instant', icon = 'greatfirewave', mana = 120, level = 38, soul = 0, group = {[1] = 2000}, vocations = {1, 5}},
|
||||||
|
['Restoration'] = {id = 103, words = "exura max vita", exhaustion = 6000, premium = true, type = 'Instant', icon = 'restoration', mana = 260, level = 300,soul = 0, group = {[2] = 1000}, vocations = {1, 2, 5, 6}},
|
||||||
|
["Nature's Embrace"] = {id = 101, words = 'exura gran sio', exhaustion = 60000, premium = true, type = 'Instant', icon = 'naturesembrace', mana = 400, level = 300,soul = 0, group = {[2] = 1000}, vocations = {2, 6}},
|
||||||
|
['Divine Dazzle'] = {id = 101, words = 'exana amp res', exhaustion = 16000, premium = true, type = 'Instant', icon = 'divinedazzle', mana = 80, level = 250,soul = 0, group = {[3] = 2000}, vocations = {3, 7}},
|
||||||
|
|
||||||
}--[[,
|
}--[[,
|
||||||
|
|
||||||
['Sample'] = {
|
['Sample'] = {
|
||||||
@ -155,6 +170,21 @@ SpellInfo = {
|
|||||||
-- ['const_name'] = {client_id, TFS_id}
|
-- ['const_name'] = {client_id, TFS_id}
|
||||||
-- Conversion from TFS icon id to the id used by client (icons.png order)
|
-- Conversion from TFS icon id to the id used by client (icons.png order)
|
||||||
SpellIcons = {
|
SpellIcons = {
|
||||||
|
-- new tibia spells, server owners - you will probably need to adjust TFS_id
|
||||||
|
['summonsorcererfamiliar'] = {130, 173},
|
||||||
|
['summondruidfamiliar'] = {129, 172},
|
||||||
|
['summonpaladinfamiliar'] = {127, 171},
|
||||||
|
['summonknightfamiliar'] = {128, 170},
|
||||||
|
['exposeweakness'] = {134, 106},
|
||||||
|
['sapstrenght'] = {135, 105},
|
||||||
|
['restoration'] = {137, 103},
|
||||||
|
['fairwoundcleansing'] = {132, 102},
|
||||||
|
['chivalrouschallange'] = {131, 101},
|
||||||
|
["naturesembrace"] = {138, 101},
|
||||||
|
['divinedazzle'] = {139, 101},
|
||||||
|
['greatfirewave'] = {136, 100},
|
||||||
|
['conjurewandofdarkness'] = {133, 92},
|
||||||
|
-- old spells
|
||||||
['intenserecovery'] = {16, 160},
|
['intenserecovery'] = {16, 160},
|
||||||
['recovery'] = {15, 159},
|
['recovery'] = {15, 159},
|
||||||
['intensewoundcleansing'] = {4, 158},
|
['intensewoundcleansing'] = {4, 158},
|
||||||
@ -291,7 +321,7 @@ SpellIcons = {
|
|||||||
['intensehealingrune'] = {74, 4},
|
['intensehealingrune'] = {74, 4},
|
||||||
['ultimatehealing'] = {1, 3},
|
['ultimatehealing'] = {1, 3},
|
||||||
['intensehealing'] = {7, 2},
|
['intensehealing'] = {7, 2},
|
||||||
['lighthealing'] = {6, 1}
|
['lighthealing'] = {6, 1},
|
||||||
}
|
}
|
||||||
|
|
||||||
VocationNames = {
|
VocationNames = {
|
||||||
@ -309,7 +339,8 @@ SpellGroups = {
|
|||||||
[1] = 'Attack',
|
[1] = 'Attack',
|
||||||
[2] = 'Healing',
|
[2] = 'Healing',
|
||||||
[3] = 'Support',
|
[3] = 'Support',
|
||||||
[4] = 'Special'
|
[4] = 'Special',
|
||||||
|
[5] = 'Cripple'
|
||||||
}
|
}
|
||||||
|
|
||||||
Spells = {}
|
Spells = {}
|
||||||
|
BIN
otclient_dx.exe
BIN
otclient_dx.exe
Binary file not shown.
BIN
otclient_gl.exe
BIN
otclient_gl.exe
Binary file not shown.
BIN
otclient_mac
BIN
otclient_mac
Binary file not shown.
BIN
otclientv8.apk
BIN
otclientv8.apk
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user