-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenemyaction.lua
More file actions
58 lines (49 loc) · 1.25 KB
/
enemyaction.lua
File metadata and controls
58 lines (49 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
_addon.name = 'EnemyAction'
_addon.author = 'Akirane'
_addon.version = '0.3'
_addon.language = 'English'
_addon.commands = {'enemyaction','ea'}
local player_id = nil
require('action_message')
action_message = require('action_message')
action_tracking = require('action_tracking')
local action_msg_obj = nil
local ready = false
function initialize()
action_msg_obj = action_message:new(nil)
action_msg_obj:update_player_id()
ready = true
end
windower.register_event('prerender', function()
if ready == true then
if action_msg_obj ~= nil then
action_msg_obj:clean()
action_msg_obj:prerender_update()
end
end
end)
--windower.register_event('action', function(raw_action)
-- if ready == true then
-- action_msg_obj:update_casting(raw_action)
-- end
--end)
windower.register_event('incoming chunk', function(id, data)
if ready == true then
if action_msg_obj ~= nil then
action_msg_obj:update(id, data)
end
end
end)
windower.register_event('zone change', function()
if ready == true then
if action_msg_obj ~= nil then
action_msg_obj:update_player_id()
action_msg_obj:reset_tracked_actions()
end
end
end)
windower.register_event('load', 'login', function()
if windower.ffxi.get_player() ~= nil then
initialize()
end
end)