-
Member
NilName - Lua Unlocker (Windows)
Last edited by Harry_B; 12-19-2024 at 04:18 PM.
Reason: code tag on sig
-
Post Thanks / Like - 1 Thanks
olman503 (1 members gave Thanks to Harry_B for this useful post)
-
Member
Here is a (very) basic scaffold of how to create your own rotation, so if you want to learn to code you can get started.
With AI and a bit of good will you can go pretty far by yourself.
It's made for classic era, you'll have to adapt it if you play other versions of the game.
In your Wow Addon folder create a directory with a name of your choosing.
This is your addon directory.
In this directory create a file named like your directory and the ".toc" extension (for example RenameMe.toc)
In this file write RenameMe.lua (change the name according to what you chose initially).
In the same directory create a file named RenameMe.lua (also change the name).
This is where your code will live.
Lines starting with - - are comments to help you understand what we're doing.
Start Nilname then launch wow. If your priest has power word fortitude he will autobuff himself.
Beware of performances if you adjust the frequency of the pulse function, I wouldn't put it under 0.1 (100 ms).
Code:
local myClass = UnitClass("PLAYER")
local function doPriestThings()
-- Power Word: Fortitude is availlable for 10c at lvl 1 at the priest trainer, so it's very easy to test this script
local powerWordFortitude = "Power Word: Fortitude"
-- find a non harmful buff on the player, in this case we're looking for Power Word: Fortitude
local aura = AuraUtil.FindAuraByName(powerWordFortitude, "PLAYER", "HELPFUL")
if not aura then
print(powerWordFortitude .. " not found")
-- get the spellId for PWF so that we can cast the best one availlable to the player
-- (rank 1 doesn't have the same id as rank 2 for example)
local spellId = C_Spell.GetSpellIDForSpellIdentifier(powerWordFortitude)
if spellId then
local isUsable, insufficientPower = C_Spell.IsSpellUsable(spellId)
if isUsable then
print("Casting " .. powerWordFortitude)
-- /!\ this is a protected function, without the unlocker it wouldn't work
CastSpellByID(spellId)
elseif insufficientPower then
print("Not enough mana to cast " .. powerWordFortitude)
else
print("Cannot cast " .. powerWordFortitude .. " now")
end
end
end
end
local function pulse()
if myClass == "Priest" then
-- we separate the priest logic into a separate function to keep the code clean
doPriestThings()
elseif myClass == "Warrior" then
-- create your own warrior logic here
print("I'm a warrior")
-- etc for the other classes
else
print(myClass .. " logic hasn't been implemented yet")
end
-- schedule the next pulse in 2 seconds
-- this will keep the script running every 2 seconds until the player logs out
C_Timer.After(2, pulse)
end
-- first call to the pulse function.
-- this will be executed once when the player logs in.
pulse()
Every line of code in this addon is legal per Blizzard book, except
Code:
CastSpellByID(spellId)
If you use this addon without Nilname it will error.
Use the addons buggraber and bugsack to check the errors.
-
Post Thanks / Like - 1 Thanks
olman503 (1 members gave Thanks to Harry_B for this useful post)
-
Member
probably too awkward to ask since it's mostly retail oriented, but any chance there will be private server support such as bfa 8.3.7?
-
Member
Originally Posted by
Harry_B
...Start Nilname then launch wow...
I only tested it on Warmane's own 3.3.5 (I think, it is modded), and it says that version is not supported. Some list of realms would be great where you tested Nilname.
Keep up great work, cheers
-
Member
Happy new year yall 
NN supports all official versions of the game.
No private server support at this moment, sorry.