diff --git a/Inputs/NemoMap.yml b/Inputs/NemoMap.yml index 8b26683b..d80cdfac 100644 --- a/Inputs/NemoMap.yml +++ b/Inputs/NemoMap.yml @@ -355,4 +355,6 @@ #--- To be implemented in WARP --- # 338 : ValidateClient -#--------------------------------- \ No newline at end of file +#--------------------------------- + +350 : EnableFlagAnimation \ No newline at end of file diff --git a/Patches/UI.yml b/Patches/UI.yml index a8f3d0bc..2146fcf5 100644 --- a/Patches/UI.yml +++ b/Patches/UI.yml @@ -242,6 +242,12 @@ CustomUI: author : CH.C (jchcc) desc : Fix issue in homunculus AI which prevents automatic attacks (present in clients 20170920 clients and newer). + - EnableFlagAnimation: + title : Enable WoE Flag Animation + recommend : no + author : Sapito Sucio + desc : Restores WoE flag's animation, disabled by Gravity long ago. + CaseInsensitiveSearch: title: CASE INSENSITIVE SEARCH mutex: false diff --git a/Scripts/Patches/EnableFlagAnimation.qjs b/Scripts/Patches/EnableFlagAnimation.qjs new file mode 100644 index 00000000..b55f5988 --- /dev/null +++ b/Scripts/Patches/EnableFlagAnimation.qjs @@ -0,0 +1,62 @@ +/**************************************************************************\ +* * +* Copyright (C) 2025 * +* * +* This file is a part of WARP project (specific to RO clients) * +* * +* WARP is free software: you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation, either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see . * +* * +* * +|**************************************************************************| +* * +* Author(s) : Sapito Sucio * +* Created Date : 2025-01-11 * +* Last Modified : 2025-01-11 * +* * +\**************************************************************************/ + +/// +/// \brief Change the PUSH 5 to PUSH 1 for guild flag animation +/// +EnableFlagAnimation = function() +{ + const _ = 'EnableFlagAnimation : '; + + $$(_ + '1.1 - Find the guild flag model string reference') + const addr = Exe.FindText("model\\3dmob\\guildflag90_1.gr2"); + if (addr < 0) + throw Error("Guild flag model string not found"); + + $$(_ + '1.2 - Find where it is used in a PUSH') + const code = + PUSH_0 //push 0 + + PUSH(5) //push 5 + + PUSH(addr) //push offset "model\3dmob\guildflag90_1.gr2" + ; + + const pushAddr = Exe.FindHex(code); + if (pushAddr < 0) + throw Error("Pattern not found"); + + $$(_ + '2 - Change PUSH 5 to PUSH 1') + Exe.SetUint8(pushAddr + 3, 1); + + return true; +}; + +/// +/// \brief Disable for unsupported clients +/// +EnableFlagAnimation.validate = () => + true; // Patch should work on all clients \ No newline at end of file diff --git a/Tables/Patch.yml b/Tables/Patch.yml index d7c44a00..de8a2822 100644 --- a/Tables/Patch.yml +++ b/Tables/Patch.yml @@ -320,3 +320,5 @@ #--- To be implemented in WARP --- # 338 : ValidateClient #--------------------------------- + +350 : EnableFlagAnimation \ No newline at end of file