I have a question about CM. As I see there is no code for digging box, so must be bring in another way. I tried to open adventure options box and then get the absolute position in pixels (A?y1/?y2) but there are too many values for the digging box and anyway it does not react to my left or right push (keeping bring me that big dialog box, ignoring debug messages and CM:R0 does not avoid the big box popping)
So, after I excluded all options possible I came up with the following solution, the best I could find, but I would like to know if there is another way to get a real dig (special mention- the player will have to dig for "grail" several times and get it several times):
ZVSE
!?CM0;
!!CM:F?y1 I?y2;
!!FU99&y1=512/y2=9:P; If right click on adventure options (left click does not work as it brings big box, whatever I do, any way to disable?)
!?FU99;
!!VRz1:S^Options^;
!!VRz2:S^Dig for treasure^;
!!VRz3:S^Exit^;
!!IF:G1/1/0/1/2/3;
!!CM:R0;
!!FU&v1=2:E;
!!IF&v1=1:M^You dig for treasure and rest for the whole day-temporary dialog^;
!!VRz10:S^DIGSOUND.wav^; external WAVE or 82M file
!!SN:Pz10; Play it now !
!!HE-1:W0;
!!HE-1:P?y1/?y2/?y3;
!!UN:Iy1/y2/y3/124/0; **place hole
Edit: solved with help of Berserker, kudos for adding checks for various situations
(This post was last modified: 17.11.2009 21:07 by Valery.)