Advertisement
Guest User

Gearswap Template w/ examples

a guest
Feb 10th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.80 KB | None | 0 0
  1. function get_sets()
  2.  
  3.     send_command('bind f9 gs c toggle TP set')
  4.     send_command('bind f10 gs c toggle Idle set')
  5.     send_command('bind f11 gs c toggle Rea set')
  6.    
  7.     function file_unload()
  8.      
  9.  
  10.         send_command('unbind ^f9')
  11.         send_command('unbind ^f10')
  12.         send_command('unbind ^f11')
  13.        
  14.         send_command('unbind !f9')
  15.         send_command('unbind !f10')
  16.         send_command('unbind !f11')
  17.  
  18.         send_command('unbind f9')
  19.         send_command('unbind f10')
  20.         send_command('unbind f11')
  21.  
  22.        
  23.  
  24.     end
  25.        
  26.     --Idle Sets--  
  27.     sets.Idle = {}
  28.    
  29.     sets.Idle.index = {'Standard','DT','MDT'}
  30.     Idle_ind = 1           
  31.    
  32.     sets.Idle.Standard = {ammo="",
  33.                           head="",neck="", ear1="", ear2="",
  34.                           body="",hands="",ring1="",ring2="",
  35.                           back="",waist="",legs="",feet=""}
  36.                          
  37.     sets.Idle.DT = {ammo="",
  38.                           head="",neck="", ear1="", ear2="",
  39.                           body="",hands="",ring1="",ring2="",
  40.                           back="",waist="",legs="",feet=""}
  41.                            
  42.     sets.Idle.MDT = {ammo="",
  43.                           head="",neck="", ear1="", ear2="",
  44.                           body="",hands="",ring1="",ring2="",
  45.                           back="",waist="",legs="",feet=""}
  46.                          
  47.     --TP Sets--
  48.     sets.TP = {}
  49.  
  50.     sets.TP.index = {'Standard', 'Accuracy', 'PhysSkillUp'}
  51.     TP_ind = 1
  52.    
  53.     sets.TP.Standard = {ammo="",
  54.                           head="",neck="", ear1="", ear2="",
  55.                           body="",hands="",ring1="",ring2="",
  56.                           back="",waist="",legs="",feet=""}
  57.                            
  58.     sets.TP.Accuracy = {ammo="",
  59.                           head="",neck="", ear1="", ear2="",
  60.                           body="",hands="",ring1="",ring2="",
  61.                           back="",waist="",legs="",feet=""}
  62.                          
  63.     sets.TP.PhysSkillUp = {ammo="",
  64.                           head="",neck="", ear1="", ear2="",
  65.                           body="",hands="",ring1="",ring2="",
  66.                           back="",waist="",legs="",feet=""}
  67.    
  68.    
  69.     --Weaponskill Sets--
  70.     sets.WS = {}
  71.      
  72.     sets.Realmrazer = {}
  73.    
  74.     sets.Realmrazer.index = {'Attack','Accuracy'}
  75.     Realmrazer_ind = 1
  76.    
  77.     --Realmrazer: Full MND Attack multi hit STR Acc as needed | Flame Light Thunder Belts Necks --
  78.     sets.Realmrazer.Attack = {ammo="",
  79.                           head="",neck="", ear1="", ear2="",
  80.                           body="",hands="",ring1="",ring2="",
  81.                           back="",waist="",legs="",feet=""}
  82.                              
  83.     sets.Realmrazer.Accuracy = {ammo="",
  84.                           head="",neck="", ear1="", ear2="",
  85.                           body="",hands="",ring1="",ring2="",
  86.                           back="",waist="",legs="",feet=""}
  87.                            
  88.     sets.WS.FlashNova = {}
  89.    
  90.     --Flash Nova: MagAtt MND STR some INT ok basically a nuking set | Aqua Belts Necks --
  91.     sets.WS.FlashNova = {ammo="",
  92.                           head="",neck="", ear1="", ear2="",
  93.                           body="",hands="",ring1="",ring2="",
  94.                           back="",waist="",legs="",feet=""}
  95.                                
  96.                                
  97.                                
  98.                                
  99.                            
  100.     --WHM Magic Sets--
  101.     sets.WHM = {}
  102.    
  103.     sets.WHM.Cures = {ammo="",
  104.                           head="",neck="", ear1="", ear2="",
  105.                           body="",hands="",ring1="",ring2="",
  106.                           back="",waist="",legs="",feet=""}
  107.                            
  108.     sets.WHM.SelfCures = {ammo="",
  109.                           head="",neck="", ear1="", ear2="",
  110.                           body="",hands="",ring1="",ring2="",
  111.                           back="",waist="",legs="",feet=""}
  112.  
  113.     sets.WHM.MagicAccuracy = {ammo="",
  114.                           head="",neck="", ear1="", ear2="",
  115.                           body="",hands="",ring1="",ring2="",
  116.                           back="",waist="",legs="",feet=""}
  117.    
  118.     -- Recast set Recast/haste --
  119.     sets.WHM.SkillRecast = {ammo="",
  120.                           head="",neck="", ear1="", ear2="",
  121.                           body="",hands="",ring1="",ring2="",
  122.                           back="",waist="",legs="",feet=""}
  123.                                  
  124.                                  
  125.     --Utility Sets--
  126.     sets.Utility = {}
  127.    
  128.     -- Generic Enhancing Skill Spell interruption MND --                     
  129.     sets.Utility.Enhance = {ammo="",
  130.                           head="",neck="", ear1="", ear2="",
  131.                           body="",hands="",ring1="",ring2="",
  132.                           back="",waist="",legs="",feet=""}
  133.                          
  134.     -- Stoneskin enhance gear Haste Spell Interruption MND --
  135.     sets.Utility.Stoneskin = {ammo="",
  136.                           head="",neck="", ear1="", ear2="",
  137.                           body="",hands="",ring1="",ring2="",
  138.                           back="",waist="",legs="",feet=""}
  139.                            
  140.    
  141.    
  142.    
  143.     --Job Ability Sets--
  144.     sets.JA = {}
  145.    
  146.     sets.JA.Benediction = {}
  147.    
  148.     sets.JA.Asylum = {}
  149.    
  150.     sets.JA.DivineSeal = {}
  151.    
  152.     sets.JA.DivineCaress = {}
  153.    
  154.     sets.JA.AfflatusSolace = {}
  155.    
  156.     sets.JA.AfflatusMisery = {}
  157.    
  158.     sets.JA.Sacrosanctity = {}
  159.    
  160.    
  161.     --Precast Sets - Fast Cast and reduced cast time only--
  162.     sets.precast = {}
  163.    
  164.     sets.precast.FC = {}
  165.    
  166.     sets.precast.FC.Standard = {ammo="",
  167.                           head="",neck="", ear1="", ear2="",
  168.                           body="",hands="",ring1="",ring2="",
  169.                           back="",waist="",legs="",feet=""}
  170.                          
  171.     sets.precast.FC.Enhance = {ammo="",
  172.                           head="",neck="", ear1="", ear2="",
  173.                           body="",hands="",ring1="",ring2="",
  174.                           back="",waist="",legs="",feet=""}
  175. end
  176.  
  177.  
  178.  
  179.  
  180.  
  181. -- PRECASTING RULES --
  182. function precast(spell)
  183.     if spell.action_type == 'Magic' then
  184.         equip(sets.precast.FC.Standard)    
  185.         if spell.skill == 'Enhancing Magic' then
  186.             equip(sets.precast.FC.Enhance)
  187.         end
  188.     end
  189.    
  190.     if spell.english == 'Benediction' then
  191.         equip(sets.JA.Benediction)
  192.     end
  193.    
  194.     if spell.english == 'Asylum' then
  195.         equip(sets.JA.Asylum)
  196.     end
  197.    
  198.     if spell.english == 'Divine Seal' then
  199.         equip(sets.JA.DivineSeal)
  200.     end
  201.    
  202.     if spell.english == 'Divine Caress' then
  203.         equip(sets.JA.DivineCaress)
  204.     end
  205.    
  206.     if spell.english == 'Afflatus Solace' then
  207.         equip(sets.JA.AfflatusSolace)
  208.     end
  209.    
  210.     if spell.english == 'Afflatus Misery' then
  211.         equip(sets.JA.AfflatusMisery)
  212.     end
  213.    
  214.     if spell.english == 'Sacrosanctity' then
  215.         equip(sets.JA.Sacrosanctity)
  216.     end
  217.    
  218.     if spell.english == 'Realmrazer' then
  219.         equip(sets.Realmrazer[sets.Realmrazer.index[Realmrazer_ind]])
  220.     end
  221.    
  222.     if spell.english == 'Flash Nova' then
  223.         equip(sets.WS.FlashNova)
  224.     end
  225. end
  226.  
  227. -- MIDCASTING RULES -- 
  228. function midcast(spell,act)
  229.     if spell.english == 'Magic Fruit' or spell.english == 'Plenilune Embrace' or spell.english == 'Wild Carrot' or spell.english == 'Pollen' or spell.english == 'Cure III' or spell.english == 'Cure IV' then
  230.         equip(sets.WHM.Cures)
  231.             if spell.target.name == player.name and string.find(spell.english, 'Magic Fruit') or string.find(spell.english, 'Plenilune Embrace') or string.find(spell.english, 'Wild Carrot') or string.find(spell.english, 'Cure III') or string.find(spell.english, 'Cure IV') then
  232.                 equip(sets.WHM.SelfCures)
  233.             end
  234.     end
  235.    
  236.     if spell.skill == 'Enhancing Magic' then
  237.         equip(sets.Utility.Enhance)
  238.         if spell.english == 'Stoneskin' then
  239.             equip(sets.Utility.Stoneskin)
  240.         end
  241.     end
  242. end
  243.  
  244. -- AFTERCAST & Misc RULES --
  245. function aftercast(spell)
  246.     if player.status == 'Engaged' then
  247.         equip(sets.TP[sets.TP.index[TP_ind]])
  248.     else
  249.         equip(sets.Idle[sets.Idle.index[Idle_ind]])
  250.     end
  251.    
  252.     if spell.action_type == 'Weaponskill' then
  253.         add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
  254.     end
  255. end
  256.  
  257. function status_change(new,old)
  258.     if new == 'Engaged' then
  259.         equip(sets.TP[sets.TP.index[TP_ind]])
  260.     else
  261.         equip(sets.Idle[sets.Idle.index[Idle_ind]])
  262.     end
  263. end
  264.  
  265. function self_command(command)
  266.     if command == 'toggle TP set' then
  267.         TP_ind = TP_ind +1
  268.         if TP_ind > #sets.TP.index then TP_ind = 1 end
  269.         send_command('@input /echo <----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
  270.         equip(sets.TP[sets.TP.index[TP_ind]])
  271.     elseif command == 'toggle Idle set' then
  272.         Idle_ind = Idle_ind +1
  273.         if Idle_ind > #sets.Idle.index then Idle_ind = 1 end
  274.         send_command('@input /echo <----- Idle Set changed to '..sets.Idle.index[Idle_ind]..' ----->')
  275.         equip(sets.Idle[sets.Idle.index[Idle_ind]])
  276.     elseif command == 'toggle Rea set' then
  277.         Realmrazer_ind = Realmrazer_ind +1
  278.         if Realmrazer_ind > #sets.Realmrazer.index then Realmrazer_ind = 1 end
  279.         send_command('@input /echo <----- Realmrazer Set changed to '..sets.Realmrazer.index[Realmrazer_ind]..' ----->')
  280.     elseif command == 'equip TP set' then
  281.         equip(sets.TP[sets.TP.index[TP_ind]])
  282.     elseif command == 'equip Idle set' then
  283.         equip(sets.Idle[sets.Idle.index[Idle_ind]])
  284.     end
  285. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement