Kakaroto Posted May 15, 2016 Posted May 15, 2016 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: Thank you in advance!! Quote
0 Vykimo Posted May 16, 2016 Posted May 16, 2016 for(.@i = 9285; .@i <= 9289; .@i++) { if(checkquest(.@i)>=0) erasequest .@i; } is better 1 Quote
0 Promise Posted May 15, 2016 Posted May 15, 2016 (edited) for(.@i = 9285; .@i <= 9289; .@i++) { if(checkquest(.@i)>=0) erasequest .@i; else { end; } } Edited May 15, 2016 by Promise 1 Quote
0 Emistry Posted May 16, 2016 Posted May 16, 2016 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; } 1 Quote
0 Kakaroto Posted May 16, 2016 Author Posted May 16, 2016 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! Quote
Question
Kakaroto
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:
map_server:
Thank you in advance!!
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.