sania207 1 Posted November 5, 2021 Share Posted November 5, 2021 Hello, i was wondering if anyone can help me with code. You need a code to switch the complexity of the raid (normal/heroic/normal). RunLuaCode ResetInstances(); - not suitable for solving the problem. Link to comment Share on other sites More sharing options...
zzzar 13 Posted November 5, 2021 Share Posted November 5, 2021 https://addonstudio.fandom.com/wiki/API_SetRaidDifficulty Link to comment Share on other sites More sharing options...
sania207 1 Posted November 5, 2021 Author Share Posted November 5, 2021 16 minutes ago, zzzar said: https://addonstudio.fandom.com/wiki/API_SetRaidDifficulty Wow BFA 8.3.7 does not work Link to comment Share on other sites More sharing options...
Droidz 2708 Posted November 5, 2021 Share Posted November 5, 2021 Hello, look https://github.com/tomrus88/BlizzardInterfaceCode/blob/ffbd8a3f993fb455aaff5726a8192b1a6d81f56c/Interface/FrameXML/UnitPopup.lua#L1885 (to get DifficultyID https://github.com/tomrus88/BlizzardInterfaceCode/blob/ffbd8a3f993fb455aaff5726a8192b1a6d81f56c/Interface/FrameXML/UnitPopup.lua#L85 ) Sye24 1 Link to comment Share on other sites More sharing options...
sania207 1 Posted November 6, 2021 Author Share Posted November 6, 2021 18 hours ago, Droidz said: Hello, look https://github.com/tomrus88/BlizzardInterfaceCode/blob/ffbd8a3f993fb455aaff5726a8192b1a6d81f56c/Interface/FrameXML/UnitPopup.lua#L1885 (to get DifficultyID https://github.com/tomrus88/BlizzardInterfaceCode/blob/ffbd8a3f993fb455aaff5726a8192b1a6d81f56c/Interface/FrameXML/UnitPopup.lua#L85 ) Although it is unclear, but thank you Link to comment Share on other sites More sharing options...
Zan 99 Posted November 6, 2021 Share Posted November 6, 2021 Lua.LuaDoString("SetLegacyRaidDifficultyID(3);"); Lua.LuaDoString("SetRaidDifficultyID(3);"); https://wowpedia.fandom.com/wiki/API_SetRaidDifficultyID Link to comment Share on other sites More sharing options...
Droidz 2708 Posted November 6, 2021 Share Posted November 6, 2021 2 hours ago, sania207 said: Although it is unclear, but thank you It is code used in BFA interface (function seems changed since old game vesions) to change difficulty: https://github.com/tomrus88/BlizzardInterfaceCode/blob/ffbd8a3f993fb455aaff5726a8192b1a6d81f56c/Interface/FrameXML/UnitPopup.lua#L1885 For "DUNGEON_DIFFICULTY": SetDungeonDifficultyID(difficultyID); For "RAID_DIFFICULTY": SetRaidDifficulties(true, difficultyID); For "LEGACY_RAID_DIFFICULTY": SetRaidDifficulties(false, difficultyID); And diffultyID can be found here: https://github.com/tomrus88/BlizzardInterfaceCode/blob/ffbd8a3f993fb455aaff5726a8192b1a6d81f56c/Interface/FrameXML/UnitPopup.lua#L85 ["DUNGEON_DIFFICULTY1"] > difficultyID = 1 ["DUNGEON_DIFFICULTY2"] > difficultyID = 2 ["DUNGEON_DIFFICULTY3"] > difficultyID = 23 ["RAID_DIFFICULTY1"] > difficultyID = 14 ["RAID_DIFFICULTY2"] > difficultyID = 15 ["RAID_DIFFICULTY3"] > difficultyID = 16 ["LEGACY_RAID_DIFFICULTY1"] > difficultyID = 3 ["LEGACY_RAID_DIFFICULTY2"] > difficultyID = 4 IDs seems unchanged, you can use https://wowpedia.fandom.com/wiki/API_SetRaidDifficultyID 3 → 10 Player 4 → 25 Player 5 → 10 Player (Heroic) 6 → 25 Player (Heroic) 14 → Normal 15 → Heroic 16 → Mythic Based on wow UI code you code should look like (to use heroic difficulty): SetRaidDifficulties(true, 15); Link to comment Share on other sites More sharing options...
sania207 1 Posted November 6, 2021 Author Share Posted November 6, 2021 2 hours ago, Droidz said: SetRaidDifficulties(true, 15); Thank You Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now