Trying to get a bit of code Martel posted for a self_command to pop Velkk Coffers to work, but not having any luck and didn't want to carry on the discussion in the Incursion thread. With Motenten's .lua, I've tried both within the job .lua:
Code:
function job_self_command(cmdParams, eventArgs)
if command == 'coffer' then
cycle = 0
invCount = windower.ffxi.get_bag_info(0).count
if invCount == 80 then
add_to_chat(140,'Inv. full. Ending cycle')
elseif player.inventory["Velkk Coffer"] then
send_command('input /item "Velkk Coffer"')
cycle = 1
else
add_to_chat(140,'No Coffers found in inv.')
send_command('findall Velkk Coffer')
end
if cycle == 1 then
send_command('wait 2;gc c coffer')
end
end
end
Code:
function self_command(command)
if command == 'coffer' then
cycle = 0
invCount = windower.ffxi.get_bag_info(0).count
if invCount == 80 then
add_to_chat(140,'Inv. full. Ending cycle')
elseif player.inventory["Velkk Coffer"] then
send_command('input /item "Velkk Coffer"')
cycle = 1
else
add_to_chat(140,'No Coffers found in inv.')
send_command('findall Velkk Coffer')
end
if cycle == 1 then
send_command('wait 2;gc c coffer')
end
end
end
Both work in the sense that I get no errors when reloading the .lua, however neither work once I input //gs c coffer. I did a search for self_command within the thread and tried a few variations that I found within, which may or may not of even been for Mote's files, with no luck. Any help with what am I missing here would be appreciated, would love to do this rather than alter a script each time. :3