Updated to OTCv8 3.1 rev 229

This commit is contained in:
OTCv8
2022-07-09 22:09:37 +00:00
parent 88fb41bafc
commit a48d0fd0d1
125 changed files with 24548 additions and 732 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,7 @@
Module
name: game_actionbar
description: Action bar
author: otclient@otclient.ovh
website: otclient.ovh
author: https://github.com/Vithrax/
sandboxed: true
scripts: [ actionbar ]
@onLoad: init()
@onUnload: terminate()
scripts: [ actionbar ]

View File

@@ -1,29 +1,42 @@
ActionButton < Panel
ActionButton < UIButton
font: cipsoftFont
width: 40
padding: 1 1 1 1
width: 36
padding: 1
margin-left: 1
draggable: true
Item
id: item
anchors.fill: parent
padding: 1
&selectable: true
&editable: false
virtual: true
border-width: 1
border-color: #00000000
draggable: true
$!on:
image-source: /images/game/actionbarslot
image-source: /images/game/actionbar/actionbarslot
image-color: #dfdfdf
image-clip: 0 0 34 34
image-border: 0
$on:
image-source: /images/ui/button
image-color: #dfdfdf
image-clip: 0 0 22 23
image-border: 3
$pressed on:
image-clip: 0 46 22 23
Label
id: text
anchors.fill: parent
anchors.fill: prev
text-auto-resize: true
text-wrap: true
phantom: true
margin: 1
text-align: center
font: verdana-9px
@@ -31,7 +44,7 @@ ActionButton < Panel
id: hotkeyLabel
anchors.top: parent.top
anchors.right: parent.right
margin: 2 3 3 3
margin: 3 4 3 3
text-auto-resize: true
text-wrap: false
phantom: true
@@ -39,22 +52,172 @@ ActionButton < Panel
color: white
background: #292A2A
Label
id: parameterText
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
margin-bottom: -3
margin-left: 2
margin-right: 2
font: verdana-9px
color: white
text-align: center
UIProgressRect
id: cooldown
background: #585858AA
background: #101010aa
percent: 100
focusable: false
phantom: true
anchors.fill: parent
margin: 1 1 1 1
font: verdana-11px-rounded
color: white
LeftSliders < Panel
size: 17 34
Button
id: prev
anchors.fill: parent
anchors.bottom: parent.verticalCenter
@onClick: modules.game_actionbar.moveActionButtons(self)
$!on:
tooltip: No further action buttons in this direction
$on:
tooltip: Move to the previous action button
UIWidget
id: image
anchors.centerIn: parent
phantom: true
$!on:
image-source: /images/game/actionbar/arrow-disabled
$on:
image-source: /images/game/actionbar/arrow
Button
id: first
anchors.fill: parent
anchors.top: parent.verticalCenter
@onClick: modules.game_actionbar.moveActionButtons(self)
$!on:
tooltip: No further action buttons in this direction
$on:
tooltip: Move to the first action button
UIWidget
id: image
anchors.centerIn: parent
phantom: true
$!on:
image-source: /images/game/actionbar/arrow-skip-disabled
$on:
image-source: /images/game/actionbar/arrow-skip
RightSliders < Panel
size: 29 34
Button
id: lock
anchors.top: parent.top
anchors.right: parent.right
anchors.bottom: parent.bottom
width: 12
@onClick: modules.game_actionbar.changeLockState(self)
$!on:
tooltip: Action Bar Locked: You cannot assign actions to or switch actions on action buttons by "drag&drop".
$on:
tooltip: Action Bar Unlocked: You can assign actions to or switch actions on action buttons by "drag&drop".
UIWidget
id: image
anchors.centerIn: parent
margin-right: 1
phantom: true
$!on:
image-source: /images/game/actionbar/locked
$on:
image-source: /images/game/actionbar/unlocked
Button
id: next
anchors.top: parent.top
anchors.bottom: parent.verticalCenter
anchors.left: parent.left
anchors.right: lock.left
margin-right: 1
@onClick: modules.game_actionbar.moveActionButtons(self)
on: true
$!on:
tooltip: No further action buttons in this direction
$on:
tooltip: Move to the next action button
UIWidget
id: image
anchors.centerIn: parent
phantom: true
margin-top: 1
margin-left: 2
rotation: 180
on: true
$!on:
image-source: /images/game/actionbar/arrow-disabled
$on:
image-source: /images/game/actionbar/arrow
Button
id: last
anchors.top: parent.verticalCenter
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: prev.right
@onClick: modules.game_actionbar.moveActionButtons(self)
on: true
$!on:
tooltip: No further action buttons in this direction
$on:
tooltip: Move to the last action button
UIWidget
id: image
anchors.centerIn: parent
phantom: true
margin-top: 1
margin-left: 1
rotation: 180
on: true
$!on:
image-source: /images/game/actionbar/arrow-skip-disabled
$on:
image-source: /images/game/actionbar/arrow-skip
Panel
id: actionBar
focusable: false
image-source: /images/ui/panel_side
image-border: 4
image-source: /images/ui/actionbar_background
image-border: 1
margin-top: -1
$on:
@@ -65,77 +228,37 @@ Panel
height: 0
visible: false
TabButton
id: prevButton
icon: /images/game/console/leftarrow
LeftSliders
id: prevPanel
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.verticalCenter: parent.verticalCenter
margin-left: 1
margin-top: 1
margin-bottom: 2
Panel
ScrollablePanel
id: tabBar
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: prev.right
anchors.right: next.left
margin-right: 3
anchors.right: nextPanel.left
margin-left: 4
margin-right: 4
clipping: true
padding-top: 2
padding-bottom: 2
horizontal-scrollbar: actionScroll
layout: horizontalBox
TabButton
id: nextButton
icon: /images/game/console/rightarrow
anchors.right: parent.right
HorizontalScrollBar
id: actionScroll
anchors.top: parent.top
anchors.bottom: parent.bottom
margin-right: 1
margin-top: 1
margin-bottom: 2
ActionAssignWindow < MainWindow
id: assignWindow
!text: tr('Button Assign')
size: 360 150
@onEscape: self:destroy()
Label
!text: tr('Please, press the key you wish to use for action')
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
text-auto-resize: true
text-align: left
step: 37
pixels-scroll: true
visible: false
Label
id: comboPreview
!text: tr('Current action hotkey: %s', 'none')
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: prev.bottom
margin-top: 10
text-auto-resize: true
HorizontalSeparator
id: separator
anchors.left: parent.left
RightSliders
id: nextPanel
anchors.right: parent.right
anchors.bottom: next.top
margin-bottom: 10
Button
id: addButton
!text: tr('Add')
width: 64
anchors.right: next.left
anchors.bottom: parent.bottom
margin-right: 10
Button
id: cancelButton
!text: tr('Cancel')
width: 64
anchors.right: parent.right
anchors.bottom: parent.bottom
@onClick: self:getParent():destroy()
anchors.verticalCenter: parent.verticalCenter
margin-right: 1

View File

@@ -0,0 +1,56 @@
MainWindow
id: assignHotkeyWindow
size: 400 170
FlatLabel
id: display
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
height: 33
text-align: center
font: verdana-11px-rounded
Label
id: desc
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
margin-top: 10
multi-line: true
height: 40
text-wrap: true
text: Click "Ok" to assign the hotkey. Click "Clear" to remove the hotkey from "
HorizontalSeparator
anchors.top: prev.bottom
margin-top: 10
anchors.left: parent.left
anchors.right: parent.right
Button
id: buttonClose
anchors.right: parent.right
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Close
@onClick: self:getParent():destroy()
Button
id: buttonClear
anchors.right: prev.left
margin-right: 5
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Clear
Button
id: buttonOk
anchors.right: prev.left
margin-right: 5
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Ok

View File

@@ -0,0 +1,100 @@
RoundCheckBox < CheckBox
image-source: /images/ui/checkbox_round
$first:
margin-top: 2
$!first:
margin-top: 5
MainWindow
id: assignItemWindow
size: 275 195
UIItem
id: item
anchors.top: parent.top
anchors.left: parent.left
size: 86 86
padding: 5
&selectable: true
&editable: false
image-source: /images/ui/panel_flat
image-border: 1
Panel
id: checks
anchors.left: prev.right
anchors.top: parent.top
anchors.right: parent.right
margin-left: 10
layout:
type: verticalBox
fit-children: true
RoundCheckBox
id: useSelf
text: Use on yourself
enabled: false
RoundCheckBox
id: useTarget
text: Use on target
enabled: false
RoundCheckBox
id: useCross
text: With crosshair
enabled: false
RoundCheckBox
id: equip
text: Equip/Unequip
enabled: false
RoundCheckBox
id: use
text: Use
enabled: false
Button
id: select
anchors.left: item.left
anchors.right: item.right
anchors.top: item.bottom
margin-top: 5
font: cipsoftFont
height: 20
text: Select item
HorizontalSeparator
anchors.top: prev.bottom
margin-top: 10
anchors.left: parent.left
anchors.right: parent.right
Button
id: buttonClose
anchors.right: parent.right
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Close
Button
id: buttonApply
anchors.right: prev.left
margin-right: 5
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Apply
Button
id: buttonOk
anchors.right: prev.left
margin-right: 5
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Ok

View File

@@ -1,30 +1,37 @@
SideActionButton < Panel
SideActionButton < UIButton
font: cipsoftFont
height: 40
padding: 1 1 1 1
$first:
margin-top: -4
$!first:
margin-top: -1
height: 36
padding: 1
margin-top: 1
Item
id: item
anchors.fill: parent
padding: 1
&selectable: true
&editable: false
virtual: true
border-width: 1
border-color: #00000000
$!on:
image-source: /images/game/actionbarslot
image-source: /images/game/actionbar/actionbarslot
image-color: #dfdfdf
image-clip: 0 0 34 34
image-border: 0
$on:
image-source: /images/ui/button
image-color: #dfdfdf
image-clip: 0 0 22 23
image-border: 3
$pressed on:
image-clip: 0 46 22 23
Label
id: text
anchors.fill: parent
anchors.fill: prev
text-auto-resize: true
text-wrap: true
phantom: true
@@ -35,7 +42,7 @@ SideActionButton < Panel
id: hotkeyLabel
anchors.top: parent.top
anchors.right: parent.right
margin: 2 3 3 3
margin: 3 4 3 3
text-auto-resize: true
text-wrap: false
phantom: true
@@ -43,103 +50,214 @@ SideActionButton < Panel
color: white
background: #292A2A
Label
id: parameterText
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
margin-bottom: -3
margin-left: 2
margin-right: 2
font: verdana-9px
color: white
text-align: center
UIProgressRect
id: cooldown
background: #585858AA
background: #101010aa
percent: 100
focusable: false
phantom: true
anchors.fill: parent
margin: 1 1 1 1
font: verdana-11px-rounded
color: white
TopSliders < Panel
size: 34 17
Button
id: prev
anchors.fill: parent
anchors.right: parent.horizontalCenter
@onClick: modules.game_actionbar.moveActionButtons(self)
$!on:
tooltip: No further action buttons in this direction
$on:
tooltip: Move to the previous action button
UIWidget
id: image
anchors.centerIn: parent
phantom: true
margin-left: 1
rotation: 90
$!on:
image-source: /images/game/actionbar/arrow-disabled
$on:
image-source: /images/game/actionbar/arrow
Button
id: first
anchors.fill: parent
anchors.left: parent.horizontalCenter
@onClick: modules.game_actionbar.moveActionButtons(self)
$!on:
tooltip: No further action buttons in this direction
$on:
tooltip: Move to the first action button
UIWidget
id: image
anchors.centerIn: parent
phantom: true
margin-left: 1
rotation: 90
$!on:
image-source: /images/game/actionbar/arrow-skip-disabled
$on:
image-source: /images/game/actionbar/arrow-skip
BottomSliders < Panel
size: 34 32
Button
id: lock
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 15
@onClick: modules.game_actionbar.changeLockState(self)
$!on:
tooltip: Action Bar Locked: You cannot assign actions to or switch actions on action buttons by "drag&drop".
$on:
tooltip: Action Bar Unlocked: You can assign actions to or switch actions on action buttons by "drag&drop".
UIWidget
id: image
anchors.centerIn: parent
phantom: true
margin-bottom: 1
$!on:
image-source: /images/game/actionbar/locked
$on:
image-source: /images/game/actionbar/unlocked
Button
id: next
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.horizontalCenter
height: 17
margin-right: 1
@onClick: modules.game_actionbar.moveActionButtons(self)
on: true
$!on:
tooltip: No further action buttons in this direction
$on:
tooltip: Move to the next action button
UIWidget
id: image
anchors.centerIn: parent
phantom: true
margin-top: 1
rotation: 270
on: true
$!on:
image-source: /images/game/actionbar/arrow-disabled
$on:
image-source: /images/game/actionbar/arrow
Button
id: last
anchors.top: parent.top
anchors.left: parent.horizontalCenter
anchors.right: parent.right
height: 17
@onClick: modules.game_actionbar.moveActionButtons(self)
on: true
$!on:
tooltip: No further action buttons in this direction
$on:
tooltip: Move to the last action button
UIWidget
id: image
anchors.centerIn: parent
phantom: true
margin-top: 1
rotation: 270
on: true
$!on:
image-source: /images/game/actionbar/arrow-skip-disabled
$on:
image-source: /images/game/actionbar/arrow-skip
Panel
id: actionBar
focusable: false
image-source: /images/ui/panel_side
image-border: 4
margin-top: -2
image-source: /images/ui/actionbar_background
image-border: 1
margin-top: -5
$on:
width: 40
width: 37
visible: true
$!on:
width: 0
visible: false
TabButton
id: prevButton
icon: /images/game/console/uparrow
anchors.left: parent.left
TopSliders
id: prevPanel
anchors.top: parent.top
anchors.right: parent.right
margin-top: -1
margin-left: 1
margin-right: 1
anchors.horizontalCenter: parent.horizontalCenter
margin-top: 1
Panel
ScrollablePanel
id: tabBar
anchors.top: prev.bottom
anchors.right: parent.right
anchors.bottom: nextPanel.top
anchors.left: parent.left
anchors.bottom: next.top
margin-top: 3
anchors.right: parent.right
margin-top: 2
margin-bottom: 4
clipping: true
padding-left: 1
vertical-scrollbar: actionScroll
layout: verticalBox
TabButton
id: nextButton
icon: /images/game/console/downarrow
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
margin-right: 1
margin-left: 1
margin-bottom: 2
ActionAssignWindow < MainWindow
id: assignWindow
!text: tr('Button Assign')
size: 360 150
@onEscape: self:destroy()
Label
!text: tr('Please, press the key you wish to use for action')
anchors.left: parent.left
anchors.right: parent.right
VerticalScrollBar
id: actionScroll
anchors.top: parent.top
text-auto-resize: true
text-align: left
anchors.bottom: parent.bottom
anchors.right: parent.right
step: 37
pixels-scroll: true
visible: false
Label
id: comboPreview
!text: tr('Current action hotkey: %s', 'none')
BottomSliders
id: nextPanel
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: prev.bottom
margin-top: 10
text-auto-resize: true
HorizontalSeparator
id: separator
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: next.top
margin-bottom: 10
Button
id: addButton
!text: tr('Add')
width: 64
anchors.right: next.left
anchors.bottom: parent.bottom
margin-right: 10
Button
id: cancelButton
!text: tr('Cancel')
width: 64
anchors.right: parent.right
anchors.bottom: parent.bottom
@onClick: self:getParent():destroy()
margin-bottom: 3

View File

@@ -0,0 +1,150 @@
SpellPreview < UICheckBox
height: 34
text-wrap: true
multi-line: true
focusable: true
text-offset: 38 2
image-source:
change-cursor-image: false
$hover !disabled:
color: #ffffff
$!checked:
background-color: alpha
$checked:
background-color: #ffffff22
$disabled:
image-color: #dfdfdf88
color: #dfdfdf88
opacity: 0.8
UIWidget
id: image
anchors.left: parent.left
anchors.top: parent.top
phantom: true
padding: 1
size: 34 34
MainWindow
id: assignSpellWindow
size: 275 310
@onEscape: self:destroy()
SpellPreview
id: preview
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
focusable: false
$!checked:
background-color: alpha
$checked:
background-color: alpha
HorizontalSeparator
anchors.top: prev.bottom
margin-top: 10
anchors.left: parent.left
anchors.right: parent.right
TextList
id: spellList
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
margin-top: 10
height: 120
padding: 1
focusable: false
vertical-scrollbar: listScrollBar
background-color: #484848
VerticalScrollBar
id: listScrollBar
anchors.top: spellList.top
anchors.right: spellList.right
margin-right: 1
anchors.bottom: spellList.bottom
step: 14
pixels-scroll: true
FlatPanel
id: checkPanel
anchors.top: spellList.bottom
margin-top: 8
anchors.left: parent.left
anchors.right: parent.right
height: 20
CheckBox
id: tick
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
margin-left: 5
text: Only show vocation spells
checked: true
Label
id: paramLabel
anchors.top: prev.bottom
margin-top: 5
anchors.left: parent.left
text: Parameter:
height: 20
text-horizontal-auto-resize: true
text-offset: 0 3
on: false
$on:
color: white
$!on:
color: #c0c0c0
TextEdit
id: paramText
anchors.top: prev.top
anchors.bottom: prev.bottom
anchors.right: parent.right
anchors.left: prev.right
margin-left: 5
enabled: false
HorizontalSeparator
anchors.top: prev.bottom
margin-top: 10
anchors.left: parent.left
anchors.right: parent.right
Button
id: buttonClose
anchors.right: parent.right
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Close
Button
id: buttonApply
anchors.right: prev.left
margin-right: 5
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Apply
Button
id: buttonOk
anchors.right: prev.left
margin-right: 5
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Ok

View File

@@ -0,0 +1,66 @@
MainWindow
id: assignTextWindow
size: 275 150
text: Assign Text
Label
anchors.top: parent.top
anchors.left: parent.left
text: Text:
text-horizontal-auto-resize: true
TextEdit
id: text
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
margin-top: 5
FlatPanel
id: checkPanel
anchors.top: prev.bottom
margin-top: 5
anchors.left: parent.left
anchors.right: parent.right
height: 20
CheckBox
id: tick
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
margin-left: 5
text: Send automatically
checked: true
HorizontalSeparator
anchors.top: prev.bottom
margin-top: 10
anchors.left: parent.left
anchors.right: parent.right
Button
id: buttonClose
anchors.right: parent.right
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Close
Button
id: buttonApply
anchors.right: prev.left
margin-right: 5
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Apply
Button
id: buttonOk
anchors.right: prev.left
margin-right: 5
anchors.bottom: parent.bottom
size: 45 21
font: cipsoftFont
text: Ok