Jump to content
  • 0

set dar_dar,1;


pojiejapan

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  126
  • Reputation:   6
  • Joined:  11/18/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Set the variable to 0, which is the equivalent of deleting the variable.

set dar_dar, 0;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  126
  • Reputation:   6
  • Joined:  11/18/11
  • Last Seen:  

is there any option ? i mean not by using script. maybe GM commands?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

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;
}

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