MarkFergus

spawner/lib/API

May 24th, 2020 (edited)
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function check(list,name)
  2.   local chk = false
  3.   for i,v in pairs(list) do
  4.     if string.find(name,v) ~= nil then chk = true end
  5.   end
  6.   if chk == true then return true else return false end
  7. end
  8. function unlock(p,word)
  9.   local chestSize = p.getInventorySize()
  10.   list = {}
  11.   if chestSize ~= nil then
  12.     for a=1,chestSize do
  13.       list[a] = p.getStackInSlot(a)
  14.       if list[a] ~= nil and list[a].name == "teleporterMKI" then
  15.         if string.find(word,list[a].display_name) ~= nil then return true end
  16.       end
  17.     end
  18.   end
  19. end
Add Comment
Please, Sign In to add comment