• 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 players die, they don't lose blessings?

Kombosabo

New Member
Joined
Jul 30, 2009
Messages
27
Reaction score
1
Players don't lose bless when they die in my OT
What is happening? :(


Styller 0.7.5.
Protocol 8.60


I tried to fix the problem in login.lua
but the problem is somewhere else I think lol
 
or here is a bless script? :D
Lua:
-- Created using QtLuaPad on Sun Jan 8 2012
-- Written by: RuggedMage.

function onSay(cid, words, param)
    if (getPlayerStorageValue(cid, 50001) == TRUE) or (getPlayerStorageValue(cid, 50002) == TRUE) or (getPlayerStorageValue(cid, 50003) == TRUE) or (getPlayerStorageValue(cid, 50004) == TRUE) or (getPlayerStorageValue(cid, 50000) == TRUE) then
        doPlayerSendCancel(cid,'You have already got one or more blessings!')
    else
        if doPlayerRemoveMoney(cid, 50000) == TRUE then
		    doPlayerAddBless(cid, 0)
            doPlayerAddBless(cid, 1)
            doPlayerAddBless(cid, 2)
            doPlayerAddBless(cid, 3)
            doPlayerAddBless(cid, 4)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
            doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have been blessed by the gods!')
        else
            doPlayerSendCancel(cid, "You need 50k to get blessed!")
        end
    end    
    return 1
end

Im not sure if it works, but it should
 
Last edited:
or here is a bless script? :D
PHP:
-- Created using QtLuaPad on Tue Dec 6 2011
-- Written by: RuggedMage.

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 > 10000 then 
        cost = 10000 
    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,MESSAGE_EVENT_ADVANCE,"You have purchased all of the blessings.") 
                end 
            else 
                doPlayerSendCancel(cid, "You dont have enough money for all of the blessings!") 
                break 
            end 
        end 
    end 
    if fail == 5 then 
        doPlayerSendCancel(cid, "You already have all the blessings!") 
    end 
return TRUE 
end

That's not your script, please edit the credits.
 
Back
Top