Jump to content
  • 0

Floating Rates Script


Question

Posted (edited)

can i ask a floating rates script which gives a x2 exp on 4.00PM~11.00P.M from monday to friday then at saturday 12:00A.M it will give x3 Exp until Monday 12:00A.M

Edited by xmaniacx

12 answers to this question

Recommended Posts

Posted (edited)

Hello Try this scripts(It's my first)

- script triple_exp -1,{
OnInit:
// original Base/Job Exp and Drop Rates
set .bexp_rate, rate_exp; //Put you rate...
set .jexp_rate, rate_job; //put you rate...

OnClock1600:
	  if(gettime(4)==0  || gettime(4)==1  || gettime(4)==2  || gettime(4)==3  || gettime(4)==4 ) { // Monday to Friday
	  setbattleflag "base_exp_rate", .bexp_rate*100 * 2;
	  setbattleflag "job_exp_rate", .jexp_rate*100 * 2;

	  atcommand "@reloadmobdb";
	  announce "Double Event Starting!", bc_all;
	  end;
}  
OnClock2300:
	 if(gettime(4)==0  || gettime(4)==1  || gettime(4)==2  || gettime(4)==3  || gettime(4)==4 ) { // Monday to Friday
	 setbattleflag "base_exp_rate", .bexp_rate*100;
	 setbattleflag "job_exp_rate", .jexp_rate*100;

	 atcommand "@reloadmobdb";
	 announce "Double Event is finished!",bc_all,0xFF6060;
	 end;
}
OnClock2301:
	  if(gettime(4)==4  || gettime(4)==5  || gettime(4)==6  || gettime(4)==0  ) { // friday to monday
	  setbattleflag "base_exp_rate", .bexp_rate*100 * 3;
	  setbattleflag "job_exp_rate", .jexp_rate*100 * 3;

	  atcommand "@reloadmobdb";
	  announce "Triple Event is Starting!",bc_all,0xFF6060;
	  end;
}
OnClock1200:
	  if(gettime(4) == 0) { //Triple Exp Week-end is finished!!!
	  setbattleflag "base_exp_rate", .bexp_rate*100;
	  setbattleflag "job_exp_rate", .jexp_rate*100;

	  atcommand "@reloadmobdb";
	  announce "Triple Event is finished!",bc_all,0xFF6060;
	  end;
}

Edited by Loki81
Posted (edited)

@Loki

Some mistake

He asks for Double rate on Monday to Friday

*gettime(<type>)

...

4 - Week day (0 for Sunday, 6 is Saturday)

and you put

if(gettime(4)==0  || gettime(4)==1  || gettime(4)==2  || gettime(4)==3  || gettime(4)==4 ) {

Then saturday to Monday

// friday to monday

Missing one curly too.

I have updated your script if you don't mind

-	script	triple_exp	-1,{
OnInit:
// original Base/Job Exp and Drop Rates
set .bexp_rate, 1; //Put you rate...
set .jexp_rate, 1; //put you rate...


OnHour16:
OnHour23:
if( gettime(4) != 0 && gettime(4) != 6 || ( gettime(4) == 1 && gettime(3) >= 16 ) ) { // Monday to Friday
	if( gettime(3) >= 23 || gettime(3) < 16 ) {
		announce "Double Event is finished!",bc_all,0xFF6060;
		callsub L_ratio, 1;
	}
	else {
		announce "Double Event Starting!", bc_all;
		callsub L_ratio, 2;
	}
}
OnHour12:
if( !gettime(4) || ( gettime(4) == 6 && gettime(3) >= 12 ) || ( gettime(4) == 1 && gettime(3) < 12 ) ) {
	announce "Triple Event is Starting!",bc_all,0xFF6060;
	callsub L_ratio, 3;
}
else if( gettime(4) == 1 && gettime(3) == 12 ) {
	announce "Triple Event is finished!",bc_all,0xFF6060;
	callsub L_ratio, 1;
}
else
	callsub L_ratio, 1;
end;


L_ratio:
setbattleflag "base_exp_rate", .bexp_rate * 100 * getarg( 0 );
setbattleflag "job_exp_rate", .jexp_rate * 100 * getarg( 0 );
atcommand "@reloadmobdb";
end;
}

Edited by Capuche
Posted

@Loki

Some mistake

He asks for Double rate on Monday to Friday

*gettime(<type>)

...

4 - Week day (0 for Sunday, 6 is Saturday)

and you put

if(gettime(4)==0  || gettime(4)==1  || gettime(4)==2  || gettime(4)==3  || gettime(4)==4 ) {

Then saturday to Monday

// friday to monday

Missing one curly too.

I have updated your script if you don't mind

-	script	triple_exp	-1,{
OnInit:
// original Base/Job Exp and Drop Rates
set .bexp_rate, 1; //Put you rate...
set .jexp_rate, 1; //put you rate...


OnHour16:
OnHour23:
if( gettime(4) != 0 && gettime(4) != 6 || ( gettime(4) == 1 && gettime(3) >= 16 ) ) { // Monday to Friday
	if( gettime(3) >= 23 || gettime(3) < 16 ) {
		announce "Double Event is finished!",bc_all,0xFF6060;
		callsub L_ratio, 1;
	}
	else {
		announce "Double Event Starting!", bc_all;
		callsub L_ratio, 2;
	}
}
OnHour12:
if( !gettime(4) || ( gettime(4) == 6 && gettime(3) >= 12 ) || ( gettime(4) == 1 && gettime(3) < 12 ) ) {
	announce "Triple Event is Starting!",bc_all,0xFF6060;
	callsub L_ratio, 3;
}
else if( gettime(4) == 1 && gettime(3) == 12 ) {
	announce "Triple Event is finished!",bc_all,0xFF6060;
	callsub L_ratio, 1;
}
else
	callsub L_ratio, 1;
end;


L_ratio:
setbattleflag "base_exp_rate", .bexp_rate * 100 * getarg( 0 );
setbattleflag "job_exp_rate", .jexp_rate * 100 * getarg( 0 );
atcommand "@reloadmobdb";
end;
}

can you put an announce on the script about what is the current EXP rates every 01 Minute of every Hour so that player's know what's going on

Posted (edited)

can you put an announce on the script about what is the current EXP rates every 01 Minute of every Hour so that player's know what's going on

A flood ? oO I don't like this idea sorry. It's better to write news on NPC.

Edited by Capuche
Posted (edited)

can you put an announce on the script about what is the current EXP rates every 01 Minute of every Hour so that player's know what's going on

A flood ? oO I don't like this idea sorry. It's better to write news on NPC.

i thinks its not a flood....... coz it's every hour......... anyway i tried making some code on it.......but i'm getting error..... can check if its correct


- script FloatingAnn -1,{

OnMinute01:
if(gettime(4)==4 || gettime(4)==5 || gettime(4)==6 ) {
announce "Weekend Triple EXP Event is currently in affect, Enjoy and have a great day!",bc_all,0xFF6060;
}

end;
}

Edited by caspa
Posted (edited)

I get it now. I thought it was every minute of every hour lol

btw your script trigger every minute 01 of Thursday, Friday and Saturday. So it's not correct.

*gettime(<type>)

...

4 - Week day (0 for Sunday, 6 is Saturday)

Edit:

-    script    triple_exp    -1,{
OnInit:
   // original Base/Job Exp and Drop Rates
   set .bexp_rate, 1; //Put you rate...
   set .jexp_rate, 1; //put you rate...


OnHour16:
OnHour23:
   if( gettime(4) != 0 && gettime(4) != 6 || ( gettime(4) == 1 && gettime(3) >= 16 ) ) { // Monday to Friday
       if( gettime(3) >= 23 || gettime(3) < 16 ) {
           announce "Double Event is finished!",bc_all,0xFF6060;
           callsub L_ratio, 1;
       }
       else {
           announce "Double Event Starting!", bc_all;
           callsub L_ratio, 2;
       }
   }
OnHour12:
   if( !gettime(4) || ( gettime(4) == 6 && gettime(3) >= 12 ) || ( gettime(4) == 1 && gettime(3) < 12 ) ) {
       announce "Triple Event is Starting!",bc_all,0xFF6060;
       callsub L_ratio, 3;
   }
   else if( gettime(4) == 1 && gettime(3) == 12 ) {
       announce "Triple Event is finished!",bc_all,0xFF6060;
       callsub L_ratio, 1;
   }
   else
       callsub L_ratio, 1;
   end;


L_ratio:
   setbattleflag "base_exp_rate", .bexp_rate * 100 * getarg( 0 );
   setbattleflag "job_exp_rate", .jexp_rate * 100 * getarg( 0 );
   set .ratio, getarg( 0 );
   atcommand "@reloadmobdb";
   end;

OnMinute01:
   if( .ratio == 3 )
       announce "Weekend Triple EXP Event is currently in affect, Enjoy and have a great day!",bc_all,0xFF6060;
   end;
}

Edited by Capuche
Posted

I get it now. I thought it was every minute of every hour lol

btw your script trigger every minute 01 of Thursday, Friday and Saturday. So it's not correct.

*gettime(<type>)

...

4 - Week day (0 for Sunday, 6 is Saturday)

Edit:

-	script	triple_exp	-1,{
OnInit:
// original Base/Job Exp and Drop Rates
set .bexp_rate, 1; //Put you rate...
set .jexp_rate, 1; //put you rate...


OnHour16:
OnHour23:
if( gettime(4) != 0 && gettime(4) != 6 || ( gettime(4) == 1 && gettime(3) >= 16 ) ) { // Monday to Friday
	if( gettime(3) >= 23 || gettime(3) < 16 ) {
		announce "Double Event is finished!",bc_all,0xFF6060;
		callsub L_ratio, 1;
	}
	else {
		announce "Double Event Starting!", bc_all;
		callsub L_ratio, 2;
	}
}
OnHour12:
if( !gettime(4) || ( gettime(4) == 6 && gettime(3) >= 12 ) || ( gettime(4) == 1 && gettime(3) < 12 ) ) {
	announce "Triple Event is Starting!",bc_all,0xFF6060;
	callsub L_ratio, 3;
}
else if( gettime(4) == 1 && gettime(3) == 12 ) {
	announce "Triple Event is finished!",bc_all,0xFF6060;
	callsub L_ratio, 1;
}
else
	callsub L_ratio, 1;
end;


L_ratio:
setbattleflag "base_exp_rate", .bexp_rate * 100 * getarg( 0 );
setbattleflag "job_exp_rate", .jexp_rate * 100 * getarg( 0 );
set .ratio, getarg( 0 );
atcommand "@reloadmobdb";
end;

OnMinute01:
if( .ratio == 3 )
	announce "Weekend Triple EXP Event is currently in affect, Enjoy and have a great day!",bc_all,0xFF6060;
end;
}

Thank you very much...........

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