• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Bless Problem

elking

Swev-v2.sytes.net Comming Soon !<>!
Joined
Aug 20, 2012
Messages
445
Reaction score
28
Location
Egypt
Hello Otland .

Lately I get some problem with bless.lua

When player make !bless and die back to level 1 ! !

Can Anyone help me ??

My Bless.lua

Code:
function onSay(cid, words, param)
    if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
        doPlayerSendCancel(cid,'You have already got one or more blessings!')
    else
        if doPlayerRemoveMoney(cid, 100000) == TRUE then
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)
            doPlayerAddBlessing(cid, 4)
            doPlayerAddBlessing(cid, 5)
            doSendMagicEffect(getPlayerPosition(cid), math.random(19,23))
            doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have been blessed!')
            doCreatureSay(cid, "!blessing", TALKTYPE_ORANGE_1)
        else
            doPlayerSendCancel(cid, "You need 10 crystal coin to get blessed!")
        end
    end 
    return 1
end

and talkaction.xml
Code:
    <talkaction words="!bless" event="script" value="blessingz.lua"/>
 
This is my bless script and it works, should work for you

Code:
local cfg = {
    bless = { 1, 2, 3, 4, 5 },
    cost = 50000
}

function onSay(cid, words, param, channel)
    for i = 1, table.maxn(cfg.bless) do
        if(getPlayerBlessing(cid, cfg.bless[i])) then
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
            doCreatureSay(cid, "You have already been blessed.", TALKTYPE_ORANGE_1)
            return true
        end
    end
    if (getPlayerMoney(cid) < cfg.cost) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_WHITE)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money.")
    elseif(doPlayerRemoveMoney(cid, cfg.cost) == TRUE) then
        for i = 1, table.maxn(cfg.bless) do
            doPlayerAddBlessing(cid, cfg.bless[i])
        end
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        doSendAnimatedText(getCreaturePosition(cid), "BLESSED!", TEXTCOLOR_RED)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been blessed by the gods.")
    end
    return true
end
 
This is my bless script and it works, should work for you

Code:
local cfg = {
    bless = { 1, 2, 3, 4, 5 },
    cost = 50000
}

function onSay(cid, words, param, channel)
    for i = 1, table.maxn(cfg.bless) do
        if(getPlayerBlessing(cid, cfg.bless[i])) then
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
            doCreatureSay(cid, "You have already been blessed.", TALKTYPE_ORANGE_1)
            return true
        end
    end
    if (getPlayerMoney(cid) < cfg.cost) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_WHITE)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money.")
    elseif(doPlayerRemoveMoney(cid, cfg.cost) == TRUE) then
        for i = 1, table.maxn(cfg.bless) do
            doPlayerAddBlessing(cid, cfg.bless[i])
        end
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        doSendAnimatedText(getCreaturePosition(cid), "BLESSED!", TEXTCOLOR_RED)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been blessed by the gods.")
    end
    return true
end
Didn't Work :(
 
It can bee that your lossrate on death is to low or high try to set it rate:8 in config
Code:
-- The Subwat Server Config

    -- Account manager
    accountManager = true
    namelockManager = false
    newPlayerChooseVoc = true
    newPlayerSpawnPosX = 1000 
    newPlayerSpawnPosY = 999
    newPlayerSpawnPosZ = 7
    newPlayerTownId = 1
    newPlayerLevel = 20
    newPlayerMagicLevel = 4
    generateAccountNumber = false


    -- Unjustified kills
    redSkullLength = 100 * 24 * 60 * 60
    blackSkullLength = 150 * 24 * 60 * 60
    dailyFragsToRedSkull = 20
    weeklyFragsToRedSkull = 10000
    monthlyFragsToRedSkull = 10000
    dailyFragsToBlackSkull = dailyFragsToRedSkull
    weeklyFragsToBlackSkull = weeklyFragsToRedSkull
    monthlyFragsToBlackSkull = monthlyFragsToRedSkull
    dailyFragsToBanishment = dailyFragsToRedSkull
    weeklyFragsToBanishment = weeklyFragsToRedSkull
    monthlyFragsToBanishment = monthlyFragsToRedSkull
    blackSkulledDeathHealth = 40
    blackSkulledDeathMana = 0
    useBlackSkull = true
    useFragHandler = true
    advancedFragList = false

    -- Banishments
    notationsToBan = 3
    warningsToFinalBan = 4
    warningsToDeletion = 5
    banLength = 7 * 24 * 60 * 60
    killsBanLength = 7 * 24 * 60 * 60
    finalBanLength = 30 * 24 * 60 * 60
    ipBanishmentLength = 1 * 24 * 60 * 60
    broadcastBanishments = true
    maxViolationCommentSize = 200
    violationNameReportActionType = 2
    autoBanishUnknownBytes = false

    -- Battle
    worldType = "pvp"
    protectionLevel = 80
    pvpTileIgnoreLevelAndVocationProtection = true
    pzLocked = 60 * 1000
    huntingDuration = 60 * 1000
    criticalHitChance = 7
    criticalHitMultiplier = 1
    displayCriticalHitNotify = false
    removeWeaponAmmunition = false
    removeWeaponCharges = false
    removeRuneCharges = false
    whiteSkullTime = 5 * 60 * 1000
    noDamageToSameLookfeet = false
    showHealingDamage = true
    showHealingDamageForMonsters = true
    fieldOwnershipDuration = 5 * 1000
    stopAttackingAtExit = true
    oldConditionAccuracy = false
    loginProtectionPeriod = 10 * 1000
    deathLostPercent = 10
    stairhopDelay = 0
    pushCreatureDelay = 1500
    deathContainerId = 1987
    gainExperienceColor = 215
    addManaSpentInPvPZone = true
    squareColor = 0
    allowFightback = true

    -- Connection config
    worldId = 0
    ip = "127.0.0.1"
    bindOnlyConfiguredIpAddress = false
    loginPort = 7171
    gamePort = 7172
    adminPort = 7171
    statusPort = 7171
    loginTries = 15
    retryTimeout = 5 * 1000
    loginTimeout = 60 * 1000
    maxPlayers = 1000
    motd = "Welcome  "
    displayOnOrOffAtCharlist = true
    onePlayerOnlinePerAccount = false
    allowClones = true
    serverName = "Swev-v2 "
    loginMessage = "Welcome "
    statusTimeout = 5 * 60 * 1000
    replaceKickOnLogin = false
    forceSlowConnectionsToDisconnect = false
    loginOnlyWithLoginServer = false
    premiumPlayerSkipWaitList = false

 
    -- Database
    sqlType = "sqlite"
    sqlHost = "localhost"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = ""
    sqlDatabase = "theforgottenserver"
    sqlFile = "Realserver.s3db"
    sqlKeepAlive = 0
    mysqlReadTimeout = 10
    mysqlWriteTimeout = 10
    encryptionType = "plain"

    -- Deathlist
    deathListEnabled = true
    deathListRequiredTime = 1 * 60 * 1000
    deathAssistCount = 19
    maxDeathRecords = 5

    -- Guilds
    ingameGuildManagement = true
    levelToFormGuild = 100
    premiumDaysToFormGuild = 0
    guildNameMinLength = 4
    guildNameMaxLength = 20

    -- Highscores
    highscoreDisplayPlayers = 15
    updateHighscoresAfterMinutes = 60

    -- Houses
    buyableAndSellableHouses = true
    houseNeedPremium = false
    bedsRequirePremium = false
    levelToBuyHouse = 100
    housesPerAccount = 9999
    houseRentAsPrice = false
    housePriceAsRent = false
    housePriceEachSquare = 1000
    houseRentPeriod = "never"
    houseCleanOld = 0
    guildHalls = false

    -- Item usage
    timeBetweenActions = 200
    timeBetweenExActions = 1000
    hotkeyAimbotEnabled = true
 
        -- Map
    mapName = "theend"
    mapAuthor = "theend"
    randomizeTiles = true
    storeTrash = true
    cleanProtectedZones = true
    mailboxDisabledTowns = "-1"

    -- Startup
    defaultPriority = "high"
    niceLevel = 5
    coresUsed = "-1"
    optimizeDatabaseAtStartup = true
    removePremiumOnInit = true
    confirmOutdatedVersion = false

    -- Muted buffer
    bufferMutedOnSpellFailure = false
    spellNameInsteadOfWords = false
    emoteSpells = true
    allowChangeOutfit = true
    allowChangeColors = true
    allowChangeAddons = true
    disableOutfitsForPrivilegedPlayers = false
    addonsOnlyPremium = true


    -- Miscellaneous
    dataDirectory = "data/"
    bankSystem = true
    displaySkillLevelOnAdvance = false
    promptExceptionTracerErrorBox = true
    separateViplistPerCharacter = false
    maximumDoorLevel = 500
    maxMessageBuffer = 20
    saveGlobalStorage = true
    useHouseDataStorage = false
    storePlayerDirection = false
    checkCorpseOwner = true
    monsterLootMessage = 3
    monsterLootMessageType = 25
 

    -- Ghost mode
    ghostModeInvisibleEffect = false
    ghostModeSpellEffects = true

    -- Limits
    idleWarningTime = 14 * 60 * 1000
    idleKickTime = 15 * 60 * 1000
    expireReportsAfterReads = 1
    playerQueryDeepness = 2
    maxItemsPerPZTile = 0
    maxItemsPerHouseTile = 0

    -- Premium-related
    freePremium = true
    premiumForPromotion = true

    -- Blessings
    blessingOnlyPremium = false
    blessingReductionBase = 30
    blessingReductionDecreament = 5
    eachBlessReduction = 20

    -- Rates
    experienceStages = true
    rateExperience = 5.0
    rateExperienceFromPlayers = 0
    rateSkill = 50.0
    rateMagic = 30.0
    rateLoot = 4.0
    rateSpawn = 5

    -- Monster rates
    rateMonsterHealth = 1.0
    rateMonsterMana = 1.0
    rateMonsterAttack = 1.0
    rateMonsterDefense = 1.0


    -- Experience from players
 
    minLevelThresholdForKilledPlayer = 0.9
    maxLevelThresholdForKilledPlayer = 1.1

    -- Stamina
    rateStaminaLoss = 1
    rateStaminaGain = 3
    rateStaminaThresholdGain = 12
    staminaRatingLimitTop = 41 * 60
    staminaRatingLimitBottom = 14 * 60
    rateStaminaAboveNormal = 1.5
    rateStaminaUnderNormal = 0.5
    staminaThresholdOnlyPremium = true

    -- Party
    experienceShareRadiusX = 30
    experienceShareRadiusY = 30
    experienceShareRadiusZ = 1
    experienceShareLevelDifference = 2 / 3
    extraPartyExperienceLimit = 20
    extraPartyExperiencePercent = 5
    experienceShareActivity = 2 * 6 * 1000

    -- Global save
    globalSaveEnabled = false
    globalSaveHour = 8
    shutdownAtGlobalSave = true
    cleanMapAtGlobalSave = false

    -- Spawns
    deSpawnRange = 2
    deSpawnRadius = 50

    -- Summons
    maxPlayerSummons = 3
    teleportAllSummons = false

    -- Status
    ownerName = "Mohamed emara"
    ownerEmail = "[email protected]"
    url = "www.facebook.com"
    location = "Egypt"
    displayGamemastersWithOnlineCommand = false

    -- Logs
    -- NOTE: This kind of logging does not work in GUI version.
    -- For such, please compile the software with __GUI_LOGS__ flag.
    adminLogsEnabled = false
    displayPlayersLogging = true
    prefixChannelLogs = ""
    runFile = ""
    outLogName = ""
    errorLogName = ""
    truncateLogsOnStartup = false

