Billy 164 Report post Posted May 14, 2016 Customisable question NPC. Table for questions/answers/prizes. Function to refresh questions. Function to clear answer records. Player can only answer each question once (until records are cleared). (EDIT: Added auto refresh after X seconds, set delay to 0 to disable) (EDIT: 17/05/16 : Added MinLevel and MaxLevel parameter to questions) http://pastebin.com/c2T5530V 6 Quote Share this post Link to post Share on other sites
DevMorgan 6 Report post Posted May 14, 2016 Thankyou bro!!! Quote Share this post Link to post Share on other sites
DevMorgan 6 Report post Posted May 17, 2016 (edited) How to add Level Trigger? QuestionNpc.ErrorLevel = "You need Lv 40 for answer this question." --Checks Level. function QuestionNpc.CheckLevel(QuestionID,AnswerID) if QuestionNpc.Questions[QuestionID].Answer == AnswerID then QuestionNpc.Error = LvCheck, ">", 40, return 1 else QuestionNpc.Error = QuestionNpc.ErrorLevel return 0 end end InitTrigger() TriggerCondition( 1, QuestionNpc.CheckLevel,ChosenQuestion) help me? @7n6 Edited May 17, 2016 by DevMorgan Quote Share this post Link to post Share on other sites
Billy 164 Report post Posted May 17, 2016 13 hours ago, DevMorgan said: How to add Level Trigger? QuestionNpc.ErrorLevel = "You need Lv 40 for answer this question." --Checks Level. function QuestionNpc.CheckLevel(QuestionID,AnswerID) if QuestionNpc.Questions[QuestionID].Answer == AnswerID then QuestionNpc.Error = LvCheck, ">", 40, return 1 else QuestionNpc.Error = QuestionNpc.ErrorLevel return 0 end end InitTrigger() TriggerCondition( 1, QuestionNpc.CheckLevel,ChosenQuestion) help me? @7n6 Updated the download link, now has MinLevel and MaxLevel parameters for each question. You can leave either as nil if you don't want a min or max level for a question (Also I think I renamed one of the functions (TimeCheck -> CheckTime) , so if it doesnt work make sure to update that in your missionsdk) 1 Quote Share this post Link to post Share on other sites
DevMorgan 6 Report post Posted May 17, 2016 Thankyou! Quote Share this post Link to post Share on other sites
DevMorgan 6 Report post Posted May 17, 2016 [05-17 15:23:12]resource/script/addons/roso/Question NPC.lua:329: attempt to call global `PadString' (a nil value) Quote Share this post Link to post Share on other sites
Billy 164 Report post Posted May 17, 2016 on line 329 change PadString to QuestionNpc.PadString 1 Quote Share this post Link to post Share on other sites
DevMorgan 6 Report post Posted May 17, 2016 Thankyou its 100% now! Quote Share this post Link to post Share on other sites
Methz 2 Report post Posted February 2, 2017 Can someone upload the script again please? Quote “So the problem is not so much to see what nobody has yet seen, as to think what nobody has yet thought concerning that which everybody sees.” ― Arthur Schopenhauer Share this post Link to post Share on other sites
Billy 164 Report post Posted February 2, 2017 28 minutes ago, Methz said: Can someone upload the script again please? added pastebin, for future referance if links dont work change daylight-online.ru/xxxxx to pkodev.net/xxxxxx 1 Quote Share this post Link to post Share on other sites
Methz 2 Report post Posted February 2, 2017 Thank you for the script and tip Quote “So the problem is not so much to see what nobody has yet seen, as to think what nobody has yet thought concerning that which everybody sees.” ― Arthur Schopenhauer Share this post Link to post Share on other sites