Jump to content

Dtom's chest


Recommended Posts

Hey-o! I'm new to this board.

Anyways. I was doing Dtom's modding Tutorial, and I came to this part with a treasure chest that is supposed to have a 3 digit combination lock. The correct combination being 1 4 7. So, I tried using his script for it and it wouldn't work so I made my own, but the correct answer dosn't seem to work. Can ya help me out fellow moddies?

Here is the script I'm using :

 

scn bgmchest2

short button1

short button2

short button3

short digit

begin onactivate

if bgm001.digit == 7 ;(I started using variables declared in the quest script on an earlier attempt. They are still declared there.)

activate

else

if bgm001.digit == 0

messagebox "What is the first digit?", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"

set bgm001.digit to 1

endif

if bgm001.digit == 2

messagebox "What is the second digit?", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"

set bgm001.digit to 3

endif

if bgm001.digit == 4

messagebox "What is the third digit?", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"

set bgm001.digit to 5

endif

endif

end

begin gamemode

if bgm001.digit == 1 && getbuttonpressed > -1

set bgm001.button1 to getbuttonpressed

set bgm001.digit to 2

endif

if bgm001.digit == 3 && getbuttonpressed > -1

set bgm001.button2 to getbuttonpressed

set bgm001.digit to 4

endif

if bgm001.digit == 5 && getbuttonpressed > -1

set bgm001.button3 to getbuttonpressed

set bgm001.digit to 6

endif

if bgm001.digit == 6

if bgm001.button1 == 1 && bgm001.button2 == 4 && bgm001.button3 == 7

messagebox "You hear a small click from inside the chest"

set bgm001.digit to 7

else

messagebox "The chest dosn't budge no matter how hard you try"

set bgm001.digit to 0

endif

endif

end

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...