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

Bless

GOD Wille

Excellent OT User
Joined
Jan 11, 2010
Messages
2,826
Solutions
2
Reaction score
815
Location
Sweden
Any1 got a script for bless , when making !bless u loose only 2 lvls each death.
 
losing your amount of experience during death depends on your level, I can give you bless script that I use:
LUA:
 local bless = {1, 2, 3, 4, 5}
local cost = 50000
function onSay(cid, words, param)
    for i = 1, table.maxn(bless) do
        if(getPlayerBlessing(cid, bless[i])) then
            doPlayerSendCancel(cid, "You have already all blessings.")
            return TRUE
        end
    end

    if(doPlayerRemoveMoney(cid, cost) == TRUE) then
        for i = 1, table.maxn(bless) do
            doPlayerAddBlessing(cid, bless[i])
        end
        doCreatureSay(cid, "You are now blessed!" ,19)
        doSendMagicEffect(getPlayerPosition(cid), 49)
    else
        doPlayerSendCancel(cid, "You don\'t have enough money.")
    end
    return TRUE
end
 
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless)) then
doPlayerSendCancel(cid, "You have already all blessings.")
return TRUE
end


could someone explain me why it says u have already all blessings ...if maybe the guy just have 1? doesnt the for check one by one?....
 
how to change this to that you dont loose lvls when blessing

blessingsOnlyPremium = "yes"
blessingReductionBase = 30
blessingReductionDecreament = 5
eachBlessReduction = 8
 
Back
Top