Jump to content

Configs for questing


Recommended Posts

Posted

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? 

Posted

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

 

Posted
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

Posted
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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...