Advertisement
Gilpow

Untitled

Oct 18th, 2021
1,678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local inCombatLocal
  2.  
  3. local function onSimulate()
  4.     local inCombat = tes3.mobilePlayer.inCombat
  5.     if (inCombat and (not inCombatLocal)) then
  6.         inCombatLocal = true
  7.         tes3.messageBox("'inCombat' has become TRUE")
  8.     elseif ((not inCombat) and inCombatLocal) then
  9.         inCombatLocal = false
  10.         tes3.messageBox("'inCombat' has become FALSE")
  11.     end
  12. end
  13.  
  14. local function onInitialized()
  15.     event.register('simulate', onSimulate)
  16.     inCombatLocal = false
  17.  
  18.     mwse.log("[Test924: INFO] Test924 Initialized")
  19. end
  20.  
  21. event.register("initialized", onInitialized)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement