pojiejapan Posted February 18, 2012 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 126 Reputation: 6 Joined: 11/18/11 Last Seen: February 19, 2015 Share Posted February 18, 2012 example is set dar_dar,1 how can I reset the set of the player? For example he can do the quest again. Example of script. Finish quest = set dar_dar,1; if dar_dar,1; - cannot do that quest again. but how can I reset a player or GM set so it can do that quest again? thanks in advance Quote Link to comment Share on other sites More sharing options...
Brian Posted February 18, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 594 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted February 18, 2012 Set the variable to 0, which is the equivalent of deleting the variable. set dar_dar, 0; Quote Link to comment Share on other sites More sharing options...
pojiejapan Posted February 19, 2012 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 126 Reputation: 6 Joined: 11/18/11 Last Seen: February 19, 2015 Author Share Posted February 19, 2012 is there any option ? i mean not by using script. maybe GM commands? Quote Link to comment Share on other sites More sharing options...
Brian Posted February 19, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 594 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted February 19, 2012 I think you could create a command like @reset_dar that uses pc_setaccountreg(sd, "dar_dar", 0); then to use it on other players: #reset_dar PlayerName. If you don't want to edit the source, you could make a script that GMs can whisper the name of a player, then the script resets the player's variable. - script reset_dar -1,{ OnWhisperGlobal: if (getgroupid() < 99) end; set .@AID, playerattached(); set .@name$, @whispervar0$; mes "[dar_dar reset]"; mes "Do you want to reset the Dar Dar quest for " + .@name$ + "?"; if (select("Yes:No")==2) close; // check if player exists if (query_sql "SELECT char_id,account_id FROM `char` WHERE `name`='"+escape_sql(.@name$)+"'", .@char_id, .@account_id) { // if player is online ... if (isloggedin(.@char_id, .@account_id)) { if (attachrid .@account_id) { set dar_dar, 0; attachrid .@AID; mes "Dar Dar quest reset for " + .@name$ + "."; } } else { // offline - delete variable from SQL query_sql "DELETE FROM global_reg_value WHERE char_id="+.@char_id+" AND `str`='dar_dar'"; mes "Dar Dar quest reset for " + .@name$ + "."; } } else { mes "Player not found."; } close; } Quote Link to comment Share on other sites More sharing options...
Question
pojiejapan
example is set dar_dar,1
how can I reset the set of the player?
For example he can do the quest again.
Example of script.
Finish quest = set dar_dar,1;
if dar_dar,1; - cannot do that quest again.
but how can I reset a player or GM set so it can do that quest again?
thanks in advance
Link to comment
Share on other sites
3 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.