this my config i can't find which you mean
 
-- Battle
worldType = "pvp"
protectionLevel = 80
pvpTileIgnoreLevelAndVocationProtection = true
pzLocked = 60 * 1000
huntingDuration = 60 * 1000
criticalHitChance = 7
criticalHitMultiplier = 1
displayCriticalHitNotify = false
removeWeaponAmmunition = false
removeWeaponCharges = false
removeRuneCharges = false
whiteSkullTime = 5 * 60 * 1000
noDamageToSameLookfeet = false
showHealingDamage = true
showHealingDamageForMonsters = true
fieldOwnershipDuration = 5 * 1000
stopAttackingAtExit = true
oldConditionAccuracy = false
loginProtectionPeriod = 10 * 1000
deathLostPercent = 10
 
I noticed if character had used super promotion before and died back level 1

but without super promotion no back level 1

i hope see this my vocation.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
    <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="10" gainmanaticks="6" gainmanaamount="10" manamultiplier="4.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="2.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.5"/>
        <skill id="1" multiplier="2.0"/>
        <skill id="2" multiplier="2.0"/>
        <skill id="3" multiplier="2.0"/>
        <skill id="4" multiplier="2.0"/>
        <skill id="5" multiplier="1.5"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
    <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="1" gainhpamount="5" gainmanaticks="1" gainmanaamount="13" manamultiplier="1.1" attackspeed="1850" soulmax="100" gainsoulticks="120" fromvoc="1">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.5"/>
        <skill id="1" multiplier="2.0"/>
        <skill id="2" multiplier="2.0"/>
        <skill id="3" multiplier="2.0"/>
        <skill id="4" multiplier="2.0"/>
        <skill id="5" multiplier="1.5"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
    <vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="1" gainhpamount="5" gainmanaticks="1" gainmanaamount="13" manamultiplier="1.1" attackspeed="1850" soulmax="100" gainsoulticks="120" fromvoc="2">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.5"/>
        <skill id="1" multiplier="1.8"/>
        <skill id="2" multiplier="1.8"/>
        <skill id="3" multiplier="1.8"/>
        <skill id="4" multiplier="1.8"/>
        <skill id="5" multiplier="1.5"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
    <vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="1" gainhpamount="11" gainmanaticks="1" gainmanaamount="10" manamultiplier="1.4" attackspeed="1750" soulmax="100" gainsoulticks="120" fromvoc="3">
        <formula meleeDamage="1.0" distDamage="1.2" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.2"/>
        <skill id="1" multiplier="1.2"/>
        <skill id="2" multiplier="1.2"/>
        <skill id="3" multiplier="1.2"/>
        <skill id="4" multiplier="1.1"/>
        <skill id="5" multiplier="1.1"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
    <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="1" gainhpamount="16" gainmanaticks="1" gainmanaamount="8" manamultiplier="3.0" attackspeed="1800" soulmax="100" gainsoulticks="120" fromvoc="4">
        <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.1"/>
        <skill id="1" multiplier="1.1"/>
        <skill id="2" multiplier="1.1"/>
        <skill id="3" multiplier="1.1"/>
        <skill id="4" multiplier="1.4"/>
        <skill id="5" multiplier="1.1"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
    <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="1" gainhpamount="13" gainmanaticks="1" gainmanaamount="25" manamultiplier="1.1" attackspeed="1850" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.5"/>
        <skill id="1" multiplier="2.0"/>
        <skill id="2" multiplier="2.0"/>
        <skill id="3" multiplier="2.0"/>
        <skill id="4" multiplier="2.0"/>
        <skill id="5" multiplier="1.5"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
    <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="1" gainhpamount="13" gainmanaticks="1" gainmanaamount="25" manamultiplier="1.1" attackspeed="1850" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.5"/>
        <skill id="1" multiplier="1.8"/>
        <skill id="2" multiplier="1.8"/>
        <skill id="3" multiplier="1.8"/>
        <skill id="4" multiplier="1.8"/>
        <skill id="5" multiplier="1.5"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
    <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="1" gainhpamount="25" gainmanaticks="1" gainmanaamount="16" manamultiplier="1.4" attackspeed="1750" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.2" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.2"/>
        <skill id="1" multiplier="1.2"/>
        <skill id="2" multiplier="1.2"/>
        <skill id="3" multiplier="1.2"/>
        <skill id="4" multiplier="1.1"/>
        <skill id="5" multiplier="1.1"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
    <vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="60" gainmanaticks="3" gainmanaamount="50" manamultiplier="3.0" attackspeed="1800" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
        <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.1"/>
        <skill id="1" multiplier="1.1"/>
        <skill id="2" multiplier="1.1"/>
        <skill id="3" multiplier="1.1"/>
        <skill id="4" multiplier="1.4"/>
        <skill id="5" multiplier="1.1"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
        <!-- DUDE, DON'T DELETE THIS, IT BUGGED WHEN I DID IT-->
    <vocation id="9" name="Skyer Mage" description="a Skyer Mage" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="25" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="1900" soulmax="299" gainsoulticks="15" fromvoc="5" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.3" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.5"/>
        <skill id="1" multiplier="2.0"/>
        <skill id="2" multiplier="2.0"/>
        <skill id="3" multiplier="2.0"/>
        <skill id="4" multiplier="2.0"/>
        <skill id="5" multiplier="1.5"/>
        <skill id="6" multiplier="1.1"/>
        </vocation>
    <vocation id="10" name="Bloody Priest" description="an Bloody Priest" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="3" gainhpamount="25" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="1900" soulmax="299" gainsoulticks="15" fromvoc="6" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.3" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.5"/>
        <skill id="1" multiplier="1.8"/>
        <skill id="2" multiplier="1.8"/>
        <skill id="3" multiplier="1.8"/>
        <skill id="4" multiplier="1.8"/>
        <skill id="5" multiplier="1.5"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
    <vocation id="11" name="Ninja" description="a Ninja" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="30" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.4" attackspeed="1750" soulmax="299" gainsoulticks="15" fromvoc="7" lessloss="30">
        <formula meleeDamage="1.0" distDamage="1.5" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.1" armor="1.0"/>
        <skill id="0" multiplier="1.2"/>
        <skill id="1" multiplier="1.2"/>
        <skill id="2" multiplier="1.2"/>
        <skill id="3" multiplier="1.2"/>
        <skill id="4" multiplier="1.1"/>
        <skill id="5" multiplier="1.1"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
    <vocation id="12" name="Hellborn" description="an Hellborn" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="40" gainmanaticks="3" gainmanaamount="30" manamultiplier="3.0" attackspeed="1800" soulmax="299" gainsoulticks="15" fromvoc="8" lessloss="30">
        <formula meleeDamage="1.4" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.2" armor="1.0"/>
        <skill id="0" multiplier="1.1"/>
        <skill id="1" multiplier="1.1"/>
        <skill id="2" multiplier="1.1"/>
        <skill id="3" multiplier="1.1"/>
        <skill id="4" multiplier="1.4"/>
        <skill id="5" multiplier="1.1"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
</vocations>
 
and this promotion.lua

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local a = getPlayerPromotionLevel(cid)
    if a == 1 then
        doPlayerSendCancel(cid, 'You need to be promoted in order to use this item.')
    elseif a == 3 then
        doPlayerSendCancel(cid, 'Your\'re already promoted!')
    else
        doPlayerSetPromotionLevel(cid, 2)
        doCreatureSay(cid, 'You are now ' .. getVocationInfo(getPlayerVocation(cid)).description .. '!', TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid)
    end
    return true
end

and action.xml
Code:
        <action itemid="2110" script="Promotion.lua" />
 
if u still have the same problem maybe change this
-- Blessings
blessingOnlyPremium = false
blessingReductionBase = 30
blessingReductionDecreament = 5
eachBlessReduction = 20

to this

-- Blessings
blessingOnlyPremium = false
blessingReductionBase = 30
blessingReductionDecreament = 5
eachBlessReduction = 8

i had same problem im tryin to make it so when u have all blessings u dont lose any lvls atm im losing 1lvl at low lvl n high lvl lose 1-3 lvl depending on lvl(high lvl)
 
FOund it, it's in your vocations.xml When you get promoted you get another boost of "lessloss" which will add to under the accepted value. you need to remove:

<vocation id="12" name="Hellborn" description="an Hellborn" needpremium="1" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="40" gainmanaticks="3" gainmanaamount="30" manamultiplier="3.0" attackspeed="1800" soulmax="299" gainsoulticks="15" fromvoc="8" lessloss="30">
<formula meleeDamage="1.4" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.2" armor="1.0"/>

for each super vocation.
I may be wrong, it may not add the lessloss but just replace. But it's worth a try

remember in config should look like:
deathLostPercent = 10
 
Back
Top