If a command works with a command block, then it should work with a command computer. I haven't found any exceptions thus far, but do remember that you're playing with Minecraft 1.7.10. There's a lot more functionality in later builds.
The command system is a strange beast. Pretty much the only information you can get
out of it is either "true" or "false" (which, with a real command block, you'd detect as a redstone signal or lack thereof).
Some commands do return more information, which isn't intended to be "useful" so much as it's a debug log of sorts. Becomes pretty handy for command computer usage, though! For example, the xp command can be used to find out who's online, and the tp command can be used to find out where they are -
see here for some examples of how to extract this information.
I'm not aware of any scoreboard-related commands that give this sort of extra info, however. So to determine exact scores for players, I would play the "guess the number between one and a hundred" game - the scoreboard can at least tell you if the number is higher or lower. Let's say you already know the names of your players (either because they typed them into the computer before playing, or because you used the xp/tp techniques above). I'll demonstrate using a stat called "Kills" (which I'm choosing because
the first guide I found on stats happened to use it) set up like so:
/scoreboard objectives add Kills totalKillCount
/scoreboard objectives setDisplay sidebar Kills
This counter should go up for each player as they kill stuff (becoming visible to them once they start doing so). Let's say you wanted to get the exact value for a given player, and happen to know that the maximum value it
could be is, say, 100. A monitoring script might go like this:
local players = {"master39","BombBloke"} -- Fill this table however you like.
commands.scoreboard("objectives add Kills totalKillCount") -- Sample objective.
commands.scoreboard("objectives setDisplay sidebar Kills") -- Makes the counter visible to players (once they start).
local maxVal = 100 -- Highest value you expect a player to reach.
local function getKillCount(playerName)
if not commands.xp("0 "..playerName) then return 0 end -- In case the player is not online.
local minGuess, maxGuess, curGuess = 0, maxVal, math.floor(maxVal / 2)
while curGuess >= minGuess and curGuess < maxGuess do
if commands.testfor("@a[name="..playerName..",score_Kills="..tostring(curGuess).."]") then
-- Score is equal to or less than curGuess.
maxGuess = curGuess
curGuess = minGuess + math.floor((maxGuess - minGuess) / 2)
else
-- Score is greater than curGuess.
minGuess = curGuess
curGuess = math.max(minGuess + 1, minGuess + math.floor((maxGuess - minGuess) / 2))
end
end
return curGuess
end
-- A primitive score display loop:
while true do
term.clear()
term.setCursorPos(1,1)
for i = 1, #players do print(players[i]..": "..getKillCount(players[i])) end
sleep(30) -- Or however many seconds you want between updates.
end
With any luck you should be able to adapt this for your purposes.
In the case of the above example, if you wanted to clear the stats you'd do:
/scoreboard objectives setDisplay sidebar
/scoreboard objectives remove Kills