Jump to content
  • 0

[Paid] Automatic increased rates in certain days


c2greentea

Question


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

I'd like to know how to increased rates in certain days, for example every Saturday or Tuesday? Willing to tip via Paypal

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Here's an example done by Lupus, yeah?

//===== rAthena Script =======================================
//= Floating Server Rates
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= It's a simply example of setbattleflag
//= This script will change your server rates from 1x to 1.5x every 6 hours
//= Note: It doesn't affect Card granted drops, MVP & Treasure Chests drops ^_-
//=       It also doesn't affect CARD drops, because they are just 0.01%
//===== Additional Comments: =================================
//= You can make incredible scripts with 'setbattleflag'!
//============================================================

-	script	FloatingRates	-1,{
OnInit:
//add any other HOURS
OnHour00:
OnHour06:
OnHour12:
OnHour18:
//-------------------
	set $@brate,rand(100,150);
	set $@jrate,rand(100,150);
	set $@drate,rand(100,150);
	//Base exp
	setbattleflag("base_exp_rate",$@brate);
	//Job exp
	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);
	//we don't change card drops rate, because these values won't change them anyway
	atcommand "@reloadmobdb";
	
	announce "Current Rune-Midgard rates are: 1."+($@brate-100)+"x 1."+($@jrate-100)+"x 1."+($@drate-100)+"x",bc_all,0xFF6060;
	end;
}
OnSat0000:
OnTue0000:

For the labels used to activate the effects etc.

 

More examples from the script_commands.txt

Examples:

// Will set the base experience rate to 20x (2000%)
	setBattleFlag "base_exp_rate",2000;
	
// Will return the value of the base experience rate (when used after the above example, it would print 2000).
	mes getBattleFlag("base_exp_rate");
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:  

Thanks Skorm. Will the drop rates change for boss/mvp drops also?


In the script, is the right atcommand @reloadmobdb really? It should be @reloadbattleconf right? I'm confused.


-	script	X2	-1,{
OnInit:
OnSat0000:
//-------------------
	set $@brate(3500);
	set $@jrate(3500);
	set $@drate(1000);
	//Base exp
	setbattleflag("base_exp_rate",$@brate);
	//Job exp
	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);
	//we don't change card drops rate, because these values won't change them anyway
	atcommand "@reloadmobdb";
	
	announce "Current Rune-Midgard rates are: 1."+($@brate-100)+"x 1."+($@jrate-100)+"x 1."+($@drate-100)+"x",bc_all,0xFF6060;
	end;
}

I used this script. Is there no error in this one?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

I've been on servers that have used the floating rates and it seemed to work fine, but I'm pretty sure it's rather old and maybe came before @reloadbattleconf you could try it either way.

	set $@brate(3500);
	set $@jrate(3500);
	set $@drate(1000);

Should be...

	set $@brate, 3500;
	set $@jrate, 3500;
	set $@drate, 1000;
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:  

Skorm, it didn't work. I put the server on maintenance and tried this script: http://pastebin.com/raw.php?i=SAw8mCmU

 

But as soon as I reloadscript it announced right away even if it's not yet Saturday. Help pls?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Skorm, it didn't work. I put the server on maintenance and tried this script: http://pastebin.com/raw.php?i=SAw8mCmU

 

But as soon as I reloadscript it announced right away even if it's not yet Saturday. Help pls?

 

Remove:

OnInit:
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:  

Thanks Skorm. Will have to wait til Sat to check if it works or maybe I'll put the server on maintenance to check. Btw, will the changed rates be return to normal as soon as Sunday 12:00 am though?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  


- script X2 -1,{

OnInit:

set .brate, getBattleFlag("base_exp_rate");

set .jrate, getBattleFlag("job_exp_rate");

setarray .drate,

getBattleFlag("item_rate_common"),

getBattleFlag("item_rate_heal"),

getBattleFlag("item_rate_use"),

getBattleFlag("item_rate_equip");

end;

OnSat0000:

setarray .@drop_rates, 1000, 1000, 1000, 1000;

callsub Sub_Rates, 3500, 3500, .@drop_rates;

end;

OnSun1200:

callsub Sub_Rates, .brate, .jrate, .drate;

end;

//-------------------

Sub_Rates:

set .@brate, getarg(0);

set .@jrate, getarg(1);

copyarray .@drate[0], getelementofarray( getarg(2), 0 ), 4;

//Base exp

setbattleflag( "base_exp_rate", .@brate );

//Job exp

setbattleflag( "job_exp_rate", .@jrate );

//Drops

setbattleflag( "item_rate_common", .@drate );

setbattleflag( "item_rate_heal", .@drate[1] );

setbattleflag( "item_rate_use", .@drate[2] );

setbattleflag( "item_rate_equip", .@drate[3] );

//we don't change card drops rate, because these values won't change them anyway

atcommand "@reloadmobdb";

announce "Current Rune-Midgard rates are: 1."+(.@brate-100)+"x 1."+(.@jrate-100)+"x 1."+(.@drate-100)+"x",bc_all,0xFF6060;

return;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   0
  • Joined:  09/04/14
  • Last Seen:  

-	script	X2	-1,{
OnInit:
	set .brate, getBattleFlag("base_exp_rate");
	set .jrate, getBattleFlag("job_exp_rate");
	setarray .drate,
		getBattleFlag("item_rate_common"),
		getBattleFlag("item_rate_heal"),
		getBattleFlag("item_rate_use"),
		getBattleFlag("item_rate_equip");
	end;

OnSat0000:
	setarray .@drop_rates, 1000, 1000, 1000, 1000;
	callsub Sub_Rates, 3500, 3500, .@drop_rates;
	end;
	
OnSun1200:
	callsub Sub_Rates, .brate, .jrate, .drate;
	end;
	
//-------------------
Sub_Rates:
	set .@brate, getarg(0);
	set .@jrate, getarg(1);
	copyarray .@drate[0], getelementofarray( getarg(2), 0 ), 4;
	//Base exp
	setbattleflag( "base_exp_rate", .@brate );
	//Job exp
	setbattleflag( "job_exp_rate", .@jrate );
	//Drops
	setbattleflag( "item_rate_common", .@drate );
	setbattleflag( "item_rate_heal", .@drate[1] );
	setbattleflag( "item_rate_use", .@drate[2] );
	setbattleflag( "item_rate_equip", .@drate[3] );
	//we don't change card drops rate, because these values won't change them anyway
	atcommand "@reloadmobdb";
	
	announce "Current Rune-Midgard rates are: 1."+(.@brate-100)+"x 1."+(.@jrate-100)+"x 1."+(.@drate-100)+"x",bc_all,0xFF6060;
	return;
}

 

Just to confirm if we add for saturday & sunday and end on monday 12 AM.

 

OnSat0000:

    setarray .@drop_rates, 1000, 1000, 1000, 1000;

    callsub Sub_Rates, 3500, 3500, .@drop_rates;

    end;

 

OnSun0000:

    setarray .@drop_rates, 1000, 1000, 1000, 1000;

    callsub Sub_Rates, 3500, 3500, .@drop_rates;

    end;

    

OnMon1200:

    callsub Sub_Rates, .brate, .jrate, .drate;

    end;

 

 

something like this?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

something like this?

 

Yeah.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  46
  • Reputation:   0
  • Joined:  09/04/14
  • Last Seen:  

Thanks sir i will try it.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

Thanks sir i will try it.

 

Except if you want 12:00 a.m...

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