Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- MAKE A MACRO : /tell <me> check
- function open_coffer()
- CofferType = "Velkk Coffer"
- if player.inventory[CofferType] then
- NCoffer = player.inventory[CofferType].count
- bag = windower.ffxi.get_bag_info(0).count
- max = windower.ffxi.get_bag_info(0).max
- spots = max-bag
- if spots > 0 then
- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..NCoffer..'x '..CofferType..' to open - Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
- local nextcommand = ""
- for i=1, spots do
- nextcommand = nextcommand .. 'input /item "'..CofferType..'" <me>; wait 2;'
- end
- nextcommand = nextcommand .. 'input /tell '..player.name..' check'
- send_command(nextcommand)
- else
- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Inventory('..bag..'/'..max..') ] *-*-*-*-*-*-*-*-*')
- end
- else
- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ No '..CofferType..' in inventory ] *-*-*-*-*-*-*-*-*')
- end
- end
- windower.register_event('chat message', function(original, sender, mode, gm)
- local match
- if sender == player.name then
- if original == "check" then
- open_coffer()
- end
- end
- return sender, mode, gm
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement