Your browser does not support JavaScript or its disabled!
Please turn it on, or be aware that some features on this website will not work correctly.
349
Suggestions
BotServer Node.js | 19/09/24 | 364
Warning replace | 18/08/24 | 208
CaveBot Mana Delay | 08/06/24 | 1K
CaveBot/TargetBot Hotkey | 01/02/24 | 1.1K
UI Container Drag Drop | 04/11/22 | 3.6K
BotServer Updates | 11/03/24 | 1.5K
Vocation Selector #119

Until Oxygen server allows you to player:getVocation() this will allow you to select your vocation and then use it in your scripts.

813b | 35 lines.
--[[
  Script made by Lee (Discord: l33_) - www.trainorcreations.com
  If you want to support my work, feel free to donate at https://trainorcreations.com/donate
  PS. Stop ripping off my work and selling it as your own.
]]--
if not storage.vocation then
    storage.vocation = 1
end

local vocSelector = setupUI([[
Panel
  height: 150
  layout:
    type: verticalBox
    fit-children: true
  Label
    text: Vocation
    text-align: center
    margin-top: 6
  ComboBox
    id: playerVoc
    height: 20
    margin: 3
    @onSetup: |
      self:addOption("Sorcerer", 1)
      self:addOption("Druid", 2)
      self:addOption("Paladin", 3)
      self:addOption("Knight", 4)
]])

vocSelector.playerVoc:setCurrentIndex(storage.vocation)
vocSelector.playerVoc.onOptionChange = function(widget)
    storage.vocation = widget:getCurrentOption().data
end

 -- To use call storage.vocation in your scripts.
 -- EG:
 -- if storage.vocation == 1 then -- Sorcerer
 -- elseif storage.vocation == 2 then -- Druid
 -- end

22 Jun 2024
Ads