Slothmachine

end my suffering

May 5th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. -- Clockwork.item is a library, with a function named New, that accepts a string as an input parameter, and returns an item table.
  2. local ITEM = Clockwork.item:New("consumable_base");
  3.  
  4. -- All kinds of variables the item uses, the type varies but it should be self explanatory.
  5. -- Any text that isn't the variable or a function should be in quotes, basically.
  6. ITEM.name = "Banana";
  7. ITEM.uniqueID = "banana";
  8. ITEM.spawnValue = 7;
  9. ITEM.spawnType = "consumable";
  10. ITEM.category = "Consumable";
  11. ITEM.cost = 25;
  12. ITEM.health = 6;
  13. ITEM.hunger = 40;
  14. ITEM.thirst = 15;
  15. ITEM.model = "models/bioshockinfinite/loot_banana.mdl";
  16. ITEM.weight = 0.4;
  17. ITEM.access = "v";
  18. ITEM.business = true;
  19. ITEM.description = "A fresh yellow-skinned banana, grown by the powers that be in the outlands. It tastes sweet and succulent... Get your mind out of the gutter.";
  20.  
  21. -- Now you're calling the Register function on the item table you got from Clockwork.item:New, again, it's a function so put a colon :
  22. ITEM:Register();
Advertisement
Add Comment
Please, Sign In to add comment