Jump to content
  • 0

OnDate Floating Rates


Brave

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  208
  • Reputation:   11
  • Joined:  05/31/12
  • Last Seen:  

How do I set ondate in here? please help setting ondate: 11/04/2014 and will end on 11/19/2014

-	script	FloatingRates	-1,{
	

OnInit:
	//Note: You can always set a standard exp. rate or set it as a rand
	set $@brate,1000; // Change the value here for your Base Experience
	set $@jrate,1000; // Change the value here for your Job Experience
	set $@drate,700;
// =========================
OnDay1103:
		{ // Friday, Saturday, Sunday
		//Base Experience
		setbattleflag("base_exp_rate",$@brate*100);
		//Job Experience
		setbattleflag("job_exp_rate",$@jrate*100);
		// Reload the database
		setbattleflag("item_rate_common",$@drate*100);
		setbattleflag("item_rate_heal",$@drate*100);
		setbattleflag("item_rate_use",$@drate*100);
		setbattleflag("item_rate_equip",$@drate*100);
		setbattleflag("item_rate_card",$@drate*100);
		atcommand "@reloadmobdb";	
	}
end;
}

// We will announce about the EXP rates every 01 Minute of every Hour so that player's know what's going on
//============================================================================

-	script	FloatingAnn	-1,{

OnMinute00:
	if(gettime(4)==0 || gettime(4)==6 || gettime(4)==1 || gettime(4)==2 || gettime(4)==3 || gettime(4)==4 || gettime(4)==5 ) { // Friday, Saturday, Sunday
	announce "Super Month Event is currently in affect with :"+($@brate*100)+"x/"+($@jrate*100)+"x rates!",bc_all,0xFF6060;
	}

end;
}


//============================================================================

-	script	FloatingAnn#1	-1,{

OnDay1119:
	{ // On Sunday at 11:59pm server time, Double EXP event will end
	announce "Super Month Event has finished!",bc_all,0xFF6060;
	setbattleflag("base_exp_rate", 1000 ); // Set this rates back to your regular server's rates
	setbattleflag("job_exp_rate", 1000 ); // Set this rates back to your regular server's rates
	atcommand "@reloadmobdb";
	}

end;
}

//============================================================================
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  183
  • Reputation:   15
  • Joined:  06/10/12
  • Last Seen:  

But is just correct..

OnDay1119:

Event ends 19/11 -> OnDay11 = month 11 / OnDay1119 = month 11 day 19

OnDay1103:

Event starts 04/11 

OnMinute00:

Check if is 00 (24hrs) onclock.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  208
  • Reputation:   11
  • Joined:  05/31/12
  • Last Seen:  

But is just correct..

OnDay1119:

Event ends 19/11 -> OnDay11 = month 11 / OnDay1119 = month 11 day 19

OnDay1103:

Event starts 04/11 

OnMinute00:

Check if is 00 (24hrs) onclock.

 

it just doesn't work :( tried it and doesn't work

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

Using OnDay will be a pain since it occurs 15 times, consecutively.it will be:

OnDay1104:

OnDay1105:

OnDay1106:

OnDay1107:

OnDay1108:

OnDay1109:

OnDay1110:

OnDay1111:

OnDay1112:

OnDay1113:

OnDay1114:

OnDay1115:

OnDay1116:

OnDay1117:

OnDay1118:

OnDay1119:

 

Therefore, I suggest you to use if and gettime functions.

-	script	FloatingRates	-1,{
OnInit:
	//Note: You can always set a standard exp. rate or set it as a rand
	set $@brate,1000; // Change the value here for your Base Experience
	set $@jrate,1000; // Change the value here for your Job Experience
	set $@drate,700;
// =========================
if ((gettime(6) == 11) && (gettime(5)>=4) && (gettime(5)<=19)) {
		//Base Experience
		setbattleflag("base_exp_rate",$@brate*100);
		//Job Experience
		setbattleflag("job_exp_rate",$@jrate*100);
		// Reload the database
		setbattleflag("item_rate_common",$@drate*100);
		setbattleflag("item_rate_heal",$@drate*100);
		setbattleflag("item_rate_use",$@drate*100);
		setbattleflag("item_rate_equip",$@drate*100);
		setbattleflag("item_rate_card",$@drate*100);
		atcommand "@reloadmobdb";	
	}
end;
}

// We will announce about the EXP rates every 01 Minute of every Hour so that player's know what's going on
//============================================================================

-	script	FloatingAnn	-1,{

OnMinute00:
	if ((gettime(6) == 11) && (gettime(5)>=4) && (gettime(5)<=19)) {
	announce "Super Month Event is currently in affect with :"+($@brate*100)+"x/"+($@jrate*100)+"x rates!",bc_all,0xFF6060;
	}

end;
}


//============================================================================

-	script	FloatingAnn#1	-1,{

OnDay1119:
	announce "Super Month Event has finished!",bc_all,0xFF6060;
	setbattleflag("base_exp_rate", 1000 ); // Set this rates back to your regular server's rates
	setbattleflag("job_exp_rate", 1000 ); // Set this rates back to your regular server's rates
	atcommand "@reloadmobdb";

end;
}

//============================================================================

Just asking, have you set the configurations below the OnInit label? why is it the same with the regular rate?

Edited by Winz
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...