Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
It depend on what you want to do.Посмотреть вложение 74494
Could someone tell me which source file and which client file I can modify this option in?
I'm implementing what's missing in version 464 and I can't change the new classes.
// Check for player proper class group and level.
canChange = false;
final int playerLevel = player.getLevel();
if (player.isInCategory(CategoryType.FIRST_CLASS_GROUP) && (playerLevel >= 18))
{
canChange = CategoryData.getInstance().isInCategory(CategoryType.SECOND_CLASS_GROUP, _classId);
}
else if (player.isInCategory(CategoryType.SECOND_CLASS_GROUP) && (playerLevel >= 38))
{
canChange = CategoryData.getInstance().isInCategory(CategoryType.THIRD_CLASS_GROUP, _classId);
}
else if (player.isInCategory(CategoryType.THIRD_CLASS_GROUP) && (playerLevel >= 76))
{
canChange = CategoryData.getInstance().isInCategory(CategoryType.FOURTH_CLASS_GROUP, _classId);
}
When the line of new classes is added to CategoryData.XML, the class change icon disappears from the characters.It depend on what you want to do.
If you wanna add new classes for High Elves in Category.xml, because in java file it required.
Java:// Check for player proper class group and level. canChange = false; final int playerLevel = player.getLevel(); if (player.isInCategory(CategoryType.FIRST_CLASS_GROUP) && (playerLevel >= 18)) { canChange = CategoryData.getInstance().isInCategory(CategoryType.SECOND_CLASS_GROUP, _classId); } else if (player.isInCategory(CategoryType.SECOND_CLASS_GROUP) && (playerLevel >= 38)) { canChange = CategoryData.getInstance().isInCategory(CategoryType.THIRD_CLASS_GROUP, _classId); } else if (player.isInCategory(CategoryType.THIRD_CLASS_GROUP) && (playerLevel >= 76)) { canChange = CategoryData.getInstance().isInCategory(CategoryType.FOURTH_CLASS_GROUP, _classId); }
It depend on what you want to do.
If you wanna add new classes for High Elves in Category.xml, because in java file it required.
Java:// Check for player proper class group and level. canChange = false; final int playerLevel = player.getLevel(); if (player.isInCategory(CategoryType.FIRST_CLASS_GROUP) && (playerLevel >= 18)) { canChange = CategoryData.getInstance().isInCategory(CategoryType.SECOND_CLASS_GROUP, _classId); } else if (player.isInCategory(CategoryType.SECOND_CLASS_GROUP) && (playerLevel >= 38)) { canChange = CategoryData.getInstance().isInCategory(CategoryType.THIRD_CLASS_GROUP, _classId); } else if (player.isInCategory(CategoryType.THIRD_CLASS_GROUP) && (playerLevel >= 76)) { canChange = CategoryData.getInstance().isInCategory(CategoryType.FOURTH_CLASS_GROUP, _classId); }
if(player.getrace() == highelf)
{
player.sendmessage("enter here");
change class line;
}
where do I add this code?to debug put insede if messages, example:
Код:if(player.getrace() == highelf) { player.sendmessage("enter here"); change class line; }
the message will apear in systemmessage... with this u can trash the flow of change class, also u can put in warrior class to see if is working well and then put to test highelf and investigate the diffs
It seems to me that the errors are in the XML...In the java file, for u check the process.
If everything in java part is ok, then u will know is a XML problem.
jocker23
Like this
Посмотреть вложение 74552
this way u can confirm IF when u try to change for HighElf classes, u are enter in this part of code. U can put this message inner in code. Inside this if(player.isSubClassActive) to see if are wrongly enter in this part. Learn to DEBUG ur code will help u alot.
<?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 minOccurs="1" maxOccurs="1">
<xs:element name="shortcuts" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element name="page" minOccurs="1" maxOccurs="4">
<xs:complexType>
<xs:sequence>
<xs:element name="slot" maxOccurs="12" minOccurs="1">
<xs:complexType>
<xs:attribute type="xs:byte" name="slotId" use="required" />
<xs:attribute name="shortcutType" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="ITEM" />
<xs:enumeration value="SKILL" />
<xs:enumeration value="ACTION" />
<xs:enumeration value="MACRO" />
<xs:enumeration value="RECIPE" />
<xs:enumeration value="BOOKMARK" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute type="xs:short" name="shortcutId" use="required" />
<xs:attribute type="xs:byte" name="shortcutLevel" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="pageId" use="required">
<xs:simpleType>
<xs:restriction base="xs:nonNegativeInteger">
<xs:minInclusive value="0" />
<xs:maxInclusive value="20" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="classId" use="optional">
<xs:simpleType>
<xs:restriction base="xs:nonNegativeInteger">
<xs:minInclusive value="0" />
<xs:maxInclusive value="255" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="macros" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="macro" maxOccurs="48">
<xs:complexType>
<xs:sequence>
<xs:element name="command" maxOccurs="12" minOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="SKILL" />
<xs:enumeration value="ACTION" />
<xs:enumeration value="TEXT" />
<xs:enumeration value="SHORTCUT" />
<xs:enumeration value="ITEM" />
<xs:enumeration value="DELAY" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute type="xs:positiveInteger" name="skillId" use="optional" />
<xs:attribute type="xs:positiveInteger" name="skillLevel" use="optional" />
<xs:attribute type="xs:nonNegativeInteger" name="page" use="optional" />
<xs:attribute type="xs:nonNegativeInteger" name="slot" use="optional" />
<xs:attribute type="xs:positiveInteger" name="actionId" use="optional" />
<xs:attribute type="xs:positiveInteger" name="actionType" use="optional" />
<xs:attribute type="xs:positiveInteger" name="itemId" use="optional" />
<xs:attribute type="xs:positiveInteger" name="delay" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:nonNegativeInteger" name="macroId" use="required" />
<xs:attribute name="icon" use="required">
<xs:simpleType>
<xs:restriction base="xs:byte">
<xs:minInclusive value="0" />
<xs:maxInclusive value="6" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute type="xs:string" name="name" use="required" />
<xs:attribute type="xs:string" name="description" use="optional" />
<xs:attribute type="xs:token" name="acronym" use="required" />
<xs:attribute type="xs:boolean" name="enabled" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
It seems to me that the errors are in the XML...
I'm having another problem with XML, now in shortcuts,
Посмотреть вложение 74603
Код:<?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 minOccurs="1" maxOccurs="1"> <xs:element name="shortcuts" minOccurs="1" maxOccurs="unbounded"> <xs:complexType> <xs:sequence minOccurs="1" maxOccurs="1"> <xs:element name="page" minOccurs="1" maxOccurs="4"> <xs:complexType> <xs:sequence> <xs:element name="slot" maxOccurs="12" minOccurs="1"> <xs:complexType> <xs:attribute type="xs:byte" name="slotId" use="required" /> <xs:attribute name="shortcutType" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="ITEM" /> <xs:enumeration value="SKILL" /> <xs:enumeration value="ACTION" /> <xs:enumeration value="MACRO" /> <xs:enumeration value="RECIPE" /> <xs:enumeration value="BOOKMARK" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute type="xs:short" name="shortcutId" use="required" /> <xs:attribute type="xs:byte" name="shortcutLevel" use="optional" /> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="pageId" use="required"> <xs:simpleType> <xs:restriction base="xs:nonNegativeInteger"> <xs:minInclusive value="0" /> <xs:maxInclusive value="20" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="classId" use="optional"> <xs:simpleType> <xs:restriction base="xs:nonNegativeInteger"> <xs:minInclusive value="0" /> <xs:maxInclusive value="255" /> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="macros" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="macro" maxOccurs="48"> <xs:complexType> <xs:sequence> <xs:element name="command" maxOccurs="12" minOccurs="1"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="type" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="SKILL" /> <xs:enumeration value="ACTION" /> <xs:enumeration value="TEXT" /> <xs:enumeration value="SHORTCUT" /> <xs:enumeration value="ITEM" /> <xs:enumeration value="DELAY" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute type="xs:positiveInteger" name="skillId" use="optional" /> <xs:attribute type="xs:positiveInteger" name="skillLevel" use="optional" /> <xs:attribute type="xs:nonNegativeInteger" name="page" use="optional" /> <xs:attribute type="xs:nonNegativeInteger" name="slot" use="optional" /> <xs:attribute type="xs:positiveInteger" name="actionId" use="optional" /> <xs:attribute type="xs:positiveInteger" name="actionType" use="optional" /> <xs:attribute type="xs:positiveInteger" name="itemId" use="optional" /> <xs:attribute type="xs:positiveInteger" name="delay" use="optional" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute type="xs:nonNegativeInteger" name="macroId" use="required" /> <xs:attribute name="icon" use="required"> <xs:simpleType> <xs:restriction base="xs:byte"> <xs:minInclusive value="0" /> <xs:maxInclusive value="6" /> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute type="xs:string" name="name" use="required" /> <xs:attribute type="xs:string" name="description" use="optional" /> <xs:attribute type="xs:token" name="acronym" use="required" /> <xs:attribute type="xs:boolean" name="enabled" use="optional" /> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
I can't solve any problem, I need help :/
short
.