Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Round(num)
- if num >= 0 then
- return math.floor(num+.5)
- else
- return math.ceil(num-.5) end
- end
- function onLook(cid, thing, position, lookDistance)
- if isCreature(thing.uid) then
- return true
- end
- local Dash = '-------------------'
- --[[ Item ID belongs in the key of the table ]]--
- local Items = {
- [2643] = {Desc = "Leather Boots\n".. Dash .."\nProtection: 3\nHealing: 1000"}
- }
- local Get = {
- Access = getPlayerAccess(cid),
- ItemID = getItemIdByName,
- ItemName = getItemName(thing.uid),
- ID = thing.itemid,
- AID = thing.actionid,
- UID = thing.uid,
- X = position.x,
- Y = position.y,
- Z = position.z
- }
- --[[ Access required to see special item stats such as item ID or position ]]--
- local Access_Required = 3
- local GA = Get.Access >= Access_Required
- local f =
- {
- {event = "itemID", func = function(thing) if thing.itemid ~= 0 then return thing.itemid else return false end end},
- {event = "uniqueID", func = function(thing) if thing.uid ~= 70000 then return thing.uid else return false end end},
- {event = "actionID", func = function(thing) if thing.aid ~= 0 then return thing.aid else return false end end},
- {event = "positionX", func = function(position) return position.x end},
- {event = "positionY", func = function(position) return position.y end},
- {event = "positionZ", func = function(position) return position.z end}
- }
- local str = ""
- for _, v in ipairs(f) do
- local t = string.find(v.event, "position") and v.func(position) or v.func(thing)
- if t then
- str = str .."".. v.event ..": ".. t .."\n"
- end
- end
- if str ~= "" then
- doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str)
- return false
- end
- --[[ Don't Touch
- if Items[Get.ID] and GA and Get.AID ~= 0 and Get.UID ~= 70000 then
- doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "" .. Items[Get.ID].Desc .."\n"..Dash.."\nItemID: ["..Get.ID.."]\nActionID: ["..Get.AID.."]\nUniqueID: ["..Get.UID.."]\nPosition: [X: "..Get.X.."] [Y: "..Get.Y.."] [Z: "..Get.Z.."]")
- return false
- end
- if Items[Get.ID] and GA and Get.AID ~= 0 then
- doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "" .. Items[Get.ID].Desc .."\n"..Dash.."\nItemID: ["..Get.ID.."]\nActionID: ["..Get.AID.."]\nPosition: [X: "..Get.X.."] [Y: "..Get.Y.."] [Z: "..Get.Z.."]")
- return false
- end
- if Items[Get.ID] and GA and Get.UID ~= 70000 then
- doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "" .. Items[Get.ID].Desc .."\n"..Dash.."\nItemID: ["..Get.ID.."]\nUniqueID: ["..Get.UID.."]\nPosition: [X: "..Get.X.."] [Y: "..Get.Y.."] [Z: "..Get.Z.."]")
- return false
- end
- if Items[Get.ID] and GA then
- doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "" .. Items[Get.ID].Desc .."\n"..Dash.."\nItemID: ["..Get.ID.."]\nPosition: [X: "..Get.X.."] [Y: "..Get.Y.."] [Z: "..Get.Z.. "]")
- return false
- end
- if Items[Get.ID] then
- doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "" .. Items[Get.ID].Desc .. "")
- return false
- end--]]
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment