Version 1.4 - Websockets and bug fixes

This commit is contained in:
OTCv8
2019-11-26 02:32:51 +01:00
parent 1072671986
commit c750ea65f8
29 changed files with 426 additions and 124 deletions

View File

@@ -456,7 +456,7 @@ Panels.Attacking = function(parent)
local ui = context.setupUI([[
Panel
id: attacking
height: 150
height: 140
BotLabel
anchors.top: parent.top
@@ -486,7 +486,7 @@ Panel
anchors.left: parent.left
text: Add
width: 60
height: 20
height: 17
Button
id: edit
@@ -494,7 +494,7 @@ Panel
anchors.horizontalCenter: parent.horizontalCenter
text: Edit
width: 60
height: 20
height: 17
Button
id: remove
@@ -502,7 +502,7 @@ Panel
anchors.right: parent.right
text: Remove
width: 60
height: 20
height: 17
TextList
id: list
@@ -531,7 +531,7 @@ Panel
anchors.left: parent.left
text: Add
width: 60
height: 20
height: 17
Button
id: mEdit
@@ -539,7 +539,7 @@ Panel
anchors.horizontalCenter: parent.horizontalCenter
text: Edit
width: 60
height: 20
height: 17
Button
id: mRemove
@@ -547,7 +547,7 @@ Panel
anchors.right: parent.right
text: Remove
width: 60
height: 20
height: 17
]], parent)
@@ -897,7 +897,10 @@ Panel
if #lootContainers == 0 or not context.storage.looting.enabled then
return false
end
if modules.game_walking.lastManualWalk + 500 > context.now then
return true
end
local pos = context.player:getPosition()
table.sort(lootContainers, function(pos1, pos2)
local dist1 = math.max(math.abs(pos.x-pos1.x), math.abs(pos.y-pos1.y))
@@ -993,7 +996,7 @@ Panel
end
local topItem = tile:getTopUseThing()
if not topItem:isContainer() then
if not topItem or not topItem:isContainer() then
return
end

View File

@@ -15,9 +15,12 @@ Panels.Haste = function(parent)
end
Panels.ManaShield = function(parent)
local lastManaShield = 0
context.macro(100, "Auto Mana Shield", nil, function()
if not context.hasManaShield() then
context.saySpell("utamo vita", 200)
if not context.hasManaShield() or context.now > lastManaShield + 90000 then
if context.saySpell("utamo vita", 200) then
lastManaShield = context.now
end
end
end, parent)
end

View File

@@ -5,7 +5,7 @@ Panels.Looting = function(parent)
local ui = context.setupUI([[
Panel
id: looting
height: 190
height: 180
BotLabel
anchors.top: parent.top
@@ -35,7 +35,7 @@ Panel
anchors.left: parent.left
text: Add
width: 60
height: 20
height: 17
Button
id: edit
@@ -43,7 +43,7 @@ Panel
anchors.horizontalCenter: parent.horizontalCenter
text: Edit
width: 60
height: 20
height: 17
Button
id: remove
@@ -51,7 +51,7 @@ Panel
anchors.right: parent.right
text: Remove
width: 60
height: 20
height: 17
ScrollablePanel
id: items
@@ -90,7 +90,6 @@ Panel
height: 33
margin-top: 2
]], parent)
local lootContainers = { ui.containers.item1, ui.containers.item2, ui.containers.item3, ui.containers.item4, ui.containers.item5 }

View File

@@ -5,7 +5,7 @@ Panels.Waypoints = function(parent)
local ui = context.setupUI([[
Panel
id: waypoints
height: 223
height: 206
BotLabel
anchors.top: parent.top
@@ -35,7 +35,7 @@ Panel
anchors.left: parent.left
text: Add
width: 60
height: 20
height: 17
Button
id: edit
@@ -43,7 +43,7 @@ Panel
anchors.horizontalCenter: parent.horizontalCenter
text: Edit
width: 60
height: 20
height: 17
Button
id: remove
@@ -51,7 +51,7 @@ Panel
anchors.right: parent.right
text: Remove
width: 60
height: 20
height: 17
TextList
id: list
@@ -88,7 +88,7 @@ Panel
text: Goto
width: 61
margin-top: 1
height: 20
height: 17
Button
id: wUse
@@ -96,7 +96,7 @@ Panel
anchors.left: prev.right
text: Use
width: 61
height: 20
height: 17
Button
id: wUseWith
@@ -104,7 +104,7 @@ Panel
anchors.left: prev.right
text: UseWith
width: 61
height: 20
height: 17
Button
id: wWait
@@ -113,7 +113,7 @@ Panel
text: Wait
width: 61
margin-top: 1
height: 20
height: 17
Button
id: wSay
@@ -121,7 +121,7 @@ Panel
anchors.left: prev.right
text: Say
width: 61
height: 20
height: 17
Button
id: wNpc
@@ -129,7 +129,7 @@ Panel
anchors.left: prev.right
text: Say NPC
width: 61
height: 20
height: 17
Button
id: wLabel
@@ -138,7 +138,7 @@ Panel
text: Label
width: 61
margin-top: 1
height: 20
height: 17
Button
id: wFollow
@@ -146,7 +146,7 @@ Panel
anchors.left: prev.right
text: Follow
width: 61
height: 20
height: 17
Button
id: wFunction
@@ -154,7 +154,7 @@ Panel
anchors.left: prev.right
text: Function
width: 61
height: 20
height: 17
BotSwitch
id: recording
@@ -162,7 +162,7 @@ Panel
anchors.left: parent.left
anchors.right: parent.right
text: Auto Recording
height: 20
height: 17
]], parent)