• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help Change otclient combat controls like rl tibia

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,990
Solutions
9
Reaction score
334
Location
Chile
Hello otlanders
I Wonderland if anyone could guide me into this
Based on this client Tibia - OTClient 7.4 with Real Tibia features
Where should i look to make combat controls like real tibia
Which files are involved?

Thanks by advance

Pls help There are too many files to explore
Bump
 
Last edited by a moderator:
^Up

He's right he's owner of NTSW so please listen to him !
 
I'm a bit too late here, but i made this on my own, working:

inventory.otui:


Lua:
InventoryItem < Item

CombatBox < UICheckBox
  size: 20 20
  image-clip: 0 0 20 20
  margin: 2 2

  $checked:
    image-clip: 0 20 20 20

FightOffensiveBox < CombatBox
  image-source: /images/game/combatmodes/fightoffensive
FightBalancedBox < CombatBox
  image-source: /images/game/combatmodes/fightbalanced
FightDefensiveBox < CombatBox
  image-source: /images/game/combatmodes/fightdefensive
ChaseModeBox < CombatBox
  image-source: /images/game/combatmodes/chasemode
SafeFightBox < CombatBox
  image-source: /images/game/combatmodes/safefight

HeadSlot < InventoryItem
  id: slot1
  image-source: /images/game/slots/head
  &position: {x=65535, y=1, z=0}

BodySlot < InventoryItem
  id: slot4
  image-source: /images/game/slots/body
  &position: {x=65535, y=4, z=0}

LegSlot < InventoryItem
  id: slot7
  image-source: /images/game/slots/legs
  &position: {x=65535, y=7, z=0}

FeetSlot < InventoryItem
  id: slot8
  image-source: /images/game/slots/feet
  &position: {x=65535, y=8, z=0}

NeckSlot < InventoryItem
  id: slot2
  image-source: /images/game/slots/neck
  &position: {x=65535, y=2, z=0}

LeftSlot < InventoryItem
  id: slot6
  image-source: /images/game/slots/left-hand
  &position: {x=65535, y=6, z=0}

FingerSlot < InventoryItem
  id: slot9
  image-source: /images/game/slots/finger
  &position: {x=65535, y=9, z=0}

BackSlot < InventoryItem
  id: slot3
  image-source: /images/game/slots/back
  &position: {x=65535, y=3, z=0}

RightSlot < InventoryItem
  id: slot5
  image-source: /images/game/slots/right-hand
  &position: {x=65535, y=5, z=0}

AmmoSlot < InventoryItem
  id: slot10
  image-source: /images/game/slots/ammo
  &position: {x=65535, y=10, z=0}

FakeSlot < InventoryItem
  virtual: true
  image-source: /images/ui/item_small
  size: 34 24

MiniWindow
  id: inventoryWindow
  !text: tr('Inventory & Combat')
  icon: /images/topbuttons/inventory
  height: 178
  @onClose: modules.game_inventory.onMiniWindowClose()
  &save: true

  MiniWindowContents
    NeckSlot
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 14
      margin-left: 10

    LeftSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    FingerSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    FakeSlot
      id: fakeSlotLeft
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    HeadSlot
      anchors.top: parent.top
      anchors.left: slot2.right
      margin-top: 4
      margin-left: 5

    BodySlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    LegSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    FeetSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    BackSlot
      anchors.top: slot2.top
      anchors.left: slot1.right
      margin-left: 5

    RightSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    AmmoSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    FakeSlot
      id: fakeSlotRight
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    Panel
      id: combatPanel
      anchors.top: slot3.top
      anchors.right: parent.right
      margin-top: 1
      margin-right: 10
      size: 45 66
      focusable: false
      border-width: 1
      border-color: #3b3932
      background-color: #201e17

      FightOffensiveBox
        id: fightOffensiveBox
        anchors.top: parent.top
        anchors.left: parent.left

      FightBalancedBox
        id: fightBalancedBox
        anchors.top: prev.bottom
        anchors.left: parent.left

      FightDefensiveBox
        id: fightDefensiveBox
        anchors.top: prev.bottom
        anchors.left: parent.left

      Panel
        id: combatImage
        !tooltip: tr('Combat and chase modes')
        phantom: false
        image-source: /images/topbuttons/combatcontrols
        image-smooth: true
        size: 16 16
        anchors.left: fightOffensiveBox.right
        anchors.top: parent.top
        margin-top: 4
        margin-left: 4
        //border-width: 1
        //border-color: #1a1816
        focusable: false

      ChaseModeBox
        id: chaseModeBox
        anchors.top: combatImage.bottom
        anchors.left: fightOffensiveBox.right
        margin-top: 4

      SafeFightBox
        id: safeFightBox
        anchors.top: prev.bottom
        anchors.left: fightOffensiveBox.right

