Castle functions update.
Contributed by quangnguyen.
This commit is contained in:
		
							
								
								
									
										43
									
								
								L2J_Mobius_Classic_2.0_Saviors/dist/game/data/multisell/4039.xml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								L2J_Mobius_Classic_2.0_Saviors/dist/game/data/multisell/4039.xml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <list applyTaxes="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd"> | ||||
| 	<item> | ||||
| 		<ingredient id="29668" count="11" /> <!-- Castle Onwer's Coin --> | ||||
| 		<production id="29679" count="1" /> <!-- Castle Earring (10-day) --> | ||||
| 	</item> | ||||
| 	<item> | ||||
| 		<ingredient id="29668" count="15" /> <!-- Castle Onwer's Coin --> | ||||
| 		<production id="29681" count="1" /> <!-- Castle Necklace (10-day) --> | ||||
| 	</item> | ||||
| 	<item> | ||||
| 		<ingredient id="29668" count="8" /> <!-- Castle Onwer's Coin --> | ||||
| 		<production id="29677" count="1" /> <!-- Castle Ring (10-day) --> | ||||
| 	</item> | ||||
| 	<item> | ||||
| 		<ingredient id="29668" count="4" /> <!-- Castle Onwer's Coin --> | ||||
| 		<production id="29670" count="1" /> <!-- Castle XP/SP Scroll - Medium --> | ||||
| 	</item> | ||||
| 	<item> | ||||
| 		<ingredient id="29668" count="3" /> <!-- Castle Onwer's Coin --> | ||||
| 		<production id="29669" count="1" /> <!-- Castle XP/SP Scroll - Normal --> | ||||
| 	</item> | ||||
| 	<item> | ||||
| 		<ingredient id="29668" count="3" /> <!-- Castle Onwer's Coin --> | ||||
| 		<production id="29672" count="1" /> <!-- Major Quick Castle Healing Potion --> | ||||
| 	</item> | ||||
| 	<item> | ||||
| 		<ingredient id="29668" count="4" /> <!-- Castle Onwer's Coin --> | ||||
| 		<production id="29671" count="1" /> <!-- Quick Castle Healing Potion --> | ||||
| 	</item> | ||||
| 	<item> | ||||
| 		<ingredient id="29668" count="1" /> <!-- Castle Onwer's Coin --> | ||||
| 		<production id="29673" count="1" /> <!-- Scroll: Castle Berserker Spirit --> | ||||
| 	</item> | ||||
| 	<item> | ||||
| 		<ingredient id="29668" count="3" /> <!-- Castle Onwer's Coin --> | ||||
| 		<production id="29674" count="1" /> <!-- Scroll: Castle Death Whisper --> | ||||
| 	</item> | ||||
| 	<item> | ||||
| 		<ingredient id="29668" count="3" /> <!-- Castle Onwer's Coin --> | ||||
| 		<production id="29676" count="1" /> <!-- Scroll: Castle Blessing --> | ||||
| 	</item> | ||||
| </list> | ||||
| @@ -76,16 +76,16 @@ public final class CastleChamberlain extends AbstractNpcAI | ||||
| 		35184, 36655, // Giran | ||||
| 		35226, 36656, // Oren | ||||
| 		35274, 36657, // Aden | ||||
| 		35316, 36658, // Innadril | ||||
| 		35363, 36659, // Goddard | ||||
| 		35509, 36660, // Rune | ||||
| 		35555, 36661, // Schuttgart | ||||
| 		// 35316, 36658, // Innadril | ||||
| 		// 35363, 36659, // Goddard | ||||
| 		// 35509, 36660, // Rune | ||||
| 		// 35555, 36661, // Schuttgart | ||||
| 	}; | ||||
| 	//@formatter:on | ||||
| 	// Item | ||||
| 	private static final int CROWN = 6841; | ||||
| 	private static final int LORD_CLOAK_OF_LIGHT = 34996; | ||||
| 	private static final int LORD_CLOAK_OF_DARK = 34997; | ||||
| 	private static final int LORD_CLOAK_OF_LIGHT = 34925; | ||||
| 	private static final int LORD_CLOAK_OF_DARK = 34926; | ||||
| 	// Fortress | ||||
| 	private static final Map<Integer, List<Integer>> FORTRESS = new HashMap<>(); | ||||
| 	 | ||||
| @@ -372,20 +372,20 @@ public final class CastleChamberlain extends AbstractNpcAI | ||||
| 		return price; | ||||
| 	} | ||||
| 	 | ||||
| 	private final boolean isDomainFortressInContractStatus(int castleId) | ||||
| 	{ | ||||
| 		final int numFort = ((castleId == 1) || (castleId == 5)) ? 2 : 1; | ||||
| 		final List<Integer> fortList = FORTRESS.get(castleId); | ||||
| 		for (int i = 0; i < numFort; i++) | ||||
| 		{ | ||||
| 			final Fort fortress = FortManager.getInstance().getFortById(fortList.get(i)); | ||||
| 			if (fortress.getFortState() == 2) | ||||
| 			{ | ||||
| 				return true; | ||||
| 			} | ||||
| 		} | ||||
| 		return false; | ||||
| 	} | ||||
| 	// private final boolean isDomainFortressInContractStatus(int castleId) | ||||
| 	// { | ||||
| 	// 	final int numFort = ((castleId == 1) || (castleId == 5)) ? 2 : 1; | ||||
| 	// 	final List<Integer> fortList = FORTRESS.get(castleId); | ||||
| 	// 	for (int i = 0; i < numFort; i++) | ||||
| 	// 	{ | ||||
| 	// 		final Fort fortress = FortManager.getInstance().getFortById(fortList.get(i)); | ||||
| 	// 		if (fortress.getFortState() == 2) | ||||
| 	// 		{ | ||||
| 	// 			return true; | ||||
| 	// 		} | ||||
| 	// 	} | ||||
| 	// 	return false; | ||||
| 	// } | ||||
| 	 | ||||
| 	private final boolean isOwner(L2PcInstance player, L2Npc npc) | ||||
| 	{ | ||||
| @@ -463,10 +463,10 @@ public final class CastleChamberlain extends AbstractNpcAI | ||||
| 					{ | ||||
| 						htmltext = "chamberlain-08.html"; | ||||
| 					} | ||||
| 					else if (!isDomainFortressInContractStatus(castle.getResidenceId())) | ||||
| 					{ | ||||
| 						htmltext = "chamberlain-27.html"; | ||||
| 					} | ||||
| 					// else if (!isDomainFortressInContractStatus(castle.getResidenceId())) | ||||
| 					// { | ||||
| 					// 	htmltext = "chamberlain-27.html"; | ||||
| 					// } | ||||
| 					else | ||||
| 					{ | ||||
| 						htmltext = "chamberlain-12.html"; | ||||
|   | ||||
| @@ -8,6 +8,7 @@ Greetings, my lord. How may I serve you today?<br> | ||||
| <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CastleChamberlain list_siege_clans">View castle siege information</Button> | ||||
| <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CastleChamberlain manor">Manage manor</Button> | ||||
| <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CastleChamberlain products">Items</Button> | ||||
| <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 4039">Buy items for the Castle Owners Coins</Button> | ||||
| <Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button> | ||||
| </center> | ||||
| </body></html> | ||||
| @@ -2,7 +2,7 @@ | ||||
| Greetings, Lord <font color="00FFFF">%clanleadername%</font>.<br> | ||||
| Currently, the <font color="00FFFF"><fstring>%castlename%</fstring></font> territory is at peace, under the leadership of the <font color="00FFFF">%clanname%</font> clan. This is entirely due to your wisdom and strength, Lord <font color="00FFFF">%clanleadername%</font>.<br> | ||||
| <center> | ||||
| <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CastleChamberlain fort_status">Check the fortress status</Button> | ||||
| <!--Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CastleChamberlain fort_status">Check the fortress status</Button--> | ||||
| <Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest CastleChamberlain chamberlain-01.html">Back</Button><br> | ||||
| </center> | ||||
| </body></html>   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <html><body> | ||||
| That is not possible as the Guardian Towers of Life have been destroyed.<br> | ||||
| Therefore, all of those in the room will be teleported to a position near the castle hall in 8 minutes.<br> | ||||
| Therefore, all of those in the room will be teleported to a position near the castle hall in 3 minutes.<br> | ||||
| Make yourself comfortable.<br> | ||||
| <center> | ||||
| <Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest CastleTeleporter teleporter-03.html">Teleport</Button> | ||||
|   | ||||
| @@ -90,7 +90,7 @@ public final class CastleTeleporter extends AbstractNpcAI | ||||
| 				if (npc.isScriptValue(0)) | ||||
| 				{ | ||||
| 					final Siege siege = npc.getCastle().getSiege(); | ||||
| 					final int time = (siege.isInProgress() && (siege.getControlTowerCount() == 0)) ? 480000 : 30000; | ||||
| 					final int time = (siege.isInProgress() && (siege.getControlTowerCount() == 0)) ? 180000 : 30000; | ||||
| 					startQuestTimer("MASS_TELEPORT", time, npc, null); | ||||
| 					npc.setScriptValue(1); | ||||
| 				} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDev
					MobiusDev