Alo! I'm looking for the best/shortest way to check for a certain item in a 3x3 shown as below:
My original idea was to write out every position and then do a for-loop with an if statement inside, something like:
(My first thought however is that the positions could be fetched in a better way, but not sure how.)
My original idea was to write out every position and then do a for-loop with an if statement inside, something like:
Lua:
local purplePos = {
{x,y,z}, {x,y,z}, {x,y,z},
{x,y,z}, {x,y,z}, {x,y,z},
{x,y,z}, {x,y,z}, {x,y,z},
}
for i = 1,9 do
if getTileThingByPos(purplePos[i]).itemid ~= 9564 then
return false
end
end
(My first thought however is that the positions could be fetched in a better way, but not sure how.)