• 0
Sign in to follow this  
Bringer

@events Timer Problem

Question

Every time i restart server  event timer will become negative
How can i avoid this from happening? That even if i restarted the server, event timer will remain as is and it will not show negative result or a negative time.

 

OnMinute00:
	$EVT_Dice_Timer = gettimetick(2);
	$EVT_Dice = 1;
	if( gettime(3) % 1 != 0 ) end;
	if (.EventStatus) end;
	.EventOnJoin = 1;
	.EventStatus = 1;
	announce "Dice: We are going to have a Dice event.",0;
	sleep 10000;
	announce "Dice: For those who wants to join, use @dice",0;
	sleep 10000;
	announce "Dice: After 1 Minute Event will close.",0;
	sleep 10000;
	announce "Dice: So please if you want to join. use @dice",0;
	initnpctimer;
	end;


OnTimer46000:
	announce "[ Dice ] Event Time's up.",0;
	.EventOnJoin = 0;
	$EVT_Dice = 0;
	$EVT_Dice_Status = 0;
	end;

 

-	script	eventstatus	-1,{

OnAtStatusEvent:
	[email protected]_lim_time = $EVT_Dice_Timer + .RunEvery;
	[email protected]_cur_time = gettimetick(2);
	[email protected]_ent_t = ([email protected]_lim_time - [email protected]_cur_time);
	[email protected]_h = ([email protected]_ent_t / 3600);
	[email protected]_m = ([email protected]_ent_t - ([email protected]_h * 3600)) / 60;
	[email protected]_s = [email protected]_ent_t - (([email protected]_h * 3600) + ([email protected]_m * 60));

	mes " [ Event Status ] ";
		if ($EVT_Dice == 0) mes " Dice Event [^FF0000"[email protected]_h+"h "[email protected]_m+"m "[email protected]_s+"s^000000]";
		if ($EVT_Dice == 1) mes " Dice Event [^FF0000"[email protected]_h+"h "[email protected]_m+"m "[email protected]_s+"s^000000]";

	switch(select(
		"Dice Event - " + ($EVT_Dice ? "^FF0000Not Available":"^00FF00Join Event!") + "^000000")) 
	{
	case 1:
		break;
	}
	end;

OnInit:
	bindatcmd "event",strnpcinfo(0)+"::OnAtStatusEvent";
	.RunEvery = 3600; // second
	end;
}

 

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
1 hour ago, Mabuhay said:

Change the variables from global permanent to global temp

$EVT_Dice_Timer to [email protected]_Dice_Timer

still same

Share this post


Link to post
Share on other sites
  • 0

You could try my own version of dice. 

I just took an old dice event script and modified it the way how I understand how your script works.

https://pastebin.com/UZ1R2ZM1

I will be posting my own version in rathena downloads in a bit.

Share this post


Link to post
Share on other sites
  • 0
58 minutes ago, Mabuhay said:

You could try my own version of dice. 

I just took an old dice event script and modified it the way how I understand how your script works.

https://pastebin.com/UZ1R2ZM1

I will be posting my own version in rathena downloads in a bit.

here my dice script

https://pastebin.com/iPMpP4c5

i want to copy this ideas

27497481_1539994936116984_882781207_n.png?_nc_cat=110&_nc_oc=AQmBtLWG3EuEQn8_pBOmRafYr8jD-Hoodk37DLvo_v2XVvSDoP-Vc3RjAkKXuGY9xm4&_nc_ht=scontent.fmnl4-3.fna&oh=9ec1d012917f301fc4c33bba14d9e485&oe=5DC5108B

Credit : SarahRO 

Share this post


Link to post
Share on other sites
  • 0

That's obviously an event manager script. 

It's quite tedious to do. I will have to think about making a simple one for free. 

Share this post


Link to post
Share on other sites
  • 0
17 minutes ago, Mabuhay said:

That's obviously an event manager script. 

It's quite tedious to do. I will have to think about making a simple one for free. 

i already made like on photo but my only problem the tick timer alwys negative when restart server

Share this post


Link to post
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.

Loading...
Sign in to follow this