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

Blessing Bug - downgraded to level 1

Hrsha

Member
Joined
May 30, 2010
Messages
450
Reaction score
21
Location
Egypt
Hi guys

as topic say (blessing bug)
sometimes when players die they does not back to lvl one
and sometimes they back to lvl 1 idno what is wrong

-- here is my settings --

config.lua
Lua:
blessings = true
blessingOnlyPremium = false
blessingReductionBase = 0
blessingReductionDecrement = 0
eachBlessReduction = 20

login.lua
Lua:
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)

also all of loss_experience loss_mana loss_skills loss_containers loss_items
in database are 100

so what is wrong?
 
Please post your bless script from talkactions!

and set this in your database

freePremium = true

and

blessingOnlyPremium = false

then test!
 
config.lua - deathLostPercent = 10 ?

Test this blessing..

function onSay(cid, words, param)
local fail = 0

if getPlayerLevel(cid) < 31 then
cost = 2000
else
cost = ((getPlayerLevel(cid) - 30) * 200) + 2000
end

if cost > 6000 then
cost = 6000
end

for i = 1, 5 do
if getPlayerBlessing(cid, i) then
fail = fail + 1
else
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddBlessing(cid, i)
if i == 5 and not(fail == 5) then
doSendMagicEffect(getPlayerPosition(cid),14)
doPlayerSendTextMessage(cid,22,"You have purchased full bless.")
end
else
doPlayerSendCancel(cid, "You do not have enough money to buy all the blessings!")
break
end
end
end
if fail == 5 then
doPlayerSendCancel(cid, "You already have all the blessings!")
end
return TRUE
end
 
here it is

Lua:
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, 50000) == TRUE then
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)
            doPlayerAddBlessing(cid, 4)
            doPlayerAddBlessing(cid, 5)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
            doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have been blessed by the gods!')
			doPlayerSave(cid)
        else
            doPlayerSendCancel(cid, "You need 50k to get blessed!")
        end
    end    
    return 1
end
 
Are you sure you don't have another blessing script somewhere? like from an npc.
Also, have you already tested with a test char if you are using this blessing script you become lvl 1?
 
Are you sure you don't have another blessing script somewhere? like from an npc.
Also, have you already tested with a test char if you are using this blessing script you become lvl 1?

there is no other bless script or npc
i did not test by myself because it happens sometimes and sometimes not
i had 7 players downgaded to lvl 1
 
Try to test it, because I think it's not this blessing script that is causing it. If this blessing script has something to do with it, then maybe in combination with another script.
You can also try to ask the players who where downgraded to lvl 1, all the actions they did and look what kind of scripts they used with the actions.
 
PHP:
UPDATE `players` SET `loss_experience` = 100;
UPDATE `players` SET `loss_mana` = 100;
UPDATE `players` SET `loss_skills` = 100;
UPDATE `players` SET `loss_containers` = 100;
UPDATE `players` SET `loss_items` = 100;

yep, execute this in your db :3
 
using creaturescript.. defaut.. tfs.. for testing...

and use [server closed]
UPDATE `players` SET `loss_experience` = 100;
UPDATE `players` SET `loss_mana` = 100;
UPDATE `players` SET `loss_skills` = 100;
UPDATE `players` SET `loss_containers` = 100;
UPDATE `players` SET `loss_items` = 100;

and use my Blessing script .
Create other characters for test.
 
the problem was from vocation.xml

from master sorcerer , elder druid , royal paladin and elite knight
i removed this word lessloss="30" i dont know what its mean but it just solved

how i mark the topic as solved ? color green
 
I had the same problem, then i removed the "word lessloss="30" and it worked.
How the bug is there? I have NO IDEA.

Anyway, that problem is solved but you still lose exp when you die, maybe not level 1 but you lose exp.
 
i know the problem is, when some1, use bless and hes not premoted, its all fine ,, when he get promotion and he dies with bless, he get to level 1
 
Back
Top