Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Player:sendAttributeModal()
- local points = self:getAttributePoints()
- local modaltext = "Available points: [" .. points .. "]\n\nAttribute Modifier Current "
- local AttributeWindow = ModalWindow(666, "Attribute points", modaltext)
- AttributeWindow:addButton(1, "Assign")
- AttributeWindow:setDefaultEnterButton(1)
- AttributeWindow:addButton(2, "Exit")
- AttributeWindow:setDefaultEscapeButton(2)
- for id, name in ipairs(ATTRIBUTE_NAMES) do
- local current = self:getAttributeLevel(id)*ATTRIBUTE_MODIFIERS[id]
- local choicetext = "[" .. name .. "]" .. (" "):rep(ATTRIBUTE_SPACING[id][1]+2) .. "[+%" .. ATTRIBUTE_MODIFIERS[id] .. "]"
- choicetext = choicetext .. (" "):rep(ATTRIBUTE_SPACING[id][2]+3) .. "[+%" .. current .. "]"
- AttributeWindow:addChoice(id, choicetext)
- end
- AttributeWindow:sendToPlayer(self)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement