View Single Post
  #5  
Old 02-18-2018, 10:54 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by lctucker2999 View Post
Thanks that condensed code looks so much better. As soon as I get home I'll try it out.

Another question, is there either a) a limit to the amount of elseif lines or b) a point where one npc is doing too much? My ultimate goal is to still have quest armor be a thing, but to simplify it (mold + class specific token that i havent decided how im going to implement yet) and then have one NPC per expansion to do quest armor turn ins e.g. Defender of Frost would allow you to turn in Thurg, SS and Kael armor... so however many classes there are, 15? Multiplied by 3 sets of armor, times 7 pieces per set, plus if I add mischief items that's around 400 different possible turn in combinations.

I'm having fun with the possibilities on how to tweak things. thanks again the help!

a. No limit (that I'm aware of, but remember if the last conditional is the one that applies, it will still iterate through all the prior ones and will check all if none apply)

b. You could take a look at quests in Kael for some leads. However, you may want to consider checking class for applicable exchanges, so nested if's/elsif's to a point. It's one way (of a few). You could also consider going the route of creating recipes, where combining said items result in some other, etc, etc. The straight answer (thus code) will rely highly on precisely what your game plan is in detail.
Reply With Quote