Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. -- Table containing our allowed mobs to attack. Feel free to add your own
  2.  
  3. rampart.tracking.allowedMobList = {"a test value",
  4. "a black rat",
  5. "a young rat",
  6. "a rat"}
  7.  
  8.  
  9. rampart = rampart or {}
  10. rampart.tracking = rampart.tracking or {}
  11. rampart.tracking.mobsToKill = rampart.tracking.mobsToKill or {}
  12.  
  13. function populateMobTable()
  14.     rampart.tracking.mobsToKill = {}
  15.     local mobList = gmcp.Char.Items.List
  16.     if mobList.location == "room" then
  17.         for _, v in ipairs(mobList.items) do
  18.             for _, value in ipairs(rampart.tracking.allowedMobList) do
  19.                 if v.name == value then
  20.                 rampart.tracking.mobsToKill = {}
  21.                 table.insert(rampart.tracking.mobsToKill, v.id)
  22.                 end
  23.             end
  24.         end
  25.     end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement