Jump to content
  • 0
ToiletMaster

doesn't show the right status

Question

Hi Guys,


 


I got a pretty simple script down here, currently my main quest ID is
80003 and the problem now is, the quest status doesn't show the right
one. it works for the matthias#tutorial script though.


 


Example once im done with the quest with 80003 == 2, the 2nd npc doesn't show complete but shows inactive still.

 


Currently my end goal is to show which quest is active and which is
not for easier troubleshooting from my own end. Would be great if
someone could guide me through on what i went wrong sad.png


 


currently the one below shows the 1 quest that i'm looking at one
quest, but in the future i plan to put more and more quests in.

 

 

 

splendide_n,139,178,3    script    Matthias#Tutorial    507,{    if(checkquest(80003) == 2){    mes ""+.npc_name$+"";    mes ".......huh? You talkin' to me?";    }    mes ""+.npc_name$+"";    mes "Hello!";    setquest 80003;    completequest 80003;    close;        OnInit:        // Configuration for names.        .npc_name$ = "[^993300 Tester 1 ^000000]"; //NPC Name        .npc_name2$ = "[^003333 Tester 2^000000]"; //NPC2 Name        end;    } //ending bracket        splendide_n,144,178,3    script    quest#status    507,{    mes "I display your quest status";    next;    if(checkquest(80003 == 0)){    mes "Quest 80003: ^FF4848Inactive^000000";}    else    if(checkquest(80003 == 1)){    mes "Quest 80003: ^5757FFActive^000000";}    else    if(checkquest(80003 == 2)){    mes "Quest 80003: ^01F33ECompleted^000000"; }    close;        } //ending bracket

my end goal would be like

 

80003 = Completed

80004 = In progress

80005 = Completed

80006 = Inactive

Edited by ToiletMaster

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Just add more checks, but use the newer commands in the recent updates. For instance:

for (.@i = 80003; .@i < 80006; .@i++) {    if (questprogress(.@i)) {        mes "Quest [^0000FF"+ .@i +"^000000] is currently: "+((questprogress(.@i) == 2)?"^0000FFCompleted":(questactive(.@i)?"^FFFF00Inprogress":"^FF0000Inactive"))+"^000000";    } else {        mes "Quest [^0000FF"+ .@i +"^000000] hasn't been started yet.";    }}close;

 

What that does is check all your quests, one after the other, starting with quest 80003, and ending with 80006.

1. It'll first check to see if the quest has been obtained.

2. If it has, it'll check to see if it's completed, if so say it is.

3. If not completed, check to see whether it's active (inprogress) or inactive.

4. If it hasn't been obtained yet, say so.

5. Repeat for all quests.

6. close;

Share this post


Link to post
Share on other sites
  • 0

Hi there GmOcean,

 

Thank you for replying this thread! Initially i made another script similar to what you've placed but yours definitely seems much better and more easier to configure.

 

  mes "Quest 80003 Progress is "+questprogress(80003);
 mes "Quest 80004 Progress is "+questprogress(80004);
 mes "Quest 80005 Progress is "+questprogress(80005);
 mes "Quest 80006 Progress is "+questprogress(80006);
 close;

 

 

However, currently it shows the active ID whether it's 0,1,2.  I noticed you placed the text for inactive active and completed there, could there be a bug in the script perhaps?

 

edit

----

 

i tried playing around with the script you gave, since we only have 3 states now which is 0 1 2 for the quests,

 

quoting the one in the lastest doc folder

*questprogress(<ID>{,PLAYTIME|HUNTING})If no additional argument supplied, return the state of the quest:    0 = Quest not started (not in quest log)    1 = Quest has been given    2 = Quest completedIf parameter 'PLAYTIME' is supplied:    0 = Quest not started (not in quest log)    1 = The time limit has not yet been reached    2 = The time limit has been reachedIf parameter 'HUNTING' is supplied:    0 = Quest not started (not in quest log)    1 = Player hasn't killed all of the target monsters    2 = Player has killed all of the target monsters

 

therefore i would only need active and inactive since you've helped me out in playing 0 = has not started quest.

 

in this case,

 

   

 mes "Quest [^0000FF"+ .@i +"^000000] is currently:   "+((questprogress(.@i) == 2)?"^0000FFCompleted":(questprogress(.@i) == 1))+"^0000FFActive"; 

 

i've tried this statement above in contrary to the one you've provided, but it seems that it's not working :(, it works in the game but it doesn't the way i want it to, it's either shows (if state = 2) CompletedActive or if state 1 = 1Active. instead of just Completed / Active

 

Just fixed the CompletedActive part, but i'm left with 1Active only.

 

here's my current statement not sure how to remove that particular 1 there lol

 

 mes "Quest [^0000FF"+ .@i +"^000000] is currently:   "+((questprogress(.@i) == 2)?"^0000FFCompleted":(questprogress(.@i) == 1)+"^0000FFActive")+"^000000"; 

Edited by ToiletMaster

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.