mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-04-29 10:49:21 +02:00
Updated to OTCv8 3.1 rev 157
This commit is contained in:
parent
1d7d2f0c2b
commit
19fad11949
Binary file not shown.
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 12 KiB |
476
data/styles/40-outfitwindow.otui
Normal file
476
data/styles/40-outfitwindow.otui
Normal file
@ -0,0 +1,476 @@
|
||||
PartCheckBoxes < Panel
|
||||
height: 18
|
||||
|
||||
ButtonBox
|
||||
id: head
|
||||
font: cipsoftFont
|
||||
!text: tr('Head')
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
checked: true
|
||||
width: 62
|
||||
height: 18
|
||||
|
||||
ButtonBox
|
||||
id: primary
|
||||
font: cipsoftFont
|
||||
!text: tr('Primary')
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.left: prev.right
|
||||
width: 62
|
||||
height: 18
|
||||
|
||||
ButtonBox
|
||||
id: secondary
|
||||
font: cipsoftFont
|
||||
!text: tr('Secondary')
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.left: prev.right
|
||||
width: 62
|
||||
height: 18
|
||||
|
||||
ButtonBox
|
||||
id: detail
|
||||
font: cipsoftFont
|
||||
!text: tr('Detail')
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.left: prev.right
|
||||
width: 62
|
||||
height: 18
|
||||
|
||||
ButtonBox
|
||||
id: randomizeButton
|
||||
font: cipsoftFont
|
||||
!text: tr('Randomize')
|
||||
!tooltip: tr('Randomize characters outfit')
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.left: prev.right
|
||||
width: 62
|
||||
height: 18
|
||||
@onClick: modules.game_outfit.randomize()
|
||||
|
||||
AppearanceCategory < Panel
|
||||
height: 20
|
||||
|
||||
$!first:
|
||||
margin-top: 2
|
||||
|
||||
CheckBox
|
||||
id: checkBox
|
||||
image-source: /images/ui/checkbox_round
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
margin-left: 5
|
||||
width: 90
|
||||
text: Outfit:
|
||||
@onClick: modules.game_outfit.onOptionChange(self:getParent():getId(), self:isChecked(), self)
|
||||
|
||||
FlatLabel
|
||||
id: description
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.left: prev.right
|
||||
anchors.right: parent.right
|
||||
margin-right: 5
|
||||
text-align: center
|
||||
text: -
|
||||
|
||||
WindowPanel < Panel
|
||||
image-source: /images/ui/window
|
||||
image-border: 6
|
||||
image-border-top: 27
|
||||
padding: 5
|
||||
padding-top: 8
|
||||
|
||||
OptionsCheckBox < Panel
|
||||
image-source: /images/ui/panel_flat
|
||||
image-border: 1
|
||||
padding: 2
|
||||
padding-left: 7
|
||||
height: 22
|
||||
|
||||
CheckBox
|
||||
id: check
|
||||
anchors.centerIn: parent
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text-align: left
|
||||
@onCheckChange: modules.game_outfit.onOptionChange(self:getParent():getId(), self:isChecked(), self)
|
||||
|
||||
$!first:
|
||||
margin-top: 3
|
||||
|
||||
PreviewCreaturePanel < FlatPanel
|
||||
padding: 3
|
||||
|
||||
Button
|
||||
id: rotateLeft
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
size: 20 20
|
||||
text: <
|
||||
@onClick: modules.game_outfit.rotatePreview(self:getId())
|
||||
|
||||
Button
|
||||
id: rotateRight
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
size: 20 20
|
||||
text: >
|
||||
@onClick: modules.game_outfit.rotatePreview(self:getId())
|
||||
|
||||
UICreature
|
||||
id: creature
|
||||
size: 100 100
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
ConfigurePanel < WindowPanel
|
||||
width: 150
|
||||
padding: 3
|
||||
|
||||
Label
|
||||
id: title
|
||||
margin-top: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
font: verdana-11px-rounded
|
||||
text: Configure
|
||||
|
||||
Panel
|
||||
id: options
|
||||
anchors.fill: parent
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 1
|
||||
padding: 5
|
||||
layout: verticalBox
|
||||
|
||||
SmallPreviewTile < UICheckBox
|
||||
padding: 5
|
||||
@onClick: modules.game_outfit.onElementSelect(self)
|
||||
image-source: /images/ui/button
|
||||
image-color: #dfdfdf
|
||||
image-clip: 0 0 22 23
|
||||
image-border: 10
|
||||
opacity: 1.0
|
||||
|
||||
$pressed:
|
||||
image-clip: 0 46 22 23
|
||||
|
||||
$hover:
|
||||
opacity: 0.75
|
||||
|
||||
UICreature
|
||||
id: creature
|
||||
size: 60 60
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
phantom: true
|
||||
creature-fixed-size: true
|
||||
|
||||
UIWidget
|
||||
id: item
|
||||
anchors.fill: prev
|
||||
phantom: true
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text-align: center
|
||||
font: verdana-11px-rounded
|
||||
|
||||
$checked:
|
||||
border-width: 1
|
||||
border-color: #ffffff
|
||||
|
||||
$!checked:
|
||||
border-width: 0
|
||||
|
||||
LargePreviewTile < UICheckBox
|
||||
padding: 15 15 2 15
|
||||
@onClick: modules.game_outfit.onElementSelect(self)
|
||||
image-source: /images/ui/button
|
||||
image-color: #dfdfdf
|
||||
image-clip: 0 0 22 23
|
||||
image-border: 10
|
||||
opacity: 1.0
|
||||
|
||||
$pressed:
|
||||
image-clip: 0 46 22 23
|
||||
|
||||
UICreature
|
||||
id: outfit
|
||||
size: 60 60
|
||||
anchors.left: parent.left
|
||||
margin-left: 10
|
||||
anchors.top: parent.top
|
||||
phantom: true
|
||||
|
||||
UICreature
|
||||
id: mount
|
||||
size: 60 60
|
||||
anchors.right: parent.right
|
||||
margin-right: 10
|
||||
anchors.top: parent.top
|
||||
phantom: true
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text-align: center
|
||||
font: verdana-11px-rounded
|
||||
|
||||
$checked:
|
||||
border-width: 1
|
||||
border-color: #ffffff
|
||||
|
||||
$!checked:
|
||||
border-width: 0
|
||||
|
||||
FilterPanel < WindowPanel
|
||||
size: 242 56
|
||||
padding-left: 10
|
||||
padding-right: 10
|
||||
padding-bottom: 8
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text-align: center
|
||||
anchors.top: parent.top
|
||||
font: verdana-11px-rounded
|
||||
text: Filter outfits
|
||||
|
||||
Button
|
||||
id: clear
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
size: 20 20
|
||||
text: X
|
||||
@onClick: modules.game_outfit.clearFilterText()
|
||||
|
||||
TextEdit
|
||||
id: filterWindow
|
||||
anchors.right: prev.left
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
height: 20
|
||||
placeholder: Type to search
|
||||
placehoder-color: black
|
||||
@onTextChange: modules.game_outfit.onFilterList(self:getText())
|
||||
|
||||
PresetPanel < WindowPanel
|
||||
size: 242 47
|
||||
padding-left: 2
|
||||
padding-bottom: 2
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
font: verdana-11px-rounded
|
||||
text: Manage Presets
|
||||
|
||||
Button
|
||||
id: new
|
||||
size: 45 18
|
||||
font: cipsoftFont
|
||||
text: New
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin-bottom: 6
|
||||
margin-left: 25
|
||||
@onClick: modules.game_outfit.onPresetButtonPress(self:getId())
|
||||
|
||||
Button
|
||||
id: rename
|
||||
size: 45 18
|
||||
font: cipsoftFont
|
||||
text: Rename
|
||||
anchors.left: prev.right
|
||||
margin-left: 3
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
@onClick: modules.game_outfit.onPresetButtonPress(self:getId())
|
||||
|
||||
|
||||
Button
|
||||
id: save
|
||||
size: 45 18
|
||||
font: cipsoftFont
|
||||
text: Save
|
||||
anchors.left: prev.right
|
||||
margin-left: 3
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
@onClick: modules.game_outfit.onPresetButtonPress(self:getId())
|
||||
|
||||
Button
|
||||
id: delete
|
||||
size: 45 18
|
||||
font: cipsoftFont
|
||||
text: Delete
|
||||
anchors.left: prev.right
|
||||
margin-left: 3
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
@onClick: modules.game_outfit.onPresetButtonPress(self:getId())
|
||||
|
||||
PreviewPanel < WindowPanel
|
||||
size: 477 205
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
font: verdana-11px-rounded
|
||||
text: Preview Selection
|
||||
|
||||
FlatPanel
|
||||
id: options
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin: 3
|
||||
margin-top: 19
|
||||
padding: 5
|
||||
width: 120
|
||||
layout: verticalBox
|
||||
|
||||
Label
|
||||
font: verdana-11px-rounded
|
||||
text-align: center
|
||||
text: Show:
|
||||
|
||||
PreviewCreaturePanel
|
||||
id: creaturePanel
|
||||
margin: 3
|
||||
margin-top: 19
|
||||
anchors.fill: parent
|
||||
anchors.left: prev.right
|
||||
|
||||
AppearancePanel < WindowPanel
|
||||
layout:
|
||||
type: verticalBox
|
||||
fit-children: true
|
||||
|
||||
Panel
|
||||
id: categories
|
||||
margin-top: 20
|
||||
layout:
|
||||
type: verticalBox
|
||||
fit-children: true
|
||||
|
||||
PartCheckBoxes
|
||||
id: parts
|
||||
margin-top: 3
|
||||
margin-left: 7
|
||||
|
||||
Panel
|
||||
id: colorBoxPanel
|
||||
padding: 2 2 2 5
|
||||
layout:
|
||||
type: grid
|
||||
cell-size: 14 14
|
||||
cell-spacing: 2
|
||||
num-columns: 19
|
||||
num-lines: 7
|
||||
fit-children: true
|
||||
|
||||
ListBox < ScrollableFlatPanel
|
||||
width: 242
|
||||
padding-top: 6
|
||||
padding-left: 6
|
||||
padding-bottom: 6
|
||||
layout:
|
||||
type: grid
|
||||
num-columns: 2
|
||||
cell-size: 106 100
|
||||
cell-spacing: 6
|
||||
flow: true
|
||||
|
||||
OutfitWindow < MainWindow
|
||||
size: 760 519
|
||||
padding-top: 35
|
||||
!text: tr('Customize Character')
|
||||
|
||||
FilterPanel
|
||||
id: search
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
|
||||
PresetPanel
|
||||
id: preset
|
||||
anchors.fill: prev
|
||||
visible: false
|
||||
|
||||
ListBox
|
||||
id: list
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 5
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: bottomSep.top
|
||||
margin-bottom: 5
|
||||
vertical-scrollbar: scrollBar
|
||||
|
||||
VerticalScrollBar
|
||||
id: scrollBar
|
||||
anchors.top: list.top
|
||||
anchors.bottom: list.bottom
|
||||
anchors.right: list.right
|
||||
step: 14
|
||||
pixels-scroll: true
|
||||
|
||||
PreviewPanel
|
||||
id: preview
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
|
||||
ConfigurePanel
|
||||
id: config
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 5
|
||||
anchors.bottom: bottomSep.top
|
||||
margin-bottom: 5
|
||||
anchors.left: parent.left
|
||||
|
||||
AppearancePanel
|
||||
id: appearance
|
||||
anchors.left: prev.right
|
||||
anchors.top: preview.bottom
|
||||
anchors.right: preview.right
|
||||
margin: 5 0 5 5
|
||||
|
||||
Label
|
||||
anchors.top: prev.top
|
||||
margin-top: 8
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
font: verdana-11px-rounded
|
||||
text: Change Appearance
|
||||
|
||||
HorizontalSeparator
|
||||
id: bottomSep
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: closeButton.top
|
||||
margin-bottom: 8
|
||||
|
||||
Button
|
||||
id: closeButton
|
||||
!text: tr('Cancel')
|
||||
font: cipsoftFont
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
size: 45 21
|
||||
@onClick: modules.game_outfit.destroy()
|
||||
|
||||
Button
|
||||
id: okButton
|
||||
!text: tr('Ok')
|
||||
font: cipsoftFont
|
||||
anchors.right: prev.left
|
||||
margin-right: 7
|
||||
anchors.bottom: parent.bottom
|
||||
size: 45 21
|
||||
@onClick: modules.game_outfit.accept()
|
467
layouts/retro/styles/40-outfitwindow.otui
Normal file
467
layouts/retro/styles/40-outfitwindow.otui
Normal file
@ -0,0 +1,467 @@
|
||||
PartCheckBoxes < Panel
|
||||
height: 18
|
||||
|
||||
ButtonBox
|
||||
id: head
|
||||
font: cipsoftFont
|
||||
!text: tr('Head')
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
checked: true
|
||||
width: 62
|
||||
height: 18
|
||||
|
||||
ButtonBox
|
||||
id: primary
|
||||
font: cipsoftFont
|
||||
!text: tr('Primary')
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.left: prev.right
|
||||
width: 62
|
||||
height: 18
|
||||
|
||||
ButtonBox
|
||||
id: secondary
|
||||
font: cipsoftFont
|
||||
!text: tr('Secondary')
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.left: prev.right
|
||||
width: 62
|
||||
height: 18
|
||||
|
||||
ButtonBox
|
||||
id: detail
|
||||
font: cipsoftFont
|
||||
!text: tr('Detail')
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.left: prev.right
|
||||
width: 62
|
||||
height: 18
|
||||
|
||||
ButtonBox
|
||||
id: randomizeButton
|
||||
font: cipsoftFont
|
||||
!text: tr('Randomize')
|
||||
!tooltip: tr('Randomize characters outfit')
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.left: prev.right
|
||||
width: 62
|
||||
height: 18
|
||||
@onClick: modules.game_outfit.randomize()
|
||||
|
||||
AppearanceCategory < Panel
|
||||
height: 20
|
||||
|
||||
$!first:
|
||||
margin-top: 2
|
||||
|
||||
CheckBox
|
||||
id: checkBox
|
||||
image-source: /images/ui/checkbox_round
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
margin-left: 5
|
||||
width: 90
|
||||
text: Outfit:
|
||||
@onClick: modules.game_outfit.onOptionChange(self:getParent():getId(), self:isChecked(), self)
|
||||
|
||||
FlatLabel
|
||||
id: description
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.left: prev.right
|
||||
anchors.right: parent.right
|
||||
margin-right: 5
|
||||
text-align: center
|
||||
text: -
|
||||
|
||||
WindowPanel < Panel
|
||||
image-source: /images/ui/window
|
||||
padding-top: 3
|
||||
padding-left: 7
|
||||
padding-bottom: 7
|
||||
padding-right: 7
|
||||
image-border: 4
|
||||
image-border-top: 17
|
||||
|
||||
OptionsCheckBox < Panel
|
||||
image-source: /images/ui/panel_flat
|
||||
image-border: 1
|
||||
padding: 2
|
||||
padding-left: 7
|
||||
height: 22
|
||||
|
||||
CheckBox
|
||||
id: check
|
||||
anchors.centerIn: parent
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text-align: left
|
||||
@onCheckChange: modules.game_outfit.onOptionChange(self:getParent():getId(), self:isChecked(), self)
|
||||
|
||||
$!first:
|
||||
margin-top: 3
|
||||
|
||||
PreviewCreaturePanel < FlatPanel
|
||||
padding: 3
|
||||
|
||||
Button
|
||||
id: rotateLeft
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
size: 20 20
|
||||
text: <
|
||||
@onClick: modules.game_outfit.rotatePreview(self:getId())
|
||||
|
||||
Button
|
||||
id: rotateRight
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
size: 20 20
|
||||
text: >
|
||||
@onClick: modules.game_outfit.rotatePreview(self:getId())
|
||||
|
||||
UICreature
|
||||
id: creature
|
||||
size: 100 100
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
ConfigurePanel < WindowPanel
|
||||
width: 150
|
||||
padding: 3
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
font: verdana-11px-rounded
|
||||
text: Configure
|
||||
|
||||
Panel
|
||||
id: options
|
||||
anchors.fill: parent
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 1
|
||||
padding: 5
|
||||
layout: verticalBox
|
||||
|
||||
SmallPreviewTile < UICheckBox
|
||||
padding: 5
|
||||
image-source: /images/ui/button
|
||||
@onClick: modules.game_outfit.onElementSelect(self)
|
||||
image-clip: 0 0 22 23
|
||||
image-border: 3
|
||||
|
||||
$pressed:
|
||||
image-clip: 0 46 22 23
|
||||
|
||||
UICreature
|
||||
id: creature
|
||||
size: 60 60
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
phantom: true
|
||||
creature-fixed-size: true
|
||||
|
||||
UIWidget
|
||||
id: item
|
||||
anchors.fill: prev
|
||||
phantom: true
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text-align: center
|
||||
font: verdana-11px-rounded
|
||||
|
||||
$checked:
|
||||
border-width: 1
|
||||
border-color: #ffffff
|
||||
|
||||
$!checked:
|
||||
border-width: 0
|
||||
|
||||
LargePreviewTile < UICheckBox
|
||||
padding: 15
|
||||
padding-bottom: 2
|
||||
image-source: /images/ui/button
|
||||
@onClick: modules.game_outfit.onElementSelect(self)
|
||||
image-clip: 0 0 22 23
|
||||
image-border: 3
|
||||
|
||||
$pressed:
|
||||
image-clip: 0 46 22 23
|
||||
|
||||
UICreature
|
||||
id: outfit
|
||||
size: 60 60
|
||||
anchors.left: parent.left
|
||||
margin-left: 10
|
||||
anchors.top: parent.top
|
||||
phantom: true
|
||||
|
||||
UICreature
|
||||
id: mount
|
||||
size: 60 60
|
||||
anchors.right: parent.right
|
||||
margin-right: 10
|
||||
anchors.top: parent.top
|
||||
phantom: true
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text-align: center
|
||||
font: verdana-11px-rounded
|
||||
|
||||
$checked:
|
||||
border-width: 1
|
||||
border-color: #ffffff
|
||||
|
||||
$!checked:
|
||||
border-width: 0
|
||||
|
||||
FilterPanel < WindowPanel
|
||||
size: 242 47
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text-align: center
|
||||
anchors.top: parent.top
|
||||
font: verdana-11px-rounded
|
||||
text: Filter outfits
|
||||
|
||||
Button
|
||||
id: clear
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
size: 20 20
|
||||
text: X
|
||||
@onClick: modules.game_outfit.clearFilterText()
|
||||
|
||||
TextEdit
|
||||
id: filterWindow
|
||||
anchors.right: prev.left
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
height: 20
|
||||
placeholder: Type to search
|
||||
@onTextChange: modules.game_outfit.onFilterList(self:getText())
|
||||
|
||||
PresetPanel < WindowPanel
|
||||
size: 242 47
|
||||
padding-left: 2
|
||||
padding-bottom: 2
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
font: verdana-11px-rounded
|
||||
text: Manage Presets
|
||||
|
||||
Button
|
||||
id: new
|
||||
size: 45 18
|
||||
font: cipsoftFont
|
||||
text: New
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin-bottom: 6
|
||||
margin-left: 25
|
||||
@onClick: modules.game_outfit.onPresetButtonPress(self:getId())
|
||||
|
||||
Button
|
||||
id: rename
|
||||
size: 45 18
|
||||
font: cipsoftFont
|
||||
text: Rename
|
||||
anchors.left: prev.right
|
||||
margin-left: 3
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
@onClick: modules.game_outfit.onPresetButtonPress(self:getId())
|
||||
|
||||
|
||||
Button
|
||||
id: save
|
||||
size: 45 18
|
||||
font: cipsoftFont
|
||||
text: Save
|
||||
anchors.left: prev.right
|
||||
margin-left: 3
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
@onClick: modules.game_outfit.onPresetButtonPress(self:getId())
|
||||
|
||||
Button
|
||||
id: delete
|
||||
size: 45 18
|
||||
font: cipsoftFont
|
||||
text: Delete
|
||||
anchors.left: prev.right
|
||||
margin-left: 3
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
@onClick: modules.game_outfit.onPresetButtonPress(self:getId())
|
||||
|
||||
PreviewPanel < WindowPanel
|
||||
size: 477 205
|
||||
|
||||
Label
|
||||
id: title
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
font: verdana-11px-rounded
|
||||
text: Preview Selection
|
||||
|
||||
FlatPanel
|
||||
id: options
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin: 3
|
||||
margin-top: 19
|
||||
padding: 5
|
||||
width: 120
|
||||
layout: verticalBox
|
||||
|
||||
Label
|
||||
font: verdana-11px-rounded
|
||||
text-align: center
|
||||
text: Show:
|
||||
|
||||
PreviewCreaturePanel
|
||||
id: creaturePanel
|
||||
margin: 3
|
||||
margin-top: 19
|
||||
anchors.fill: parent
|
||||
anchors.left: prev.right
|
||||
|
||||
AppearancePanel < WindowPanel
|
||||
layout:
|
||||
type: verticalBox
|
||||
fit-children: true
|
||||
|
||||
Panel
|
||||
id: categories
|
||||
margin-top: 20
|
||||
layout:
|
||||
type: verticalBox
|
||||
fit-children: true
|
||||
|
||||
PartCheckBoxes
|
||||
id: parts
|
||||
margin-top: 10
|
||||
|
||||
FlatPanel
|
||||
id: colorBoxPanel
|
||||
margin-top: 2
|
||||
padding: 2
|
||||
layout:
|
||||
type: grid
|
||||
cell-size: 14 14
|
||||
cell-spacing: 2
|
||||
num-columns: 19
|
||||
num-lines: 7
|
||||
fit-children: true
|
||||
|
||||
ListBox < ScrollableFlatPanel
|
||||
width: 242
|
||||
padding-top: 6
|
||||
padding-left: 6
|
||||
padding-bottom: 6
|
||||
layout:
|
||||
type: grid
|
||||
num-columns: 2
|
||||
cell-size: 106 100
|
||||
cell-spacing: 6
|
||||
flow: true
|
||||
|
||||
OutfitWindow < MainWindow
|
||||
size: 755 519
|
||||
padding-top: 27
|
||||
!text: tr('Customize Character')
|
||||
|
||||
FilterPanel
|
||||
id: search
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
|
||||
PresetPanel
|
||||
id: preset
|
||||
anchors.fill: prev
|
||||
visible: false
|
||||
|
||||
ListBox
|
||||
id: list
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 5
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: bottomSep.top
|
||||
margin-bottom: 5
|
||||
vertical-scrollbar: scrollBar
|
||||
|
||||
VerticalScrollBar
|
||||
id: scrollBar
|
||||
anchors.top: list.top
|
||||
anchors.bottom: list.bottom
|
||||
anchors.right: list.right
|
||||
step: 14
|
||||
pixels-scroll: true
|
||||
|
||||
PreviewPanel
|
||||
id: preview
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
|
||||
ConfigurePanel
|
||||
id: config
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 5
|
||||
anchors.bottom: bottomSep.top
|
||||
margin-bottom: 5
|
||||
anchors.left: parent.left
|
||||
|
||||
AppearancePanel
|
||||
id: appearance
|
||||
anchors.left: prev.right
|
||||
anchors.top: preview.bottom
|
||||
anchors.right: list.left
|
||||
margin: 5
|
||||
|
||||
Label
|
||||
anchors.top: prev.top
|
||||
margin-top: 3
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
font: verdana-11px-rounded
|
||||
text: Change Appearance
|
||||
|
||||
HorizontalSeparator
|
||||
id: bottomSep
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: closeButton.top
|
||||
margin-bottom: 8
|
||||
|
||||
Button
|
||||
id: closeButton
|
||||
!text: tr('Cancel')
|
||||
font: cipsoftFont
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
size: 45 21
|
||||
@onClick: modules.game_outfit.destroy()
|
||||
|
||||
Button
|
||||
id: okButton
|
||||
!text: tr('Ok')
|
||||
font: cipsoftFont
|
||||
anchors.right: prev.left
|
||||
margin-right: 7
|
||||
anchors.bottom: parent.bottom
|
||||
size: 45 21
|
||||
@onClick: modules.game_outfit.accept()
|
@ -1,4 +1,3 @@
|
||||
---@diagnostic disable: undefined-global
|
||||
bottomActionPanel1 = nil
|
||||
bottomActionPanel2 = nil
|
||||
bottomActionPanel3 = nil
|
||||
@ -235,8 +234,6 @@ function setupAction(action)
|
||||
local chatMode = not modules.game_walking.wsadWalking
|
||||
|
||||
if not lockKeyboard or not chatMode then
|
||||
print('lock', lockKeyboard)
|
||||
print('chatMode', chatMode)
|
||||
executeAction(action, ticks)
|
||||
end
|
||||
end
|
||||
|
@ -1,17 +1,9 @@
|
||||
ActionButton < Panel
|
||||
font: cipsoftFont
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: 40
|
||||
padding: 1 1 1 1
|
||||
margin-left: 1
|
||||
draggable: true
|
||||
|
||||
$first:
|
||||
anchors.left: parent.left
|
||||
|
||||
$!first:
|
||||
anchors.left: prev.right
|
||||
|
||||
Item
|
||||
id: item
|
||||
@ -91,6 +83,7 @@ Panel
|
||||
anchors.right: next.left
|
||||
margin-right: 3
|
||||
clipping: true
|
||||
layout: horizontalBox
|
||||
|
||||
TabButton
|
||||
id: nextButton
|
||||
|
@ -1,18 +1,13 @@
|
||||
SideActionButton < Panel
|
||||
font: cipsoftFont
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 40
|
||||
padding: 1 1 1 1
|
||||
margin-top: 1
|
||||
draggable: true
|
||||
|
||||
$first:
|
||||
anchors.top: parent.top
|
||||
margin-top: -3
|
||||
margin-top: -4
|
||||
|
||||
$!first:
|
||||
anchors.top: prev.bottom
|
||||
margin-top: -1
|
||||
|
||||
Item
|
||||
id: item
|
||||
@ -92,6 +87,7 @@ Panel
|
||||
anchors.bottom: next.top
|
||||
margin-top: 3
|
||||
clipping: true
|
||||
layout: verticalBox
|
||||
|
||||
TabButton
|
||||
id: nextButton
|
||||
|
@ -1,14 +0,0 @@
|
||||
setDefaultTab("Tools")
|
||||
local m = macro(1000, "AntiRS & Msg", function() end)
|
||||
|
||||
local frags = 0
|
||||
onTextMessage(function(mode, text)
|
||||
if not m.isOn() then return end
|
||||
if not text:find("Warning! The murder of") then return end
|
||||
say("Don't bother, I have anti-rs and shit EQ. Don't waste our time.")
|
||||
frags = frags + 1
|
||||
if killsToRs() < 6 or frags > 1 then
|
||||
g_game.stop()
|
||||
modules.game_interface.forceExit()
|
||||
end
|
||||
end)
|
@ -1,159 +0,0 @@
|
||||
Container = {}
|
||||
|
||||
--- returns all open containers
|
||||
-- @return table
|
||||
function Container:getAll() return getContainers() end
|
||||
|
||||
--- gets first open container
|
||||
-- @return userdata
|
||||
function Container:getFirst() return getContainers()[1] end
|
||||
|
||||
--- gets last open container
|
||||
-- @return userdata
|
||||
function Container:getLast() return getContainers()[#getContainers()] end
|
||||
|
||||
-- returns open containers count
|
||||
-- @return number
|
||||
function Container:getOpenContainersCount() return #getContainers() end
|
||||
|
||||
--- returns given container item id
|
||||
-- @param container is userdata
|
||||
-- @return number
|
||||
function Container:getItemId() end
|
||||
|
||||
--- closes all open container windows
|
||||
-- @return void
|
||||
function Container:closeAllContainers()
|
||||
for i, container in ipairs(Container:getContainers()) do
|
||||
container:close()
|
||||
end
|
||||
end
|
||||
|
||||
--- checks if container has any free slots
|
||||
-- @param container is userdata
|
||||
-- @return boolean
|
||||
function Container:isFull(container)
|
||||
return container:getCapacity() > #container:getItems()
|
||||
end
|
||||
|
||||
--- returns free slots count in given container
|
||||
-- @param container is userdata
|
||||
-- @return number
|
||||
function Container:getFreeSlots(container)
|
||||
return #container:getItems() - container:getCapacity()
|
||||
end
|
||||
|
||||
--- returns first free slot position
|
||||
-- @param container is userdata
|
||||
-- @return table
|
||||
function Container:getFreeSlotPosition(container)
|
||||
return container:getSlotPosition(container:getItems())
|
||||
end
|
||||
|
||||
--- opens given container parent
|
||||
-- @param container is userdata
|
||||
-- @return void
|
||||
function Container:openParent(container) g_game.openParent(container) end
|
||||
|
||||
--- finds open container object based on the id
|
||||
-- @param itemId is number
|
||||
-- @return userdata
|
||||
function Container:getContainerByItemId(itemId)
|
||||
|
||||
for i, container in ipairs(getContainers()) do
|
||||
local cId = container:getContainerItem():getId()
|
||||
if cId == itemId then return container end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- finds open container object based on the name
|
||||
-- @param name is string
|
||||
-- @return userdata
|
||||
function Container:getContainerByName(name)
|
||||
name = name:lower():trim()
|
||||
|
||||
for i, container in ipairs(getContainers()) do
|
||||
local cName = container:getName():lower()
|
||||
if cName == name then return container end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- checks if given container is declared as loot container in TargetBot
|
||||
-- @param container is userdata / integer / string
|
||||
-- @returns boolean
|
||||
function Container:isLootContainer(container)
|
||||
local id
|
||||
|
||||
if type(container) == "number" then
|
||||
id = container
|
||||
elseif type(container) == "string" then
|
||||
id = Container:getContainerByName(container)
|
||||
id = id and id:getContainerItem():getId()
|
||||
elseif type(container) == "userdata" then
|
||||
id = container:getContainerItem():getId()
|
||||
end
|
||||
|
||||
if not id then return false end
|
||||
|
||||
if table.find(vBot.lootConainers, id) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
--- returns the amount of open loot containers
|
||||
-- @return amount
|
||||
function Container:getOpenLootContainersCount()
|
||||
local amount = 0
|
||||
|
||||
for i, container in ipairs(getContainers()) do
|
||||
amount = Container:isLootContainer(container) and amount + 1 or amount
|
||||
end
|
||||
|
||||
return amount
|
||||
end
|
||||
|
||||
--- opens child container with the same id inside given one
|
||||
-- @param container is userdata
|
||||
-- @param newWindow is boolean
|
||||
-- @return void
|
||||
function Container:openChild(container, newWindow)
|
||||
local parentId = container:getContaierItem():getId()
|
||||
|
||||
for i, item in ipairs(container:getItems()) do
|
||||
local id = item:getId()
|
||||
|
||||
if id == parentId then
|
||||
return g_game.open(item, newWindow and container or nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- returns all items inside given container
|
||||
-- @param container is userdata
|
||||
-- @return table
|
||||
function Container:getItems(container) return container:getItems() end
|
||||
|
||||
--- checks if given container helds item with given id
|
||||
-- @param container is userdata
|
||||
-- @param id is number
|
||||
-- @return boolean
|
||||
function Container:hasItem(container, id)
|
||||
local isInsideContainer = false
|
||||
|
||||
for i, item in ipairs(container:getItems()) do
|
||||
if item:getId() == id then
|
||||
isInsideContainer = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
return isInsideContainer
|
||||
end
|
||||
|
||||
function Container:reOpenAllContainers()
|
||||
-- TODO, extract function from containers.lua
|
||||
end
|
@ -1,100 +0,0 @@
|
||||
Player = {}
|
||||
|
||||
--- opens main backpack
|
||||
-- @return void
|
||||
function Player:openMain()
|
||||
local back = getBack()
|
||||
|
||||
if back then g_game.open(back) end
|
||||
end
|
||||
|
||||
--- opens purse/store inbox slot
|
||||
-- @return void
|
||||
function Player:openPurse()
|
||||
local purse = getPurse()
|
||||
|
||||
if item then use(purse) end
|
||||
end
|
||||
|
||||
--- player says certain phrase or sequence
|
||||
-- @param text is string or table
|
||||
-- @param npc is boolean
|
||||
-- @return void
|
||||
function Player:speak(text, npc, wait)
|
||||
if type(text) == "string" then
|
||||
if npc then
|
||||
return NPC.say(text)
|
||||
else
|
||||
return say(text)
|
||||
end
|
||||
end
|
||||
|
||||
-- text is table, therefore sequence
|
||||
local talkDelay = 0
|
||||
local globalDelay = storage.extras.talkDelay
|
||||
|
||||
for i, string in ipairs(text) do
|
||||
|
||||
schedule(talkDelay, function()
|
||||
|
||||
if npc then
|
||||
return NPC.say(string)
|
||||
else
|
||||
return say(string)
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
talkDelay = talkDelay + globalDelay
|
||||
end
|
||||
if wait then delay( talkDelay + globalDelay ) end
|
||||
end
|
||||
|
||||
|
||||
function Player:getId()
|
||||
return player:getId()
|
||||
end
|
||||
|
||||
function Player:getName()
|
||||
return player:getName()
|
||||
end
|
||||
|
||||
function Player:getTarget()
|
||||
return g_game.getAttackingCreature()
|
||||
end
|
||||
|
||||
function Player:getTargetName()
|
||||
return Player:getTarget():getName()
|
||||
end
|
||||
|
||||
function Player:getTargetPosition()
|
||||
return Player:getTarget():getPosition()
|
||||
end
|
||||
|
||||
function Player:getDistanceFromTarget()
|
||||
return getDistanceBetween(Player:getPosition(), Player:getTargetPosition())
|
||||
end
|
||||
|
||||
function Player:getPosition()
|
||||
return player:getPosition()
|
||||
end
|
||||
|
||||
function Player:getLookDirection()
|
||||
return player:getDirection()
|
||||
end
|
||||
|
||||
function Player:getLookPosition(range)
|
||||
local dir = Player:getLookDirection()
|
||||
local pos = Player:getPosition()
|
||||
local n = range or 1
|
||||
if (dir == NORTH) then
|
||||
pos.y = pos.y - n
|
||||
elseif (dir == SOUTH) then
|
||||
pos.y = pos.y + n
|
||||
elseif (dir == WEST) then
|
||||
pos.x = pos.x - n
|
||||
elseif (dir == EAST) then
|
||||
pos.x = pos.x + n
|
||||
end
|
||||
return pos
|
||||
end
|
@ -1,111 +0,0 @@
|
||||
setDefaultTab("Tools")
|
||||
function quiverManager()
|
||||
local panelName = "quiverManager"
|
||||
|
||||
local ui = setupUI([[
|
||||
Panel
|
||||
height: 33
|
||||
margin-top: 2
|
||||
|
||||
BotItem
|
||||
id: BoltsID
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
|
||||
BotItem
|
||||
id: ArrowsID
|
||||
anchors.left: prev.right
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
|
||||
BotSwitch
|
||||
id: BoltsSwitch
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: prev.verticalCenter
|
||||
anchors.right: parent.right
|
||||
text: Sort Bolts
|
||||
|
||||
BotSwitch
|
||||
id: ArrowsSwitch
|
||||
anchors.top: prev.bottom
|
||||
anchors.bottom: ArrowsID.bottom
|
||||
anchors.right: parent.right
|
||||
text: Sort Arrows
|
||||
|
||||
]]
|
||||
)
|
||||
ui:setId(panelName)
|
||||
|
||||
if not storage[panelName] then
|
||||
storage[panelName] = {
|
||||
arrowsId = 35848,
|
||||
boltsId = 35849,
|
||||
bolts = false,
|
||||
arrows = false
|
||||
}
|
||||
end
|
||||
|
||||
local config = storage[panelName]
|
||||
|
||||
ui.BoltsSwitch:setOn(config.bolts)
|
||||
ui.BoltsSwitch.onClick = function(widget)
|
||||
config.bolts = not config.bolts
|
||||
widget:setOn(config.bolts)
|
||||
end
|
||||
ui.ArrowsSwitch:setOn(config.arrows)
|
||||
ui.ArrowsSwitch.onClick = function(widget)
|
||||
config.arrows = not config.arrows
|
||||
widget:setOn(config.arrows)
|
||||
end
|
||||
ui.BoltsID:setItemId(config.boltsId)
|
||||
ui.BoltsID.onItemChange = function(widget)
|
||||
config.boltsId = widget:getItemId()
|
||||
end
|
||||
ui.ArrowsID:setItemId(config.arrowsId)
|
||||
ui.ArrowsID.onItemChange = function(widget)
|
||||
config.arrowsId = widget:getItemId()
|
||||
end
|
||||
|
||||
local arrows = {16143, 763, 761, 7365, 3448, 762, 21470, 7364, 14251, 3447, 3449, 15793, 25757, 774, 35901}
|
||||
local bolts = {6528, 7363, 3450, 16141, 25758, 14252, 3446, 16142, 35902}
|
||||
|
||||
macro(100, function()
|
||||
local dArrow
|
||||
local dBolt
|
||||
for _, c in pairs(getContainers()) do
|
||||
if not containerIsFull(c) then
|
||||
if c:getContainerItem():getId() == config.arrowsId and config.arrows then
|
||||
dArrow = c
|
||||
elseif c:getContainerItem():getId() == config.boltsId and config.bolts then
|
||||
dBolt = c
|
||||
end
|
||||
end
|
||||
end
|
||||
for _, c in pairs(getContainers()) do
|
||||
if c:getName():lower():find("backpack") or c:getName():lower():find("bag") or c:getName():lower():find("chess") then
|
||||
for _, i in pairs(c:getItems()) do
|
||||
-- arrows
|
||||
if dArrow and config.arrows then
|
||||
if table.find(arrows, i:getId()) and c ~= dArrow then
|
||||
return g_game.move(i, dArrow:getSlotPosition(dArrow:getItemsCount()), i:getCount())
|
||||
end
|
||||
end
|
||||
-- bolts
|
||||
if dBolt and config.bolts then
|
||||
if table.find(bolts, i:getId()) and c ~= dBolt then
|
||||
return g_game.move(i, dBolt:getSlotPosition(dBolt:getItemsCount()), i:getCount())
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
delay(900)
|
||||
end)
|
||||
end
|
||||
|
||||
addSeparator()
|
||||
if voc() == 2 or voc() == 12 then
|
||||
UI.Label("[[ Quiver Manager ]]")
|
||||
addSeparator()
|
||||
quiverManager()
|
||||
addSeparator()
|
||||
end
|
@ -1 +0,0 @@
|
||||
4.41
|
@ -37,6 +37,7 @@ local luaFiles = {
|
||||
"Dropper",
|
||||
"Containers",
|
||||
"quiver_manager",
|
||||
"quiver_label",
|
||||
"tools",
|
||||
"antiRs",
|
||||
"depot_withdraw",
|
@ -1,7 +1,39 @@
|
||||
CaveBot.Actions = {}
|
||||
vBot.lastLabel = ""
|
||||
local oldTibia = g_game.getClientVersion() < 960
|
||||
|
||||
|
||||
-- antistuck f()
|
||||
local nextPos = nil
|
||||
local function modPos(dir)
|
||||
local y = 0
|
||||
local x = 0
|
||||
|
||||
if dir == 0 then
|
||||
y = -1
|
||||
elseif dir == 1 then
|
||||
x = 1
|
||||
elseif dir == 2 then
|
||||
y = 1
|
||||
elseif dir == 3 then
|
||||
x = -1
|
||||
elseif dir == 4 then
|
||||
y = -1
|
||||
x = 1
|
||||
elseif dir == 5 then
|
||||
y = 1
|
||||
x = 1
|
||||
elseif dir == 6 then
|
||||
y = 1
|
||||
x = -1
|
||||
elseif dir == 7 then
|
||||
y = -1
|
||||
x = -1
|
||||
end
|
||||
|
||||
return {x, y}
|
||||
end
|
||||
|
||||
local antiTrapTriggered = false
|
||||
-- it adds an action widget to list
|
||||
CaveBot.addAction = function(action, value, focus)
|
||||
action = action:lower()
|
||||
@ -176,27 +208,37 @@ CaveBot.registerAction("goto", "green", function(value, retries, prev)
|
||||
-- check if there's a path to destination but consider Creatures (attack only if trapped)
|
||||
local path2 = findPath(playerPos, pos, maxDist, { ignoreNonPathable = true, precision = 1 })
|
||||
if not path2 then
|
||||
local target = {} -- c = creature, d = distance
|
||||
for i, spec in pairs(getSpectators()) do
|
||||
local hppc = spec:getHealthPercent()
|
||||
if spec:isMonster() and (hppc and hppc > 0) then
|
||||
local path = findPath(playerPos, spec:getPosition(), 7, { ignoreNonPathable = true, precision = 1 })
|
||||
if path then
|
||||
local dist = getDistanceBetween(pos, spec:getPosition())
|
||||
if not target.d or target.d > dist then
|
||||
target = {c=spec, d=dist}
|
||||
local foundMonster = false
|
||||
for i, dir in ipairs(path) do
|
||||
local dirs = modPos(dir)
|
||||
nextPos = nextPos or playerPos
|
||||
nextPos.x = nextPos.x + dirs[1]
|
||||
nextPos.y = nextPos.y + dirs[2]
|
||||
|
||||
local tile = g_map.getTile(nextPos)
|
||||
if tile then
|
||||
if tile:hasCreature() then
|
||||
local creature = tile:getCreatures()[1]
|
||||
local hppc = creature:getHealthPercent()
|
||||
if creature:isMonster() and (hppc and hppc > 0) and (oldTibia or creature:getType() < 3) then
|
||||
-- real blocking creature can not meet those conditions - ie. it could be player, so just in case check if the next creature is reachable
|
||||
local path = findPath(playerPos, creature:getPosition(), 20, { ignoreNonPathable = true, precision = 1 })
|
||||
if path then
|
||||
foundMonster = true
|
||||
attack(creature)
|
||||
g_game.setChaseMode(1)
|
||||
CaveBot.setOff()
|
||||
CaveBot.delay(1000)
|
||||
schedule(1000, function() CaveBot.setOn() end)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if target.c then
|
||||
if target.c ~= getTarget() then
|
||||
attack(target.c)
|
||||
end
|
||||
g_game.setChaseMode(1)
|
||||
CaveBot.setOff()
|
||||
schedule(1000, function() CaveBot.setOn() end)
|
||||
else
|
||||
|
||||
nextPos = nil -- reset path
|
||||
if not foundMonster then
|
||||
foundMonster = false
|
||||
return false -- no other way
|
||||
end
|
||||
end
|
@ -125,6 +125,7 @@ CaveBot.Extensions.Depositor.setup = function()
|
||||
end
|
||||
|
||||
-- we gucci
|
||||
resetCache()
|
||||
return true
|
||||
end)
|
||||
|
@ -5,15 +5,16 @@ CaveBot.Extensions.SellAll.setup = function()
|
||||
CaveBot.registerAction("SellAll", "#C300FF", function(value, retries)
|
||||
local val = string.split(value, ",")
|
||||
local wait
|
||||
if #val > 2 then
|
||||
warn("CaveBot[SellAll]: incorrect sell all value!")
|
||||
return false
|
||||
|
||||
-- table formatting
|
||||
for i, v in ipairs(val) do
|
||||
v = v:trim()
|
||||
v = tonumber(v) or v
|
||||
val[i] = v
|
||||
end
|
||||
|
||||
if #val == 2 then
|
||||
if table.find(val, "yes", true) then
|
||||
wait = true
|
||||
else
|
||||
wait = false
|
||||
end
|
||||
|
||||
local npcName = val[1]
|
||||
@ -46,8 +47,8 @@ CaveBot.Extensions.SellAll.setup = function()
|
||||
sellAllCap = freecap()
|
||||
end
|
||||
|
||||
NPC.sellAll(wait)
|
||||
if #val == 2 then
|
||||
modules.game_npctrade.sellAll(wait, val)
|
||||
if wait then
|
||||
print("CaveBot[SellAll]: Sold All with delay")
|
||||
else
|
||||
print("CaveBot[SellAll]: Sold All without delay")
|
||||
@ -59,7 +60,6 @@ CaveBot.Extensions.SellAll.setup = function()
|
||||
CaveBot.Editor.registerAction("sellall", "sell all", {
|
||||
value="NPC",
|
||||
title="Sell All",
|
||||
description="Insert NPC name, and 'yes' if sell with delay ",
|
||||
validation=[[^[^,]+(?:, yes$|, Yes$|, YES$|$)]]
|
||||
description="NPC Name, 'yes' if sell with delay, exceptions: id separated by comma",
|
||||
})
|
||||
end
|
@ -102,4 +102,5 @@ TargetBot.Creature.edit = function(config, callback) -- callback = function(newC
|
||||
addCheckBox("diamondArrows", "D-Arrows priority", false)
|
||||
addCheckBox("rePosition", "rePosition to better tile", false)
|
||||
addCheckBox("closeLure", "Close Pulling Monsters", false)
|
||||
addCheckBox("rpSafe", "RP PVP SAFE - (DA)", false)
|
||||
end
|
@ -1,14 +1,20 @@
|
||||
TargetBot.Creature.calculatePriority = function(creature, config, path)
|
||||
-- config is based on creature_editor
|
||||
local priority = 0
|
||||
local currentTarget = g_game.getAttackingCreature()
|
||||
|
||||
-- extra priority if it's current target
|
||||
if g_game.getAttackingCreature() == creature then
|
||||
if currentTarget == creature then
|
||||
priority = priority + 1
|
||||
end
|
||||
|
||||
-- check if distance is fine, if not then attack only if already attacked
|
||||
-- check if distance is ok
|
||||
if #path > config.maxDistance then
|
||||
if config.rpSafe then
|
||||
if currentTarget == creature then
|
||||
g_game.cancelAttackAndFollow() -- if not, stop attack (pvp safe)
|
||||
end
|
||||
end
|
||||
return priority
|
||||
end
|
||||
|
||||
@ -27,6 +33,15 @@ TargetBot.Creature.calculatePriority = function(creature, config, path)
|
||||
if config.diamondArrows then
|
||||
local mobCount = getCreaturesInArea(creature:getPosition(), diamondArrowArea, 2)
|
||||
priority = priority + (mobCount * 4)
|
||||
|
||||
if config.rpSafe then
|
||||
if getCreaturesInArea(creature:getPosition(), largeRuneArea, 3) > 0 then
|
||||
if currentTarget == creature then
|
||||
g_game.cancelAttackAndFollow()
|
||||
end
|
||||
return 0 -- pvp safe
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- extra priority for low health
|
@ -135,14 +135,14 @@ local spellPatterns = {
|
||||
{-- adjacent
|
||||
[[
|
||||
111
|
||||
101
|
||||
111
|
||||
111
|
||||
]],
|
||||
-- adjacent SAFE
|
||||
[[
|
||||
11111
|
||||
11111
|
||||
11011
|
||||
11111
|
||||
11111
|
||||
11111
|
||||
]]
|
@ -51,7 +51,8 @@ local conditions = { -- always add new conditions at the bottom
|
||||
"Player is in protection zone", -- nothing 11
|
||||
"Players around is more than:", -- spinbox 12
|
||||
"Players around is less than:", -- spinbox 13
|
||||
"TargetBot Danger is Above:" -- spinbox 14
|
||||
"TargetBot Danger is Above:", -- spinbox 14
|
||||
"Blacklist player in range (sqm)" -- spinbox 15
|
||||
}
|
||||
|
||||
local conditionNumber = 1
|
||||
@ -577,6 +578,8 @@ local function interpreteCondition(n, v)
|
||||
return getPlayers() < v
|
||||
elseif n == 14 then
|
||||
return TargetBot.Danger() > v and TargetBot.isOn()
|
||||
elseif n == 15 then
|
||||
return isBlackListedPlayerInRange(v)
|
||||
end
|
||||
|
||||
end
|
33
modules/game_bot/default_configs/vBot_4.5/vBot/antiRs.lua
Normal file
33
modules/game_bot/default_configs/vBot_4.5/vBot/antiRs.lua
Normal file
@ -0,0 +1,33 @@
|
||||
setDefaultTab("Tools")
|
||||
g_game.cancelAttackAndFollow()
|
||||
|
||||
local frags = 0
|
||||
local unequip = false
|
||||
local m = macro(50, "AntiRS & Msg", function() end)
|
||||
|
||||
function safeExit()
|
||||
CaveBot.setOff()
|
||||
TargetBot.setOff()
|
||||
g_game.cancelAttackAndFollow()
|
||||
g_game.cancelAttackAndFollow()
|
||||
g_game.cancelAttackAndFollow()
|
||||
modules.game_interface.forceExit()
|
||||
end
|
||||
|
||||
onTextMessage(function(mode, text)
|
||||
if not m.isOn() then return end
|
||||
if not text:find("Warning! The murder of") then return end
|
||||
frags = frags + 1
|
||||
if killsToRs() < 6 or frags > 1 then
|
||||
EquipManager.setOff()
|
||||
schedule(100, function()
|
||||
local id = getLeft() and getLeft():getId()
|
||||
|
||||
if id and not unequip then
|
||||
unequip = true
|
||||
g_game.equipItemId(id)
|
||||
end
|
||||
safeExit()
|
||||
end)
|
||||
end
|
||||
end)
|
@ -1,4 +1,4 @@
|
||||
local version = "4.41"
|
||||
local version = "4.5"
|
||||
local currentVersion
|
||||
local available = false
|
||||
|
@ -183,6 +183,26 @@ if rootWidget then
|
||||
clearCachedPlayers()
|
||||
refreshStatus()
|
||||
end
|
||||
label.onMouseRelease = function(widget, mousePos, mouseButton)
|
||||
if mouseButton == 2 then
|
||||
local child = rootWidget:recursiveGetChildByPos(mousePos)
|
||||
if child == widget then
|
||||
local menu = g_ui.createWidget('PopupMenu')
|
||||
menu:setId("blzMenu")
|
||||
menu:setGameMenu(true)
|
||||
menu:addOption('Check Player', function()
|
||||
local name = widget:getText():gsub(" ", "_")
|
||||
local link = "https://www.gunzodus.net/character/show/"
|
||||
g_platform.openUrl(link..name)
|
||||
end, "")
|
||||
menu:addOption('Copy Name', function()
|
||||
g_window.setClipboardText(widget:getText())
|
||||
end, "")
|
||||
menu:display(mousePos)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local tabButton = TabBar.buttonsPanel:getChildren()[v]
|
||||
@ -215,6 +235,26 @@ if rootWidget then
|
||||
table.remove(playerList, table.find(playerList, name))
|
||||
label:destroy()
|
||||
end
|
||||
label.onMouseRelease = function(widget, mousePos, mouseButton)
|
||||
if mouseButton == 2 then
|
||||
local child = rootWidget:recursiveGetChildByPos(mousePos)
|
||||
if child == widget then
|
||||
local menu = g_ui.createWidget('PopupMenu')
|
||||
menu:setId("blzMenu")
|
||||
menu:setGameMenu(true)
|
||||
menu:addOption('Check Player', function()
|
||||
local name = widget:getText():gsub(" ", "_")
|
||||
local link = "https://www.gunzodus.net/character/show/"
|
||||
g_platform.openUrl(link..name)
|
||||
end, "")
|
||||
menu:addOption('Copy Name', function()
|
||||
g_window.setClipboardText(widget:getText())
|
||||
end, "")
|
||||
menu:display(mousePos)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
nameTab:setText("")
|
||||
else
|
||||
warn("vBot[PlayerList]: Player ".. name .." is already added!")
|
||||
@ -245,6 +285,26 @@ if rootWidget then
|
||||
table.remove(playerList, table.find(playerList, name))
|
||||
label:destroy()
|
||||
end
|
||||
label.onMouseRelease = function(widget, mousePos, mouseButton)
|
||||
if mouseButton == 2 then
|
||||
local child = rootWidget:recursiveGetChildByPos(mousePos)
|
||||
if child == widget then
|
||||
local menu = g_ui.createWidget('PopupMenu')
|
||||
menu:setId("blzMenu")
|
||||
menu:setGameMenu(true)
|
||||
menu:addOption('Check Player', function()
|
||||
local name = widget:getText():gsub(" ", "_")
|
||||
local link = "https://www.gunzodus.net/character/show/"
|
||||
g_platform.openUrl(link..name)
|
||||
end, "")
|
||||
menu:addOption('Copy Name', function()
|
||||
g_window.setClipboardText(widget:getText())
|
||||
end, "")
|
||||
menu:display(mousePos)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -263,10 +323,10 @@ onCreatureAppear(function(creature)
|
||||
checkStatus(creature)
|
||||
end)
|
||||
|
||||
onPlayerPositionChange(function(x,y)
|
||||
if x.z ~= y.z then
|
||||
schedule(20, function()
|
||||
refreshStatus()
|
||||
end)
|
||||
end
|
||||
end)
|
||||
onPlayerPositionChange(function(x,y)
|
||||
if x.z ~= y.z then
|
||||
schedule(20, function()
|
||||
refreshStatus()
|
||||
end)
|
||||
end
|
||||
end)
|
@ -0,0 +1,58 @@
|
||||
local quiverSlot = modules.game_inventory.inventoryWindow:recursiveGetChildById('slot5')
|
||||
local label = quiverSlot.count
|
||||
|
||||
label = label or g_ui.loadUIFromString([[
|
||||
Label
|
||||
id: count
|
||||
color: #bfbfbf
|
||||
font: verdana-11px-rounded
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
text-align: right
|
||||
margin-right: 3
|
||||
margin-left: 3
|
||||
text:
|
||||
]], quiverSlot)
|
||||
|
||||
|
||||
function getQuiverAmount()
|
||||
-- old tibia
|
||||
if g_game.getClientVersion() < 1000 then return end
|
||||
|
||||
|
||||
local isQuiverEquipped = getRight() and getRight():isContainer() or false
|
||||
local quiver = isQuiverEquipped and getContainerByItem(getRight():getId())
|
||||
local count = 0
|
||||
|
||||
if quiver then
|
||||
for i, item in ipairs(quiver:getItems()) do
|
||||
count = count + item:getCount()
|
||||
end
|
||||
else
|
||||
return label:setText("")
|
||||
end
|
||||
|
||||
return label:setText(count)
|
||||
end
|
||||
getQuiverAmount()
|
||||
|
||||
onContainerOpen(function(container, previousContainer)
|
||||
getQuiverAmount()
|
||||
end)
|
||||
|
||||
onContainerClose(function(container)
|
||||
getQuiverAmount()
|
||||
end)
|
||||
|
||||
onAddItem(function(container, slot, item, oldItem)
|
||||
getQuiverAmount()
|
||||
end)
|
||||
|
||||
onRemoveItem(function(container, slot, item)
|
||||
getQuiverAmount()
|
||||
end)
|
||||
|
||||
onContainerUpdateItem(function(container, slot, item, oldItem)
|
||||
getQuiverAmount()
|
||||
end)
|
@ -0,0 +1,90 @@
|
||||
if voc() == 2 or voc() == 12 then
|
||||
local bows = { 3350, 31581, 27455, 8027, 20082, 36664, 7438, 28718, 36665, 14246, 19362, 35518, 34150, 29417, 9378, 16164, 22866, 12733, 8029, 20083, 20084, 8026, 8028, 34088}
|
||||
local xbows = { 30393, 3349, 27456, 20085, 16163, 5947, 8021, 14247, 22867, 8023, 22711, 19356, 20086, 20087, 34089}
|
||||
local arrows = { 16143, 763, 761, 7365, 3448, 762, 21470, 7364, 14251, 3447, 3449, 15793, 25757, 774, 35901 }
|
||||
local bolts = { 6528, 7363, 3450, 16141, 25758, 14252, 3446, 16142, 35902 }
|
||||
local hold = false
|
||||
|
||||
onContainerOpen(function(container, previousContainer)
|
||||
hold = false
|
||||
end)
|
||||
|
||||
onContainerClose(function(container)
|
||||
hold = false
|
||||
end)
|
||||
|
||||
onAddItem(function(container, slot, item, oldItem)
|
||||
hold = false
|
||||
end)
|
||||
|
||||
onRemoveItem(function(container, slot, item)
|
||||
hold = false
|
||||
end)
|
||||
|
||||
onContainerUpdateItem(function(container, slot, item, oldItem)
|
||||
hold = false
|
||||
end)
|
||||
|
||||
|
||||
|
||||
local function manageQuiver(isBowEquipped, quiverContainer)
|
||||
local ammo = isBowEquipped and arrows or bolts
|
||||
local dest = nil
|
||||
local containers = getContainers()
|
||||
for i, container in ipairs(containers) do
|
||||
if container ~= quiverContainer and not containerIsFull(container) then
|
||||
if container:getName():lower():find("backpack") or container:getName():lower():find("bag") or container:getName():lower():find("chess") then
|
||||
dest = container
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- clearing
|
||||
if dest then
|
||||
for i, item in ipairs(quiverContainer:getItems()) do
|
||||
if not table.find(ammo, item:getId()) then
|
||||
local pos = dest:getSlotPosition(dest:getItemsCount())
|
||||
return g_game.move(item, pos, item:getCount())
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not containerIsFull(quiverContainer) then
|
||||
for i, container in ipairs(containers) do
|
||||
if container ~= quiverContainer then
|
||||
for j, item in ipairs(container:getItems()) do
|
||||
if table.find(ammo, item:getId()) then
|
||||
local pos = quiverContainer:getSlotPosition(quiverContainer:getItemsCount())
|
||||
return g_game.move(item, pos, item:getCount())
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
UI.Separator()
|
||||
macro(100, "Quiver Manager", function()
|
||||
if hold then return end -- do nothing if nothing to do
|
||||
local hand = getLeft() and getLeft():getId()
|
||||
local quiverEquipped = getRight() and getRight():isContainer()
|
||||
|
||||
if not hand then return end
|
||||
if not quiverEquipped then return end
|
||||
|
||||
local quiverContainer = getContainerByItem(getRight():getId())
|
||||
if not quiverContainer then return end
|
||||
|
||||
local isBowEquipped = getLeft() and table.find(bows, hand) and true or false
|
||||
if not isBowEquipped then
|
||||
if not table.find(xbows, hand) then
|
||||
return -- neither bow and xbow is equipped
|
||||
end
|
||||
end
|
||||
|
||||
if manageQuiver(isBowEquipped, quiverContainer) then -- if true then it didn't do anything
|
||||
hold = true
|
||||
end
|
||||
end)
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user