Just coded this up in DBP but should work in DBC. Bonus points if you figure out where I got the puzzle from along with solving it.
PUZZLE CODE:
`SET UP
set display mode 800,600,32
sync on:sync rate 0
set text font "Times New Roman",1
set text size 20
randomize timer()
ink rgb(255,255,255),0
`Var
dim color(4)
dim dial(4)
dim solvedial(4)
color(1)=rgb(255,255,0)
color(2)=rgb(255,0,0)
color(3)=rgb(0,0,255)
color(4)=rgb(128,0,192)
`unlikly but what the heck
flag=1
While flag=1
for n=1 to 4
dial(n)=rnd(9)
solvedial(n)=rnd(9)
next n
`if same then loop
for n=1 to 4
if solvedial(n)<>dial(n) then flag=0
next n
Endwhile
for n=1 to 4
solvenum$=solvenum$+str$(solvedial(n))
next n
` //MAIN LOOP//
DO
gosub Images
gosub Click
gosub Game
if win=1
gosub Win
endif
sync:cls
LOOP
`////
Game:
mx=mousex()
my=mousey()
`check to see if ober a button
mouseover=0
if mx>=40 and mx<=60
for n=1 to 4
if my>=n*40 and my<=(n*40)+20
mouseover=n
endif
next n
endif
if click=1
if mouseover>0
`if click n over button then add to corect dials
x=mouseover
dial(x)=dial(x)+1
if x-1>0 then dial(x-1)=dial(x-1)+1
if x+1<5 then dial(x+1)=dial(x+1)+1
for n=1 to 4
if dial(n)>9 then dial(n)=0
next n
endif
endif
`if all = then win
flag=1
for n=1 to 4
if solvedial(n)<>dial(n) then flag=0
next n
if flag=1 then win=1
return
`////
Images:
ink rgb(255,255,255),0
for n=1 to 4
box 40,n*40,60,(n*40)+20
text 65,n*40, str$(dial(n))
next n
text 60,10, solvenum$
for n=1 to 4
ink color(n),0
box 41,(n*40)+1,59,(n*40)+19
next n
Return
`////
Win:
ink color(rnd(3)+1),0
text 100,100, "YOU HAVE SOLVED THE PUZZLE!!!"
Return
`////
Click:
if mouseclick()=0 then press=0
if click=1 then click=0
if mouseclick()=1 and press=0
press=1
click=1
endif
Return
It is quiet easy once you figure it out, just guessing at it is a sissy way to go at it.
(try to refrain but here \/)
HINT:
Pushing a button will cause it to increase by one, along with the one above and below. Pushing the top and bottom button doesn't really change anything except the difference of the middle buttons since it wraps 0-9. Try messing with the middle buttons to see how it effects the "difference" of the buttons.