extatus Posted February 1, 2019 Posted February 1, 2019 Hello. Ive used configs in the past and they work great. However I've encountered some anomalies & found ways to overcome but i need a cleaner approach to this one. Problem: My task is to ask 5 npcs a same question, however the config value does not change. The value only increases when all 5 are questioned and i go back talking that ive actually questioned all 5 . The quest state is definetly changed, but not in value. This does not happen with any other quest-where is the information stored?
Protoprize Posted February 1, 2019 Posted February 1, 2019 I mean, wouldn't a simple for/switch loop fix this issue if you're trying to talk to ONLY 5 npc's? for(int x = 0;x<5;x++) { switch(x) { case 0: (talk to first npc) case 1: (talk to 2nd npc) case 2: (etc...) case 3: case 4: } } It eliminates the need to manually increment values and also makes sure that it only loops 5 times and not more Correct me if I'm wrong though, it's the first thing that came to my mind when reading this post
extatus Posted February 1, 2019 Author Posted February 1, 2019 35 minutes ago, Protoprize said: I mean, wouldn't a simple for/switch loop fix this issue if you're trying to talk to ONLY 5 npc's? for(int x = 0;x<5;x++) { switch(x) { case 0: (talk to first npc) case 1: (talk to 2nd npc) case 2: (etc...) case 3: case 4: } } It eliminates the need to manually increment values and also makes sure that it only loops 5 times and not more Correct me if I'm wrong though, it's the first thing that came to my mind when reading this post I like to confirm quest state before i move on to next task. Like after going through a dialog with some guy in varrock,the config value increases and i can teleport to new region. Otherwise, if it missclicks the npc, or the game lags a bit, it could teleport, move to next npcs and end up stuck later since it didnt ask all 5. It is not a huge deal but a nice addition to scripts reliability. 12 minutes ago, HeyImJamie said: Look into Varbits. i think u got the right idea. thx
HeyImJamie Posted February 1, 2019 Posted February 1, 2019 14 minutes ago, extatus said: I like to confirm quest state before i move on to next task. Like after going through a dialog with some guy in varrock,the config value increases and i can teleport to new region. Otherwise, if it missclicks the npc, or the game lags a bit, it could teleport, move to next npcs and end up stuck later since it didnt ask all 5. It is not a huge deal but a nice addition to scripts reliability. i think u got the right idea. thx If you let me know what quest it is I can see if I have the Varbits.
extatus Posted February 1, 2019 Author Posted February 1, 2019 9 minutes ago, HeyImJamie said: If you let me know what quest it is I can see if I have the Varbits. Fairy Tale Part I