Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ** I Use Some of Motenten's Functions ** --
- -- Last Updated: 06/20/14 8:00 PM *Advanced Version* --
- function get_sets()
- AccIndex = 1
- AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below. --
- WeaponIndex = 1
- WeaponArray = {""} -- Default Main Weapon Is Ukonvasara. Can Delete Any Weapons That You Don't Own. --
- IdleIndex = 1
- IdleArray = {"Movement"} -- Default Idle Set Is Movement --
- Armor = 'None'
- HP = 'OFF'
- Attack = 'OFF' -- Set Default Attack Set ON or OFF Here --
- Rancor = 'OFF' -- Set Default Rancor ON or OFF Here --
- target_distance = 7 -- Set Default Distance Here --
- sc_map = {SC1="", SC2="", SC3="Berserk"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
- sets.Idle = {}
- -- Idle/Town Sets --
- sets.Idle.Movement = {
- ammo="",
- head="Ighwa Cap",
- neck="Twilight Torque",
- ear1="Merman's Earring",
- ear2="Ethereal Earring",
- body="Ankusa Jackcoat +1",
- hands="Ankusa Gloves",
- ring1="Sheltered Ring",
- ring2="Paguroidea Ring",
- back="Iximulew Cape",
- waist="Hurch'lan Sash",
- legs="Ankusa Trousers +1",
- feet="Skadi's Jambeaux"}
- -- TP Sets --
- sets.TP = {
- ammo="Demonry Core",
- head="Otomi Helm",
- neck="Asperity Necklace",
- ear1="Domesticator's Earring",
- ear2="Suppanomimi",
- body="Ankusa Jackcoat +1",
- hands="Regimen Mittens",
- ring1="Rajas Ring",
- ring2="Epona's Ring",
- back="Pastoralist's Mantle",
- waist="Hurch'lan Sash",
- legs="Ankusa Trousers +1",
- feet="Whirlpool Greaves"}
- sets.TP.MidACC = set_combine(sets.TP,{
- neck="Agitator's Collar",
- waist="Anguinus Belt",
- hands="Xaddi Gauntlets",
- ring2="Patricius Ring",})
- sets.TP.HighACC = set_combine(sets.TP.MidACC,{
- ammo="Fire Bomblet",
- legs="Xaddi Cuisses",
- head="Yaoyotl Helm",
- hands="Buremte Gloves",
- feet="Scamp's Sollerets",
- neck="Agitator's Collar",
- ear2="Heartseeker Earring"})
- -- Attack TP Set --
- sets.TP.ATT = set_combine(sets.TP,{
- })
- -- PDT/MDT Sets --
- sets.PDT = {
- ammo="Onieros Pebble",
- head="Ighwa Cap",
- neck="Agitator's Collar",
- ear1="Steelflash Earring",
- ear2="Bladeborn Earring",
- body="Cizin Mail",
- hands="Agoge Mufflers +1",
- ring1="Dark Ring",
- ring2="Dark Ring",
- back="Shadow Mantle",
- waist="Cetl Belt",
- legs="Pumm. Cuisses +1",
- feet="Cizin Greaves"}
- sets.MDT = set_combine(sets.PDT,{
- back="Engulfer Cape",
- ring2="Shadow Ring",
- neck="Twilight Torque",
- hands="Umuthi Gloves",
- feet="Pumm. Calligae +1",
- head="Yaoyotl Helm"
- })
- -- Hybrid/HP Sets --
- sets.TP.Hybrid = set_combine(sets.PDT,{
- head="Ighwa Cap",
- ear1="Steelflash Earring",
- ear2="Bladeborn Earring",
- waist="Windbuffet Belt +1"})
- sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{
- head="Ighwa Cap",
- hands="Umuthi Gloves",
- waist="Anguinus Belt",
- legs="Pumm. Cuisses +1",
- feet="Cizin Greaves"})
- sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{
- neck="Agitator's Collar",
- back="Shadow Mantle"})
- sets.HP = set_combine(sets.PDT,{
- neck="Dualism Collar",
- ear1="Bloodgem Earring",
- ear2="Cassie Earring",
- ring1="Meridian Ring",
- back="Anchoret's Mantle"})
- -- WS Base Set --
- sets.WS = {}
- -- Ruinator Sets --
- sets.WS["Ruinator"] = {
- ammo="Yetshila",
- head="Otomi Helm",
- neck="Justiciar's Torque",
- ear1="Kokou's Earring",
- ear2="Moonshade Earring",
- body="Phorcys Korazin",
- hands="Umuthi Gloves",
- ring1="Ifrit Ring",
- ring2="Ifrit Ring",
- back="Letalis Mantle",
- waist="Windbuffet Belt +1",
- legs="Xaddi Cuisses",
- feet="Whirlpool Greaves"}
- sets.WS["Ruinator"].MidACC = set_combine(sets.WS["Ruinator"],{
- })
- sets.WS["Ruinator"].HighACC = set_combine(sets.WS["Ruinator"].MidACC,{
- })
- -- Raging Rush Sets --
- sets.WS["Raging Rush"] = {
- ammo="Oneiros Pebble",
- head="Yaoyotl Helm",
- neck="Justiciar's Torque",
- ear1="Brutal Earring",
- ear2="Moonshade Earring",
- body="Xaddi Mail",
- hands="Buremte Gloves",
- ring1="Rajas Ring",
- ring2="Ifrit Ring",
- back="Letalis Mantle",
- waist="Caudata Belt",
- legs="Ankusa Trousers +1",
- feet="Whirlpool Greaves"}
- sets.WS["Raging Rush"].MidACC = set_combine(sets.WS["Raging Rush"],{
- })
- sets.WS["Raging Rush"].HighACC = set_combine(sets.WS["Raging Rush"].MidACC,{
- })
- -- JA Sets --
- sets.JA = {}
- sets.JA['Familiar'] = {}
- sets.JA['Charm'] = {}
- sets.JA['Reward'] = {}
- sets.JA['Sic'] = {}
- sets.JA["Feral Howl"] = {}
- sets.JA['Call Beast'] = {}
- sets.JA['Ready'] = {}
- sets.JA['Bestial Loyalty'] = {}
- -- Waltz Set --
- sets.Waltz = {}
- sets.Precast = {}
- -- Fastcast Set --
- sets.Precast.FastCast = {
- head="Haruspex Hat +1",
- neck="Orunmila's Torque",
- ear1="Loquac. Earring",
- hands="Thaumas Gloves",
- ring1="Prolix Ring",}
- -- Utsusemi Precast Set --
- sets.Precast.Utsusemi = set_combine(sets.Precast.FastCast,{neck="Magoraga Beads"})
- sets.Midcast = {}
- -- Magic Haste Set --
- sets.Midcast.Haste = set_combine(sets.PDT,{})
- end
- function pretarget(spell,action)
- if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
- cancel_spell()
- send_command('input /item "Echo Drops" <me>')
- elseif spell.type == "WeaponSkill" and player.status == 'Engaged' and spell.target.distance > target_distance then -- Cancel WS If You Are Out Of Range --
- cancel_spell()
- add_to_chat(123, spell.name..' Canceled: [Out of Range]')
- return
- end
- end
- function precast(spell,action)
- if spell.type == "WeaponSkill" then
- if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
- cancel_spell()
- add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
- return
- else
- equipSet = sets.WS
- if equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- end
- if Attack == 'ON' then
- equipSet = equipSet["ATT"]
- end
- if equipSet[AccArray[AccIndex]] then
- equipSet = equipSet[AccArray[AccIndex]]
- end
- equip(equipSet)
- end
- elseif spell.type == "JobAbility" then
- if sets.JA[spell.english] then
- equip(sets.JA[spell.english])
- end
- elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
- if string.find(spell.english,'Utsusemi') then
- if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
- cancel_spell()
- add_to_chat(123, spell.english .. ' Canceled: [3+ Images]')
- return
- else
- equip(sets.Precast.Utsusemi)
- end
- else
- equip(sets.Precast.FastCast)
- end
- elseif spell.type == "Waltz" then
- refine_waltz(spell,action)
- equip(sets.Waltz)
- elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
- cast_delay(0.2)
- send_command('cancel Sneak')
- end
- if HP == 'ON' then
- equip(sets.HP)
- end
- end
- function midcast(spell,action)
- if spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
- if string.find(spell.english,'Utsusemi') then
- if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
- send_command('@wait 1.7;cancel Copy Image*')
- end
- equip(sets.Midcast.Haste)
- elseif spell.english == 'Monomi: Ichi' then
- if buffactive['Sneak'] then
- send_command('@wait 1.7;cancel sneak')
- end
- equip(sets.Midcast.Haste)
- else
- equip(sets.Midcast.Haste)
- end
- end
- end
- function aftercast(spell,action)
- if not spell.interrupted then
- if spell.type == "WeaponSkill" then
- send_command('wait 0.2;gs c TP')
- end
- end
- status_change(player.status)
- end
- function status_change(new,old)
- if Armor == 'PDT' then
- equip(sets.PDT)
- elseif Armor == 'MDT' then
- equip(sets.MDT)
- elseif new == 'Engaged' then
- equipSet = sets.TP
- if Armor == 'Hybrid' and equipSet["Hybrid"] then
- equipSet = equipSet["Hybrid"]
- end
- if Attack == 'ON' then
- equipSet = equipSet["ATT"]
- end
- if equipSet[AccArray[AccIndex]] then
- equipSet = equipSet[AccArray[AccIndex]]
- end
- if Rancor == 'ON' then -- Use Rancor Toggle For Rancorous Mantle --
- equipSet = set_combine(equipSet,sets.TP.Rancor)
- end
- equip(equipSet)
- else
- equipSet = sets.Idle
- if equipSet[IdleArray[IdleIndex]] then
- equipSet = equipSet[IdleArray[IdleIndex]]
- end
- if equipSet[WeaponArray[WeaponIndex]] then
- equipSet = equipSet[WeaponArray[WeaponIndex]]
- end
- equip(equipSet)
- end
- if HP == 'ON' then
- equip(sets.HP)
- end
- end
- -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
- function self_command(command)
- if command == 'C1' then -- Accuracy Toggle --
- AccIndex = (AccIndex % #AccArray) + 1
- add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
- status_change(player.status)
- elseif command == 'C17' then -- Main Weapon Toggle --
- WeaponIndex = (WeaponIndex % #WeaponArray) + 1
- add_to_chat(158,'Main Weapon: '..WeaponArray[WeaponIndex])
- status_change(player.status)
- elseif command == 'C5' then -- Auto Update Gear Toggle --
- status_change(player.status)
- add_to_chat(158,'Auto Update Gear')
- elseif command == 'C2' then -- Hybrid Toggle --
- if Armor == 'Hybrid' then
- Armor = 'None'
- add_to_chat(123,'Hybrid Set: [Unlocked]')
- else
- Armor = 'Hybrid'
- add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
- end
- status_change(player.status)
- elseif command == 'C7' then -- PDT Toggle --
- if Armor == 'PDT' then
- Armor = 'None'
- add_to_chat(123,'PDT Set: [Unlocked]')
- else
- Armor = 'PDT'
- add_to_chat(158,'PDT Set: [Locked]')
- end
- status_change(player.status)
- elseif command == 'C15' then -- MDT Toggle --
- if Armor == 'MDT' then
- Armor = 'None'
- add_to_chat(123,'MDT Set: [Unlocked]')
- else
- Armor = 'MDT'
- add_to_chat(158,'MDT Set: [Locked]')
- end
- status_change(player.status)
- elseif command == 'C3' then -- HP Toggle --
- if HP == 'ON' then
- HP = 'OFF'
- add_to_chat(123,'HP Set: [Unlocked]')
- else
- HP = 'ON'
- add_to_chat(158,'HP Set: [locked]')
- end
- status_change(player.status)
- elseif command == 'C16' then -- Rancor Toggle --
- if Rancor == 'ON' then
- Rancor = 'OFF'
- add_to_chat(123,'Rancor: [OFF]')
- else
- Rancor = 'ON'
- add_to_chat(158,'Rancor: [ON]')
- end
- status_change(player.status)
- elseif command == 'C9' then -- Attack Toggle --
- if Attack == 'ON' then
- Attack = 'OFF'
- add_to_chat(123,'Attack: [OFF]')
- else
- Attack = 'ON'
- add_to_chat(158,'Attack: [ON]')
- end
- status_change(player.status)
- elseif command == 'C8' then -- Distance Toggle --
- if player.target.distance then
- target_distance = math.floor(player.target.distance*10)/10
- add_to_chat(158,'Distance: '..target_distance)
- else
- add_to_chat(123,'No Target Selected')
- end
- elseif command == 'C6' then -- Idle Toggle --
- IdleIndex = (IdleIndex % #IdleArray) + 1
- add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
- status_change(player.status)
- elseif command == 'TP' then
- add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
- elseif command:match('^SC%d$') then
- send_command('//' .. sc_map[command])
- end
- end
- function timer_Berserk()
- local duration = 180
- send_command('timers create "Berserk" '..tostring(duration)..' down')
- end
- function timer_BloodRage()
- local duration = 60
- send_command('timers create "Blood Rage" '..tostring(duration)..' down')
- end
- function refine_waltz(spell,action)
- if spell.type ~= 'Waltz' then
- return
- end
- if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
- return
- end
- local newWaltz = spell.english
- local waltzID
- local missingHP
- if spell.target.type == "SELF" then
- missingHP = player.max_hp - player.hp
- elseif spell.target.isallymember then
- local target = find_player_in_alliance(spell.target.name)
- local est_max_hp = target.hp / (target.hpp/100)
- missingHP = math.floor(est_max_hp - target.hp)
- end
- if missingHP ~= nil then
- if player.sub_job == 'DNC' then
- if missingHP < 40 and spell.target.name == player.name then
- add_to_chat(123,'Full HP!')
- cancel_spell()
- return
- elseif missingHP < 150 then
- newWaltz = 'Curing Waltz'
- waltzID = 190
- elseif missingHP < 300 then
- newWaltz = 'Curing Waltz II'
- waltzID = 191
- else
- newWaltz = 'Curing Waltz III'
- waltzID = 192
- end
- else
- return
- end
- end
- local waltzTPCost = {['Curing Waltz'] = 20, ['Curing Waltz II'] = 35, ['Curing Waltz III'] = 50, ['Curing Waltz IV'] = 65, ['Curing Waltz V'] = 80}
- local tpCost = waltzTPCost[newWaltz]
- local downgrade
- if player.tp < tpCost and not buffactive.trance then
- if player.tp < 20 then
- add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
- cancel_spell()
- return
- elseif player.tp < 35 then
- newWaltz = 'Curing Waltz'
- elseif player.tp < 50 then
- newWaltz = 'Curing Waltz II'
- elseif player.tp < 65 then
- newWaltz = 'Curing Waltz III'
- elseif player.tp < 80 then
- newWaltz = 'Curing Waltz IV'
- end
- downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
- end
- if newWaltz ~= spell.english then
- send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
- if downgrade then
- add_to_chat(158, downgrade)
- end
- cancel_spell()
- return
- end
- if missingHP > 0 then
- add_to_chat(158,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
- end
- end
- function find_player_in_alliance(name)
- for i,v in ipairs(alliance) do
- for k,p in ipairs(v) do
- if p.name == name then
- return p
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement