Advertisement
Arnan

THF Lua October 2017

Oct 4th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.74 KB | None | 0 0
  1.        
  2.         -------------------------------------------
  3.         -- ** Amadis 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 = {"Movement","Regen"} -- 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 = 10 -- 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.  
  41.     -- Herculean Augments --
  42.     HerculeanGloves={}
  43.     HerculeanGloves.DT={ name="Herculean Gloves", augments={'Damage taken-3%','DEX+8','Accuracy+11','Attack+10',}}
  44.     HerculeanBoots={}
  45.     HerculeanBoots.TA={ name="Herculean Boots", augments={'Accuracy+27','"Triple Atk."+4','DEX+7','Attack+13',}}
  46.     HerculeanBoots.DT={ name="Herculean Boots", augments={'Accuracy+12','Phys. dmg. taken -5%','Attack+5',}}
  47.    
  48.     -- Key Binds --
  49.         send_command('bind F9 input /ws "Mandalic Stab" <t>')
  50.         send_command('bind F10 input /ws "Exenterator" <t>')
  51.         send_command('bind F11 input /ws "Evisceration" <t>')
  52.         send_command('bind F12 input //send ojomo /ws "Last Stand" <t>')
  53.         send_command('bind !F12 input //send ojomo "Leaden Salute" <t>')
  54.         send_command('bind Delete input /ws "Rudra\'s Storm" <t>')
  55.         send_command('bind !Delete input //send ojomo /ws "Savage Blade" <t>')
  56.     function file_unload()
  57.         send_command('unbind F9')
  58.         send_command('unbind F10')     
  59.         send_command('unbind F11')     
  60.         send_command('unbind F12') 
  61.         send_command('unbind !F12')                
  62.         send_command('unbind Delete')
  63.         send_command('unbind !Delete') 
  64.     end
  65.    
  66.     -- Toutatis's Cape Augments --
  67.     STPCape={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Store TP"+10',}}
  68.     WSDCape={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%',}}
  69.     CritCape={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Crit.hit rate+10',}}
  70.    
  71.     --------------------
  72.     -- Idle/Town Sets --
  73.     --------------------
  74.     sets.Idle = {}
  75.     sets.Idle.Regen = {}
  76.     sets.Idle.Movement = set_combine(sets.Idle.Regen,{
  77.             ammo="Staunch Tathlum",
  78.             head="Turms Cap",
  79.             neck="Bathy Choker +1",
  80.             ear1="Infused Earring",
  81.             ear2="Odnowa Earring +1",
  82.             body="Meg. Cuirie +2",
  83.             hands="Meg. Gloves +2",
  84.             ring1="Defending Ring",
  85.             ring2="Meghanada Ring",
  86.             back="Moonbeam Cape",
  87.             waist="Flume Belt +1",
  88.             legs="Meg. Chausses +2",
  89.             feet="Jute Boots +1"})
  90.            
  91.     -------------
  92.     -- TP Sets --
  93.     -------------
  94.            
  95.     -- Normal TP Sets --
  96.     sets.TP = {                    
  97.             ammo="Yamarang",
  98.             head="Adhemar Bonnet +1",
  99.             neck="Anu Torque",
  100.             ear1="Suppanomimi",
  101.             ear2="Eabani Earring",
  102.             body="Adhemar Jacket +1",
  103.             hands="Adhemar Wrist. +1",
  104.             ring1="Hetairoi Ring",
  105.             ring2="Epona's Ring",
  106.             back=STPCape,
  107.             waist="Shetal Stone",
  108.             legs="Pill. Culottes +3",
  109.             feet=HerculeanBoots.TA}
  110.     sets.TP.MidACC = set_combine(sets.TP,{
  111.             head="Dampening Tam",
  112.             ring1="Ramuh Ring +1"})
  113.     sets.TP.HighACC = set_combine(sets.TP.MidACC,{
  114.             neck="Combatant's Torque", 
  115.             waist="Olseni Belt"})
  116.  
  117.     -- Capped Magic Haste --
  118.     sets.TP.MidHaste = {                    
  119.             ammo="Yamarang",
  120.             head="Adhemar Bonnet +1",
  121.             neck="Anu Torque",
  122.             ear1="Suppanomimi",
  123.             ear2="Sherida Earring",
  124.             body="Pillager's Vest +3",
  125.             hands="Adhemar Wrist. +1",
  126.             ring1="Hetairoi Ring",
  127.             ring2="Epona's Ring",
  128.             back=STPCape,
  129.             waist="Windbuffet Belt +1",
  130.             legs="Pill. Culottes +3",
  131.             feet=HerculeanBoots.TA}
  132.     sets.TP.MidACC.MidHaste = set_combine(sets.TP.MidHaste,{
  133.             head="Dampening Tam",  
  134.             ring1="Ramuh Ring +1"})
  135.     sets.TP.HighACC.MidHaste = set_combine(sets.TP.MidACC.MidHaste,{
  136.             neck="Combatant's Torque",
  137.             waist="Olseni Belt"})
  138.  
  139.     -- Capped Magic Haste + Samba --
  140.     sets.TP.HighHaste = {                      
  141.             ammo="Yamarang",
  142.             head="Adhemar Bonnet +1",
  143.             neck="Anu Torque",
  144.             ear1="Cessance Earring",
  145.             ear2="Sherida Earring",
  146.             body="Pillager's Vest +3",
  147.             hands="Adhemar Wrist. +1",
  148.             ring1="Hetairoi Ring",
  149.             ring2="Epona's Ring",
  150.             back=STPCape,
  151.             waist="Windbuffet Belt +1",
  152.             legs="Pill. Culottes +3",
  153.             feet=HerculeanBoots.TA}
  154.     sets.TP.MidACC.HighHaste = set_combine(sets.TP.HighHaste,{
  155.             head="Dampening Tam",
  156.             ring1="Ramuh Ring +1"})
  157.     sets.TP.HighACC.HighHaste = set_combine(sets.TP.MidACC.HighHaste,{
  158.             neck="Combatant's Torque",
  159.             waist="Olseni Belt"})
  160.            
  161.     -- Full TH TP Set --
  162.     sets.TP.TH = {feet="Skulk. Poulaines +1"}
  163.  
  164.     -- TP Rancor --
  165.     sets.TP.Rancor = {}
  166.  
  167.         -----------------------
  168.         -- Damage Taken Sets --
  169.         -----------------------
  170.    
  171.     -- PDT Set --
  172.     sets.PDT = {
  173.             ammo="Staunch Tathlum",
  174.             head="Meghanada Visor +1",
  175.             neck="Loricate Torque +1",
  176.             ear1="Genmei Earring",
  177.             ear2="Odnowa Earring +1",
  178.             body="Meg. Cuirie +2",
  179.             hands="Meg. Gloves +2",
  180.             ring1="Defending Ring",
  181.             ring2="Moonbeam Ring",
  182.             back="Moonbeam Cape",
  183.             waist="Flume Belt +1",
  184.             legs="Meg. Chausses +2",
  185.             feet="Meg. Jam. +1"}
  186.  
  187.     -- MDT Set --
  188.     sets.MDT = set_combine(sets.PDT,{})
  189.            
  190.     -- Kiting Set --
  191.     sets.Kiting =  set_combine(sets.PDT,{feet="Jute Boots +1"})
  192.  
  193.     -- Hybrid/Evasion Sets --
  194.     sets.TP.Hybrid = set_combine(sets.PDT,{})
  195.     sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
  196.     sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
  197.  
  198.     sets.Evasion = set_combine(sets.PDT,{})
  199.  
  200.         -----------------------
  201.         -- Weapon Skill Sets --
  202.         -----------------------
  203.    
  204.     -- WS Base Set --
  205.     sets.WS = {}
  206.  
  207.     -- WS Sets --
  208.     sets.WS.Evisceration = {
  209.             ammo="Yetshila",
  210.             head="Adhemar Bonnet +1",
  211.             neck="Fotia Gorget",
  212.             ear1="Moonshade Earring",
  213.             ear2="Sherida Earring",
  214.             body="Adhemar Jacket +1",
  215.             hands="Adhemar Wrist. +1",
  216.             ring1="Begrudging Ring",
  217.             ring2="Epona's Ring",
  218.             back=CritCape,
  219.             waist="Fotia Belt",
  220.             legs="Pill. Culottes +3",
  221.             feet="Adhe. Gamashes +1"}
  222.     sets.WS.Evisceration.SA = set_combine(sets.WS.Evisceration,{})
  223.     sets.WS.Evisceration.TA = set_combine(sets.WS.Evisceration,{})
  224.  
  225.     sets.WS["Rudra's Storm"] = {
  226.             ammo="Jukukik Feather",
  227.             head="Pill. Bonnet +3",
  228.             neck="Caro Necklace",
  229.             ear1="Moonshade Earring",
  230.             ear2="Ishvara Earring",
  231.             body="Adhemar Jacket +1",
  232.             hands="Meg. Gloves +2",
  233.             ring1="Regal Ring",
  234.             ring2="Ilabrat Ring",
  235.             back=WSDCape,
  236.             waist="Chiner's Belt +1",
  237.             legs="Lustr. Subligar +1",
  238.             feet="Lustra. Leggings +1"}
  239.     sets.WS["Rudra's Storm"].SA = set_combine(sets.WS["Rudra's Storm"],{
  240.             ammo="Yetshila",
  241.             body="Meg. Cuirie +2"})
  242.     sets.WS["Rudra's Storm"].TA = set_combine(sets.WS["Rudra's Storm"],{
  243.             ammo="Yetshila",
  244.             body="Meg. Cuirie +2"})
  245.  
  246.     sets.WS["Aeolian Edge"] = {}
  247.  
  248.     sets.WS["Mandalic Stab"] =  set_combine(sets.WS["Rudra's Storm"],{})
  249.     sets.WS["Mandalic Stab"].SA = set_combine(sets.WS["Rudra's Storm"].SA,{})
  250.     sets.WS["Mandalic Stab"].TA = set_combine(sets.WS["Rudra's Storm"].TA,{})
  251.  
  252.     -------------
  253.     -- JA Sets --
  254.     -------------
  255.     sets.JA = {}
  256.     TH_Gear = {feet="Skulk. Poulaines +1"}
  257.     sets.JA.Conspirator = {body="Raider's Vest +2"}
  258.     sets.JA.Accomplice = {head="Skulker's Bonnet +1"}
  259.     sets.JA.Collaborator = {head="Skulker's Bonnet +1"}
  260.     sets.JA["Perfect Dodge"] = {hands="Plun. Armlets +1"}
  261.     sets.JA.Steal = {hands="Pill. Armlets +1",legs="Pill. Culottes +3",feet="Pill. Poulaines +1"}
  262.     sets.JA.Flee = {feet="Pill. Poulaines +1"}
  263.     sets.JA.Despoil = {legs="Raid. Culottes +2",feet="Skulk. Poulaines +1"}
  264.     sets.JA.Mug = {head="Plun. Bonnet"}
  265.     sets.JA.Hide = {body="Pillager's Vest +3"}
  266.     sets.JA.Provoke = TH_Gear
  267.     sets.JA["Sneak Attack"] = {}
  268.     sets.JA["Trick Attack"] = set_combine(sets.JA["Sneak Attack"],{})
  269.  
  270.     -- Step Set --
  271.     sets.Step = set_combine({},TH_Gear)
  272.  
  273.     -- Flourish Set --
  274.     sets.Flourish = set_combine({},TH_Gear)
  275.  
  276.     -- Waltz Set --
  277.     sets.Waltz = {}
  278.  
  279.     ----------------
  280.     -- Magic Sets --
  281.     ----------------
  282.    
  283.     -- Precast Sets --
  284.     sets.Precast = {}
  285.    
  286.     -- Fastcast Set --
  287.     sets.Precast.FastCast = {}
  288.    
  289.     -- Utsusemi Precast Set --
  290.     sets.Precast.Utsusemi = set_combine(sets.Precast.FastCast,{})
  291.  
  292.     -- Midcast Base Set --
  293.     sets.Midcast = {}
  294.    
  295.     -- Magic Haste Set --
  296.     sets.Midcast.Haste = set_combine(sets.PDT,{})
  297. end
  298.  
  299.         ----------------
  300.         -- Pre-Target --
  301.         ----------------
  302.  
  303. function pretarget(spell,action)
  304.     if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  305.         cancel_spell()
  306.         send_command('input /item "Echo Drops" <me>')
  307.     elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
  308.         cancel_spell()
  309.         send_command('Aggressor')
  310.     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 --
  311.         cancel_spell()
  312.         add_to_chat(123, spell.name..' Canceled: [Out of Range]')
  313.         return
  314.     end
  315. end
  316.  
  317.         --------------
  318.         -- Pre-Cast --
  319.         --------------
  320.  
  321. function precast(spell,action)
  322.     if spell.type == "WeaponSkill" then
  323.         if player.status ~= 'Engaged' then
  324.         return
  325.         else
  326.             equipSet = sets.WS
  327.             if equipSet[spell.english] then
  328.                 equipSet = equipSet[spell.english]
  329.             end
  330.             if SA and equipSet["SA"] then
  331.                 equipSet = equipSet["SA"]
  332.             end
  333.             if TA and equipSet["TA"] then
  334.                 equipSet = equipSet["TA"]
  335.             end
  336.             if spell.english == "Evisceration" and player.tp > 2999 then -- Equip Mache Earring When You Have 3000 TP --
  337.                 equipSet = set_combine(equipSet,{ear1="Mache Earring"})
  338.             end
  339.             if spell.english == "Rudra's Storm" and player.tp > 2999 then -- Equip Mache Earring When You Have 3000 TP --
  340.                 equipSet = set_combine(equipSet,{ear1="Mache Earring"})
  341.             end
  342.             equip(equipSet)
  343.         end
  344.     elseif spell.type=="JobAbility" then
  345.         if sets.JA[spell.english] then
  346.             equip(sets.JA[spell.english])
  347.         end
  348.         if spell.english=="Sneak Attack" then
  349.             SA = true
  350.         end
  351.         if spell.english=="Trick Attack" then
  352.             TA = true
  353.         end
  354.     elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  355.         if string.find(spell.english,'Utsusemi') then
  356.             if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  357.                 cancel_spell()
  358.                 add_to_chat(123, spell.name .. ' Canceled: [3+ Images]')
  359.                 return
  360.             else
  361.                 equip(sets.Precast.Utsusemi)
  362.             end
  363.         else
  364.             equip(sets.Precast.FastCast)
  365.         end
  366.     elseif spell.type == 'Step' then
  367.         equip(sets.Step)
  368.     elseif string.find(spell.type,'Flourish') then
  369.         equip(sets.Flourish)
  370.     elseif spell.type == "Waltz" then
  371.         refine_waltz(spell,action)
  372.         equip(sets.Waltz)
  373.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  374.         cast_delay(0.2)
  375.         send_command('cancel Sneak')
  376.     end
  377. end
  378.  
  379.         --------------
  380.         -- Mid-Cast --
  381.         --------------
  382.  
  383. function midcast(spell,action)
  384.     if spell.english == 'Ranged' then
  385.         equip(TH_Gear)
  386.     elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  387.         if string.find(spell.english,'Utsusemi') then
  388.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  389.                 send_command('@wait 1.7;cancel Copy Image*')
  390.             end
  391.             equip(sets.Midcast.Haste)
  392.         elseif spell.english == 'Monomi: Ichi' then
  393.             if buffactive['Sneak'] then
  394.                 send_command('@wait 1.7;cancel sneak')
  395.             end
  396.             equip(sets.Midcast.Haste)
  397.         else
  398.             equip(sets.Midcast.Haste)
  399.         end
  400.     end
  401. end
  402.  
  403.         ----------------
  404.         -- After-Cast --
  405.         ----------------
  406.  
  407. function aftercast(spell,action)
  408.     if spell.type == "WeaponSkill" and not spell.interrupted then
  409.         send_command('wait 0.2;gs c TP')
  410.     end
  411.     status_change(player.status)
  412. end
  413.  
  414.         -------------------
  415.         -- Status Change --
  416.         -------------------
  417.  
  418. function status_change(new,old)
  419.     if player.equipment.range ~= 'empty' then
  420.         disable('range','ammo')
  421.     else
  422.         enable('range','ammo')
  423.     end
  424.     if Armor == 'PDT' then
  425.         equip(sets.PDT)
  426.     elseif Armor == 'MDT' then
  427.         equip(sets.MDT)
  428.     elseif Armor == 'Kiting' then
  429.         equip(sets.Kiting)
  430.     elseif Armor == 'EVA' then
  431.         equip(sets.Evasion)
  432.     elseif new == 'Engaged' then
  433.         equipSet = sets.TP
  434.         if Armor == 'Hybrid' and equipSet["Hybrid"] then
  435.             equipSet = equipSet["Hybrid"]
  436.         end
  437.         if equipSet[AccArray[AccIndex]] then
  438.             equipSet = equipSet[AccArray[AccIndex]]
  439.         end
  440.         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
  441.             equipSet = equipSet["HighHaste"]
  442.         end
  443.         if buffactive.March and (buffactive.Embrava or buffactive.Haste) or (buffactive.Haste == 2) and equipSet["MidHaste"] then
  444.             equipSet = equipSet["MidHaste"]
  445.         end
  446.         if SA then
  447.             equipSet = set_combine(equipSet,sets.JA["Sneak Attack"])
  448.         end
  449.         if TA then
  450.             equipSet = set_combine(equipSet,sets.JA["Trick Attack"])
  451.         end
  452.         if Rancor == 'ON' then -- Use Rancor Toggle For Rancor Collar --
  453.             equipSet = set_combine(equipSet,sets.TP.Rancor)
  454.         end
  455.         if TH == 'ON' then -- Use TH Toggle To Lock Full TH Set --
  456.             equipSet = set_combine(equipSet,sets.TP.TH)
  457.         end
  458.         equip(equipSet)
  459.     else
  460.         equip(sets.Idle[IdleArray[IdleIndex]])
  461.     end
  462. end
  463.  
  464.         -----------------
  465.         -- Buff Change --
  466.         -----------------
  467.  
  468. function buff_change(buff,gain)
  469.     buff = string.lower(buff)
  470.     if buff == "sneak attack" then
  471.         SA = gain
  472.     elseif buff == "trick attack" then
  473.         TA = gain
  474.     elseif buff == 'weakness' then -- Weakness Timer --
  475.         if gain then
  476.             send_command('timers create "Weakness" 300 up')
  477.         else
  478.             send_command('timers delete "Weakness"')
  479.         end
  480.     end
  481.     if not midaction() then
  482.         status_change(player.status)
  483.     end
  484. end
  485.  
  486.         -------------------------------------------------------------------------------------
  487.         -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  488.         -------------------------------------------------------------------------------------
  489.  
  490. function self_command(command)
  491.     if command == 'acc' then -- Accuracy Level Toggle --
  492.         AccIndex = (AccIndex % #AccArray) + 1
  493.         status_change(player.status)
  494.         add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  495.     elseif command == 'update' then -- Auto Update Gear Toggle --
  496.         status_change(player.status)
  497.         add_to_chat(155,'Auto Update Gear')
  498.     elseif command == 'hybrid' then -- Hybrid Toggle --
  499.         if Armor == 'Hybrid' then
  500.             Armor = 'None'
  501.             add_to_chat(123,'Hybrid Set: [Unlocked]')
  502.         else
  503.             Armor = 'Hybrid'
  504.             add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
  505.         end
  506.         status_change(player.status)
  507.     elseif command == 'th' then -- Full TH Set Toggle --
  508.         if TH == 'ON' then
  509.             TH = 'OFF'
  510.             add_to_chat(123,'Full TH Set: [Unlocked]')
  511.         else
  512.             TH = 'ON'
  513.             add_to_chat(158,'Full TH Set: [Locked]')
  514.         end
  515.         status_change(player.status)
  516.     elseif command == 'pdt' then -- PDT Toggle --
  517.         if Armor == 'PDT' then
  518.             Armor = 'None'
  519.             add_to_chat(123,'PDT Set: [Unlocked]')
  520.         else
  521.             Armor = 'PDT'
  522.             add_to_chat(158,'PDT Set: [Locked]')
  523.         end
  524.         status_change(player.status)
  525.     elseif command == 'mdt' then -- MDT Toggle --
  526.         if Armor == 'MDT' then
  527.             Armor = 'None'
  528.             add_to_chat(123,'MDT Set: [Unlocked]')
  529.         else
  530.             Armor = 'MDT'
  531.             add_to_chat(158,'MDT Set: [Locked]')
  532.         end
  533.         status_change(player.status)
  534.     elseif command == 'kiting' then -- Kiting Toggle --
  535.         if Armor == 'Kiting' then
  536.             Armor = 'None'
  537.             add_to_chat(123,'Kiting Set: [Unlocked]')
  538.         else
  539.             Armor = 'Kiting'
  540.             add_to_chat(158,'Kiting Set: [Locked]')
  541.         end
  542.             status_change(player.status)
  543.     elseif command == 'evasion' then -- Evasion Toggle --
  544.         if Armor == 'EVA' then
  545.             Armor = 'None'
  546.             add_to_chat(123,'Evasion Set: [Unlocked]')
  547.         else
  548.             Armor = 'EVA'
  549.             add_to_chat(158,'Evasion Set: [Locked]')
  550.         end
  551.         status_change(player.status)
  552.     elseif command == 'rancor' then -- Rancor Toggle --
  553.         if Rancor == 'ON' then
  554.             Rancor = 'OFF'
  555.             add_to_chat(123,'Rancor: [OFF]')
  556.         else
  557.             Rancor = 'ON'
  558.             add_to_chat(158,'Rancor: [ON]')
  559.         end
  560.         status_change(player.status)
  561.     elseif command == 'distance' then -- Distance Toggle --
  562.         if player.target.distance then
  563.             target_distance = math.floor(player.target.distance*10)/10
  564.             add_to_chat(158,'Distance: '..target_distance)
  565.         else
  566.             add_to_chat(123,'No Target Selected')
  567.         end
  568.     elseif command == 'idle' then -- Idle Toggle --
  569.         IdleIndex = (IdleIndex % #IdleArray) + 1
  570.         status_change(player.status)
  571.         add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
  572.     elseif command == 'TP' then
  573.         add_to_chat(155,'TP Return: ['..tostring(player.tp)..']')
  574.     elseif command:match('^SC%d$') then
  575.         send_command('//' .. sc_map[command])
  576.     end
  577. end
  578.  
  579.     -----------
  580.     -- Misc. --
  581.     -----------
  582.  
  583. function find_player_in_alliance(name)
  584.     for i,v in ipairs(alliance) do
  585.         for k,p in ipairs(v) do
  586.             if p.name == name then
  587.                 return p
  588.             end
  589.         end
  590.     end
  591. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement