Jump to content
  • 0
Kakaroto

if(checkquest([email protected])) erasequest [email protected];

Question

Hello...

Could someone give me a quick little help?

I like to check and delete multiple quests a player, but I can not make it work.

 

Script:

                    for([email protected] = 9285; [email protected] <= 9289; [email protected]++) {
                        if(checkquest([email protected])) erasequest [email protected];
                    }

map_server:

6fa95a8.png

 

Thank you in advance!!

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

checkquest return -1 if the quest isn't started/given.  So you have to add a checking for the value that returned.

if ( checkquest( [email protected] ) >= 0 ) {
    erasequest [email protected];
}

otherwise you could also use isbegin_quest

if ( isbegin_quest( [email protected] ) > 0 ) {
    erasequest [email protected];
}
  • Upvote 1
Link to comment
Share on other sites

  • 0
for([email protected] = 9285; [email protected] <= 9289; [email protected]++) {
                        if(checkquest([email protected])>=0) erasequest [email protected];
                        else { 
                        end;
                        }
                    }

 

 

 

for([email protected] = 9285; [email protected] <= 9289; [email protected]++) {
                        if(checkquest([email protected])>=0) erasequest [email protected];
                        
                    }
is better

 

 

 

 

checkquest return -1 if the quest isn't started/given.  So you have to add a checking for the value that returned.

if ( checkquest( [email protected] ) >= 0 ) {
    erasequest [email protected];
}

otherwise you could also use isbegin_quest

if ( isbegin_quest( [email protected] ) > 0 ) {
    erasequest [email protected];
}

 

 

 

Works perfectly, tnks guys!

Link to comment
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.   Paste as plain text instead

  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.



×
×
  • Create New...

Important Information

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