• 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!

When full blessed and dead -> level 1

Tony32

Veteran OT User
Joined
Jun 6, 2008
Messages
1,261
Reaction score
349
Well, I got a critical problem with my server. It runs on the latest TFS.

When a player dies with blessings he sometimes goes back to level 1. This is the settings:

Code:
	-- Blessings
	blessingOnlyPremium = true
	blessingReductionBase = 30
	blessingReductionDecreament = 5
	eachBlessReduction = 8

This is truly critical!

p.s Using MySql
 
not sure of the problem

:huh: not sure how to fix prob man but this seems to be working very well if you want to try it out:p



Code:
function onSay(cid, words, param)
    for i = 1,5 do
		if(getPlayerBlessing(cid, i)) then
			doPlayerSendCancel(cid, "You already have all of the blessings.")
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
			return true
		end
	end

    if doPlayerRemoveMoney(cid, 50000) == TRUE then
        for i = 1,5 do
            doPlayerAddBlessing(cid, i)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have pruchased all the blessings!")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
        end
    else
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    end
    return TRUE
end
:peace:
 
:huh: not sure how to fix prob man but this seems to be working very well if you want to try it out:p



Code:
function onSay(cid, words, param)
    for i = 1,5 do
		if(getPlayerBlessing(cid, i)) then
			doPlayerSendCancel(cid, "You already have all of the blessings.")
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
			return true
		end
	end

    if doPlayerRemoveMoney(cid, 50000) == TRUE then
        for i = 1,5 do
            doPlayerAddBlessing(cid, i)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have pruchased all the blessings!")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
        end
    else
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    end
    return TRUE
end
:peace:

I will test that one right now, thank you very much. I will report back withing a minute!

And btw, when a player is blessed, then in the database it says the player got blessings value 31.
 
Last edited:
Tested the script now. The talkaction works, but I still die to level 1 when dying. Anyone got an idéa what's causing this? Maybe the loss_experience, loss_mana , loss_skills , loss_containers, loss_itemssettings in MySQL? Anyone got the default values for it? Thanks!
 
Back
Top