Skip to content

Conversation

@Emistry
Copy link
Member

@Emistry Emistry commented Jul 29, 2019

Pull Request Prelude

Changes Proposed

  • allow to specify more than one equipment slots.
  • return the total of refine of specified equipment slots.

Shorten this

.@r = getequiprefinerycnt(EQI_SHADOW_ARMOR)+getequiprefinerycnt(EQI_SHADOW_WEAPON)+getequiprefinerycnt(EQI_SHADOW_SHIELD)+getequiprefinerycnt(EQI_SHADOW_SHOES)+getequiprefinerycnt(EQI_SHADOW_ACC_R)+getequiprefinerycnt(EQI_SHADOW_ACC_L);

into this

.@r = getequiprefinerycnt(EQI_SHADOW_ARMOR, EQI_SHADOW_WEAPON, EQI_SHADOW_SHIELD, EQI_SHADOW_SHOES, EQI_SHADOW_ACC_R, EQI_SHADOW_ACC_L);

Test Result:
Preview

Details

Test Script:

prontera,155,181,5	script	Sample NPC	4_F_KAFRA1,{
	for (.@i = EQI_HEAD_TOP; .@i <= EQI_SHADOW_ACC_L; .@i++) {
		.@old_refine += getequiprefinerycnt(.@i);
	}
	.@new_refine = getequiprefinerycnt(
		EQI_HEAD_TOP
		,EQI_ARMOR
		,EQI_HAND_L
		,EQI_HAND_R
		,EQI_GARMENT
		,EQI_SHOES
		,EQI_ACC_L
		,EQI_ACC_R
		,EQI_HEAD_MID
		,EQI_HEAD_LOW
		,EQI_COSTUME_HEAD_LOW
		,EQI_COSTUME_HEAD_MID
		,EQI_COSTUME_HEAD_TOP
		,EQI_COSTUME_GARMENT
		,EQI_SHADOW_ARMOR
		,EQI_SHADOW_WEAPON
		,EQI_SHADOW_SHIELD
		,EQI_SHADOW_SHOES
		,EQI_SHADOW_ACC_R
		,EQI_SHADOW_ACC_L
	);
	mes ".@old_refine = "+.@old_refine;
	mes ".@new_refine = "+.@new_refine;
	close;
}

Issues addressed:
reduce the need to use multiple getequiprefinerycnt(...), kRO tend to introduce new equipments that has combo bonus affected by total number of refine of several other equipments.

Known Issue:
Return value will multiple if users happen to input same equipment slots in the script commands. Ex:

getequiprefinerycnt(EQI_ARMOR, EQI_ARMOR); // value doubled due to duplicate equipment slots
getequiprefinerycnt(EQI_ARMOR); // everything good. 

- allow to specify more than one equipment slots.
- return the total of refine of specified equipment slots.
@Emistry Emistry added type:enhancement Issue describes an enhancement or feature that should be implemented component:core:scriptengine Affecting the script engine or the script commands component:documentation Affecting the documentation in the doc/ folder labels Jul 29, 2019
@HerculesWSAPI
Copy link
Contributor

This change is Reviewable

@MishimaHaruna MishimaHaruna added this to the Release v2019.08.25 milestone Aug 25, 2019
@MishimaHaruna MishimaHaruna merged commit 9f40655 into HerculesWS:master Aug 25, 2019
@Emistry Emistry deleted the scriptcommand_getequiprefinerycnt branch August 26, 2019 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:core:scriptengine Affecting the script engine or the script commands component:documentation Affecting the documentation in the doc/ folder type:enhancement Issue describes an enhancement or feature that should be implemented

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants