Version 1.9

This commit is contained in:
OTCv8
2020-01-21 23:45:52 +01:00
parent 11ad766308
commit be8704ee92
56 changed files with 3517 additions and 483 deletions

View File

@@ -163,7 +163,6 @@ function refresh()
configList.onOptionChange = function(widget)
settings[index].config = widget:getCurrentOption().text
settings[index].enabled = false
g_settings.setNode('bot', settings)
g_settings.save()
refresh()
@@ -178,7 +177,7 @@ function refresh()
if not g_game.isOnline() or not settings[index].enabled then
statusLabel:setOn(true)
statusLabel:setText("Status: disabled")
statusLabel:setText("Status: disabled\nPress off button to enable")
return
end
@@ -381,7 +380,9 @@ function initCallbacks()
})
connect(g_map, {
onMissle = botOnMissle
onMissle = botOnMissle,
onAnimatedText = botOnAnimatedText,
onStaticText = botOnStaticText
})
end
@@ -427,7 +428,9 @@ function terminateCallbacks()
})
disconnect(g_map, {
onMissle = botOnMissle
onMissle = botOnMissle,
onAnimatedText = botOnAnimatedText,
onStaticText = botOnStaticText
})
end
@@ -526,6 +529,16 @@ function botOnMissle(missle)
safeBotCall(function() botExecutor.callbacks.onMissle(missle) end)
end
function botOnAnimatedText(thing, text)
if botExecutor == nil then return false end
safeBotCall(function() botExecutor.callbacks.onAnimatedText(thing, text) end)
end
function botOnStaticText(thing, text)
if botExecutor == nil then return false end
safeBotCall(function() botExecutor.callbacks.onStaticText(thing, text) end)
end
function botChannelList(channels)
if botExecutor == nil then return false end
safeBotCall(function() botExecutor.callbacks.onChannelList(channels) end)