Disabling Back Does Not Allow Me To Use Cap Mantle

Language: JP EN DE FR
New Items
2018-08-14
users online
Forum » Windower » Support » disabling back does not allow me to use cap mantle
disabling back does not allow me to use cap mantle
Offline
Posts: 20
By vpmarche 2018-05-17 00:13:38
Link | Quote | Reply
 
disabling the back allows me to equip the aptitude mantle +1 but it changes even when its disabled to another piece when fighting.
Online
Posts: 566
By Nyarlko 2018-05-17 00:32:47
Link | Quote | Reply
 
Double check your macros to make sure you don't have /equip or /equipset lines included.
 Asura.Chiaia
Offline
Server: Asura
Game: FFXI
user: Demmis
Posts: 893
By Asura.Chiaia 2018-05-17 01:07:38
Link | Quote | Reply
 
then some wheres in your lua is allowing it to unlock and u didn't post it or what was said above
Offline
Posts: 20
By vpmarche 2018-05-17 20:11:59
Link | Quote | Reply
 
you know the part of the lua where you can add gear like exalted crossbow +1 or tizona etc does it make a difference if i add the aptitude mantle +1?
 Fenrir.Aladeus
Offline
Server: Fenrir
Game: FFXI
user: Aladeus
Posts: 69
By Fenrir.Aladeus 2018-05-17 21:49:38
Link | Quote | Reply
 
i had the same issue. theres a couple of parts and im not sure if i got it all cuz i copied from another one.

state.CP = M(false, "Capacity Points Mode")

send_command('bind @c gs c toggle CP')

sets.CP = {back="Mecisto. Mantle"}

elseif state.CP.current == 'on' then
equip(sets.CP)
disable('back')
else
enable('back')
end

first part at start, 2nd part in keybinds, 3rd part before arguements, 4th part in the final arguements. i think thats everything. anyway if it works, you can just hit windows key+c and it'll put the mecisto mantle on and lock it. obviously change for aptitude if thats what you have. i hope i got it right for you.
[+]
 Bahamut.Dannyl
Offline
Server: Bahamut
Game: FFXI
user: dannyl
Posts: 1332
By Bahamut.Dannyl 2018-05-17 22:01:23
Link | Quote | Reply
 
You can do something like this that will lock your slot if that equipment is found on said slot:
Code
function check_equip_lock() -- Lock Equipment Here --
	if player.equipment.back == "Mecisto. Mantle" or player.equipment.back == "Aptitude Mantle +1" or player.equipment.back == "Aptitude Mantle" then
		disable('back')
	else
		enable('back')
	end
end
[+]
 Quetzalcoatl.Langly
Offline
Server: Quetzalcoatl
Game: FFXI
user: Langly
Posts: 545
By Quetzalcoatl.Langly 2018-05-17 22:34:35
Link | Quote | Reply
 
I like to do it this way. Includes items I don't want swapping out if I'm waiting for charge.
Code
function job_handle_equipping_gear(playerStatus, eventArgs)
	local lockables = T{'Mecisto. Mantle', 'Shobuhouou Kabuto', 'Aptitude Mantle', 'Nexus Cape', 'Aptitude Mantle +1', 'Warp Ring', 'Vocation Ring', 'Reraise Earring', 'Capacity Ring', 'Trizek Ring', 'Echad Ring', 'Facility Ring', 'Dim. Ring (Holla)', 'Dim. Ring (Dem)', 'Dim. Ring (Mea)'}
	local watch_slots = T{'ear1','ear2','ring1','ring2','back','head'}

	for _,v in pairs(watch_slots) do
		if lockables:contains(player.equipment[v]) then
			disable(v)
		else
			enable(v)
		end
	end
end


Or if you want it to automatically enable again if there's no charge ready/available, you could use something more like this:
Code
function job_handle_equipping_gear(playerStatus, eventArgs)
	local lockables = T{'Mecisto. Mantle', 'Shobuhouou Kabuto', 'Aptitude Mantle', 'Nexus Cape', 'Aptitude Mantle +1', 'Warp Ring', 'Vocation Ring', 'Reraise Earring', 'Capacity Ring', 'Trizek Ring', 'Echad Ring', 'Facility Ring', 'Dim. Ring (Holla)', 'Dim. Ring (Dem)', 'Dim. Ring (Mea)'}
	local watch_slots = T{'ear1','ear2','ring1','ring2','back','head'}

	for _,v in pairs(watch_slots) do
		if lockables:contains(player.equipment[v]) then
			disable(v)
			if has_charges(player.equipment[v]) and (not is_enchant_ready(player.equipment[v])) then
				enable(v)
			end
		else
			enable(v)
		end
	end
end


But you will also need these two additional functions along with the libraries:
Code
res = require('resources')
extdata = require('extdata')

-- Item must be equipped for it to return any meaningful value.
function is_enchant_ready(--[[name of item]]item)
	local item_id, item = res.items:find(function(v) if v.name == item then return true end end)
	local inventory = windower.ffxi.get_items()
	local usable_bags = T{'inventory','wardrobe','wardrobe2','wardrobe3','wardrobe4'}
	local itemdata = {}
	
	for i,v in pairs(inventory) do
		if usable_bags:contains(i) then
			for key,val in pairs(v) do
				if type(val) == 'table' and val.id == item_id then
					itemdata = extdata.decode(val)
				end
			end
		end
	end
	
	if itemdata and itemdata.charges_remaining then
		if itemdata.activation_time - itemdata.next_use_time > item.cast_delay then
			return true
		end
	end
	return false
end

function has_charges(--[[name of item]]item)
	local item_id, item = res.items:find(function(v) if v.name == item then return true end end)
	local inventory = windower.ffxi.get_items()
	local bags = T{'inventory','safe','safe2','storage','satchel','locker','sack','case','wardrobe','wardrobe2','wardrobe3','wardrobe4'}
	local itemdata = {}
	
	for i,v in pairs(inventory) do
		if bags:contains(i) then
			for key,val in pairs(v) do
				if type(val) == 'table' and val.id == item_id then
					itemdata = extdata.decode(val)
				end
			end
		end
	end
	
	if itemdata and itemdata.charges_remaining then
		if itemdata.charges_remaining > 0 then
			return true
		end
	end
	return false
end
[+]
Offline
Posts: 20
By vpmarche 2018-05-18 00:19:47
Link | Quote | Reply
 
i like all 3 ways. quetz i put the 2nd one in the top part? and the other one down lower?
Offline
Posts: 20
By vpmarche 2018-05-18 00:32:05
Link | Quote | Reply
 
thank you both i used the quetz method, it works perfectly. looking forward to some massive cping. appreciate it fellas.
Offline
Posts: 895
By Boshi 2018-05-18 00:34:23
Link | Quote | Reply
 
if
//gs disable back
doesn't work it's prob do to your lua having something in it already that handles disabling back; basically the else: enable back is messing this up
Offline
Posts: 20
By vpmarche 2018-05-18 03:53:37
Link | Quote | Reply
 
i was wrong its not working, it still changes when i fight.
Offline
Posts: 20
By vpmarche 2018-05-18 03:58:33
Link | Quote | Reply
 
was still not working and didnt find anything there so i added to engaged to equip mantle and it works and i can just -- it out.
 Fenrir.Aladeus
Offline
Server: Fenrir
Game: FFXI
user: Aladeus
Posts: 69
By Fenrir.Aladeus 2018-05-18 07:24:15
Link | Quote | Reply
 
whoever wrote my base lua also had it so that it would not allow me the easy task of disable back, but i like the keybind better anyway. just saying
[+]
Log in to post.