Advertisement
ranisalt

food.rb

Jan 26th, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.00 KB | None | 0 0
  1. @food = {
  2.     2362 => [5, 'Crunch'], # carrot
  3.     2666 => [15, 'Munch'], # meat
  4.     2667 => [12, 'Munch'], # fish
  5.     2668 => [10, 'Mmmm'], # salmon
  6.     2669 => [17, 'Munch'], # northern pike
  7.     2670 => [4, 'Gulp'], # shrimp
  8.     2671 => [30, 'Chomp'], # ham
  9.     2672 => [60, 'Chomp'], # dragon ham
  10.     2673 => [5, 'Yum'], # pear
  11.     2674 => [6, 'Yum'], # red apple
  12.     2675 => [13, 'Yum'], # orange
  13.     2676 => [8, 'Yum'], # banana
  14.     2677 => [1, 'Yum'], # blueberry
  15.     2678 => [18, 'Slurp'], # coconut
  16.     2679 => [1, 'Yum'], # cherry
  17.     2680 => [2, 'Yum'], # strawberry
  18.     2681 => [9, 'Yum'], # grapes
  19.     2682 => [20, 'Yum'], # melon
  20.     2683 => [17, 'Munch'], # pumpkin
  21.     2684 => [5, 'Crunch'], # carrot
  22.     2685 => [6, 'Munch'], # tomato
  23.     2686 => [9, 'Crunch'], # corncob
  24.     2687 => [2, 'Crunch'], # cookie
  25.     2688 => [2, 'Munch'], # candy cane
  26.     2689 => [10, 'Crunch'], # bread
  27.     2690 => [3, 'Crunch'], # roll
  28.     2691 => [8, 'Crunch'], # brown bread
  29.     2695 => [6, 'Gulp'], # egg
  30.     2696 => [9, 'Smack'], # cheese
  31.     2787 => [9, 'Munch'], # white mushroom
  32.     2788 => [4, 'Munch'], # red mushroom
  33.     2789 => [22, 'Munch'], # brown mushroom
  34.     2790 => [30, 'Munch'], # orange mushroom
  35.     2791 => [9, 'Munch'], # wood mushroom
  36.     2792 => [6, 'Munch'], # dark mushroom
  37.     2793 => [12, 'Munch'], # some mushrooms
  38.     2794 => [3, 'Munch'], # some mushrooms
  39.     2795 => [36, 'Munch'], # fire mushroom
  40.     2796 => [5, 'Munch'], # green mushroom
  41.     5097 => [4, 'Yum'], # mango
  42.     6125 => [8, 'Gulp'], # tortoise egg
  43.     6278 => [10, 'Mmmm'], # cake
  44.     6279 => [15, 'Mmmm'], # decorated cake
  45.     6393 => [12, 'Mmmm'], # valentine's cake
  46.     6394 => [15, 'Mmmm'], # cream cake
  47.     6501 => [20, 'Mmmm'], # gingerbread man
  48.     6541 => [6, 'Gulp'], # coloured egg (yellow)
  49.     6542 => [6, 'Gulp'], # coloured egg (red)
  50.     6543 => [6, 'Gulp'], # coloured egg (blue)
  51.     6544 => [6, 'Gulp'], # coloured egg (green)
  52.     6545 => [6, 'Gulp'], # coloured egg (purple)
  53.     6569 => [1, 'Mmmm'], # candy
  54.     6574 => [5, 'Mmmm'], # bar of chocolate
  55.     7158 => [15, 'Munch'], # rainbow trout
  56.     7159 => [13, 'Munch'], # green perch
  57.     7372 => [2, 'Yum'], # ice cream cone (crispy chocolate chips)
  58.     7373 => [2, 'Yum'], # ice cream cone (velvet vanilla)
  59.     7374 => [2, 'Yum'], # ice cream cone (sweet strawberry)
  60.     7375 => [2, 'Yum'], # ice cream cone (chilly cherry)
  61.     7376 => [2, 'Yum'], # ice cream cone (mellow melon)
  62.     7377 => [2, 'Yum'], # ice cream cone (blue-barian)
  63.     7909 => [4, 'Crunch'], # walnut
  64.     7910 => [4, 'Crunch'], # peanut
  65.     7963 => [60, 'Munch'], # marlin
  66.     8112 => [9, 'Urgh'], # scarab cheese
  67.     8838 => [10, 'Gulp'], # potato
  68.     8839 => [5, 'Yum'], # plum
  69.     8840 => [1, 'Yum'], # raspberry
  70.     8841 => [1, 'Urgh'], # lemon
  71.     8842 => [7, 'Munch'], # cucumber
  72.     8843 => [5, 'Crunch'], # onion
  73.     8844 => [1, 'Gulp'], # jalapeño pepper
  74.     8845 => [5, 'Munch'], # beetroot
  75.     8847 => [11, 'Yum'], # chocolate cake
  76.     9005 => [7, 'Slurp'], # yummy gummy worm
  77.     9114 => [5, 'Crunch'], # bulb of garlic
  78.     9996 => [0, 'Slurp'], # banana chocolate shake
  79.     10454 => [0, 'Your head begins to feel better.'], # headache pill
  80.     11246 => [15, 'Yum'], # rice ball
  81.     11370 => [3, 'Urgh'], # terramite eggs
  82.     11429 => [10, 'Mmmm'], # crocodile steak
  83.     12415 => [20, 'Yum'], # pineapple
  84.     12416 => [10, 'Munch'], # aubergine
  85.     12417 => [8, 'Crunch'], # broccoli
  86.     12418 => [9, 'Crunch'], # cauliflower
  87.     12637 => [55, 'Gulp'], # ectoplasmic sushi
  88.     12638 => [18, 'Yum'], # dragonfruit
  89.     12639 => [2, 'Munch'], # peas
  90.     13297 => [20, 'Crunch'], # haunch of boar
  91.     15405 => [55, 'Munch'], # sandfish
  92.     15487 => [14, 'Urgh'], # larvae
  93.     15488 => [15, 'Munch'], # deepling filet
  94.     16014 => [60, 'Mmmm'], # anniversary cake
  95.     18397 => [33, 'Munch'], # mushroom pie
  96.     19737 => [10, 'Urgh'], # insectoid eggs
  97.     20100 => [15, 'Smack'], # soft cheese
  98.     20101 => [12, 'Smack.'] # rat cheese
  99. }
  100.  
  101. def onUse creature, item, fromPos, itemEx, toPos
  102.     if @food = food[:item.itemid]
  103.         unless creature.getFood + @food[0] >= 400
  104.             creature.sendCancel 'You are full.'
  105.         else
  106.             creature.feed @food[0] << 2
  107.             creature.say @food[1], TALKTYPE_ORANGE_1
  108.             item.remove 1
  109.         end
  110.         return true
  111.     end
  112.     false
  113. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement