local vocations = {
[0] = PLAYERSEX_FEMALE,
[1] = PLAYERSEX_FEMALE,
[2] = PLAYERSEX_MALE,
[3] = PLAYERSEX_MALE,
[4] = PLAYERSEX_MALE -- add all your vocations into this table. data/xml/vocations.xml
}
function onLogin(player)
local player_voc = player:getVocation():getId()
if vocations[player_voc] and player:getSex() ~= vocations[player_voc] then
player:setSex(vocations[player_voc])
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Your characters sex has been updated to match your vocation.")
end
return true
end