Garrulous Glaahk Abu Dhabi Posted June 29, 2004 Share Posted June 29, 2004 My code: beginstate 12; if (get_flag(1,1) == 1) && (get_flag(1,2) == 0) { set_state_continue(13); } if (get_flag(1,2) == 1) { set_state_continue(14); } if (has_item(377) == 1) && (get_flag(1,2) == 0) { set_state_continue(15); } if (get_flag(1,1) == 0) { set_state_continue(16); } break; beginstate 13; reset_dialog(); add_dialog_str(0,"Uncomplete."); add_dialog_choice(0,"Uh huh."); break; beginstate 14; reset_dialog(); add_dialog_str(0,"Completed."); add_dialog_choice(0,"Uh huh."); break; beginstate 15; reset_dialog(); add_dialog_str(0,"Completing."); add_dialog_str(1,"_Thanks._"); add_dialog_choice(0,"Ok."); award_party_xp(5,1); reward_give(248); set_flag(1,2,1); break; beginstate 16; reset_dialog(); add_dialog_str(0,"Description.",0); add_dialog_str(1,"Description.",0); add_dialog_str(2,"Description.",0); add_dialog_str(3,"_Bring._",0); add_dialog_str(4,"_Ok?_",0); add_dialog_choice(0,"Maybe."); set_flag(1,1,1); toggle_quest(1,1); break; I want this to be an outdoor get_me_something_or_other quest. But something's wrong. I don't know where, because I have the error line number problem, but I know this: When I walk into the area it gives me the quest, when I return with the item it shows an error. It shows no messages. Help me? Please? Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted June 29, 2004 Share Posted June 29, 2004 Missing a ( ) for the if statements' conditions. The conditions must be encased in ( ) Example Code: beginstate 12;if ((get_flag(1,1) == 1) && (get_flag(1,2) == 0))...if ((has_item(377) == 1) && (get_flag(1,2) == 0)) Link to comment Share on other sites More sharing options...
Garrulous Glaahk Abu Dhabi Posted June 30, 2004 Author Share Posted June 30, 2004 That doesn't seem to fix it all the way. I now get a completely different error. Something about wrong numbers. Anyway thanks. PS: Do you have BoA bitmaps for those giant blue chickens? I could probably use them. EDIT: I've noticed I missed a few ',0'. I placed them where they should be, now there is no error. It only works in a strange way -- no messages! Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted June 30, 2004 Share Posted June 30, 2004 Post the new script + comments. Always, always comment. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Abu Dhabi Posted June 30, 2004 Author Share Posted June 30, 2004 My code, revised: beginstate 12; // This is supposed to check SDFs // and items if ((get_flag(1,1) == 1) && (get_flag(1,2) == 0)) { set_state_continue(13); } if (get_flag(1,2) == 1) { set_state_continue(14); } if ((has_item(377) == 1) && (get_flag(1,2) == 0)) { set_state_continue(15); } if (get_flag(1,1) == 0) { set_state_continue(16); } break; beginstate 13; // Been here before, not finished // the quest reset_dialog(); add_dialog_str(0,"Incomplete.",0); add_dialog_choice(0,"Uh huh."); break; beginstate 14; // Been here before, finished the // quest reset_dialog(); add_dialog_str(0,"Completed.",0); add_dialog_choice(0,"Uh huh."); break; beginstate 15; // Have the right item, rewardng // now reset_dialog(); add_dialog_str(0,"Completing.",0); add_dialog_str(1,"_Thanks._"); add_dialog_choice(0,"Ok."); take_item(377); award_party_xp(5,1); reward_give(248); set_flag(1,2,1); break; beginstate 16; // This sould be the first after // the SDF check but I think it will work anyhow, // as long as the SDF check is correct // This describes the first visit to the encounter reset_dialog(); add_dialog_str(0,"Description.",0); add_dialog_str(1,"Description.",0); add_dialog_str(2,"Description.",0); add_dialog_str(3,"_Bring._",0); add_dialog_str(4,"_Ok?_",0); add_dialog_choice(0,"Maybe."); set_flag(1,1,1); toggle_quest(1,1); break; Happy? Link to comment Share on other sites More sharing options...
Burgeoning Battle Gamma Kiexcolo Posted June 30, 2004 Share Posted June 30, 2004 run_dialog(1)? Link to comment Share on other sites More sharing options...
Garrulous Glaahk Abu Dhabi Posted July 1, 2004 Author Share Posted July 1, 2004 Come again? Link to comment Share on other sites More sharing options...
Articulate Vlish FZ Posted July 1, 2004 Share Posted July 1, 2004 Code: reset_dialog(); add_dialog_str(0,"Description.",0); add_dialog_str(1,"Description.",0); add_dialog_str(2,"Description.",0); add_dialog_str(3,"_Bring._",0); add_dialog_str(4,"_Ok?_",0); add_dialog_choice(0,"Maybe."); set_flag(1,1,1); toggle_quest(1,1); I don't know scripts much, but it looks like you have set up a dialog, but haven't run it. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Abu Dhabi Posted July 1, 2004 Author Share Posted July 1, 2004 Where should I put run_dialog(1)? Right after reset_dialog() or somewhere else? Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted July 1, 2004 Share Posted July 1, 2004 reset the dialog, create the dialog (and choices), then run the dialog. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Abu Dhabi Posted July 1, 2004 Author Share Posted July 1, 2004 Thanks guys! It works now. It still has some minoer flaws, but I should be able to work it out from now. Thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts