Kakaroto Posted May 15, 2016 Group: Members Topic Count: 99 Topics Per Day: 0.02 Content Count: 637 Reputation: 95 Joined: 05/11/12 Last Seen: 12 hours ago Share 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 Link to comment Share on other sites More sharing options...
0 Vykimo Posted May 16, 2016 Group: Members Topic Count: 23 Topics Per Day: 0.00 Content Count: 236 Reputation: 189 Joined: 11/27/11 Last Seen: August 4, 2024 Share Posted May 16, 2016 for(.@i = 9285; .@i <= 9289; .@i++) { if(checkquest(.@i)>=0) erasequest .@i; } is better 1 Quote Link to comment Share on other sites More sharing options...
0 Promise Posted May 15, 2016 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 386 Reputation: 38 Joined: 04/28/13 Last Seen: March 22, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Emistry Posted May 16, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 18 hours ago Share 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 Link to comment Share on other sites More sharing options...
0 Kakaroto Posted May 16, 2016 Group: Members Topic Count: 99 Topics Per Day: 0.02 Content Count: 637 Reputation: 95 Joined: 05/11/12 Last Seen: 12 hours ago Author Share 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 Link to comment Share on other sites More sharing options...
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!!
Link to comment
Share on other sites
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.