Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Structure of the player profile
- local PlayerProfile = {
- -- General information
- id = "", -- Unique id of the player
- title = "",
- firstName = "",
- lastName = "",
- race = "",
- class = "",
- -- Physical attributes
- height = "",
- bodyType = "",
- sex = "",
- -- Custom sections
- about = "",
- kinks = "",
- -- Profile picture
- picture = "",
- -- Options
- options = {
- showProfile = true, -- If false, the profile won't be visible to other players
- showPicture = true, -- If false, the picture won't be visible to other players
- showKinks = false, -- If false, the kinks section won't be visible to other players
- }
- }
- -- Function to create a new profile
- function NewProfile(id, title, firstName, lastName, race, class, height, bodyType, sex, about, kinks, picture, options)
- local profile = PlayerProfile
- profile.id = id
- profile.title = title
- profile.firstName = firstName
- profile.lastName = lastName
- profile.race = race
- profile.class = class
- profile.height = height
- profile.bodyType = bodyType
- profile.sex = sex
- profile.about = about
- profile.kinks = kinks
- profile.picture = picture
- profile.options = options
- return profile
- end
- -- Function to edit an existing profile
- function EditProfile(profile, field, newValue)
- if profile[field] then
- profile[field] = newValue
- end
- end
- -- Function to view a profile
- function ViewProfile(profile)
- -- Here you would implement the code to view the profile based on its data and options
- end
- -- Function to change profile options
- function ChangeProfileOptions(profile, option, newValue)
- if profile.options[option] then
- profile.options[option] = newValue
- end
- end
- -- Structure of the database
- local PlayerDatabase = {}
- -- Function to add a profile to the database
- function AddProfileToDatabase(profile)
- PlayerDatabase[profile.id] = profile
- end
- -- Function to remove a profile from the database
- function RemoveProfileFromDatabase(id)
- PlayerDatabase[id] = nil
- end
- -- Function to search profiles in the database
- function SearchProfiles(query)
- local results = {}
- for id, profile in pairs(PlayerDatabase) do
- if string.match(profile.firstName, query) or string.match(profile.lastName, query) then
- table.insert(results, profile)
- end
- end
- return results
- end
- -- Function to view a profile based on the id
- function ViewProfile(id)
- local profile = PlayerDatabase[id]
- if profile and profile.options.showProfile then
- -- Here you would implement the code to view the profile based on its data and options
- end
- end
- -- Function to edit the 'About' section of a profile
- function EditAboutSection(profile, newAboutText)
- profile.about = newAboutText
- end
- -- Function to edit the 'Kinks' section of a profile
- function EditKinksSection(profile, newKinksText)
- profile.kinks = newKinksText
- end
- -- Function to change visibility of the 'About' section
- function ChangeAboutVisibility(profile, visibility)
- profile.options.showAbout = visibility
- end
- -- Function to change visibility of the 'Kinks' section
- function ChangeKinksVisibility(profile, visibility)
- profile.options.showKinks = visibility
- end
- -- Function to view the 'About' section of a profile
- function ViewAboutSection(id)
- local profile = PlayerDatabase[id]
- if profile and profile.options.showAbout then
- -- Display the 'About' section of the profile
- return profile.about
- else
- -- Return a message indicating that the 'About' section is not visible
- return "This section is not visible."
- end
- end
- -- Function to view the 'Kinks' section of a profile
- function ViewKinksSection(id)
- local profile = PlayerDatabase[id]
- if profile and profile.options.showKinks then
- -- Display the 'Kinks' section of the profile
- return profile.kinks
- else
- -- Return a message indicating that the 'Kinks' section is not visible
- return "This section is not visible."
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement