mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-04-30 03:09:20 +02:00
Removed debug prints
This commit is contained in:
parent
440bf56060
commit
48d7eb810d
@ -3,7 +3,7 @@
|
|||||||
addIcon("dancing", {outfit={mount=0,feet=0,legs=0,body=176,type=128,auxType=0,addons=3,head=48}, hotkey="F5", text="dance"}, macro(100, "dance", function()
|
addIcon("dancing", {outfit={mount=0,feet=0,legs=0,body=176,type=128,auxType=0,addons=3,head=48}, hotkey="F5", text="dance"}, macro(100, "dance", function()
|
||||||
turn(math.random(0,3))
|
turn(math.random(0,3))
|
||||||
end))
|
end))
|
||||||
|
--[[
|
||||||
addIcon("ctrl", {outfit={mount=0,feet=10,legs=10,body=176,type=129,auxType=0,addons=3,head=48}, text="press ctrl to move icon"}, function(widget, enabled)
|
addIcon("ctrl", {outfit={mount=0,feet=10,legs=10,body=176,type=129,auxType=0,addons=3,head=48}, text="press ctrl to move icon"}, function(widget, enabled)
|
||||||
if enabled then
|
if enabled then
|
||||||
info("icon on")
|
info("icon on")
|
||||||
@ -36,3 +36,4 @@ addIcon("text", {text="text\nonly\nicon", switchable=true}, function(widget, ena
|
|||||||
info("icon with text clicked")
|
info("icon with text clicked")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
]]--
|
@ -142,7 +142,6 @@ context.findPath = function(startPos, destPos, maxDist, params)
|
|||||||
if math.abs(x) >= marginMin or math.abs(y) >= marginMin then
|
if math.abs(x) >= marginMin or math.abs(y) >= marginMin then
|
||||||
local dest = (destPos.x + x) .. "," .. (destPos.y + y) .. "," .. destPos.z
|
local dest = (destPos.x + x) .. "," .. (destPos.y + y) .. "," .. destPos.z
|
||||||
local node = paths[dest]
|
local node = paths[dest]
|
||||||
print(node)
|
|
||||||
if node and (not bestCandidate or bestCandidate[1] > node[1]) then
|
if node and (not bestCandidate or bestCandidate[1] > node[1]) then
|
||||||
bestCandidate = node
|
bestCandidate = node
|
||||||
bestCandidatePos = dest
|
bestCandidatePos = dest
|
||||||
|
@ -17,11 +17,10 @@ context.addTab = function(name)
|
|||||||
|
|
||||||
context.tabs:setOn(true)
|
context.tabs:setOn(true)
|
||||||
local newTab = context.tabs:addTab(name, g_ui.createWidget('BotPanel')).tabPanel.content
|
local newTab = context.tabs:addTab(name, g_ui.createWidget('BotPanel')).tabPanel.content
|
||||||
print(#(context.tabs.tabs))
|
|
||||||
if #(context.tabs.tabs) > 5 then
|
if #(context.tabs.tabs) > 5 then
|
||||||
for k,tab in pairs(context.tabs.tabs) do
|
for k,tab in pairs(context.tabs.tabs) do
|
||||||
tab:setPadding(3)
|
tab:setPadding(3)
|
||||||
tab:setFont('cipsoftFont')
|
tab:setFont('small-9px')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ function onStoreInit(url, coins)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function onStoreCategories(categories)
|
function onStoreCategories(categories)
|
||||||
if otcv8shop then return end
|
if not shop or otcv8shop then return end
|
||||||
local correctCategories = {}
|
local correctCategories = {}
|
||||||
for i, category in ipairs(categories) do
|
for i, category in ipairs(categories) do
|
||||||
table.insert(correctCategories, {
|
table.insert(correctCategories, {
|
||||||
@ -158,7 +158,7 @@ function onStoreCategories(categories)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function onStoreOffers(categoryName, offers)
|
function onStoreOffers(categoryName, offers)
|
||||||
if otcv8shop then return end
|
if not shop or otcv8shop then return end
|
||||||
local updated = false
|
local updated = false
|
||||||
|
|
||||||
for i, category in ipairs(CATEGORIES) do
|
for i, category in ipairs(CATEGORIES) do
|
||||||
@ -197,7 +197,7 @@ function onStoreOffers(categoryName, offers)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function onStoreTransactionHistory(currentPage, hasNextPage, offers)
|
function onStoreTransactionHistory(currentPage, hasNextPage, offers)
|
||||||
if otcv8shop then return end
|
if not shop or otcv8shop then return end
|
||||||
HISTORY = {}
|
HISTORY = {}
|
||||||
for i, offer in ipairs(offers) do
|
for i, offer in ipairs(offers) do
|
||||||
table.insert(HISTORY, {
|
table.insert(HISTORY, {
|
||||||
@ -219,16 +219,17 @@ function onStoreTransactionHistory(currentPage, hasNextPage, offers)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function onStorePurchase(message)
|
function onStorePurchase(message)
|
||||||
if otcv8shop then return end
|
if not shop or otcv8shop then return end
|
||||||
processMessage({title="Successful shop purchase", msg=message})
|
processMessage({title="Successful shop purchase", msg=message})
|
||||||
end
|
end
|
||||||
|
|
||||||
function onStoreError(errorType, message)
|
function onStoreError(errorType, message)
|
||||||
if otcv8shop then return end
|
if not shop or otcv8shop then return end
|
||||||
processMessage({title="Shop error", msg=message})
|
processMessage({title="Shop error", msg=message})
|
||||||
end
|
end
|
||||||
|
|
||||||
function onCoinBalance(coins, transferableCoins)
|
function onCoinBalance(coins, transferableCoins)
|
||||||
|
if not shop or otcv8shop then return end
|
||||||
shop.infoPanel.points:setText(tr("Points:") .. " " .. coins)
|
shop.infoPanel.points:setText(tr("Points:") .. " " .. coins)
|
||||||
shop.infoPanel.buy:hide()
|
shop.infoPanel.buy:hide()
|
||||||
shop.infoPanel:setHeight(20)
|
shop.infoPanel:setHeight(20)
|
||||||
@ -461,6 +462,8 @@ function addOffer(category, data)
|
|||||||
if category ~= 0 then
|
if category ~= 0 then
|
||||||
offer.onDoubleClick = buyOffer
|
offer.onDoubleClick = buyOffer
|
||||||
offer.buyButton.onClick = function() buyOffer(offer) end
|
offer.buyButton.onClick = function() buyOffer(offer) end
|
||||||
|
else
|
||||||
|
offer.buyButton:hide()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user