Jump to content
  • 0

Rate Selector


emundus

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.01
  • Content Count:  37
  • Reputation:   7
  • Joined:  03/07/23
  • Last Seen:  

I would like to request a "rate selector", which would be Low Rates, Mid Rates and High Rates (I would like to customize the values, if possible).
I would also like some help with installation, thanks in advance!


How it would work: when entering the character for the first time, the person chooses the rates they want to play and there is a "buff" showing the selected rates (or a command like @myrates).

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   33
  • Joined:  06/22/13
  • Last Seen:  

On 2/27/2024 at 3:37 AM, emundus said:

I would like to request a "rate selector", which would be Low Rates, Mid Rates and High Rates (I would like to customize the values, if possible).
I would also like some help with installation, thanks in advance!


How it would work: when entering the character for the first time, the person chooses the rates they want to play and there is a "buff" showing the selected rates (or a command like @myrates).

script

-	script	RateSelect	-1,{

OnPCLoginEvent:
		switch (individual_rate) {
			case 1:
				.@exp_rate_multiplier = 100;
				.@jexp_rate_multiplier = 100;
				set .@rate_description$, "x1 (Low Rate)";
				break;
			case 2:
				.@exp_rate_multiplier = 2500;
				.@jexp_rate_multiplier = 2500;
				set .@rate_description$, "x25 (Mid Rate)";
				break;
			case 3:
				.@exp_rate_multiplier = 5000;
				.@jexp_rate_multiplier = 5000;
				set .@rate_description$, "x50 (High Rate)";
				break;
			case 4:
				.@exp_rate_multiplier = 10000;
				.@jexp_rate_multiplier = 10000;
				set .@rate_description$, "x100 (Super High Rate)";
				break;
			default:
				mes "[Rate Selector]";
				mes "Select your preferred server rate for this character.";
				mes "BE CAREFUL: YOU CAN'T CHANGE IT AFTERWARD!";
				individual_rate = select("Low Rate:Mid Rate:High Rate:Super High Rate");
			close2;
			goto OnPCLoginEvent; // Return to case evaluation after selection
		}
		
	// Save the multipliers to the player variables
	set #exp_rate_multiplier, .@exp_rate_multiplier;
	set #jexp_rate_multiplier, .@jexp_rate_multiplier;
	fakeIcon(getcharid(0),2002,0,1);
	dispbottom "You have chosen the " + .@rate_description$ + " for your character.";
	end;

OnNPCKillEvent:
	// Retrieve the stored multipliers
	.@exp_rate_multiplier = #exp_rate_multiplier;
	.@jexp_rate_multiplier = #jexp_rate_multiplier;

	.@base_exp = getmonsterinfo(killedrid, MOB_BASEEXP) * .@exp_rate_multiplier;
	.@job_exp = getmonsterinfo(killedrid, MOB_JOBEXP) * .@jexp_rate_multiplier;

	// Debug messages to track values
	dispbottom "[Debug] Base EXP: " + .@base_exp;
	dispbottom "[Debug] Job EXP: " + .@job_exp;

	if (.@base_exp > 0 || .@job_exp > 0) {
		// Use getcharid(0) to specify the character ID
		getexp2(.@base_exp, .@job_exp);
	} else {
		dispbottom "[Error] Experience values are zero.";
	}
	end;
}

stateiconinfo.lub

StateIconList[EFST_IDs.EFST_RATE_UP] = {
    haveTimeLimit = 1,
    posTimeLimitStr = 2,
    descript = {
        { "RATE UP", COLOR_TITLE_BUFF },
		{ "%s", COLOR_TIME },
        { "Increases your Bonus EXP and Job Exp" },
        { "x1 / x25 / x50 / x100" },
		{ "Grants players different rewards" },
		{ "depending on what they choose." }
    }
    
}

efstids.lub

	EFST_VIPSTATE1 = 2000,
	EFST_VIPSTATE2 = 2001,
	EFST_RATE_UP = 2002,	
	__newindex = function()
	error("unknown state")
end
}
setmetatable(EFST_IDs, EFST_IDs)

stateiconimginfo.lub

		-- Other official effects
		[EFST_IDs.EFST_VIPSTATE1] = "SI_VIP.tga",
		[EFST_IDs.EFST_VIPSTATE2] = "SI_VIP2.tga",		
		[EFST_IDs.EFST_RATE_UP] = "RATE_UP.tga",
		[EFST_IDs.EFST_YGGDRASIL_BLESS] = "vitata500.tga",
		[EFST_IDs.EFST_PERIOD_RECEIVEITEM_2ND] = "ITEM_G.tga",
		[EFST_IDs.EFST_PERIOD_PLUSEXP_2ND] = "EXP_G.tga"

	}
}

status.hpp

/// @APIHOOK_END
/// Do not modify code above this, since it will be automatically generated by the API again
	EFST_VIPSTATE1 = 2000,
	EFST_VIPSTATE2 = 2001,
	EFST_RATE_UP = 2002,
	EFST_MAX,

script_constants.hpp

/// @APIHOOK_END
/// Do not modify code above this, since it will be automatically generated by the API again
	export_constant(EFST_VIPSTATE1);
	export_constant(EFST_VIPSTATE2);
	export_constant(EFST_RATE_UP);	
	export_constant(EFST_MAX);

Install fakeicon:

https://rathena.org/board/files/file/4034-fake-icon-stats/

RATE_UP.tga

image.thumb.png.52e5e81b6e6d7cd71c23b31a760d6dd5.png

RATE_UP.tga

  • Love 1
  • MVP 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.01
  • Content Count:  37
  • Reputation:   7
  • Joined:  03/07/23
  • Last Seen:  

On 6/14/2024 at 1:29 PM, Louis T Steinhil said:

script

-	script	RateSelect	-1,{

OnPCLoginEvent:
		switch (individual_rate) {
			case 1:
				.@exp_rate_multiplier = 100;
				.@jexp_rate_multiplier = 100;
				set .@rate_description$, "x1 (Low Rate)";
				break;
			case 2:
				.@exp_rate_multiplier = 2500;
				.@jexp_rate_multiplier = 2500;
				set .@rate_description$, "x25 (Mid Rate)";
				break;
			case 3:
				.@exp_rate_multiplier = 5000;
				.@jexp_rate_multiplier = 5000;
				set .@rate_description$, "x50 (High Rate)";
				break;
			case 4:
				.@exp_rate_multiplier = 10000;
				.@jexp_rate_multiplier = 10000;
				set .@rate_description$, "x100 (Super High Rate)";
				break;
			default:
				mes "[Rate Selector]";
				mes "Select your preferred server rate for this character.";
				mes "BE CAREFUL: YOU CAN'T CHANGE IT AFTERWARD!";
				individual_rate = select("Low Rate:Mid Rate:High Rate:Super High Rate");
			close2;
			goto OnPCLoginEvent; // Return to case evaluation after selection
		}
		
	// Save the multipliers to the player variables
	set #exp_rate_multiplier, .@exp_rate_multiplier;
	set #jexp_rate_multiplier, .@jexp_rate_multiplier;
	fakeIcon(getcharid(0),2002,0,1);
	dispbottom "You have chosen the " + .@rate_description$ + " for your character.";
	end;

OnNPCKillEvent:
	// Retrieve the stored multipliers
	.@exp_rate_multiplier = #exp_rate_multiplier;
	.@jexp_rate_multiplier = #jexp_rate_multiplier;

	.@base_exp = getmonsterinfo(killedrid, MOB_BASEEXP) * .@exp_rate_multiplier;
	.@job_exp = getmonsterinfo(killedrid, MOB_JOBEXP) * .@jexp_rate_multiplier;

	// Debug messages to track values
	dispbottom "[Debug] Base EXP: " + .@base_exp;
	dispbottom "[Debug] Job EXP: " + .@job_exp;

	if (.@base_exp > 0 || .@job_exp > 0) {
		// Use getcharid(0) to specify the character ID
		getexp2(.@base_exp, .@job_exp);
	} else {
		dispbottom "[Error] Experience values are zero.";
	}
	end;
}

stateiconinfo.lub

StateIconList[EFST_IDs.EFST_RATE_UP] = {
    haveTimeLimit = 1,
    posTimeLimitStr = 2,
    descript = {
        { "RATE UP", COLOR_TITLE_BUFF },
		{ "%s", COLOR_TIME },
        { "Increases your Bonus EXP and Job Exp" },
        { "x1 / x25 / x50 / x100" },
		{ "Grants players different rewards" },
		{ "depending on what they choose." }
    }
    
}

efstids.lub

	EFST_VIPSTATE1 = 2000,
	EFST_VIPSTATE2 = 2001,
	EFST_RATE_UP = 2002,	
	__newindex = function()
	error("unknown state")
end
}
setmetatable(EFST_IDs, EFST_IDs)

stateiconimginfo.lub

		-- Other official effects
		[EFST_IDs.EFST_VIPSTATE1] = "SI_VIP.tga",
		[EFST_IDs.EFST_VIPSTATE2] = "SI_VIP2.tga",		
		[EFST_IDs.EFST_RATE_UP] = "RATE_UP.tga",
		[EFST_IDs.EFST_YGGDRASIL_BLESS] = "vitata500.tga",
		[EFST_IDs.EFST_PERIOD_RECEIVEITEM_2ND] = "ITEM_G.tga",
		[EFST_IDs.EFST_PERIOD_PLUSEXP_2ND] = "EXP_G.tga"

	}
}

status.hpp

/// @APIHOOK_END
/// Do not modify code above this, since it will be automatically generated by the API again
	EFST_VIPSTATE1 = 2000,
	EFST_VIPSTATE2 = 2001,
	EFST_RATE_UP = 2002,
	EFST_MAX,

script_constants.hpp

/// @APIHOOK_END
/// Do not modify code above this, since it will be automatically generated by the API again
	export_constant(EFST_VIPSTATE1);
	export_constant(EFST_VIPSTATE2);
	export_constant(EFST_RATE_UP);	
	export_constant(EFST_MAX);

Install fakeicon:

https://rathena.org/board/files/file/4034-fake-icon-stats/

RATE_UP.tga 4.04 kB · 3 downloads

image.thumb.png.52e5e81b6e6d7cd71c23b31a760d6dd5.png

RATE_UP.tga 4.04 kB · 4 downloads

I created 2 characters, one selecting 1x and the other 100x, in the chat debug it shows that more exp came but they have the same experience after killing the same amount of porings.

 

Edit:

I forgot the "multi_level_up: yes" xD Thanks ❤️

Edited by emundus
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  105
  • Reputation:   7
  • Joined:  04/11/22
  • Last Seen:  

On 6/14/2024 at 1:29 PM, Louis T Steinhil said:

script

-	script	RateSelect	-1,{

OnPCLoginEvent:
		switch (individual_rate) {
			case 1:
				.@exp_rate_multiplier = 100;
				.@jexp_rate_multiplier = 100;
				set .@rate_description$, "x1 (Low Rate)";
				break;
			case 2:
				.@exp_rate_multiplier = 2500;
				.@jexp_rate_multiplier = 2500;
				set .@rate_description$, "x25 (Mid Rate)";
				break;
			case 3:
				.@exp_rate_multiplier = 5000;
				.@jexp_rate_multiplier = 5000;
				set .@rate_description$, "x50 (High Rate)";
				break;
			case 4:
				.@exp_rate_multiplier = 10000;
				.@jexp_rate_multiplier = 10000;
				set .@rate_description$, "x100 (Super High Rate)";
				break;
			default:
				mes "[Rate Selector]";
				mes "Select your preferred server rate for this character.";
				mes "BE CAREFUL: YOU CAN'T CHANGE IT AFTERWARD!";
				individual_rate = select("Low Rate:Mid Rate:High Rate:Super High Rate");
			close2;
			goto OnPCLoginEvent; // Return to case evaluation after selection
		}
		
	// Save the multipliers to the player variables
	set #exp_rate_multiplier, .@exp_rate_multiplier;
	set #jexp_rate_multiplier, .@jexp_rate_multiplier;
	fakeIcon(getcharid(0),2002,0,1);
	dispbottom "You have chosen the " + .@rate_description$ + " for your character.";
	end;

OnNPCKillEvent:
	// Retrieve the stored multipliers
	.@exp_rate_multiplier = #exp_rate_multiplier;
	.@jexp_rate_multiplier = #jexp_rate_multiplier;

	.@base_exp = getmonsterinfo(killedrid, MOB_BASEEXP) * .@exp_rate_multiplier;
	.@job_exp = getmonsterinfo(killedrid, MOB_JOBEXP) * .@jexp_rate_multiplier;

	// Debug messages to track values
	dispbottom "[Debug] Base EXP: " + .@base_exp;
	dispbottom "[Debug] Job EXP: " + .@job_exp;

	if (.@base_exp > 0 || .@job_exp > 0) {
		// Use getcharid(0) to specify the character ID
		getexp2(.@base_exp, .@job_exp);
	} else {
		dispbottom "[Error] Experience values are zero.";
	}
	end;
}

stateiconinfo.lub

StateIconList[EFST_IDs.EFST_RATE_UP] = {
    haveTimeLimit = 1,
    posTimeLimitStr = 2,
    descript = {
        { "RATE UP", COLOR_TITLE_BUFF },
		{ "%s", COLOR_TIME },
        { "Increases your Bonus EXP and Job Exp" },
        { "x1 / x25 / x50 / x100" },
		{ "Grants players different rewards" },
		{ "depending on what they choose." }
    }
    
}

efstids.lub

	EFST_VIPSTATE1 = 2000,
	EFST_VIPSTATE2 = 2001,
	EFST_RATE_UP = 2002,	
	__newindex = function()
	error("unknown state")
end
}
setmetatable(EFST_IDs, EFST_IDs)

stateiconimginfo.lub

		-- Other official effects
		[EFST_IDs.EFST_VIPSTATE1] = "SI_VIP.tga",
		[EFST_IDs.EFST_VIPSTATE2] = "SI_VIP2.tga",		
		[EFST_IDs.EFST_RATE_UP] = "RATE_UP.tga",
		[EFST_IDs.EFST_YGGDRASIL_BLESS] = "vitata500.tga",
		[EFST_IDs.EFST_PERIOD_RECEIVEITEM_2ND] = "ITEM_G.tga",
		[EFST_IDs.EFST_PERIOD_PLUSEXP_2ND] = "EXP_G.tga"

	}
}

status.hpp

/// @APIHOOK_END
/// Do not modify code above this, since it will be automatically generated by the API again
	EFST_VIPSTATE1 = 2000,
	EFST_VIPSTATE2 = 2001,
	EFST_RATE_UP = 2002,
	EFST_MAX,

script_constants.hpp

/// @APIHOOK_END
/// Do not modify code above this, since it will be automatically generated by the API again
	export_constant(EFST_VIPSTATE1);
	export_constant(EFST_VIPSTATE2);
	export_constant(EFST_RATE_UP);	
	export_constant(EFST_MAX);

Install fakeicon:

https://rathena.org/board/files/file/4034-fake-icon-stats/

RATE_UP.tga 4.04 kB · 6 downloads

image.thumb.png.52e5e81b6e6d7cd71c23b31a760d6dd5.png

RATE_UP.tga 4.04 kB · 5 downloads

 

Thanks for sharing! ❤️ 

I am testing this one and it seems all good but perhaps could you confirm if there's this SI_VIP.tga anywhere I could download too? I didn't find it inside my GRF...

--

Have a good one!

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