Advertisement
Alscara

onLookInTrade

Jun 24th, 2015
463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.57 KB | None | 0 0
  1. local description = "You see " .. item:getDescription(distance)
  2.     local numbers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
  3.     if item:getId() == 2006 then
  4.         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}
  5.         if isInArray(fluidType, item:getFluidType()) then
  6.             local effects = item:getEffects(item)
  7.             if effects[6] == 1 then
  8.                 description = "You see a " .. apotency[tonumber(effects[4])].prefix .. " " .. effects[5] .. ".\n" .. item:getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)
  9.             elseif effects[6] == 2 then
  10.                 description = "You see a " .. effects[5] .. ".\n" .. item:getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)
  11.             end
  12.         end
  13.     end
  14.     for i = 1, #aingredients do
  15.         if item:getId() == aingredients[i].id then
  16.             description = "You see " .. item:getDescription(distance) .. "\nEffects:\n1: "
  17.             if self:getStorageValue(aingredients[i].storages[1]) == 1 then
  18.                 description = description .. aeffects[aingredients[i].effects[1]].fullname
  19.             else
  20.                 description = description .. "Unknown"
  21.             end
  22.             description = description .. "\n2: "
  23.             if self:getStorageValue(aingredients[i].storages[2]) == 1 then
  24.                 description = description .. aeffects[aingredients[i].effects[2]].fullname
  25.             else
  26.                 description = description .. "Unknown"
  27.             end
  28.         end
  29.     end
  30.    self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. description)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement