LadyHonor Posted January 22, 2017 Share Posted January 22, 2017 For some reason, when the quest_complete plots are set, it is completing the quest, but it isn't giving the player the reward for doing it. I made a rewards_lhc snippet and set it to reward 500 exp points and 2 gold. Everything shows correctly in the drop down rewards menu in the plot file, but it's not giving it. I did find a post by sunjammer over at flextra life showing how to do it via scripting. Cleaned up, the script looks like this: void lhcAddExp(int nXp, object oCreature=OBJECT_SELF) { float fXp = IntToFloat(GetExperience(oCreature)+ nXp); SetCreatureProperty(oCreature, PROPERTY_SIMPLE_EXPERIENCE, fXp, PROPERTY_VALUE_BASE); } And it's used like this (called in a dialog line when turning it in): void main() { if (WR_GetPlotFlag(PLT_LHC_HVR_SHARPEN_SWORDS, LHC_HVR_SS_LEADER_DESTROYED) && WR_GetPlotFlag(PLT_LHC_HVR_SHARPEN_SWORDS, LHC_HVR_SS_COMPLETE) == FALSE) { lhcAddExp(1000, GetHero()); AddCreatureMoney(20000, GetHero()); WR_SetPlotFlag(PLT_LHC_HVR_SHARPEN_SWORDS, LHC_HVR_SS_COMPLETE, TRUE); } } And it does add exp but only to a point. Example....Level 1 requires 2001 exp to advance to level 2. If you have 1500 xp before turning in the quest and the quest rewards 1000 xp, it will only add 500 xp and doesn't go any over to allow the player to level up. Using the existing options doesn't work either. So, I think it's safe to assume it isn't a gda/xls problem. So....any suggestions on how to fix this? The preferred method is via the dropdown rewards option, but the scripting method is fine if someone can tell me how to get it to reward all the experience. Link to comment Share on other sites More sharing options...
LadyHonor Posted January 22, 2017 Author Share Posted January 22, 2017 Fixed it. There was already a function to add xp to the party: RewardXPParty(1000, XP_TYPE_COMBAT, OBJECT_INVALID, OBJECT_INVALID); And I think I like doing it via script better now too. It gives more flexibility. Link to comment Share on other sites More sharing options...
Recommended Posts