Jump to content
  • 0

if(checkquest(.@i)) erasequest .@i;


Kakaroto

Question


  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

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(.@i = 9285; .@i <= 9289; .@i++) {
                        if(checkquest(.@i)) erasequest .@i;
                    }

map_server:

6fa95a8.png

 

Thank you in advance!!

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   189
  • Joined:  11/27/11
  • Last Seen:  

for(.@i = 9285; .@i <= 9289; .@i++) {
                        if(checkquest(.@i)>=0) erasequest .@i;
                        
                    }
is better
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   38
  • Joined:  04/28/13
  • Last Seen:  


for(.@i = 9285; .@i <= 9289; .@i++) {

if(checkquest(.@i)>=0) erasequest .@i;

else {

end;

}

}

Edited by Promise
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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

if ( checkquest( .@i ) >= 0 ) {
    erasequest .@i;
}

otherwise you could also use isbegin_quest

if ( isbegin_quest( .@i ) > 0 ) {
    erasequest .@i;
}
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

for(.@i = 9285; .@i <= 9289; .@i++) {
                        if(checkquest(.@i)>=0) erasequest .@i;
                        else { 
                        end;
                        }
                    }

 

 

 

for(.@i = 9285; .@i <= 9289; .@i++) {
                        if(checkquest(.@i)>=0) erasequest .@i;
                        
                    }
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( .@i ) >= 0 ) {
    erasequest .@i;
}

otherwise you could also use isbegin_quest

if ( isbegin_quest( .@i ) > 0 ) {
    erasequest .@i;
}

 

 

 

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