Load Addons For Specific Jobs?

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » Windower » General » Load addons for specific jobs?
Load addons for specific jobs?
 Lakshmi.Rumorian
Offline
Server: Lakshmi
Game: FFXI
user: Rumo
Posts: 10
By Lakshmi.Rumorian 2017-08-22 15:34:49
Link | Quote | Reply
 
Is it possible to load addons (or plugins, for that matter) just for specific jobs, like rolltracker for COR, and have them unload when you switch to a different job?
 Sylph.Subadai
Offline
Server: Sylph
Game: FFXI
user: Subadai
Posts: 184
By Sylph.Subadai 2017-08-24 00:57:34
Link | Quote | Reply
 
You can use the Autoexec plugin or put commands in your luas if you use Gearswap.

For Gearswap, you would add loading commands to your get_sets() function or user_setup() function (Mote-libs), and unloading commands to the file_unload() or user_unload functions:
Code
function get_sets()

  send_command('lua l rolltracker')
end

function file_unload(file_name)

  send_command('lua u rolltracker')
end


For Autoexec, it's a bit more convoluted because it only allows for executing commands when you change to a job, not when you change from that job into something else. So for each job, you have to explicitly unload all plugins/addons you don't want and load the ones you do. For example, if you're using THTracker on THF and RollTracker COR, so you want to unload Treasure Hunter Tracker and load RollTracker. Put something like the following in your plugins\Autoexec\Autoexec.xml:
Code
<register event="jobchange_cor/???" silent="true" runonce="false">lua u thtracker;lua l rolltracker</register>


Do the opposite for THF.
Code
<register event="jobchange_thf/???" silent="true" runonce="false">lua u rolltracker;lua l thtracker</register>


This list could get long so you can move the commands to a text file and execute that:
Code
<register event="jobchange_cor/???" silent="true" runonce="false">exec corload.txt</register>

<register event="jobchange_thf/???" silent="true" runonce="false">exec thfload.txt</register>


Where corload.txt and thfload.txt would contain all your load and unload commands for each job.
[+]
 Lakshmi.Rumorian
Offline
Server: Lakshmi
Game: FFXI
user: Rumo
Posts: 10
By Lakshmi.Rumorian 2017-08-25 18:21:50
Link | Quote | Reply
 
Works like a charm, thank you very much!
Log in to post.