Advertisement
Arnan

THF Lua January 2018

Jan 3rd, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 29.43 KB | None | 0 0
  1.        
  2.         ------------------------------------------
  3.         -- ** Arnan Thief Gearswap Lua File *** --
  4.         ------------------------------------------
  5.  
  6.                     -- Commands --
  7.                
  8.                 -- In Game: //gs c, Macro: /console gs c, Bind: gs c --
  9.            
  10.                 -- gs c acc         Toggle accuracy tier for TP/WS
  11.                 -- gs c idle        Toggle idle sets
  12.                
  13.                 -- gs c pdt         PDT on/off
  14.                 -- gs c mdt         MDT on/off
  15.                 -- gs c kiting      Kiting on/off
  16.                 -- gs c hybrid      Hybrid on/off
  17.                
  18.                 -- gs c th          Treasure Hunter TP gear on/off
  19.                 -- gs c evasion     Evasion on/off
  20.                 -- gs c rancor      Rancor TP on/off
  21.  
  22.         ----------
  23.         -- Sets --
  24.         ----------
  25.        
  26. function get_sets()
  27.     AccIndex = 1
  28.     AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. Default ACC Set Is LowACC. The First TP Set Of Your Main Weapon Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
  29.     IdleIndex = 1
  30.     IdleArray = {"Full","DT","Warp"} -- Default Idle Set Is Movement --
  31.     SA = false
  32.     TA = false
  33.     TH = 'OFF' -- Set Default Full TH ON or OFF Here --
  34.     Rancor = 'OFF' -- Set Default Rancor ON or OFF Here --
  35.     target_distance = 6 -- Set Default Distance Here --
  36.     send_command('input /macro book 5;wait .1;input /macro set 1') -- Change Default Macro Book Here --
  37.     add_to_chat(158,'-[Thief Lua Loaded]-')
  38.     add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  39.     add_to_chat(155,'Idle Set: ' .. IdleArray[IdleIndex])
  40.     add_to_chat(158,'-----[Weapon Skill Keybinds]-----')
  41.     add_to_chat(155,'F9 - Mandalic Stab, F10 - Exenterator, F11 - Evisceration, Delete - Rudras Storm')
  42.     add_to_chat(155,'F12 - Last Stand (mule), Alt+F12 - Leaden Salute (mule), Alt+Delete - Savage Blade (mule)')
  43.  
  44.     -- Herculean Augments --
  45.     HerculeanGloves={}
  46.     HerculeanGloves.DT={ name="Herculean Gloves", augments={'Damage taken-3%','DEX+8','Accuracy+11','Attack+10',}}
  47.     HerculeanBoots={}
  48.     HerculeanBoots.TA={ name="Herculean Boots", augments={'Accuracy+27','"Triple Atk."+4','DEX+7','Attack+13',}}
  49.    
  50.         --------------------
  51.         -- Key Binds Load --
  52.         --------------------
  53.        
  54.         -- Key Bind Toggles (The Same for all my job files) (Ctrl Key) --
  55.         send_command('bind ^A input //gs c acc')
  56.         send_command('bind ^D input //gs c pdt')
  57.         send_command('bind ^H input //gs c hybrid')
  58.         send_command('bind ^I input //gs c idle')
  59.         send_command('bind ^K input //gs c kiting')
  60.  
  61.         -- Stuff to control both Mules (Ctrl Key) --
  62.         send_command('bind ^X input /pcmd add ojomo;pause 5;input /pcmd add oeogo')
  63.         send_command('bind ^7 input //send oeogo //ma haste ojomo')
  64.         send_command('bind ^8 input //send oeogo //ma Dia 2 <t>;pause 2;input //send ojomo //ja Light Shot <t>')
  65.         send_command('bind ^9 input //send ojomo //follow arnan;pause 0.1;input //send oeogo //follow arnan')
  66.         send_command('bind ^0 input //send ojomo //assist arnan;pause 0.1;input //send oeogo //assist arnan')
  67.         send_command('bind ^- input //send ojomo /attack <t>;pause 0.1;input //send oeogo /attack <t>')
  68.  
  69.         -- COR (Mule) Job Ability Key Binds (Alt Key) --
  70.         send_command('bind !7 input //send ojomo //ja Crooked Cards <me>')
  71.         send_command('bind !8 input //send ojomo //ja Snake Eye <me>')
  72.         send_command('bind !9 input //send ojomo //ja Fold <me>')
  73.         send_command('bind !0 input //send ojomo //ja Random Deal <me>')
  74.  
  75.         -- COR (mule) Phantom Roll Key Binds (Alt Key) --
  76.         send_command('bind !A input //send ojomo //ja Allies\' Roll <me>')
  77.         send_command('bind !C input //send ojomo //ja Chaos Roll <me>')
  78.         send_command('bind !D input //send ojomo //ja Dancer\'s Roll <me>')
  79.         send_command('bind !E input //send ojomo //ja Evoker\s Roll <me>')
  80.         send_command('bind !F input //send ojomo //ja Fighter\'s Roll <me>')
  81.         send_command('bind !H input //send ojomo //ja Hunter\'s Roll <me>')
  82.         send_command('bind !R input //send ojomo //ja Rogue\'s Roll <me>')
  83.         send_command('bind !S input //send ojomo //ja Samurai Roll <me>')
  84.         send_command('bind !T input //send ojomo //ja Tactician\'s Roll <me>')
  85.  
  86.         -- GEO (Mule) Job Ability Key Binds (Win Key) --
  87.         send_command('bind @7 input //send oeogo //ja Blaze of Glory <me>')
  88.         send_command('bind @8 input //send oeogo //ja Ecliptic Attrition <me>')
  89.         send_command('bind @9 input //send oeogo //ja Life Cycle <me>')
  90.         send_command('bind @0 input //send oeogo //ja Lasting Emanation <me>')
  91.  
  92.         -- GEO (Mule) Nuke Key Binds (Win Key) --
  93.         send_command('bind @F1 input //send oeogo /ma Aero V <t>;pause 0.5;input //send oeogo /ma Aero IV <t>;pause 0.5;input //send oeogo /ma Aero III <t>;')
  94.         send_command('bind @F2 input //send oeogo /ma Fire V <t>;pause 0.5;input //send oeogo /ma Fire IV <t>;pause 0.5;input //send oeogo /ma Fire III <t>;')
  95.         send_command('bind @F3 input //send oeogo /ma Thunder V <t>;pause 0.5;input //send oeogo /ma Thunder IV <t>;pause 0.5;input //send oeogo /ma Thunder III <t>;')
  96.         send_command('bind @F4 input //send oeogo /ma Stone V <t>;pause 0.5;input //send oeogo /ma Stone IV <t>;pause 0.5;input //send oeogo /ma Stone III <t>;')
  97.         send_command('bind @F5 input //send oeogo /ma Water V <t>;pause 0.5;input //send oeogo /ma Water IV <t>;pause 0.5;input //send oeogo /ma Water III <t>;')
  98.         send_command('bind @F6 input //send oeogo /ma Blizzard V <t>;pause 0.5;input //send oeogo /ma Blizzard IV <t>;pause 0.5;input //send oeogo /ma Blizzard III <t>;')
  99.  
  100.         -- GEO (Mule) Indicolure Spells (Win Key) --
  101.         send_command('bind @1 input //send oeogo /ma Indi-Regen <me>')
  102.         send_command('bind @2 input //send oeogo /ma Indi-Refresh <me>')
  103.         send_command('bind @D input //send oeogo /ma Indi-DEX <me>')
  104.         send_command('bind @F input //send oeogo /ma Indi-Fury <me>')
  105.         send_command('bind @H input //send oeogo /ma Indi-Haste <me>')
  106.         send_command('bind @K input //send oeogo /ma Indi-Focus <me>')
  107.         send_command('bind @M input //send oeogo /ma Indi-Acumen <me>')
  108.         send_command('bind @S input //send oeogo /ma Indi-STR <me>')
  109.         send_command('bind @T input //send oeogo /ma Indi-Precision <me>')
  110.         send_command('bind @V input //send oeogo /ma Indi-Attunement <me>')
  111.         send_command('bind @W input //send oeogo /ma Indi-Barrier <me>')
  112.  
  113.         -- GEO (Mule) Geocolure Spells (Alt+Win Keys) --
  114.         send_command('bind !@1 input //send oeogo /ma Geo-Regen <me>')
  115.         send_command('bind !@2 input //send oeogo /ma Geo-Refresh <me>')
  116.         send_command('bind !@D input //send oeogo /ma Geo-DEX <me>')
  117.         send_command('bind !@F input //send oeogo /ma Geo-Frailty <t>')
  118.         send_command('bind !@H input //send oeogo /ma Geo-Haste <me>')
  119.         send_command('bind !@K input //send oeogo /ma Geo-Languor <t>')
  120.         send_command('bind !@M input //send oeogo /ma Geo-Malaise <t>')
  121.         send_command('bind !@S input //send oeogo /ma Geo-STR <me>')
  122.         send_command('bind !@T input //send oeogo /ma Geo-Torpor <t>')
  123.         send_command('bind !@V input //send oeogo /ma Geo-Vex <t>')
  124.         send_command('bind !@W input //send oeogo /ma Geo-Wilt <t>')
  125.  
  126.         -- GEO (Mule) Entrust Indicolure Spells (Ctrl+Win Keys) --
  127.         send_command('bind ^@1 input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Regen Arnan')
  128.         send_command('bind ^@2 input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Refresh Arnan')
  129.         send_command('bind ^@D input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-DEX Arnan')
  130.         send_command('bind ^@F input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Fury Arnan')
  131.         send_command('bind ^@H input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Haste Arnan')
  132.         send_command('bind ^@K input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Focus Arnan')
  133.         send_command('bind ^@M input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Acumen Arnan')
  134.         send_command('bind ^@S input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-STR Arnan')
  135.         send_command('bind ^@T input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Precision Arnan')
  136.         send_command('bind ^@V input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Attunement Arnan')
  137.         send_command('bind ^@W input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Barrier Arnan')
  138.  
  139.         -- Thief Job Key Binds (Ctrl & Ctrl+Alt Keys) --
  140.         send_command('bind ^P input //ja Provoke <t>')
  141.         send_command('bind ^Z input //ja Berserk <me>')
  142.  
  143.         -- Thief Weapon Skill Key Binds --
  144.         send_command('bind F9 input /ws "Mandalic Stab" <t>')
  145.         send_command('bind F10 input /ws "Exenterator" <t>')
  146.         send_command('bind F11 input /ws "Evisceration" <t>')
  147.         send_command('bind Delete input /ws "Rudra\'s Storm" <t>')
  148.  
  149.         -- COR (mule) Weapon Skill Key Binds --
  150.         send_command('bind F12 input //send ojomo /ws "Last Stand" <t>')
  151.         send_command('bind !F12 input //send ojomo "Leaden Salute" <t>')
  152.         send_command('bind !Delete input //send ojomo /ws "Savage Blade" <t>') 
  153.  
  154.         ----------------------
  155.         -- Key Binds Unload --
  156.         ----------------------
  157.  
  158.         function file_unload()
  159.         -- Unbind Toggles --
  160.         send_command('unbind ^A')
  161.         send_command('unbind ^D')
  162.         send_command('unbind ^H')
  163.         send_command('unbind ^I')
  164.         send_command('unbind ^K')
  165.         -- Unbind Stuff to control both Mules --
  166.         send_command('unbind ^X')
  167.         send_command('unbind ^7')
  168.         send_command('unbind ^8')
  169.         send_command('unbind ^9')
  170.         send_command('unbind ^0')
  171.         send_command('unbind ^-')
  172.         -- Unbind COR JA's --
  173.         send_command('unbind !7')
  174.         send_command('unbind !8')
  175.         send_command('unbind !9')
  176.         send_command('unbind !0')
  177.         -- Unbind COR Rolls --
  178.         send_command('unbind !A')
  179.         send_command('unbind !C')
  180.         send_command('unbind !D')
  181.         send_command('unbind !E')
  182.         send_command('unbind !F')
  183.         send_command('unbind !H')
  184.         send_command('unbind !R')
  185.         send_command('unbind !S')
  186.         send_command('unbind !T')
  187.         -- Unbind GEO JA's --
  188.         send_command('unbind @7')
  189.         send_command('unbind @8')
  190.         send_command('unbind @9')
  191.         send_command('unbind @0')
  192.         -- Unbind GEO Nukes --
  193.         send_command('unbind @F1')
  194.         send_command('unbind @F2')
  195.         send_command('unbind @F3')
  196.         send_command('unbind @F4')
  197.         send_command('unbind @F5')
  198.         send_command('unbind @F6')
  199.         -- Unbind GEO Indi Spells --
  200.         send_command('unbind @D')
  201.         send_command('unbind @F')
  202.         send_command('unbind @H')
  203.         send_command('unbind @K')
  204.         send_command('unbind @M')
  205.         send_command('unbind @S')
  206.         send_command('unbind @T')
  207.         send_command('unbind @V')
  208.         send_command('unbind @W')
  209.         send_command('unbind @1')
  210.         send_command('unbind @2')
  211.         -- Unbind GEO Geocolure Spells --
  212.         send_command('unbind !@D')
  213.         send_command('unbind !@F')
  214.         send_command('unbind !@H')
  215.         send_command('unbind !@K')
  216.         send_command('unbind !@M')
  217.         send_command('unbind !@S')
  218.         send_command('unbind !@T')
  219.         send_command('unbind !@V')
  220.         send_command('unbind !@W')
  221.         send_command('unbind !@1')
  222.         send_command('unbind !@2')
  223.         -- Unbind GEO Entrust Spells --
  224.         send_command('unbind ^@D')
  225.         send_command('unbind ^@F')
  226.         send_command('unbind ^@H')
  227.         send_command('unbind ^@K')
  228.         send_command('unbind ^@M')
  229.         send_command('unbind ^@S')
  230.         send_command('unbind ^@T')
  231.         send_command('unbind ^@V')
  232.         send_command('unbind ^@W')
  233.         send_command('unbind ^@1')
  234.         send_command('unbind ^@2')
  235.         -- Unbind THF Job Binds --
  236.         send_command('unbind ^P')
  237.         send_command('unbind ^Z')
  238.         -- Unload Weapon Skill Key Binds --
  239.         send_command('unbind F9')
  240.         send_command('unbind F10')     
  241.         send_command('unbind F11')     
  242.         send_command('unbind F12') 
  243.         send_command('unbind !F12')                
  244.         send_command('unbind Delete')
  245.         send_command('unbind !Delete')
  246.         end
  247.    
  248.     -- Key Binds --
  249.     -- Weapon Skill Key Binds --
  250.  
  251.     -- Unload Weapon Skill Key Binds --
  252.     function file_unload()
  253.    
  254.     end
  255.    
  256.     -- Toutatis's Cape Augments --
  257.     STPCape={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Store TP"+10',}}
  258.     WSDCape={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%',}}
  259.     CritCape={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}}
  260.    
  261.     --------------------
  262.     -- Idle/Town Sets --
  263.     --------------------
  264.     sets.Idle = {
  265.             ammo="Staunch Tathlum +1",
  266.             head="Turms Cap",
  267.             neck="Bathy Choker +1",
  268.             ear1="Infused Earring",
  269.             ear2="Odnowa Earring +1",
  270.             body="Meg. Cuirie +2",
  271.             hands="Meg. Gloves +2",
  272.             ring1="Defending Ring",
  273.             ring2="Meghanada Ring",
  274.             back="Moonlight Cape",
  275.             waist="Flume Belt +1",
  276.             legs="Meg. Chausses +2",
  277.             feet="Jute Boots +1"}
  278.     sets.Idle.Full = set_combine(sets.Idle,{})
  279.     sets.Idle.DT = set_combine(sets.Idle,{
  280.             neck="Loricate Torque +1"})
  281.     sets.Idle.Warp = set_combine(sets.Idle,{
  282.             ring2="Warp Ring"})
  283.            
  284.     -------------
  285.     -- TP Sets --
  286.     -------------
  287.            
  288.     -- Normal TP Sets --
  289.     sets.TP = {                    
  290.             ammo="Yetshila +1",
  291.             head="Adhemar Bonnet +1",
  292.             neck="Anu Torque",
  293.             ear1="Suppanomimi",
  294.             ear2="Eabani Earring",
  295.             body="Adhemar Jacket +1",
  296.             hands="Adhemar Wrist. +1",
  297.             ring1="Hetairoi Ring",
  298.             ring2="Epona's Ring",
  299.             back=STPCape,
  300.             waist="Shetal Stone",
  301.             legs="Pill. Culottes +3",
  302.             feet=HerculeanBoots.TA}
  303.     sets.TP.MidACC = set_combine(sets.TP,{    
  304.             ammo="Yamarang",
  305.             head="Dampening Tam",
  306.             ring1="Regal Ring"})
  307.     sets.TP.HighACC = set_combine(sets.TP.MidACC,{
  308.             neck="Combatant's Torque",
  309.             ear2="Mache Earring +1",
  310.             waist="Olseni Belt"})
  311.  
  312.     -- Capped Magic Haste --
  313.     sets.TP.MidHaste = {            
  314.             ammo="Yetshila +1",
  315.             head="Adhemar Bonnet +1",
  316.             neck="Anu Torque",
  317.             ear1="Suppanomimi",
  318.             ear2="Sherida Earring",
  319.             body="Pillager's Vest +3",
  320.             hands="Adhemar Wrist. +1",
  321.             ring1="Hetairoi Ring",
  322.             ring2="Epona's Ring",
  323.             back=STPCape,
  324.             waist="Windbuffet Belt +1",
  325.             legs="Pill. Culottes +3",
  326.             feet=HerculeanBoots.TA}
  327.     sets.TP.MidACC.MidHaste = set_combine(sets.TP.MidHaste,{
  328.             head="Dampening Tam",  
  329.             ring1="Regal Ring"})
  330.     sets.TP.HighACC.MidHaste = set_combine(sets.TP.MidACC.MidHaste,{
  331.             neck="Combatant's Torque",
  332.             ear1="Mache Earring +1",
  333.             ear2="Mache Earring +1",
  334.             waist="Olseni Belt"})
  335.  
  336.     -- Capped Magic Haste + Samba --
  337.     sets.TP.HighHaste = {            
  338.             ammo="Yetshila +1",
  339.             head="Adhemar Bonnet +1",
  340.             neck="Anu Torque",
  341.             ear1="Cessance Earring",
  342.             ear2="Sherida Earring",
  343.             body="Pillager's Vest +3",
  344.             hands="Adhemar Wrist. +1",
  345.             ring1="Hetairoi Ring",
  346.             ring2="Epona's Ring",
  347.             back=STPCape,
  348.             waist="Windbuffet Belt +1",
  349.             legs="Pill. Culottes +3",
  350.             feet=HerculeanBoots.TA}
  351.     sets.TP.MidACC.HighHaste = set_combine(sets.TP.HighHaste,{
  352.             head="Dampening Tam",
  353.             ring1="Regal Ring"})
  354.     sets.TP.HighACC.HighHaste = set_combine(sets.TP.MidACC.HighHaste,{
  355.             neck="Combatant's Torque",
  356.             ear2="Mache Earring +1",
  357.             waist="Olseni Belt"})
  358.            
  359.     -- Full TH TP Set --
  360.     sets.TP.TH = {feet="Skulk. Poulaines +1"}
  361.  
  362.     -- TP Rancor --
  363.     sets.TP.Rancor = {}
  364.  
  365.         -----------------------
  366.         -- Damage Taken Sets --
  367.         -----------------------
  368.    
  369.     -- PDT Set --
  370.     sets.PDT = {
  371.             ammo="Staunch Tathlum +1",
  372.             head="Meghanada Visor +2",
  373.             neck="Loricate Torque +1",
  374.             ear1="Genmei Earring",
  375.             ear2="Odnowa Earring +1",
  376.             body="Meg. Cuirie +2",
  377.             hands="Meg. Gloves +2",
  378.             ring1="Defending Ring",
  379.             ring2="Moonbeam Ring",
  380.             back="Moonlight Cape",
  381.             waist="Flume Belt +1",
  382.             legs="Mummu Kecks +1",
  383.             feet="Meg. Jam. +2"}
  384.  
  385.     -- MDT Set --
  386.     sets.MDT = set_combine(sets.PDT,{})
  387.            
  388.     -- Kiting Set --
  389.     sets.Kiting =  set_combine(sets.PDT,{feet="Jute Boots +1"})
  390.  
  391.     -- Hybrid/Evasion Sets --
  392.     sets.TP.Hybrid = set_combine(sets.PDT,{})
  393.     sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
  394.     sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
  395.  
  396.     sets.Evasion = set_combine(sets.PDT,{})
  397.  
  398.         -----------------------
  399.         -- Weapon Skill Sets --
  400.         -----------------------
  401.    
  402.     -- WS Base Set --
  403.     sets.WS = {}
  404.  
  405.     -- WS Sets --
  406.     sets.WS.Evisceration = {
  407.             ammo="Yetshila +1",
  408.             head="Adhemar Bonnet +1",
  409.             neck="Fotia Gorget",
  410.             ear1="Moonshade Earring",
  411.             ear2="Sherida Earring",
  412.             body="Adhemar Jacket +1",
  413.             hands="Adhemar Wrist. +1",
  414.             ring1="Begrudging Ring",
  415.             ring2="Epona's Ring",
  416.             back=CritCape,
  417.             waist="Fotia Belt",
  418.             legs="Pill. Culottes +3",
  419.             feet="Adhe. Gamashes +1"}
  420.     sets.WS.Evisceration.SA = set_combine(sets.WS.Evisceration,{})
  421.     sets.WS.Evisceration.TA = set_combine(sets.WS.Evisceration,{})
  422.  
  423.     sets.WS["Rudra's Storm"] = {
  424.             ammo="Falcon Eye",
  425.             head="Pill. Bonnet +3",
  426.             neck="Caro Necklace",
  427.             ear1="Moonshade Earring",
  428.             ear2="Ishvara Earring",
  429.             body="Adhemar Jacket +1",
  430.             hands="Meg. Gloves +2",
  431.             ring1="Regal Ring",
  432.             ring2="Ilabrat Ring",
  433.             back=WSDCape,
  434.             waist="Artful Belt +1",
  435.             legs="Lustr. Subligar +1",
  436.             feet="Lustra. Leggings +1"}
  437.     sets.WS["Rudra's Storm"].SA = set_combine(sets.WS["Rudra's Storm"],{
  438.             ammo="Yetshila +1",
  439.             body="Meg. Cuirie +2"})
  440.     sets.WS["Rudra's Storm"].TA = set_combine(sets.WS["Rudra's Storm"],{
  441.             ammo="Yetshila +1",
  442.             body="Meg. Cuirie +2"})
  443.            
  444.     sets.WS.Exenterator = {
  445.             ammo="Falcon Eye",
  446.             head="Meghanada Visor +2",
  447.             neck="Fotia Gorget",
  448.             ear1="Brutal Earring",
  449.             ear2="Sherida Earring",
  450.             body="Pillager's Vest +3",
  451.             hands="Meg. Gloves +2",
  452.             ring1="Regal Ring",
  453.             ring2="Epona's Ring",
  454.             back=STPCape,
  455.             waist="Fotia Belt",
  456.             legs="Meg. Chausses +2",
  457.             feet="Meg. Jam. +2"}
  458.     sets.WS.Exenterator.SA = set_combine(sets.WS.Exenterator,{})
  459.     sets.WS.Exenterator.TA = set_combine(sets.WS.Exenterator,{})
  460.  
  461.     sets.WS["Aeolian Edge"] = {}
  462.  
  463.     sets.WS["Mandalic Stab"] =  set_combine(sets.WS["Rudra's Storm"],{})
  464.     sets.WS["Mandalic Stab"].SA = set_combine(sets.WS["Rudra's Storm"].SA,{})
  465.     sets.WS["Mandalic Stab"].TA = set_combine(sets.WS["Rudra's Storm"].TA,{})
  466.  
  467.     -------------
  468.     -- JA Sets --
  469.     -------------
  470.     sets.JA = {}
  471.     TH_Gear = {feet="Skulk. Poulaines +1"}
  472.     sets.JA.Conspirator = {body="Skulker's Vest +1"}
  473.     sets.JA.Accomplice = {head="Skulker's Bonnet +1"}
  474.     sets.JA.Collaborator = {head="Skulker's Bonnet +1"}
  475.     sets.JA["Perfect Dodge"] = {hands="Plun. Armlets +1"}
  476.     sets.JA.Steal = {head="Plun. Bonnet +1",hands="Pill. Armlets +1",feet="Pill. Poulaines +1"}
  477.     sets.JA.Flee = {feet="Pill. Poulaines +1"}
  478.     sets.JA.Feint = {legs="Plun. Culottes +1"}
  479.     sets.JA.Despoil = {feet="Skulk. Poulaines +1"}
  480.     sets.JA.Mug = {head="Plun. Bonnet +1"}
  481.     sets.JA.Hide = {body="Pillager's Vest +3"}
  482.     sets.JA.Provoke = TH_Gear
  483.     sets.JA["Sneak Attack"] = {}
  484.     sets.JA["Trick Attack"] = set_combine(sets.JA["Sneak Attack"],{})
  485.  
  486.     -- Step Set --
  487.     sets.Step = set_combine({},TH_Gear)
  488.  
  489.     -- Flourish Set --
  490.     sets.Flourish = set_combine({},TH_Gear)
  491.  
  492.     -- Waltz Set --
  493.     sets.Waltz = {}
  494.  
  495.     ----------------
  496.     -- Magic Sets --
  497.     ----------------
  498.    
  499.     -- Precast Sets --
  500.     sets.Precast = {                        
  501.                         ammo="Impatiens",
  502.                         neck="Orunmila's Torque",
  503.                         ear1="Loquac. Earring",
  504.                         ear2="Odnowa Earring +1",
  505.                         body="Taeon Tabard",
  506.                         hands="Leyline Gloves",
  507.                         ring1="Lebeche Ring",
  508.                         ring2="Kishar Ring",
  509.                         back="Moonlight Cape",
  510.                         waist="Flume Belt +1"}
  511.    
  512.     -- Fastcast Set --
  513.     sets.Precast.FastCast = {                        
  514.                         ammo="Impatiens",
  515.                         neck="Orunmila's Torque",
  516.                         ear1="Loquac. Earring",
  517.                         ear2="Odnowa Earring +1",
  518.                         body="Taeon Tabard",
  519.                         hands="Leyline Gloves",
  520.                         ring1="Lebeche Ring",
  521.                         ring2="Kishar Ring",
  522.                         back="Moonlight Cape",
  523.                         waist="Flume Belt +1"}
  524.    
  525.     -- Utsusemi Precast Set --
  526.     sets.Precast.Utsusemi = set_combine(sets.Precast.FastCast,{})
  527.  
  528.     -- Midcast Base Set --
  529.     sets.Midcast = set_combine(sets.PDT,{              
  530.                         ammo="Staunch Tathlum +1",
  531.                         neck="Orunmila's Torque",
  532.                         ear1="Loquac. Earring",
  533.                         ear2="Odnowa Earring +1",
  534.                         body="Taeon Tabard",
  535.                         hands="Leyline Gloves",
  536.                         ring1="Defending Ring",
  537.                         ring2="Kishar Ring",
  538.                         back="Moonlight Cape",
  539.                         waist="Flume Belt +1"})
  540.    
  541.     -- Magic Haste Set --
  542.     sets.Midcast.Haste = set_combine(sets.PDT,{              
  543.                         ammo="Staunch Tathlum +1",
  544.                         neck="Orunmila's Torque",
  545.                         ear1="Loquac. Earring",
  546.                         ear2="Odnowa Earring +1",
  547.                         body="Taeon Tabard",
  548.                         hands="Leyline Gloves",
  549.                         ring1="Defending Ring",
  550.                         ring2="Kishar Ring",
  551.                         back="Moonlight Cape",
  552.                         waist="Flume Belt +1"})
  553.    
  554. end
  555.  
  556.         ----------------
  557.         -- Pre-Target --
  558.         ----------------
  559.  
  560. function pretarget(spell,action)
  561.     if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  562.         cancel_spell()
  563.         send_command('input /item "Echo Drops" <me>')
  564.     elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
  565.         cancel_spell()
  566.         send_command('Aggressor')
  567.     elseif (spell.english == 'Ranged' and spell.target.distance > 24.9) or (spell.type == "WeaponSkill" and spell.target.distance > target_distance and player.status == 'Engaged') then -- Cancel Ranged Attack or WS If You Are Out Of Range --
  568.         cancel_spell()
  569.         add_to_chat(123, spell.name..' Canceled: [Out of Range]')
  570.         return
  571.     end
  572. end
  573.  
  574.         --------------
  575.         -- Pre-Cast --
  576.         --------------
  577.  
  578. function precast(spell,action)
  579.     if spell.type == "WeaponSkill" then
  580.         if player.status ~= 'Engaged' then
  581.         return
  582.         else
  583.             equipSet = sets.WS
  584.             if equipSet[spell.english] then
  585.                 equipSet = equipSet[spell.english]
  586.             end
  587.             if SA and equipSet["SA"] then
  588.                 equipSet = equipSet["SA"]
  589.             end
  590.             if TA and equipSet["TA"] then
  591.                 equipSet = equipSet["TA"]
  592.             end
  593.             if spell.english == "Evisceration" and player.tp > 2750 or player.equipment.main == 'Aeneas' and player.tp > 2250 then -- Equip Mache Earring When You Have 2750+ TP --
  594.                 equipSet = set_combine(equipSet,{ear1="Mache Earring +1"})
  595.             end
  596.             if spell.english == "Rudra's Storm" and player.tp > 2750 or player.equipment.main == 'Aeneas' and player.tp > 2250 then -- Equip Mache Earring When You Have 2750+ TP --
  597.                 equipSet = set_combine(equipSet,{ear1="Mache Earring +1"})
  598.             end
  599.             equip(equipSet)
  600.         end
  601.     elseif spell.type=="JobAbility" then
  602.         if sets.JA[spell.english] then
  603.             equip(sets.JA[spell.english])
  604.         end
  605.         if spell.english=="Sneak Attack" then
  606.             SA = true
  607.         end
  608.         if spell.english=="Trick Attack" then
  609.             TA = true
  610.         end
  611.     elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  612.         if string.find(spell.english,'Utsusemi') then
  613.             if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  614.                 cancel_spell()
  615.                 add_to_chat(123, spell.name .. ' Canceled: [3+ Images]')
  616.                 return
  617.             else
  618.                 equip(sets.Precast.Utsusemi)
  619.             end
  620.         else
  621.             equip(sets.Precast.FastCast)
  622.         end
  623.     elseif spell.type == 'Step' then
  624.         equip(sets.Step)
  625.     elseif string.find(spell.type,'Flourish') then
  626.         equip(sets.Flourish)
  627.     elseif spell.type == "Waltz" then
  628.         equip(sets.Waltz)
  629.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  630.         cast_delay(0.2)
  631.         send_command('cancel Sneak')
  632.     end
  633. end
  634.  
  635.         --------------
  636.         -- Mid-Cast --
  637.         --------------
  638.  
  639. function midcast(spell,action)
  640.     if spell.english == 'Ranged' then
  641.         equip(TH_Gear)
  642.     elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  643.         if string.find(spell.english,'Utsusemi') then
  644.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  645.                 send_command('@wait 1.7;cancel Copy Image*')
  646.             end
  647.             equip(sets.Midcast.Haste)
  648.         elseif spell.english == 'Monomi: Ichi' then
  649.             if buffactive['Sneak'] then
  650.                 send_command('@wait 1.7;cancel sneak')
  651.             end
  652.             equip(sets.Midcast.Haste)
  653.         else
  654.             equip(sets.Midcast.Haste)
  655.         end
  656.     end
  657. end
  658.  
  659.         ----------------
  660.         -- After-Cast --
  661.         ----------------
  662.  
  663. function aftercast(spell,action)
  664.     if spell.type == "WeaponSkill" and not spell.interrupted then
  665.         send_command('wait 0.2;gs c TP')
  666.     end
  667.     status_change(player.status)
  668. end
  669.  
  670.         -------------------
  671.         -- Status Change --
  672.         -------------------
  673.  
  674. function status_change(new,old)
  675.     if player.equipment.range ~= 'empty' then
  676.         disable('range','ammo')
  677.     else
  678.         enable('range','ammo')
  679.     end
  680.     if Armor == 'PDT' or buffactive.Terror or buffactive.Stun or buffactive.Petrification or buffactive.Sleep then
  681.         equip(sets.PDT)
  682.     elseif Armor == 'MDT' then
  683.         equip(sets.MDT)
  684.     elseif Armor == 'Kiting' then
  685.         equip(sets.Kiting)
  686.     elseif Armor == 'EVA' then
  687.         equip(sets.Evasion)
  688.     elseif new == 'Engaged' then
  689.         equipSet = sets.TP
  690.         if Armor == 'Hybrid' and equipSet["Hybrid"] then
  691.             equipSet = equipSet["Hybrid"]
  692.         end
  693.         if equipSet[AccArray[AccIndex]] then
  694.             equipSet = equipSet[AccArray[AccIndex]]
  695.         end
  696.         if buffactive.March and buffactive['Haste Samba'] and (buffactive.Embrava or buffactive.Haste) or (buffactive.Haste == 2) and buffactive['Haste Samba'] and equipSet["HighHaste"] then
  697.             equipSet = equipSet["HighHaste"]
  698.         end
  699.         if buffactive.March and (buffactive.Embrava or buffactive.Haste) or (buffactive.Haste == 2) and equipSet["MidHaste"] then
  700.             equipSet = equipSet["MidHaste"]
  701.         end
  702.         if SA then
  703.             equipSet = set_combine(equipSet,sets.JA["Sneak Attack"])
  704.         end
  705.         if TA then
  706.             equipSet = set_combine(equipSet,sets.JA["Trick Attack"])
  707.         end
  708.         if Rancor == 'ON' then -- Use Rancor Toggle For Rancor Collar --
  709.             equipSet = set_combine(equipSet,sets.TP.Rancor)
  710.         end
  711.         if TH == 'ON' then -- Use TH Toggle To Lock Full TH Set --
  712.             equipSet = set_combine(equipSet,sets.TP.TH)
  713.         end
  714.         equip(equipSet)
  715.     else
  716.         equip(sets.Idle[IdleArray[IdleIndex]])
  717.     end
  718. end
  719.  
  720.         -----------------
  721.         -- Buff Change --
  722.         -----------------
  723.  
  724.  function buff_change(buff,gain,loss)
  725.     buff = string.lower(buff)
  726.     if gain then  
  727.         add_to_chat(158,'--- Gained: ['..buff..']')
  728.     elseif loss then
  729.         add_to_chat(123,'--- Lost: ['..buff..']')
  730.     elseif buff == "sneak attack" then
  731.         SA = gain
  732.     elseif buff == "trick attack" then
  733.         TA = gain
  734.     end
  735.     if not midaction() then
  736.         status_change(player.status)
  737.     end
  738.  end
  739.  
  740.         -------------------------------------------------------------------------------------
  741.         -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  742.         -------------------------------------------------------------------------------------
  743.  
  744. function self_command(command)
  745.     if command == 'acc' then -- Accuracy Level Toggle --
  746.         AccIndex = (AccIndex % #AccArray) + 1
  747.         status_change(player.status)
  748.         add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  749.     elseif command == 'update' then -- Auto Update Gear Toggle --
  750.         status_change(player.status)
  751.         add_to_chat(155,'Auto Update Gear')
  752.     elseif command == 'hybrid' then -- Hybrid Toggle --
  753.         if Armor == 'Hybrid' then
  754.             Armor = 'None'
  755.             add_to_chat(123,'Hybrid Set: [Unlocked]')
  756.         else
  757.             Armor = 'Hybrid'
  758.             add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
  759.         end
  760.         status_change(player.status)
  761.     elseif command == 'th' then -- Full TH Set Toggle --
  762.         if TH == 'ON' then
  763.             TH = 'OFF'
  764.             add_to_chat(123,'Full TH Set: [Unlocked]')
  765.         else
  766.             TH = 'ON'
  767.             add_to_chat(158,'Full TH Set: [Locked]')
  768.         end
  769.         status_change(player.status)
  770.     elseif command == 'pdt' then -- PDT Toggle --
  771.         if Armor == 'PDT' then
  772.             Armor = 'None'
  773.             add_to_chat(123,'PDT Set: [Unlocked]')
  774.         else
  775.             Armor = 'PDT'
  776.             add_to_chat(158,'PDT Set: [Locked]')
  777.         end
  778.         status_change(player.status)
  779.     elseif command == 'mdt' then -- MDT Toggle --
  780.         if Armor == 'MDT' then
  781.             Armor = 'None'
  782.             add_to_chat(123,'MDT Set: [Unlocked]')
  783.         else
  784.             Armor = 'MDT'
  785.             add_to_chat(158,'MDT Set: [Locked]')
  786.         end
  787.         status_change(player.status)
  788.     elseif command == 'kiting' then -- Kiting Toggle --
  789.         if Armor == 'Kiting' then
  790.             Armor = 'None'
  791.             add_to_chat(123,'Kiting Set: [Unlocked]')
  792.         else
  793.             Armor = 'Kiting'
  794.             add_to_chat(158,'Kiting Set: [Locked]')
  795.         end
  796.             status_change(player.status)
  797.     elseif command == 'evasion' then -- Evasion Toggle --
  798.         if Armor == 'EVA' then
  799.             Armor = 'None'
  800.             add_to_chat(123,'Evasion Set: [Unlocked]')
  801.         else
  802.             Armor = 'EVA'
  803.             add_to_chat(158,'Evasion Set: [Locked]')
  804.         end
  805.         status_change(player.status)
  806.     elseif command == 'rancor' then -- Rancor Toggle --
  807.         if Rancor == 'ON' then
  808.             Rancor = 'OFF'
  809.             add_to_chat(123,'Rancor: [OFF]')
  810.         else
  811.             Rancor = 'ON'
  812.             add_to_chat(158,'Rancor: [ON]')
  813.         end
  814.         status_change(player.status)
  815.     elseif command == 'distance' then -- Distance Toggle --
  816.         if player.target.distance then
  817.             target_distance = math.floor(player.target.distance*10)/10
  818.             add_to_chat(155,'Distance: '..target_distance)
  819.         else
  820.             add_to_chat(123,'No Target Selected')
  821.         end
  822.     elseif command == 'idle' then -- Idle Toggle --
  823.         IdleIndex = (IdleIndex % #IdleArray) + 1
  824.         status_change(player.status)
  825.         add_to_chat(155,'Idle Set: ' .. IdleArray[IdleIndex])
  826.     elseif command == 'TP' then
  827.         add_to_chat(155,'TP Return: ['..tostring(player.tp)..']')
  828.     elseif command:match('^SC%d$') then
  829.         send_command('//' .. sc_map[command])
  830.     end
  831. end
  832.  
  833.     -----------
  834.     -- Misc. --
  835.     -----------
  836.  
  837. function find_player_in_alliance(name)
  838.     for i,v in ipairs(alliance) do
  839.         for k,p in ipairs(v) do
  840.             if p.name == name then
  841.                 return p
  842.             end
  843.         end
  844.     end
  845. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement