I did use () instead [], but for some reason last time I tried to posts something with ( ) in it it said HTML not enabled. Hopefully I can use UBB code correctly to post my script... I didn't see any problems the script, so maybe you could spot something.
Code:
begintownscript;variables;int i,j,k,choice;body;beginstate INIT_STATE; set_crime_tolerance(1); i = 0;break;beginstate EXIT_STATE;break;beginstate START_STATE;break;beginstate 10; message_dialog("You spot a small building, that has a very old label, that says old treasure chamber.""This looks like a good place to loot. After all, the box on the other end of the chamber readsgold.");break;beginstate 11; reset_dialog(); add_dialog_str(0,"You notice a lever in this small hallway. Do you wish to pull it?",0); add_dialog_choice(0,"Leave"); add_dialog_choice(1,"Pull Lever"); choice = run_dialog(1); if (choice == 1); end(); if (choice == 2); flip_terrain(37,37); flip_terrain(33,38); message_dialog("You hear the sounds of metal clancking on stone.","");break;beginstate 12; if (i < 4) { block_entry(1); message_dialog("You try to cross, but the rune repels you. You cant get through here now.",""); } if (i = 4) set_state_continue(13); if (i > 4) { damage_near_loc(38,23,50,4,1); message_dialog("You set the power too high!","The floor begins spreading a sonar heat wave 4 spaces in every direction of the blue tile! Get out of there!"); block_entry(1); }break;beginstate 13; message_dialog("You step over the floor. Instead of blocking you, it alows you to pass, and take what is inside the crystal container. And to top it off, the gates over to the west open!","You open the container, and good lord! It is a golden pig!_To take the item, search the container and grab it."); block_entry(0); flip_terrain(30,22);break;beginstate 20; reset_dialog(); add_dialog_str(0,"You notice a small power lever on the floor. Should you pull it?",0); add_dialog_choice(0,"Leave"); add_dialog_choice(1,"Pull Lever"); if (choice = 1;) end(); if (choice = 2) { flip_terrain(39,24); message_dialog("You turn the lever","It appears the lever was a power control. You hear a slight electrical discharge, and the rune symbol on the blue tile sparks. You have turned up the power a little."); i + 1; }break;beginstate 21;reset_dialog(); add_dialog_str(0,"You notice a small power lever on the floor. Should you pull it?",0); add_dialog_choice(0,"Leave"); add_dialog_choice(1,"Pull Lever"); if (choice = 1;) end(); if (choice = 2) { flip_terrain(39,25); message_dialog("You turn the lever","It appears the lever was a power control. You hear a slight electrical discharge, and the rune symbol on the blue tile sparks. You have turned up the power a little."); i + 1; }break;beginstate 22; reset_dialog(); add_dialog_str(0,"You notice a small power lever on the floor. Should you pull it?",0); add_dialog_choice(0,"Leave"); add_dialog_choice(1,"Pull Lever"); if (choice = 1;) end(); if (choice = 2) { flip_terrain(39,26); message_dialog("You turn the lever","It appears the lever was a power control. You hear a slight electrical discharge, and the rune symbol on the blue tile sparks. You have turned up the power a little."); i + 1; }break;beginstate 23; reset_dialog(); add_dialog_str(0,"You notice a small power lever on the floor. Should you pull it?",0); add_dialog_choice(0,"Leave"); add_dialog_choice(1,"Pull Lever"); if (choice = 1;) end(); if (choice = 2) { flip_terrain(39,27); message_dialog("You turn the lever","It appears the lever was a power control. You hear a slight electrical discharge, and the rune symbol on the blue tile sparks. You have turned up the power a little."); i + 1; }break;beginstate 24; reset_dialog(); add_dialog_str(0,"You notice a small power lever on the floor. Should you pull it?",0); add_dialog_choice(0,"Leave"); add_dialog_choice(1,"Pull Lever"); if (choice = 1;) end(); if (choice = 2) { flip_terrain(39,28); message_dialog("You turn the lever","It appears the lever was a power control. You hear a slight electrical discharge, and the rune symbol on the blue tile sparks. You have turned up the power a little."); i + 1; }break;beginstate 25; reset_dialog(); add_dialog_str(0,"You notice a small power lever on the floor. Should you pull it?",0); add_dialog_choice(0,"Leave"); add_dialog_choice(1,"Pull Lever"); if (choice = 1;) end(); if (choice = 2) { flip_terrain(39,29); message_dialog("You turn the lever","It appears the lever was a power control. You hear a slight electrical discharge, and the rune symbol on the blue tile sparks. You have turned up the power a little."); i + 1; }break;