View Single Post
12-21-23, 06:05 PM   #1
Aethereality
A Defias Bandit
Join Date: Dec 2023
Posts: 2
Request: Prevent an addon from firing its script on reload?

Howdy. I'm trying to write an overly basic addon that runs some code when the player first logs in, but not when they do a /reload. Is there a way to prevent this from happening?

The code is very basic;

Lua Code:
  1. local frame=CreateFrame("Frame");
  2. frame:RegisterEvent("PLAYER_LOGIN");
  3. frame:SetScript("OnEvent",function(self,event,...)
  4.     --My code is here, it's one line
  5. end);
  Reply With Quote