Jump to content
  • 0

Something wrong with this script?


c2greentea

Question


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  173
  • Reputation:   0
  • Joined:  06/07/14
  • Last Seen:  

Is there something wrong with this script before I implement it? It is supposed to increase the official rates by x2 on Saturday 12 am and change back to the official rates on Sunday, after 24 hours.

//===== rAthena Script =======================================
//= Floating Rates
//===== Support ==============================================
//= Vist: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/doc/script_commands.txt
//= to know how to change the time settings
//===== By: ================================================== 
//= Mysterious
//===== Current Version: =====================================
//= 1.5
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
//= EXP Doubles on Weekends
//===== Other Information: ===================================
// Every weekend, starting on Fridays, players will gain
// double EXP. The script will announce when Double EXP has
// begun so that players know.
//===== TODO: ================================================
// 1) Optimize script a little more
// 2) Make script more friendly
//===== Additional Comments: =================================
//= v1.0 - Intitial Re-release [Mysterious]
//= v1.1 - Made it so that it starts on Friday, ends on Sunday [Mysterious]
//= v1.2 - Optimized entire script [Mysterious]
//= v1.3 - Made it more friendly [Mysterious]
//= v1.4 - Optimized [Mysterious]
//= v1.5 - Adjusted a few things [Mysterious]
//============================================================
-	script	FloatingRates	-1,{
	

OnInit:
	//Note: You can always set a standard exp. rate or set it as a rand
	set $@brate, 35000; // Change the value here for your Base Experience
	set $@jrate, 35000; // Change the value here for your Job Experience
	set $@drate, 10000;
// =========================
OnClock0000:
	if( gettime(4)==6 ) { //Saturday
		//Base Experience
		setbattleflag("base_exp_rate",$@brate);
		//Job Experience
		setbattleflag("job_exp_rate",$@jrate);
		//Drops
		setbattleflag("item_rate_common",$@drate);
		setbattleflag("item_rate_heal",$@drate);
		setbattleflag("item_rate_use",$@drate);
		setbattleflag("item_rate_equip",$@drate);
		// Reload the database
		atcommand "@reloadmobdb";

		announce "X2 increased EXP and DROP rates for this whole Saturday starts now! Enjoy!",bc_all,0xFF6060;	
	}
end;
}


-	script	FloatingAnn#1	-1,{

OnClock0000:
if(gettime(4) == 0) { // On Saturday at 11:59pm server time, Double EXP event will end
	announce "X2 increased EXP and DROP rates has ended!",bc_all,0xFF6060;
	setbattleflag("base_exp_rate", 5000 ); // Set this rates back to your regular server's rates
	setbattleflag("job_exp_rate", 5000 ); // Set this rates back to your regular server's rates
	//Drops
	setbattleflag("item_rate_common", 900 );
	setbattleflag("item_rate_heal", 900 );
	setbattleflag("item_rate_use", 900 );
	setbattleflag("item_rate_equip", 900 );
	atcommand "@reloadmobdb";
	}

end;
}
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

set $@drate, 10000;
end; // <----------------- ADD THIS
OnClock0000

change to

OnSat0000:

then

OnSun0000:

copy the same part..with original drop rate settings.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  173
  • Reputation:   0
  • Joined:  06/07/14
  • Last Seen:  

I didnt understand "copy the same part" Emistry. Is the script FloatingAnn#1 all right? Because the script FloatingRates works but FloatingAnn#1 doesnt.

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