Jump to content
  • 0

reset the set status every day.


qtdan

Question


  • Group:  Members
  • Topic Count:  67
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   29
  • Joined:  10/21/12
  • Last Seen:  

mes "[ ^336699Coin Master^000000 ]";
		mes "How many coins would you like?";
		set @mamount,0;
		input @mamount;
		if (zeny < 0) goto L_No;
		if (zeny < (10000000* @mamount)) goto L_No;
		if (checkweight(677,@mamount) == 0 ) goto L_OW;
		set dcoins, @mamount;
		set dcoins2, (dcoins2 + (@mamount)); //<-------------------- This Line
		set Zeny,(zeny - (10000000* @mamount));
		getitem 677,@mamount;
		goto L_Thanks;

I want to limit the coin exchange of my server for only 50 per day, how can i reset the "set dcoins2" for every player every "OnClock0000:".

-	script	CoinsReset	-1,{
OnInit:
OnClock0000: //12am
set dcoins2, 0;
}

Already try this code but it doesn't work. TIA ♥

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

My way is remember 'Day' that players logged in. (gettimestr)

When player login again on next days, you just use OnPCLoginEvent to check and reset those variables.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   25
  • Joined:  12/24/14
  • Last Seen:  

try to reset from sql with script

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