Button at options (alt + x ) to remove skill animation?

Olympicus

Интересующийся
Участник
Сообщения
75
Розыгрыши
0
Решения
2
Репутация
42
Реакции
33
Баллы
375
Hello, i would like to know if its possible to edit options from game (alt + x) to add checkbox for turn off some skill animations at live game, client is 140 (Salvation ) protocol, its the client it self support this feature? and if its, where start to diggle the search? any advice about it? thanks!
 
Hello, i would like to know if its possible to edit options from game (alt + x) to add checkbox for turn off some skill animations at live game, client is 140 (Salvation ) protocol, its the client it self support this feature? and if its, where start to diggle the search? any advice about it? thanks!
It can be done predominantly through the server with just a minor DAT modding in the client.

OPTION 1 (the character will use CAST animation, but the skill will have none):
1. Checkbox (in terms of data, this is a simple BOOLEAN data type, meaning it can only hold a value of TRUE or FALSE):
- You can either do it in an HTML/Community Board;
- Or if you have the client interface, you can create a custom checkbox button and will send a RequestBypassToServer packet with a command in the form of a string of your choice.

2. The DAT files:
- Create "dummy" skill(s) with no animations.

3. The Server:
3.1. Create a boolean variable in the Player.java (could be PlayerInstance or L2PcInstance or something similar) with a getter and a setter.
- If you have decided to do the Checkbox in the HTML/Community - , add handler in the community board java and hook it to the setter of the Checkbox boolean variable.
- If you have decided to do the Checkbox in the interface - create a handler in the RequestBypassToServer packet of the custom command string that you used in the client interface, and hook the setter of the Checkbox boolean variable to the RequestBypassToServer's newly added custom command handler.

3.2. Add an if statement in the RequestUseMagicSkill packet which use the Checkbox boolean getter to check the state of the Player's Checkbox boolean variable, and if the boolean is set to true, then the server sends to the client one of the custom "dummy" skills with no animations that you've created in the DAT files.



OPTION 2 (no character animation and no skill animation visible in the client):
- Create the Checkbox with any of the aforementioned methods.
- Add an if statement in the RequestUseMagicSkill packet that will check the state of the Checkbox boolean and if it is True, then it does every operation it usually does, except that it does not send the UseMagicSkill packet from the server to the client.


DISCLAIMER: In both approaches you would have to create a MAP/LIST of all the skill IDs that you want to have no animation and do a if (WHATEVER_MAP.contains(skill_id_from_the_request_use_magic_skill)) - don't send UseMagicSkill packet or send the UseMagicSkill packet with one of the dummy skills you created.
 
Последнее редактирование:
Salty Mike, If I understand correctly, your method will only work for the player's own skills since it won't affect the broadcast to other players, monsters, etc. Additionally, won't there be issues with skill icon reuse if you send a fake skill ID in the RequestUseMagicSkill packet to the client? I think you should modify the UseMagicSkill packet and check whom to send it to and in what state (taking into account the checkbox observers), not just who casts the skill.
 
It is quite possible to implement ///show particles only by UC. In almost the same way as GF-HF-like client.
 
Salty Mike, If I understand correctly, your method will only work for the player's own skills since it won't affect the broadcast to other players, monsters, etc. Additionally, won't there be issues with skill icon reuse if you send a fake skill ID in the RequestUseMagicSkill packet to the client? I think you should modify the UseMagicSkill packet and check whom to send it to and in what state (taking into account the checkbox observers), not just who casts the skill.

First, I'd like to apologise, because I just now notice which section the question was being posted in.

The shortcuts are controlled by another packet, same with ALT+K (skill list), all of which you send separately, and sending a dummy MagicSkillUse packet, I belive, won't affect what is displayed to the player's shortcut bar, because in reality, for the server, the skill in cooldown is the one you cast, and not the dummy. The old-school Costumes/DressMe system works in a similar way. It just checks if you have an item with changed appearance and sends a different ID, but in reality, the server does all of its underlying calculations about stats and all that with the base item, so, to the server, it does not really matter what the client shows.

The first method will be broadcasting a dummy skill with no animation, but the broadcast to others line should, indeed, as you pointed out, be also surrounded by an if statement, and locked behind a secondary boolean, which will be flipped to true at RequestMagicSkillUse where you check if the skill_id is present in the map with skills that require no animation. The locking mechanism should be an IF-ELSE, where the second part wouuld simply flip the secondary boolean back to false.

The idea behind the second method involves not sending the MagicSkillUse packet at all, neither to User nor to Around Players (players in radius X). As such, a better approach could be to add an IF statement in the MagicSkillUse packet itself that will check if the skill is with or without animations and if it must have no animations, just return without sending any info through the packet.


My only concern with the method 1 is that I'm not sure if a skill can have no animation in the DAT file. If it can, then both methods will work fine.
 
Последнее редактирование:
thanks for answers,now i know where to digle my search)!
 
Назад
Сверху Снизу