Jump to content
Emistry

Utility: Race Of The Day

Recommended Posts

File Name: Race Of The Day

File Submitter: Emistry

File Submitted: 29 Jul 2012

File Category: Utilities

Content Author: Emistry


This Script will provide players extra EXP , Item or Zeny to Players if they killed designed monsters for the day.

Player will get extra EXP randomly everyday for each race of monster.
Player might have chances to get some items from the ROTD when they killed the monsters.



Click here to download this file

  • Upvote 4

Share this post


Link to post
Share on other sites

Is this Race chossen by GM oder randonly by the script?

Share this post


Link to post
Share on other sites

Is this Race chossen by GM oder randonly by the script?

 

both

Share this post


Link to post
Share on other sites

Ah okey thanks :)

Is there a way to make the exp Bonus working for party member in share?

Share this post


Link to post
Share on other sites

Hmm, i realy like the way you handeled the OnNPCKillEvent part, but it makes me wonder how much this would increase the servers workload per kill.

Share this post


Link to post
Share on other sites

Is there a way to make the exp Bonus working for party member in share?

should be working now ...

 

 

 

 

Hmm, i realy like the way you handeled the OnNPCKillEvent part, but it makes me wonder how much this would increase the servers workload per kill.

duno since i dont really have any idea to calculate how much does it affect your server workload ...

i think it's still depend on your server specs ....

Share this post


Link to post
Share on other sites

i can i set item automatically as a reward? so i don't need to input the item every after my server maintenance?

Share this post


Link to post
Share on other sites

change to  permanent variable.

Share this post


Link to post
Share on other sites

Hello ive tried killing so many monster but i dont get the item reward. (im sure im killing the right monster because i am getting exp bonus)

Share this post


Link to post
Share on other sites

double check your ROTD bonus item rate setting ...etc..

Share this post


Link to post
Share on other sites

Hello ive tried killing so many monster but i dont get the item reward. (im sure im killing the right monster because i am getting exp bonus)

Fixed

Share this post


Link to post
Share on other sites

How can i make it bonus more exp with Battle manual (x exp rate)?

Share this post


Link to post
Share on other sites

Hi emistry,today login with GM character i'm got error at map console.

Here the screen shoot

post-5318-0-56925600-1405520269_thumb.jpg

 

Edit

today it's popup again 

Edited by hendra814

Share this post


Link to post
Share on other sites

NqrMoTK.jpg

/swt

 

this kind of error is normally happen because of your custom item pc_bonus ... not from script.

before telling a script got problem, make sure you did try take a look into the script to find something related to your bugs.

 

my ROTD doesnt even give any kind of pc_bonus to player.

Share this post


Link to post
Share on other sites

Thanks for reply,

but i'm not use custom item, just official item i'm used.

and i'm ROTD version this one

prontera,155,181,5	script	ROTD	436,{
while(1){

mes "^FF0000ROTD^000000 refer to ^0000FFRace of the Day^000000";
mes "In another word, it mean that the ^FF0000Monster's Race^000000 that you killed by day will grant you ^FF0000Extra Bonus EXP / Item / Zeny ^000000.";
next;
mes "[ ^FF0000Today's ROTD^000000 ] = ^0000FF"+.ROTD$[.Race]+"^000000 Race";
mes "^FF0000_____________________________^000000";
mes "Bonus Lists :";
mes "^[email protected]^000000 EXP  = ^0000FF"+( ( !.BonusEXP )?"No":.BonusEXP+" %" )+"^000000 EXP Bonus";
mes "^[email protected]^000000 Zeny = ^0000FF"+( ( !.BonusZeny )?"No":.BonusZeny )+"^000000 Zeny";
mes "^[email protected]^000000 Item = ^0000FF"+( ( !.BonusItemAmount )?"No Items":.BonusItemAmount+" x "+getitemname( .BonusItem ) )+"^000000";
if( .BonusItemAmount ){
	mes "^[email protected]^000000 Rate = ^0000FF"+.BonusRate+"^000000 %";
	mes "^FF0000_____________________________^000000";
	mes "The Amount of Bonus Reward is given ^FF0000Randomly^000000 at a fixed Rate.";
	}
next;
switch(select("^4EEE94ROTD Information^000000",
			( getgmlevel() < .GMLevel )?"":"^FF0000[GM]^000000Set a New Monster's Race",
			( getgmlevel() < .GMLevel )?"":"^FF0000[GM]^000000Set EXP Bonus",		
			( getgmlevel() < .GMLevel )?"":"^FF0000[GM]^000000Set Item / Zeny Bonus")){	

Case 1:
	mes "Today's ROTD has choosen ^0000FF"+.ROTD$[.Race]+"^000000 Race , which will grant you some ^FF0000Extra Bonus EXP^000000.";
	mes "The amount of ^FF0000EXP Bonus^000000 are ^0000FF"+.BonusEXP+" %^000000.";
	next;
	mes "For ^0000FFParty Members^000000 , they will only receive ^FF0000Bonus EXP^000000 if they didnt killed any monster.";
	mes "Besides, they have to stay in the ^FF0000Same Map^000000 in order to get the ^FF0000EXP Bonus^000000.";
	next;
	break;

Case 2:
	mes "Choose ^FF0000Randomly / Manually^000000 ?";
	for( set [email protected],0; [email protected] < getarraysize( .ROTD$ ); set [email protected],[email protected]+1 ){
		mes "[ ^FF0000"[email protected]+"^000000. ] ^0000FF"+.ROTD$[[email protected]]+"^000000 Race";
		}
	message strcharinfo(0),"Input the Number. Choose Random if you want it Randomise a Race for you.";
	input .Race,0,getarraysize( .ROTD$ )-1;
	next;
	if( .Race == getarraysize( .ROTD$ )-1 ){
		set .Race,rand( getarraysize( .ROTD$ )-1 );
	}
	mes "[ ^FF0000ROTD Update^000000 ]";
	mes "[ ^FF0000Updated^000000 ] = ^0000FF"+.ROTD$[.Race]+"^000000 Race";
	mes "[ ^FF0000Bonus EXP^000000 ] = Extra ^0000FF"+.BonusEXP+"^000000 %";
	announce "[ ROTD ] : New Race : "+.ROTD$[.Race]+" with Bonus EXP of "+.BonusEXP+" % ",bc_blue;
	delwaitingroom;
	waitingroom "[ROTD]:"+.ROTD$[.Race]+" ",0;
	next;
	break;
	
Case 3:
	mes "Set ^FF0000Random EXP / Manually^000000"; 
	mes "Input 0 for ^0000FFRandom Bonus EXP Rate^000000";
	mes "Input ^FF0000RATE^000000 for ^0000FFManual Bonus EXP Rate^000000";
	mes "^FF0000EXP Range^000000 : 1% ~ 100%";
	mes "Current Rate = [ ^0000FF"+.BonusEXP+"^000000 % ]";
	input .BonusEXP,0,100;
	if( .BonusEXP == 0 ){
	set .BonusEXP,rand( 1,100 );
	}
	next;
	mes "The New EXP Rate is [ ^0000FF"+.BonusEXP+"^000000 % ]";
	announce "[ ROTD ] : New Race : "+.ROTD$[.Race]+" with Bonus EXP of "+.BonusEXP+" % ",bc_blue;
	next;
	break;

Case 4:
	mes "You may set a ^FF0000 Item / Zeny Bonus^000000 for the ^0000FFROTD^000000.";
	mes "This will work when you have killed a ^FF0000ROTD's Monster^000000, there will be a chances for Player to gain the ^FF0000Item / Zeny^000000.";
	next;
	mes "Input the ^FF0000Zeny Bonus^000000";
	message strcharinfo(0),"You may input 0 to disable it. [ Use it Wisely ]";
	input .BonusZeny;;
	mes "Input the ^FF0000Item ID^000000";
	do{
		input .BonusItem,0,32767;
	}while( getitemname( .BonusItem ) == "null" );
	mes "Input the ^FF0000Item Bonus Amount^000000";
	mes "Range of Amount = 0 ~ 30,000";
	message strcharinfo(0),"You may input 0 to disable it. [ Use it Wisely ]";
	input .BonusItemAmount,0,30000;
	next;
	mes "^FF0000Rate^000000 to get it ??";
	mes "^FF0000100 = 100%^000000";
	mes "^FF0000 10 =  10%^000000";
	mes "^FF0000  1 =   1%^000000";
	mes "^FF0000  0 = DISABLED^000000";
	input .BonusRate,0,100;
	next;
	mes "[ ^FF0000ROTD Update^000000 ]";
	mes "^0000FFZeny Bonus^000000 : "+.BonusZeny+" Zeny";
	mes "^0000FFItem Bonus^000000 : "+.BonusItemAmount+" x "+getitemname( .BonusItem );
	mes "^0000FFItem Rate^000000  : "+.BonusRate+" %";
	next;
	break;
	}
}
close;

OnInit:
OnClock0000:
set .GMLevel,80;
setarray .ROTD$[0],
				"Formless",
				"Undead",
				"Brute",
				"Plant",
				"Insect",
				"Fish",
				"Demon",
				"Demi-Human",
				"Angel",
				"Dragon",
				"Random";
				
set .Race,rand( 10 );
set .BonusEXP,rand( 1,100 );
set .ExpLvlRange,10;
delwaitingroom;
waitingroom "[ROTD]:"+.ROTD$[.Race]+" ",0;
end;
	
OnNPCKillEvent:
if( getmonsterinfo( killedrid,19 ) != .Race  ) end;
if( getcharid(1) ){
set [email protected]$,strcharinfo(3);
set .BaseLvl,BaseLevel;
getpartymember getcharid(1),1;
getpartymember getcharid(1),2;
for ( set [email protected], 0; [email protected] < .partymembercount; set [email protected], [email protected] +1 )
	if ( isloggedin( .partymemberaid[[email protected]] )  )
		attachrid( .partymemberaid[[email protected]] );
			if( strcharinfo(3) == [email protected]$ && ( .BaseLvl - BaseLevel ) <= .ExpLvlRange )
				getexp ( getmonsterinfo( killedrid,3 ) * .BonusEXP / 100 ),( getmonsterinfo( killedrid,4 ) * .BonusEXP / 100 );
}else{
	getexp ( getmonsterinfo( killedrid,3 ) * .BonusEXP / 100 ),( getmonsterinfo( killedrid,4 ) * .BonusEXP / 100 );
}
if( rand(100) <= .BonusRate && .BonusItemAmount )
	getitem .BonusItem,rand( 1,.BonusItemAmount );
if( rand(100) <= .BonusRate && .BonusZeny )
	set Zeny,Zeny + rand( 1,.BonusZeny );
end;
}

Share this post


Link to post
Share on other sites

What if RoTD has rolled "plant"? Players might summon their plant for this rewards?

Share this post


Link to post
Share on other sites

double check your ROTD bonus item rate setting ...etc..

Im sorry but I do not understand How?

How do you input automated Exp bonus, item and rate? please do elaborate, Im not that great with scripts, honestly, I see them as if they were hieroglyphics.

Please do help, Im sorry for the spoon-feeding, its just I dont get it seriously.

Share this post


Link to post
Share on other sites

Hi Emistry, I encountered an issue with regards your script. When set to "Demi-Human", OnPCKillEvent does not trigger but other race's works fine. Thank you! 

Attached is the script that I am currently using

 

prontera,146,166,6	script	Bergrand	4_M_CRU_CRUA,{
set [email protected],getgmlevel();

do{
	set [email protected],select("^0055FFROTD Information^000000",
				( [email protected] < .gm_level )?"":"^FF0000[GM]^000000Set a New Monster's Race",
				( [email protected] < .gm_level )?"":"^FF0000[GM]^000000Set EXP Bonus",		
				( [email protected]vel < .gm_level )?"":"^FF0000[GM]^000000Set Item / Zeny Bonus",
				"Close" );
				
	switch( [email protected] ) {
		case 1:
			mes "^FF0000ROTD^000000 refers to ^0000FFRace of the Day^000000";
			mes "In other words, it means that every monster that you kill indicated on the pub, will grant you ^0055FFBonus EXP^000000.";
			next;
			mes "[ ^0055FFROTD Information^000000 ]";
			mes "Today's RACE: ^0000FF"+.rotd$[.today_rotd]+"^000000";
			if ( .rotd_exp_bonus ) mes " ~ +^777777"+.rotd_exp_bonus+"% bonus EXP^000000";
			if ( ( .rotd_item_amount && .rotd_item_rate ) || .rotd_zeny || .rotd_exp_bonus ) {
				mes " ";
				mes "Reward : "+( ( .rotd_item_rate )? .rotd_item_rate+"%":"" )+" chance ";
				if ( .rotd_item_amount && .rotd_item_rate ) mes " ~ ^777777"+.rotd_item_amount+" x "+getitemname( .rotd_item_id )+"^000000";
				if ( .rotd_zeny ) mes " ~ ^777777"+.rotd_zeny+" Zeny^000000";
			}
			break;
		case 2:
			mes "Select new race.";
			set .today_rotd,select( .rotd_menu$ ) - 1;
			if ( .today_rotd >= .rotd_size ) set .today_rotd,rand( .rotd_size );
			mes "New Race : ^777777"+.rotd$[.today_rotd]+"^000000";
			delwaitingroom;
			waitingroom "[ROTD] "+.rotd$[.today_rotd]+" ",0;
			break;
		case 3:
			mes "Set new exp bonus. (%)";
			input .rotd_exp_bonus,0,100;
			if ( .rotd_exp_bonus ) mes "ROTD EXP : "+.rotd_exp_bonus+" %";
			break;
		case 4:
			mes "Set ROTD Bonus:";
			mes "Insert Zeny Bonus:";
			input [email protected];
			mes "Insert Item ID:";
			do{
				input [email protected],0,32767; 
				if ( [email protected] ) close;
			}while( getitemname( [email protected] ) == "null" );
			mes "Enter amount:";
			input [email protected],0,30000;
			mes "Enter Rate to gain:";
			input [email protected],0,100;
			if ( [email protected] && [email protected] ) {
				next;
				mes "Updated item bonus : ( "[email protected]+"% )";
				mes "^777777"[email protected]+" x "+getitemname( [email protected] )+"^000000";
				mes "^777777"[email protected]+" Zeny^000000";
				if ( select( "Confirm","Cancel" ) == 1 ) {
					set .rotd_item_id,[email protected];	
					set .rotd_item_amount,[email protected];
					set .rotd_item_rate,[email protected];
					set .rotd_zeny,[email protected];
					mes "Updated.";
				}
			}
		default: close;
	}
	next;
}while( [email protected] != 5 );
close;

OnInit:
	// min gm level
	set .gm_level,90;

	// monster race list
	setarray .rotd$[0],
		"Formless",
		"Undead",
		"Brute",
		"Plant",
		"Insect",
		"Demi-human",
		"Fish";
	set .rotd_size,getarraysize( .rotd$ );
	for( set [email protected],0; [email protected] < .rotd_size; set [email protected],[email protected] + 1 )
		set .rotd_menu$,.rotd_menu$ + .rotd$[[email protected]] +":";
	set .rotd_menu$,.rotd_menu$ + "^0055FFRandom Race^000000";

	// min party member lv to gain exp
	set .party_level_range,10;

	// @rotd command
        bindatcmd "rotd",strnpcinfo(3)+"::OnCheck";

// daily reset
OnClock0000:
	set .today_rotd,rand( .rotd_size );
	set .rotd_exp_bonus,rand( 15,25 );
	delwaitingroom;
	waitingroom "[ROTD] "+.rotd$[.today_rotd]+" ",0;
	announce "(ROTD Officer) Bergrand: Our new Race of the Day is "+.rotd$[.today_rotd]+", ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock0200:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock0400:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock0600:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock0800:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock1000:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock1200:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock1400:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock1600:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock1800:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock2000:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

OnClock2200:
	announce "(ROTD Officer) Bergrand: Just to inform all of you, our Race of the Day is "+.rotd$[.today_rotd]+". ROK ON!",bc_all,0xD6EAF8;
	end;

// ROTD command check
OnCheck:
	mes "[ ^0055FFROTD Information^000000 ]";
        mes "Today's RACE: ^A93226"+.rotd$[.today_rotd]+"^000000";
	mes "+^777777"+.rotd_exp_bonus+"% bonus EXP^000000";
	mes "Kindly visit Bergrand for more info. Happy leveling!";
	mes " ";
	mes "Celestine";
        close;
	end;
	
OnNPCKillEvent:
if ( getmonsterinfo( killedrid,MOB_RACE ) == .today_rotd ) {
	set [email protected],getcharid(1);
	set [email protected]_base_exp,(( getmonsterinfo( killedrid,MOB_BASEEXP ) / 100 ) * .rotd_exp_bonus );
	set [email protected]_job_exp,(( getmonsterinfo( killedrid,MOB_JOBEXP ) / 100 ) * .rotd_exp_bonus );
	if ( [email protected] ) {
		set [email protected],getcharid(3);
		set [email protected],BaseLevel;
		set [email protected]$,strcharinfo(3);
		getpartymember [email protected],1;
		getpartymember [email protected],2;
		while( [email protected] < [email protected] ) {
			if ( isloggedin( [email protected][[email protected]],[email protected][[email protected]] ) )
				if ( attachrid( [email protected][[email protected]] ) )
					if ( strcharinfo(3) == [email protected]$ && ( BaseLevel - [email protected] ) <= .party_level_range && ( BaseLevel - [email protected] ) >= ~.party_level_range && Hp >= 1 ) {	
						set BaseExp,( BaseExp + [email protected]_base_exp );
						set JobExp,( JobExp + [email protected]_job_exp );
						dispbottom "[ ROTD Party Bonus ] : Additional "[email protected]_base_exp+" Base EXP | "[email protected]_job_exp+" Job EXP gained.";
					}
			set [email protected],[email protected] + 1;
		}
		attachrid( [email protected] );
	}
	else {
		set BaseExp,( BaseExp + [email protected]_base_exp );
		set JobExp,( JobExp + [email protected]_job_exp );
		dispbottom "[ ROTD Solo Bonus ] : Additional "[email protected]_base_exp+" Base EXP | "[email protected]_job_exp+" Job EXP gained.";
	}
	if ( rand( 100 ) < .rotd_item_rate && .rotd_zeny ) 
		set Zeny,Zeny + rand( .rotd_zeny );
	if ( rand( 100 ) < .rotd_item_rate && .rotd_item_amount ) 
		getitem .rotd_item_id,rand( .rotd_item_amount ),[email protected];
}
end;
}

 

Edited by Chase

Share this post


Link to post
Share on other sites

hello does this ROTD doesn't give items and zeny?

i mean if i didnt set it ingame

because i only want them to have exp bonus only .. not items and zeny

so does the script only give exp bonus? or the script will also set items randomly and zeny??

thanks

Share this post


Link to post
Share on other sites

how to remove boss and non boss race?

Share this post


Link to post
Share on other sites

Not working, version 3,4 and players are not receiving extra exp, or items. Is useless

 

Share this post


Link to post
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
Reply to this topic...

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.