btw, delete the refresh function on inventory.lua, otherwhise it will erase all your map files.
 

Attachments

Last edited by a moderator:
I'm a bit too late here, but i made this on my own, working:

inventory.otui:


Lua:
InventoryItem < Item

CombatBox < UICheckBox
  size: 20 20
  image-clip: 0 0 20 20
  margin: 2 2

  $checked:
    image-clip: 0 20 20 20

FightOffensiveBox < CombatBox
  image-source: /images/game/combatmodes/fightoffensive
FightBalancedBox < CombatBox
  image-source: /images/game/combatmodes/fightbalanced
FightDefensiveBox < CombatBox
  image-source: /images/game/combatmodes/fightdefensive
ChaseModeBox < CombatBox
  image-source: /images/game/combatmodes/chasemode
SafeFightBox < CombatBox
  image-source: /images/game/combatmodes/safefight

HeadSlot < InventoryItem
  id: slot1
  image-source: /images/game/slots/head
  &position: {x=65535, y=1, z=0}

BodySlot < InventoryItem
  id: slot4
  image-source: /images/game/slots/body
  &position: {x=65535, y=4, z=0}

LegSlot < InventoryItem
  id: slot7
  image-source: /images/game/slots/legs
  &position: {x=65535, y=7, z=0}

FeetSlot < InventoryItem
  id: slot8
  image-source: /images/game/slots/feet
  &position: {x=65535, y=8, z=0}

NeckSlot < InventoryItem
  id: slot2
  image-source: /images/game/slots/neck
  &position: {x=65535, y=2, z=0}

LeftSlot < InventoryItem
  id: slot6
  image-source: /images/game/slots/left-hand
  &position: {x=65535, y=6, z=0}

FingerSlot < InventoryItem
  id: slot9
  image-source: /images/game/slots/finger
  &position: {x=65535, y=9, z=0}

BackSlot < InventoryItem
  id: slot3
  image-source: /images/game/slots/back
  &position: {x=65535, y=3, z=0}

RightSlot < InventoryItem
  id: slot5
  image-source: /images/game/slots/right-hand
  &position: {x=65535, y=5, z=0}

AmmoSlot < InventoryItem
  id: slot10
  image-source: /images/game/slots/ammo
  &position: {x=65535, y=10, z=0}

FakeSlot < InventoryItem
  virtual: true
  image-source: /images/ui/item_small
  size: 34 24

MiniWindow
  id: inventoryWindow
  !text: tr('Inventory & Combat')
  icon: /images/topbuttons/inventory
  height: 178
  @onClose: modules.game_inventory.onMiniWindowClose()
  &save: true

  MiniWindowContents
    NeckSlot
      anchors.top: parent.top
      anchors.left: parent.left
      margin-top: 14
      margin-left: 10

    LeftSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    FingerSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    FakeSlot
      id: fakeSlotLeft
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    HeadSlot
      anchors.top: parent.top
      anchors.left: slot2.right
      margin-top: 4
      margin-left: 5

    BodySlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    LegSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    FeetSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    BackSlot
      anchors.top: slot2.top
      anchors.left: slot1.right
      margin-left: 5

    RightSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    AmmoSlot
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    FakeSlot
      id: fakeSlotRight
      anchors.top: prev.bottom
      anchors.horizontalCenter: prev.horizontalCenter
      margin-top: 4

    Panel
      id: combatPanel
      anchors.top: slot3.top
      anchors.right: parent.right
      margin-top: 1
      margin-right: 10
      size: 45 66
      focusable: false
      border-width: 1
      border-color: #3b3932
      background-color: #201e17

      FightOffensiveBox
        id: fightOffensiveBox
        anchors.top: parent.top
        anchors.left: parent.left

      FightBalancedBox
        id: fightBalancedBox
        anchors.top: prev.bottom
        anchors.left: parent.left

      FightDefensiveBox
        id: fightDefensiveBox
        anchors.top: prev.bottom
        anchors.left: parent.left

      Panel
        id: combatImage
        !tooltip: tr('Combat and chase modes')
        phantom: false
        image-source: /images/topbuttons/combatcontrols
        image-smooth: true
        size: 16 16
        anchors.left: fightOffensiveBox.right
        anchors.top: parent.top
        margin-top: 4
        margin-left: 4
        //border-width: 1
        //border-color: #1a1816
        focusable: false

      ChaseModeBox
        id: chaseModeBox
        anchors.top: combatImage.bottom
        anchors.left: fightOffensiveBox.right
        margin-top: 4

      SafeFightBox
        id: safeFightBox
        anchors.top: prev.bottom
        anchors.left: fightOffensiveBox.right

btw, delete the refresh function on inventory.lua, otherwhise it will erase all your map files.
it's never too late :p . these are the updated files?
thanks btw
 
Back
Top