Bladeren bron

BETA DP-Part for [L6120]

Rumen Nikiforov 11 jaren geleden
bovenliggende
commit
6e763b1412

+ 55 - 71
L2J_DataPack_BETA/dist/game/data/enchantData.xml

@@ -5,25 +5,8 @@
 	<enchant id="947" targetGrade="b" />
 	<enchant id="951" targetGrade="c" />
 	<enchant id="955" targetGrade="d" />
-	<enchant id="959" targetGrade="s">
-		<!-- Custom Progressive enchant system uncomment the lines below to enable. -->
-		<!--  <step level="1" successRate="100.00" /> -->
-		<!--  <step level="2" successRate="100.00" /> -->
-		<!--  <step level="3" successRate="100.00" /> -->
-		<!--  <step level="4" successRate="80.00" /> -->
-		<!--  <step level="5" successRate="75.00" /> -->
-		<!--  <step level="6" successRate="70.00" /> -->
-		<!--  <step level="7" successRate="65.00" /> -->
-		<!--  <step level="8" successRate="60.00" /> -->
-		<!--  <step level="9" successRate="55.00" /> -->
-		<!--  <step level="10" successRate="50.00" /> -->
-		<!--  <step level="11" successRate="45.00" /> -->
-		<!--  <step level="12" successRate="40.00" /> -->
-		<!--  <step level="13" successRate="35.00" /> -->
-		<!--  <step level="14" successRate="30.00" /> -->
-		<!--  <step level="15" successRate="25.00" /> -->
-		<!--  <step level="16" successRate="20.00" /> -->
-	</enchant>
+	<enchant id="959" targetGrade="s" />
+	
 	<!-- Scrolls: Enchant Armor -->
 	<enchant id="730" isWeapon="false" targetGrade="a" />
 	<enchant id="948" isWeapon="false" targetGrade="b" />
@@ -44,49 +27,50 @@
 	<enchant id="6576" isWeapon="false" isBlessed="true" targetGrade="d" />
 	<enchant id="6578" isWeapon="false" isBlessed="true" targetGrade="s" />
 
+	<!-- Not used anymore. -->
 	<!-- Crystal Scrolls: Enchant Weapon -->
-	<enchant id="731" targetGrade="a" successRate="100" />
-	<enchant id="949" targetGrade="b" successRate="100" />
-	<enchant id="953" targetGrade="c" successRate="100" />
-	<enchant id="957" targetGrade="d" successRate="100" />
-	<enchant id="961" targetGrade="s" successRate="100" />
+	<!-- <enchant id="731" targetGrade="a" bonusRate="100" />
+	<enchant id="949" targetGrade="b" bonusRate="100" />
+	<enchant id="953" targetGrade="c" bonusRate="100" />
+	<enchant id="957" targetGrade="d" bonusRate="100" />
+	<enchant id="961" targetGrade="s" bonusRate="100" /> -->
 	<!-- Crystal Scrolls: Enchant Armor -->
-	<enchant id="732" isWeapon="false" targetGrade="a" successRate="100" />
-	<enchant id="950" isWeapon="false" targetGrade="b" successRate="100" />
-	<enchant id="954" isWeapon="false" targetGrade="c" successRate="100" />
-	<enchant id="958" isWeapon="false" targetGrade="d" successRate="100" />
-	<enchant id="962" isWeapon="false" targetGrade="s" successRate="100" />
+	<!-- <enchant id="732" isWeapon="false" targetGrade="a" bonusRate="100" />
+	<enchant id="950" isWeapon="false" targetGrade="b" bonusRate="100" />
+	<enchant id="954" isWeapon="false" targetGrade="c" bonusRate="100" />
+	<enchant id="958" isWeapon="false" targetGrade="d" bonusRate="100" />
+	<enchant id="962" isWeapon="false" targetGrade="s" bonusRate="100" /> -->
 
 	<!-- Weapon Enchant Scrolls -->
-	<enchant id="22006" targetGrade="d" successRate="73.326" />
-	<enchant id="22007" targetGrade="c" successRate="73.326" />
-	<enchant id="22008" targetGrade="b" successRate="73.326" />
-	<enchant id="22009" targetGrade="a" successRate="73.326" />
-	<enchant id="20517" targetGrade="s" successRate="73.326" />
+	<enchant id="22006" targetGrade="d" bonusRate="10" />
+	<enchant id="22007" targetGrade="c" bonusRate="10" />
+	<enchant id="22008" targetGrade="b" bonusRate="10" />
+	<enchant id="22009" targetGrade="a" bonusRate="10" />
+	<enchant id="20517" targetGrade="s" bonusRate="10" />
 	<!-- Armor Enchant Scrolls -->
-	<enchant id="22010" isWeapon="false" targetGrade="d" successRate="73.326" />
-	<enchant id="22011" isWeapon="false" targetGrade="c" successRate="73.326" />
-	<enchant id="22012" isWeapon="false" targetGrade="b" successRate="73.326" />
-	<enchant id="22013" isWeapon="false" targetGrade="a" successRate="73.326" />
-	<enchant id="20518" isWeapon="false" targetGrade="s" successRate="73.326" />
+	<enchant id="22010" isWeapon="false" targetGrade="d" bonusRate="10" />
+	<enchant id="22011" isWeapon="false" targetGrade="c" bonusRate="10" />
+	<enchant id="22012" isWeapon="false" targetGrade="b" bonusRate="10" />
+	<enchant id="22013" isWeapon="false" targetGrade="a" bonusRate="10" />
+	<enchant id="20518" isWeapon="false" targetGrade="s" bonusRate="10" />
 
 	<!-- Ancient Weapon Enchant Crystal -->
-	<enchant id="22014" isSafe="true" targetGrade="b" maxEnchant="16" successRate="73.326" />
-	<enchant id="22015" isSafe="true" targetGrade="a" maxEnchant="16" successRate="73.326" />
-	<enchant id="20519" isSafe="true" targetGrade="s" maxEnchant="16" successRate="73.326" />
+	<enchant id="22014" isSafe="true" targetGrade="b" maxEnchant="16" bonusRate="10" />
+	<enchant id="22015" isSafe="true" targetGrade="a" maxEnchant="16" bonusRate="10" />
+	<enchant id="20519" isSafe="true" targetGrade="s" maxEnchant="16" bonusRate="10" />
 	<!-- Ancient Armor Enchant Crystal -->
-	<enchant id="22016" isWeapon="false" isSafe="true" targetGrade="b" maxEnchant="16" successRate="73.326" />
-	<enchant id="22017" isWeapon="false" isSafe="true" targetGrade="a" maxEnchant="16" successRate="73.326" />
-	<enchant id="20520" isWeapon="false" isSafe="true" targetGrade="s" maxEnchant="16" successRate="73.326" />
+	<enchant id="22016" isWeapon="false" isSafe="true" targetGrade="b" maxEnchant="16" bonusRate="10" />
+	<enchant id="22017" isWeapon="false" isSafe="true" targetGrade="a" maxEnchant="16" bonusRate="10" />
+	<enchant id="20520" isWeapon="false" isSafe="true" targetGrade="s" maxEnchant="16" bonusRate="10" />
 
 	<!-- Divine Weapon Enchant Crystal -->
-	<enchant id="22018" targetGrade="b" successRate="100" />
-	<enchant id="22019" targetGrade="a" successRate="100" />
-	<enchant id="20521" targetGrade="s" successRate="100" />
+	<enchant id="22018" targetGrade="b" bonusRate="1" />
+	<enchant id="22019" targetGrade="a" bonusRate="1" />
+	<enchant id="20521" targetGrade="s" bonusRate="1" />
 	<!-- Divine Armor Enchant Crystal -->
-	<enchant id="22020" isWeapon="false" targetGrade="b" successRate="100" />
-	<enchant id="22021" isWeapon="false" targetGrade="a" successRate="100" />
-	<enchant id="20522" isWeapon="false" targetGrade="s" successRate="100" />
+	<enchant id="22020" isWeapon="false" targetGrade="b" bonusRate="1" />
+	<enchant id="22021" isWeapon="false" targetGrade="a" bonusRate="1" />
+	<enchant id="20522" isWeapon="false" targetGrade="s" bonusRate="1" />
 
 	<!-- Scroll: Enchant Weapon of Destruction -->
 	<enchant id="22221" isSafe="true" targetGrade="s" maxEnchant="15" />
@@ -241,30 +225,30 @@
 	</enchant>
 
 	<!-- Weapon-Type Enhance Backup Stone -->
-	<support id="12362" targetGrade="d" maxEnchant="9" successRate="1.20" />
-	<support id="12363" targetGrade="c" maxEnchant="9" successRate="1.18" />
-	<support id="12364" targetGrade="b" maxEnchant="9" successRate="1.15" />
-	<support id="12365" targetGrade="a" maxEnchant="9" successRate="1.12" />
-	<support id="12366" targetGrade="s" maxEnchant="9" successRate="1.10" />
+	<support id="12362" targetGrade="d" maxEnchant="9" bonusRate="20" />
+	<support id="12363" targetGrade="c" maxEnchant="9" bonusRate="18" />
+	<support id="12364" targetGrade="b" maxEnchant="9" bonusRate="15" />
+	<support id="12365" targetGrade="a" maxEnchant="9" bonusRate="12" />
+	<support id="12366" targetGrade="s" maxEnchant="9" bonusRate="10" />
 	
 	<!-- Armor-Type Enhance Backup Stone -->
-	<support id="12367" isWeapon="false" targetGrade="d" maxEnchant="9" successRate="1.35" />
-	<support id="12368" isWeapon="false" targetGrade="c" maxEnchant="9" successRate="1.27" />
-	<support id="12369" isWeapon="false" targetGrade="b" maxEnchant="9" successRate="1.23" />
-	<support id="12370" isWeapon="false" targetGrade="a" maxEnchant="9" successRate="1.18" />
-	<support id="12371" isWeapon="false" targetGrade="s" maxEnchant="9" successRate="1.15" />
+	<support id="12367" isWeapon="false" targetGrade="d" maxEnchant="9" bonusRate="35" />
+	<support id="12368" isWeapon="false" targetGrade="c" maxEnchant="9" bonusRate="27" />
+	<support id="12369" isWeapon="false" targetGrade="b" maxEnchant="9" bonusRate="23" />
+	<support id="12370" isWeapon="false" targetGrade="a" maxEnchant="9" bonusRate="18" />
+	<support id="12371" isWeapon="false" targetGrade="s" maxEnchant="9" bonusRate="15" />
 
 	<!-- Agathion Auxiliary Stone: Enchant Weapon -->
-	<support id="14702" targetGrade="d" maxEnchant="9" successRate="1.20" />
-	<support id="14703" targetGrade="c" maxEnchant="9" successRate="1.18" />
-	<support id="14704" targetGrade="b" maxEnchant="9" successRate="1.15" />
-	<support id="14705" targetGrade="a" maxEnchant="9" successRate="1.12" />
-	<support id="14706" targetGrade="s" maxEnchant="9" successRate="1.10" />
+	<support id="14702" targetGrade="d" maxEnchant="9" bonusRate="20" />
+	<support id="14703" targetGrade="c" maxEnchant="9" bonusRate="18" />
+	<support id="14704" targetGrade="b" maxEnchant="9" bonusRate="15" />
+	<support id="14705" targetGrade="a" maxEnchant="9" bonusRate="12" />
+	<support id="14706" targetGrade="s" maxEnchant="9" bonusRate="10" />
 	
 	<!-- Agathion Auxiliary Stone: Enchant Armor -->
-	<support id="14707" isWeapon="false" targetGrade="d" maxEnchant="9" successRate="1.35" />
-	<support id="14708" isWeapon="false" targetGrade="c" maxEnchant="9" successRate="1.27" />
-	<support id="14709" isWeapon="false" targetGrade="b" maxEnchant="9" successRate="1.23" />
-	<support id="14710" isWeapon="false" targetGrade="a" maxEnchant="9" successRate="1.18" />
-	<support id="14711" isWeapon="false" targetGrade="s" maxEnchant="9" successRate="1.15" />
+	<support id="14707" isWeapon="false" targetGrade="d" maxEnchant="9" bonusRate="35" />
+	<support id="14708" isWeapon="false" targetGrade="c" maxEnchant="9" bonusRate="27" />
+	<support id="14709" isWeapon="false" targetGrade="b" maxEnchant="9" bonusRate="23" />
+	<support id="14710" isWeapon="false" targetGrade="a" maxEnchant="9" bonusRate="18" />
+	<support id="14711" isWeapon="false" targetGrade="s" maxEnchant="9" bonusRate="15" />
 </list>

+ 91 - 0
L2J_DataPack_BETA/dist/game/data/enchantItemGroups.xml

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/enchantItemGroups.xsd">
+	<!-- General armor enchant group. -->
+	<enchantRateGroup name="ARMOR_GROUP">
+		<current enchant="0-2" chance="100" />
+		<current enchant="3" chance="66.67" />
+		<current enchant="4" chance="33.34" />
+		<current enchant="5" chance="25" />
+		<current enchant="6" chance="20" />
+		<current enchant="7" chance="16.67" />
+		<current enchant="8" chance="14.29" />
+		<current enchant="9" chance="12.5" />
+		<current enchant="10" chance="11.12" />
+		<current enchant="11" chance="10.0" />
+		<current enchant="12" chance="9.10" />
+		<current enchant="13" chance="8.34" />
+		<current enchant="14" chance="7.70" />
+		<current enchant="15" chance="7.15" />
+		<current enchant="16" chance="6.67" />
+		<current enchant="17" chance="6.25" />
+		<current enchant="18" chance="5.89" />
+		<current enchant="19" chance="5.56" />
+		<current enchant="20-65535" chance="0" />
+	</enchantRateGroup>
+
+	<!-- General full armor enchant group. -->
+	<enchantRateGroup name="FULL_ARMOR_GROUP">
+		<current enchant="0-3" chance="100" />
+		<current enchant="4" chance="66.67" />
+		<current enchant="5" chance="33.34" />
+		<current enchant="6" chance="25" />
+		<current enchant="7" chance="20" />
+		<current enchant="8" chance="16.67" />
+		<current enchant="9" chance="14.29" />
+		<current enchant="10" chance="12.5" />
+		<current enchant="11" chance="11.12" />
+		<current enchant="12" chance="10.0" />
+		<current enchant="13" chance="9.10" />
+		<current enchant="14" chance="8.34" />
+		<current enchant="15" chance="7.70" />
+		<current enchant="16" chance="7.15" />
+		<current enchant="17" chance="6.67" />
+		<current enchant="18" chance="6.25" />
+		<current enchant="19" chance="5.89" />
+		<current enchant="20-65535" chance="0" />
+	</enchantRateGroup>
+
+	<!-- General fighter weapon enchant group. -->
+	<enchantRateGroup name="FIGHTER_WEAPON_GROUP">
+		<current enchant="0-2" chance="100" />
+		<current enchant="3-14" chance="70" />
+		<current enchant="14-65535" chance="35" />
+	</enchantRateGroup>
+
+	<!-- General mage weapon enchant group. -->
+	<enchantRateGroup name="MAGE_WEAPON_GROUP">
+		<current enchant="0-2" chance="100" />
+		<current enchant="3-14" chance="40" />
+		<current enchant="14-65535" chance="20" />
+	</enchantRateGroup>
+	
+	<!-- Default scrolls enchanting route line. -->
+	<enchantScrollGroup id="0">
+		<!-- Bind armor group to all item slots except full armor. -->
+		<enchantRate group="ARMOR_GROUP">
+			<item slot="lhand" /> <!-- Left hand: Shields, Sigils -->
+			<item slot="head" /> <!-- Head: Helmet -->
+			<item slot="chest" /> <!-- Chest: Armor upper body. -->
+			<item slot="legs" /> <!-- Legs: Armor lower body. -->
+			<item slot="feet" /> <!-- Feet: Boots -->
+			<item slot="gloves" /> <!-- Gloves: Gloves -->
+			<item slot="neck" /> <!-- Neck: Necklaces -->
+			<item slot="rear;lear" /> <!-- Right ear, Left ear: Earrings -->
+			<item slot="rfinger;lfinger" /> <!-- Right finger, Left finger: Rings -->
+			<item slot="belt" /> <!-- Belt: Belts -->
+			<item slot="shirt" /> <!-- Shirt: Shirts -->
+		</enchantRate>
+		<!-- Bind only full armor group to to full armor slot items. -->
+		<enchantRate group="FULL_ARMOR_GROUP">
+			<item slot="fullarmor" /> <!-- Full Armor: Full armor pants are included. -->
+		</enchantRate>
+		<!-- Bind only fighter weapon group to all fighter weapons. -->
+		<enchantRate group="FIGHTER_WEAPON_GROUP">
+			<item slot="rhand" magicWeapon="false" /> <!-- Right hand: Weapons, Non magic weapon -->
+		</enchantRate>
+		<!-- Bind only mage weapon group to all magic weapons. -->
+		<enchantRate group="MAGE_WEAPON_GROUP">
+			<item slot="rhand" magicWeapon="true" /> <!-- Right hand: Weapons, Magic weapon -->
+		</enchantRate>
+	</enchantScrollGroup>
+</list>

+ 29 - 0
L2J_DataPack_BETA/dist/game/data/html/admin/itemdebug.htm

@@ -0,0 +1,29 @@
+<html noscrollbar>
+	<head>
+		<title>Item debug: %item%</title>
+	</head>
+	<body>
+		<font color="LEVEL">Item</font><br1>
+		<table border="0" cellpadding="0" cellspacing="0" width="292" height="130" background="L2UI_CH3.refinewnd_back_Pattern">
+		<tr>
+		<td>Item name: </td><td><font color="LEVEL">%itemName%</font></td>
+		</tr>
+		<tr>
+		<td>Item slot: </td><td><font color="LEVEL">%itemSlot%</font></td>
+		</tr>
+		<tr>
+		<td>Item type: </td><td><font color="LEVEL">%itemType%</font></td>
+		</tr>
+		<tr>
+		<td>Enchant level: </td><td><font color="LEVEL">%enchantLevel%</font></td>
+		</tr>
+		<tr>
+		<td>Magic Weapon: </td><td><font color="LEVEL">%isMagicWeapon%</font></td>
+		</tr>
+		</table>
+		<font color="LEVEL">Formula</font><br1>
+		<table border="0" cellpadding="0" cellspacing="0" width="292" height="130" background="L2UI_CH3.refinewnd_back_Pattern">
+		%details%
+		</table><br><br><br><br><center><a action="link tutorial_close">Close</a></center><br><br><br><br><br>
+	</body>
+</html>

+ 10 - 1
L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java

@@ -29,6 +29,8 @@ import com.l2jserver.gameserver.datatables.AdminTable;
 import com.l2jserver.gameserver.datatables.BuyListData;
 import com.l2jserver.gameserver.datatables.CrestTable;
 import com.l2jserver.gameserver.datatables.DoorTable;
+import com.l2jserver.gameserver.datatables.EnchantItemData;
+import com.l2jserver.gameserver.datatables.EnchantItemGroupsData;
 import com.l2jserver.gameserver.datatables.ItemTable;
 import com.l2jserver.gameserver.datatables.MultisellData;
 import com.l2jserver.gameserver.datatables.NpcTable;
@@ -63,7 +65,7 @@ public class AdminReload implements IAdminCommandHandler
 			if (!st.hasMoreTokens())
 			{
 				AdminHtml.showAdminHtml(activeChar, "reload.htm");
-				activeChar.sendMessage("Usage: //reload <config|access|npc [npc_id]|quest [quest_id|quest_name]|walker|htm[l] [file|directory]|multisell|buylist|teleport|skill|item|door|effect|handler>");
+				activeChar.sendMessage("Usage: //reload <config|access|npc [npc_id]|quest [quest_id|quest_name]|walker|htm[l] [file|directory]|multisell|buylist|teleport|skill|item|door|effect|handler|enchant>");
 				return true;
 			}
 			
@@ -246,6 +248,13 @@ public class AdminReload implements IAdminCommandHandler
 					}
 					break;
 				}
+				case "enchant":
+				{
+					EnchantItemGroupsData.getInstance().load();
+					EnchantItemData.getInstance().load();
+					AdminTable.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded item enchanting data.");
+					break;
+				}
 				default:
 				{
 					activeChar.sendMessage("Usage: //reload <config|access|npc [npc_id]|quest [quest_id|quest_name]|walker|htm[l] [file|directory]|multisell|buylist|teleport|skill|item|door|effect|handler>");

+ 2 - 9
L2J_DataPack_BETA/dist/game/data/xsd/enchantData.xsd

@@ -30,7 +30,7 @@
 								</xs:restriction>
 							</xs:simpleType>
 						</xs:attribute>
-						<xs:attribute name="successRate">
+						<xs:attribute name="bonusRate">
 							<xs:simpleType>
 								<xs:restriction base="xs:decimal">
 									<xs:minInclusive value="1.0" />
@@ -63,14 +63,7 @@
 								</xs:restriction>
 							</xs:simpleType>
 						</xs:attribute>
-						<xs:attribute name="successRate" use="required">
-							<xs:simpleType>
-								<xs:restriction base="xs:decimal">
-									<xs:minInclusive value="1.0" />
-									<xs:maxInclusive value="2.0" />
-								</xs:restriction>
-							</xs:simpleType>
-						</xs:attribute>
+						<xs:attribute name="bonusRate" type="xs:double" use="required" />
 						<xs:attribute name="targetGrade" use="required">
 							<xs:simpleType>
 								<xs:restriction base="xs:token">

+ 43 - 0
L2J_DataPack_BETA/dist/game/data/xsd/enchantItemGroups.xsd

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+	<xs:element name="list">
+		<xs:complexType>
+			<xs:sequence>
+				<xs:element name="enchantRateGroup" maxOccurs="unbounded">
+					<xs:complexType>
+						<xs:sequence>
+							<xs:element name="current" maxOccurs="unbounded" minOccurs="0">
+								<xs:complexType>
+									<xs:attribute type="xs:string" name="enchant" use="optional" />
+									<xs:attribute type="xs:float" name="chance" use="optional" />
+								</xs:complexType>
+							</xs:element>
+						</xs:sequence>
+						<xs:attribute type="xs:string" name="name" use="optional" />
+					</xs:complexType>
+				</xs:element>
+				<xs:element name="enchantScrollGroup" maxOccurs="unbounded">
+					<xs:complexType>
+						<xs:sequence>
+							<xs:element name="enchantRate" maxOccurs="unbounded" minOccurs="0">
+								<xs:complexType>
+									<xs:sequence>
+										<xs:element name="item" maxOccurs="unbounded" minOccurs="0">
+											<xs:complexType>
+												<xs:attribute type="xs:string" name="slot" use="optional" />
+												<xs:attribute type="xs:boolean" name="magicWeapon" use="optional" />
+												<xs:attribute type="xs:int" name="itemId" use="optional" />
+											</xs:complexType>
+										</xs:element>
+									</xs:sequence>
+									<xs:attribute type="xs:string" name="group" use="required" />
+								</xs:complexType>
+							</xs:element>
+						</xs:sequence>
+						<xs:attribute type="xs:byte" name="id" />
+					</xs:complexType>
+				</xs:element>
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+</xs:schema>