megadeth9001

Not really sure...

Nov 25th, 2015
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.23 KB | None | 0 0
  1. ----LUA----
  2. Print("This is a list of items you can have on your adventure")
  3. textutils.slowPrint("Cross bow, Bolts, Fire Starter, Knife, Axe, Hammer, 10 rations, Water Skin, Leather Armor", 100)
  4. textutils.slowprint("You have enough space for four of these items")
  5.  
  6. Function InventoryChecker1()
  7. print("First item selected please select next item")
  8.  
  9. repeat
  10. local slot1 = read(*)
  11.     if slot1 =~ "Cross bow" or "Bolts" or "Fire STarter" or "Knife" or "Axe" or "Hammer" or "10 rations" or "Water skin" or "Leather Armor" Then
  12.         print("That item is not a choice please try again")
  13.             until slot1 == "Cross bow" or "Bolts" or "Fire Starter" or "Knife" or "Axe" or "Hammer" or "10 rations" or "Water skin" or "Leather Armor"
  14.     end
  15. end
  16.  
  17. Function InventoryChecker2()
  18. print("First item selected please select next item")
  19.  
  20. repeat
  21. local slot2 = read(*)
  22.     if slot2 =~ "Cross bow" or "Bolts" or "Fire STarter" or "Knife" or "Axe" or "Hammer" or "10 rations" or "Water skin" or "Leather Armor" Then
  23.         print("That item is not a choice please try again")
  24.             until slot2 == "Cross bow" or "Bolts" or "Fire Starter" or "Knife" or "Axe" or "Hammer" or "10 rations" or "Water skin" or "Leather Armor"
  25.     end
  26. end
  27.  
  28. Function InventoryChecker3()
  29. print("First item selected please select next item")
  30.  
  31. repeat
  32. local slot3 = read(*)
  33.     if slot3 =~ "Cross bow" or "Bolts" or "Fire STarter" or "Knife" or "Axe" or "Hammer" or "10 rations" or "Water skin" or "Leather Armor" Then
  34.         print("That item is not a choice please try again")
  35.             until slot3 == "Cross bow" or "Bolts" or "Fire Starter" or "Knife" or "Axe" or "Hammer" or "10 rations" or "Water skin" or "Leather Armor"
  36.     end
  37. end
  38.  
  39. Function InventoryChecker4()
  40. print("First item selected please select next item")
  41.  
  42. repeat
  43. local slot4 = read(*)
  44.     if slot4 =~ "Cross bow" or "Bolts" or "Fire STarter" or "Knife" or "Axe" or "Hammer" or "10 rations" or "Water skin" or "Leather Armor" Then
  45.         print("That item is not a choice please try again")
  46.             until slot4 == "Cross bow" or "Bolts" or "Fire Starter" or "Knife" or "Axe" or "Hammer" or "10 rations" or "Water skin" or "Leather Armor"
  47.     end
  48. end
  49.  
  50. Function Inventorychecker()
  51.     local Invchk = Inventory
  52.     If read == "Inventory" then
  53.         print (slot1 , slot2 , slot3 , slot 4)
Advertisement
Add Comment
Please, Sign In to add comment