Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

Need help on Happy Hour scripts


Elsa Mist

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  387
  • Reputation:   60
  • Joined:  10/08/13
  • Last Seen:  

Hi Community,

 

Im trying to modified a script of Happy Hour in latest SVN to my like. Im noob and still learning in Renewal scripting. This is the script

-	script	FloatingRates	-1,{
OnInit:
OnMon2100:
OnTue2100:
OnWed2100:
OnThu2100:
OnFri2100:
OnSat2100:
OnSun2100:
//-------------------
FR_start:
	set $@brate,rand(2000,3000);
	set $@jrate,rand(2000,3000);
	set $@drate,rand(2000,3000);
	//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 "Happy Hour is being held. Current rates are between 20x/20x ~ 30x/30x or type @rates to see the Happy Hour Rates",bc_all,0xFF6060;
	end;
OnMon2259:
OnTue2259:
OnWed2259:
OnThu2259:
OnFri2259:
OnSat2259:
OnSun2259:
FR_end:
    //if((gettime(5)==8 && gettime(6)==24) || (gettime(5)==9 && gettime(6)==23)) {
	//Base exp
	setbattleflag("base_exp_rate",500);
	//Job exp
	setbattleflag("job_exp_rate",500);
	//Drops
	//setbattleflag("item_rate_common",500);
	//setbattleflag("item_rate_heal",500);
	//setbattleflag("item_rate_use",500);
	//setbattleflag("item_rate_equip",500);
	//we don't change card drops rate, because these values won't change them anyway
	atcommand "@reloadmobdb";

	announce "Happy Hour is Ending. Current rates are back to normal at 5x/5x.",bc_all,0xFF6060;
	end;
    }

The scripts run well. But everytime im @reloadscript this script will be activate even not in the hour tht im configured.

 

and it keeping the floating rate after the period of hour. Hope anyone could help me on this... :(

 

 

Thanks!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  143
  • Reputation:   8
  • Joined:  02/11/13
  • Last Seen:  

Maybe add an "end" after "OnInit:"? o.o

It would look like this:

[...]
OnInit:
end;

OnMon2100:
OnTue2100:
OnWed2100:
OnThu2100:
OnFri2100:
OnSat2100:
OnSun2100:
//-------------------
FR_start:
[...]
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...