Advertisement
suteru

YARR FFXI Addon

Sep 11th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.16 KB | None | 0 0
  1. _addon.name = 'yarr'
  2. _addon.author = 'Suteru'
  3. _addon.version = '0.8'
  4. _addon.language = 'English'
  5.  
  6. require('luau')
  7. texts = require('texts')
  8.  
  9. -- Config
  10.  
  11. defaults = {}
  12. defaults.display = {}
  13. defaults.display.pos = {}
  14. defaults.display.pos.x = 1500
  15. defaults.display.pos.y = 20
  16. defaults.display.bg = {}
  17. defaults.display.bg.red = 0
  18. defaults.display.bg.green = 0
  19. defaults.display.bg.blue = 0
  20. defaults.display.bg.alpha = 102
  21. defaults.display.text = {}
  22. defaults.display.text.font = 'Consolas'
  23. defaults.display.text.red = 255
  24. defaults.display.text.green = 255
  25. defaults.display.text.blue = 255
  26. defaults.display.text.alpha = 255
  27. defaults.display.text.size = 12
  28.  
  29. settings = config.load(defaults)
  30. settings:save()
  31.  
  32. text_box = texts.new(settings.display, settings)
  33.  
  34. -- Constructor
  35.  
  36. initialize = function(text, settings)
  37.     local properties = L{}
  38.     properties:append('${pirates}')
  39.     text:clear()
  40.     text:append(properties:concat('\n'))
  41. end
  42.  
  43. text_box:register_event('reload', initialize)
  44.  
  45. -- Events
  46.  
  47. windower.register_event('prerender', function()
  48.     local remove = S{}
  49.  
  50.  
  51.         local zone = windower.ffxi.get_info().zone
  52.         local info = {}
  53.         local pirates = "test"
  54.         info.zone = zone
  55.         info.pirates = "test"
  56.        
  57.         if zone == 220 or zone == 221 then
  58.         info.pirates = 'No pirates'
  59.         text_box:show()
  60.         text_box:update(info)
  61.         elseif zone == 227 or zone == 228 then
  62.         info.pirates = "Pirates!!"
  63.         text_box:show()
  64.         text_box:update(info)
  65.         elseif zone == 252 then
  66.         info.pirates = "Deep in the pirates' cove!"
  67.         text_box:show()
  68.         text_box:update(info)
  69.         else
  70.         info.pirates = "Not in Pirate Territory!"
  71.         text_box:hide()
  72.         text_box:update(info)
  73.         end
  74.  
  75.  
  76. end)
  77.  
  78. --[[
  79. Copyright © 2013-2017, Windower
  80. All rights reserved.
  81.  
  82. Basically used TargetInfo as a base
  83.  
  84. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  85.  
  86.     * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  87.     * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  88.     * Neither the name of Windower nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  89.  
  90. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Windower BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  91. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement