Configuration for auto learning Forgotten Power skills.
This commit is contained in:
		| @@ -81,6 +81,10 @@ AutoLearnSkills = False | ||||
| # Default: False | ||||
| AutoLearnForgottenScrollSkills = False | ||||
|  | ||||
| # If it's true skills from forgotten power books will be delivered upon level up and login, require AutoLearnSkills. | ||||
| # Default: False | ||||
| AutoLearnForgottenPowerSkills = False | ||||
|  | ||||
| # Maximum number of buffs and songs/dances. | ||||
| # Remember that Divine Inspiration will give players 4 additional buff slots on top of the number specified in "maxbuffamount". | ||||
| # Default: 20, 12, 12 | ||||
|   | ||||
| @@ -32,7 +32,7 @@ | ||||
| 	<td><button value="Give taken skills" action="bypass -h admin_reset_skills" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> | ||||
| </tr> | ||||
| <tr> | ||||
| 	<td><button value="Give All Skills FS" action="bypass -h admin_give_all_skills_fs" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> | ||||
| 	<td><button value="Give All Skills FS/FP" action="bypass -h admin_give_all_skills_fs" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> | ||||
| 	<td><button value="Remove All Skills" action="bypass -h admin_remove_all_skills" width=130 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> | ||||
| </tr> | ||||
| </table> | ||||
|   | ||||
| @@ -432,7 +432,7 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader | ||||
| 					} | ||||
| 					if (Config.AUTO_LEARN_SKILLS) | ||||
| 					{ | ||||
| 						player.giveAvailableSkills(Config.AUTO_LEARN_FS_SKILLS, true); | ||||
| 						player.giveAvailableSkills(Config.AUTO_LEARN_FS_SKILLS, Config.AUTO_LEARN_FP_SKILLS, true); | ||||
| 					} | ||||
| 					player.store(false); // Save player cause if server crashes before this char is saved, he will lose class and the money payed for class change. | ||||
| 					player.broadcastUserInfo(); | ||||
| @@ -456,7 +456,7 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader | ||||
| 				} | ||||
| 				else | ||||
| 				{ | ||||
| 					player.giveAvailableSkills(true, true); | ||||
| 					player.giveAvailableSkills(true, true, true); | ||||
| 				} | ||||
| 				break; | ||||
| 			} | ||||
| @@ -863,7 +863,7 @@ public final class ClassMaster extends AbstractNpcAI implements IGameXmlReader | ||||
| 			} | ||||
| 			if (Config.AUTO_LEARN_SKILLS) | ||||
| 			{ | ||||
| 				player.giveAvailableSkills(Config.AUTO_LEARN_FS_SKILLS, true); | ||||
| 				player.giveAvailableSkills(Config.AUTO_LEARN_FS_SKILLS, Config.AUTO_LEARN_FP_SKILLS, true); | ||||
| 			} | ||||
| 			player.store(false); // Save player cause if server crashes before this char is saved, he will lose class and the money payed for class change. | ||||
| 			player.broadcastUserInfo(); | ||||
|   | ||||
| @@ -153,11 +153,11 @@ public class AdminSkill implements IAdminCommandHandler | ||||
| 		} | ||||
| 		else if (command.equals("admin_give_all_skills")) | ||||
| 		{ | ||||
| 			adminGiveAllSkills(activeChar, false); | ||||
| 			adminGiveAllSkills(activeChar, false, false); | ||||
| 		} | ||||
| 		else if (command.equals("admin_give_all_skills_fs")) | ||||
| 		{ | ||||
| 			adminGiveAllSkills(activeChar, true); | ||||
| 			adminGiveAllSkills(activeChar, true, true); | ||||
| 		} | ||||
| 		else if (command.equals("admin_give_clan_skills")) | ||||
| 		{ | ||||
| @@ -275,8 +275,9 @@ public class AdminSkill implements IAdminCommandHandler | ||||
| 	 * This function will give all the skills that the target can learn at his/her level | ||||
| 	 * @param activeChar the active char | ||||
| 	 * @param includedByFs if {@code true} Forgotten Scroll skills will be delivered. | ||||
| 	 * @param includedByFp if {@code true} Forgotten Power skills will be delivered. | ||||
| 	 */ | ||||
| 	private void adminGiveAllSkills(L2PcInstance activeChar, boolean includedByFs) | ||||
| 	private void adminGiveAllSkills(L2PcInstance activeChar, boolean includedByFs, boolean includedByFp) | ||||
| 	{ | ||||
| 		final L2Object target = activeChar.getTarget(); | ||||
| 		if ((target == null) || !target.isPlayer()) | ||||
| @@ -286,7 +287,7 @@ public class AdminSkill implements IAdminCommandHandler | ||||
| 		} | ||||
| 		final L2PcInstance player = target.getActingPlayer(); | ||||
| 		// Notify player and admin | ||||
| 		BuilderUtil.sendSysMessage(activeChar, "You gave " + player.giveAvailableSkills(includedByFs, true) + " skills to " + player.getName()); | ||||
| 		BuilderUtil.sendSysMessage(activeChar, "You gave " + player.giveAvailableSkills(includedByFs, includedByFp, true) + " skills to " + player.getName()); | ||||
| 		player.sendSkillList(); | ||||
| 		player.sendPacket(new AcquireSkillList(player)); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment