Change Class help !

jocker23

Единомышленник
Участник
Сообщения
51
Розыгрыши
0
Репутация
0
Реакции
1
Баллы
110
imagem_2024-05-03_131311414.png
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.
 
Посмотреть вложение 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.
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);
        }
 
Ops, already infomed
 
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);
        }
When the line of new classes is added to CategoryData.XML, the class change icon disappears from the characters.

Can someone help me ?

1714770073704.png
 
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);
        }
1714785134895.png
When I add the code these errors happen... sorry for being a bit of a layman on the subject !

1714785853693.png
it is already implemented in the ExRequestClassChange.java file

and I still can't change the class of new characters using the option.
 
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
 
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
where do I add this code?
 
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
1715057329662.png
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.
 
Лог ошибок должен быть представлен в виде текста, а не скринами
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.
It seems to me that the errors are in the XML...

I'm having another problem with XML, now in shortcuts,

1715291354761.png
Код:
<?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 :/
 
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 :/

jocker23, по поводу ошибки в /game/data/stats/initialShortcuts.xml, откройте этот файл, и на строке 24 исправьте значение 52049 на более корректное. Ошибка говорит о том, что в некий атрибут указанно не корректное значение, которое может быть указанно с максимальным значением 32767, поскольку является типом short.
 
Последнее редактирование:
Назад
Сверху Снизу