sensor confi unloader1 @config
sensor num nucleus1 confi
sensor cont nucleus1 @itemCapacity
op div re num cont
op mul p re 100
op idiv p2 p 10
op mod p3 p 10
op idiv p3 p3 1
set isno p2
set i 2
set x1 34
set y1 35
set w 8
set b 14
draw clear 0 0 0 0 0 0
draw stroke 2 0 0 0 0 0
draw image 48 16 confi 32 0 0
jump 22 lessThan p2 10
op sub x0 x1 w
op add y0 y1 w
op add y0 y0 w
draw line x0 y1 x0 y0 0 0
set isno p2
jump 25 greaterThan i 1
set isno p3
op add x1w1 x1 w
op add y1w1 y1 w
op add y1w2 y1w1 w
jump 38 equal isno 0
jump 46 equal isno 1
jump 50 equal isno 2
jump 57 equal isno 3
jump 64 equal isno 4
jump 70 equal isno 5
jump 77 equal isno 6
jump 85 equal isno 7
jump 90 equal isno 8
jump 99 equal isno 9
set n0 0
draw line x1 y1 x1 y1w1 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
jump 106 always isno 9
set n1 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
jump 106 always isno 9
set n2 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
draw line x1 y1 x1 y1w1 0 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
jump 106 always isno 9
set n3 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1 y1 x1 y1w1 0 0
jump 106 always isno 9
set n4 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
jump 106 always x false
set n5 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
jump 106 always x false
set n6 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
draw line x1 y1 x1 y1w1 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
jump 106 always x false
set n7 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
jump 106 always x false
set n8 0
draw line x1 y1 x1 y1w1 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
jump 106 always x false
set n9 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
op sub i i 1
op add x1 x1 b
jump 22 greaterThan i 0
op add xp x1 b
draw line x1 y1 xp y1w2 0 0
op sub xp xp 4
op add x1 x1 4
draw linePoly x1 y1w2 8 3 0 0
draw linePoly xp y1 8 3 0 0
drawflush display1

sensor num nucleus1 confi
sensor cont nucleus1 @itemCapacity
op div re num cont
op mul p re 100
op idiv p2 p 10
op mod p3 p 10
op idiv p3 p3 1
set isno p2
set i 2
set x1 34
set y1 35
set w 8
set b 14
draw clear 0 0 0 0 0 0
draw stroke 2 0 0 0 0 0
draw image 48 16 confi 32 0 0
jump 22 lessThan p2 10
op sub x0 x1 w
op add y0 y1 w
op add y0 y0 w
draw line x0 y1 x0 y0 0 0
set isno p2
jump 25 greaterThan i 1
set isno p3
op add x1w1 x1 w
op add y1w1 y1 w
op add y1w2 y1w1 w
jump 38 equal isno 0
jump 46 equal isno 1
jump 50 equal isno 2
jump 57 equal isno 3
jump 64 equal isno 4
jump 70 equal isno 5
jump 77 equal isno 6
jump 85 equal isno 7
jump 90 equal isno 8
jump 99 equal isno 9
set n0 0
draw line x1 y1 x1 y1w1 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
jump 106 always isno 9
set n1 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
jump 106 always isno 9
set n2 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
draw line x1 y1 x1 y1w1 0 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
jump 106 always isno 9
set n3 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1 y1 x1 y1w1 0 0
jump 106 always isno 9
set n4 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
jump 106 always x false
set n5 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
jump 106 always x false
set n6 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
draw line x1 y1 x1 y1w1 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
jump 106 always x false
set n7 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
jump 106 always x false
set n8 0
draw line x1 y1 x1 y1w1 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
jump 106 always x false
set n9 0
draw line x1 y1 x1w1 y1 0 0
draw line x1 y1w1 x1w1 y1w1 0 0
draw line x1 y1w1 x1 y1w2 0 0
draw line x1 y1w2 x1w1 y1w2 0 0
draw line x1w1 y1 x1w1 y1w1 0 0
draw line x1w1 y1w1 x1w1 y1w2 0 0
op sub i i 1
op add x1 x1 b
jump 22 greaterThan i 0
op add xp x1 b
draw line x1 y1 xp y1w2 0 0
op sub xp xp 4
op add x1 x1 4
draw linePoly x1 y1w2 8 3 0 0
draw linePoly xp y1 8 3 0 0
drawflush display1
