Jump to content
  • 0

reset the set status every day.


Question

Posted
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 ♥

2 answers to this question

Recommended Posts

  • 0
Posted

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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...