Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Set variables:
- creature:GetData().escorted = true
- Check variables:
- if(creature:GetData().escorted) then
- print("Has been escorted")
- end
- Remove variables (on death, logout etc)
- creature:RemoveData()
- ]]
- local T = {}
- function Object:GetData(instance)
- if(instance and not self:GetInstanceId()) then
- error("instance is true and object is not worldobject", 2)
- end
- local ID = instance and -self:GetInstanceId() or self:GetGUID()
- if(not T[ID]) then
- T[ID] = {}
- end
- return T[ID]
- end
- function Object:RemoveData(instance)
- if(instance and not self:GetInstanceId()) then
- error("instance is true and object is not worldobject", 2)
- end
- local ID = instance and -self:GetInstanceId() or self:GetGUID()
- T[ID] = nil
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement