Advertisement
Alscara

player.lua

Jun 24th, 2015
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 KB | None | 0 0
  1. local numbers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
  2.     if thing:getId() == 2006 then
  3.         local fluidType = {36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110}
  4.         if isInArray(fluidType, thing:getFluidType()) then
  5.             local effects = thing:getEffects(thing)
  6.             if effects[6] == 1 then
  7.                 description = "You see a " .. apotency[tonumber(effects[4])].prefix .. " " .. effects[5] .. ".\n" .. thing:getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)
  8.             elseif effects[6] == 2 then
  9.                 description = "You see a " .. effects[5] .. ".\n" .. thing:getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)
  10.             end
  11.         end
  12.     end
  13.     for i = 1, #aingredients do
  14.         if thing:getId() == aingredients[i].id then
  15.             description = "You see " .. thing:getDescription(distance) .. "\nEffects:\n1: "
  16.             if self:getStorageValue(aingredients[i].storages[1]) == 1 then
  17.                 description = description .. aeffects[aingredients[i].effects[1]].fullname
  18.             else
  19.                 description = description .. "Unknown"
  20.             end
  21.             description = description .. "\n2: "
  22.             if self:getStorageValue(aingredients[i].storages[2]) == 1 then
  23.                 description = description .. aeffects[aingredients[i].effects[2]].fullname
  24.             else
  25.                 description = description .. "Unknown"
  26.             end
  27.         end
  28.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement