Helliot1
Owner of Empire Online
- Joined
- Jul 26, 2017
- Messages
- 315
- Solutions
- 1
- Reaction score
- 58
What am I doing wrong?
I am trying to create new Slots, I followed this steps:
distance slot was added · EvilHero90/otclient@aff23ec · GitHub
and they are not working..
The inventory don't appears.
Inventory.lua
Inventory.otui
Player.lua
Bump
I am trying to create new Slots, I followed this steps:
distance slot was added · EvilHero90/otclient@aff23ec · GitHub
and they are not working..
The inventory don't appears.
Inventory.lua
Lua:
InventorySlotStyles = {
[InventorySlotHead] = "HeadSlot",
[InventorySlotNeck] = "NeckSlot",
[InventorySlotBack] = "BackSlot",
[InventorySlotBody] = "BodySlot",
[InventorySlotRight] = "RightSlot",
[InventorySlotLeft] = "LeftSlot",
[InventorySlotLeg] = "LegSlot",
[InventorySlotFeet] = "FeetSlot",
[InventorySlotFinger] = "FingerSlot",
[InventorySlotAmmo] = "AmmoSlot",
[InventorySlotBracers] = "BracersSlot",
[InventorySlotGauntlets] = "GauntletsSlot"
}
Inventory.otui
Code:
InventoryItem < Item
$on:
image-source: /images/ui/item-blessed
HeadSlot < InventoryItem
id: slot1
image-source: /images/game/slots/head
&position: {x=65535, y=1, z=0}
$on:
image-source: /images/game/slots/head-blessed
BodySlot < InventoryItem
id: slot4
image-source: /images/game/slots/body
&position: {x=65535, y=4, z=0}
$on:
image-source: /images/game/slots/body-blessed
LegSlot < InventoryItem
id: slot7
image-source: /images/game/slots/legs
&position: {x=65535, y=7, z=0}
$on:
image-source: /images/game/slots/legs-blessed
FeetSlot < InventoryItem
id: slot8
image-source: /images/game/slots/feet
&position: {x=65535, y=8, z=0}
$on:
image-source: /images/game/slots/feet-blessed
NeckSlot < InventoryItem
id: slot2
image-source: /images/game/slots/neck
&position: {x=65535, y=2, z=0}
$on:
image-source: /images/game/slots/neck-blessed
LeftSlot < InventoryItem
id: slot6
image-source: /images/game/slots/left-hand
&position: {x=65535, y=6, z=0}
$on:
image-source: /images/game/slots/left-hand-blessed
FingerSlot < InventoryItem
id: slot9
image-source: /images/game/slots/finger
&position: {x=65535, y=9, z=0}
$on:
image-source: /images/game/slots/finger-blessed
BackSlot < InventoryItem
id: slot3
image-source: /images/game/slots/back
&position: {x=65535, y=3, z=0}
$on:
image-source: /images/game/slots/back-blessed
RightSlot < InventoryItem
id: slot5
image-source: /images/game/slots/right-hand
&position: {x=65535, y=5, z=0}
$on:
image-source: /images/game/slots/right-hand-blessed
AmmoSlot < InventoryItem
id: slot10
image-source: /images/game/slots/ammo
&position: {x=65535, y=10, z=0}
$on:
image-source: /images/game/slots/ammo-blessed
BracersSlot < InventoryItem
id: slot11
image-source: /images/game/slots/bracers
&position: {x=65535, y=10, z=0}
$on:
image-source: /images/game/slots/bracers-blessed
GauntletsSlot < InventoryItem
id: slot12
image-source: /images/game/slots/gauntlets
&position: {x=65535, y=10, z=0}
$on:
image-source: /images/game/slots/gauntlets-blessed
PurseButton < Button
id: purseButton
size: 26 26
!tooltip: tr('Open purse')
icon-source: /images/game/slots/purse
icon-size: 24 24
icon-offset: 1 1
MiniWindow
id: inventoryWindow
!text: tr('Inventory')
icon: /images/topbuttons/inventory
height: 175
@onClose: modules.game_inventory.onMiniWindowClose()
&save: true
MiniWindowContents
HeadSlot
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
margin-top: 3
BodySlot
anchors.top: prev.bottom
anchors.horizontalCenter: prev.horizontalCenter
margin-top: 3
LegSlot
anchors.top: prev.bottom
anchors.horizontalCenter: prev.horizontalCenter
margin-top: 3
FeetSlot
anchors.top: prev.bottom
anchors.horizontalCenter: prev.horizontalCenter
margin-top: 3
NeckSlot
anchors.top: slot1.top
anchors.right: slot1.left
margin-top: 10
margin-right: 5
LeftSlot
anchors.top: prev.bottom
anchors.horizontalCenter: prev.horizontalCenter
margin-top: 3
FingerSlot
anchors.top: prev.bottom
anchors.horizontalCenter: prev.horizontalCenter
margin-top: 3
BackSlot
anchors.top: slot1.top
anchors.left: slot1.right
margin-top: 10
margin-left: 5
RightSlot
anchors.top: prev.bottom
anchors.horizontalCenter: prev.horizontalCenter
margin-top: 3
AmmoSlot
anchors.top: prev.bottom
anchors.horizontalCenter: prev.horizontalCenter
margin-top: 3
BracersSlot
anchors.top: prev.bottom
anchors.horizontalCenter: prev.horizontalCenter
margin-top: 3
GauntletsSlot
anchors.top: prev.bottom
anchors.horizontalCenter: prev.horizontalCenter
margin-top: 3
PurseButton
margin-top: 3
anchors.top: prev.bottom
anchors.horizontalCenter: prev.horizontalCenter
Player.lua
Lua:
InventorySlotOther = 0
InventorySlotHead = 1
InventorySlotNeck = 2
InventorySlotBack = 3
InventorySlotBody = 4
InventorySlotRight = 5
InventorySlotLeft = 6
InventorySlotLeg = 7
InventorySlotFeet = 8
InventorySlotFinger = 9
InventorySlotAmmo = 10
InventorySlotBracers = 11
InventorySlotGauntlets = 12
InventorySlotPurse = 13
InventorySlotFirst = InventorySlotHead
InventorySlotLast = InventorySlotPurse
Bump
Last edited: