RedHawke Posted January 29, 2005 Share Posted January 29, 2005 OK, In a dialogue, I only want a reply to be available if the PC speaker meets certain requirements, 3 to be exact; Example: PC Must be a Jedi, Have a Repair Skill of 9 and must have at least 1500 Credits... How in the heck do I write this one? 3 Nested IF statements, or lots of &&? *Princess Leia Hologram* Help me Darth333 youre my only hope! Or anyone else who wants to take a stab at this one... Link to comment Share on other sites More sharing options...
Darth333 Posted January 29, 2005 Share Posted January 29, 2005 Originally posted by RedHawke Or anyone else who wants to take a stab at this one... I'll risk myself...if your computer explodes, don't blame me int StartingConditional() { object oPC= GetPCSpeaker(); int nGold = GetGold(oPC); int nSkill = GetSkillRank(SKILL_REPAIR, oPC); if ((nGold >= 1500) && (GetLevelByClass(CLASS_TYPE_JEDICONSULAR, oPC) + GetLevelByClass(CLASS_TYPE_JEDIGUARDIAN, oPC) + GetLevelByClass(CLASS_TYPE_JEDISENTINEL, oPC)) && (nSkill >=9)) { return TRUE; } return FALSE; } note that I considered that the pc has to have a repair skill of "at least" 9 and not just equal to 9. If you want just 9 well...you know what to do Link to comment Share on other sites More sharing options...
RedHawke Posted January 29, 2005 Author Share Posted January 29, 2005 Thanks Darth333... It compiled, and not even any smoke from my PC... And now I just have to write 27 more variants of this script... then I can test my modstrosity out. EDIT: Tested and confirmed as working. Thanks again for saving me Darth333... I edited my post above too! Link to comment Share on other sites More sharing options...
Mav Posted January 29, 2005 Share Posted January 29, 2005 Oh no, what are you thinking up now RedHawke..... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.