• 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 doesn't Work 0-4 Rev.

Status
Not open for further replies.

Ns Sparkz

Just a Normal Ns King
Joined
Mar 6, 2011
Messages
466
Reaction score
25
Location
Egypt
local bless = {1, 2, 3, 4, 5}
local cost = 50000 -- Cost in gp.

function onSay(cid, words, param)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless)) then
doPlayerSendCancel(cid, "You already have all blessings.")
return TRUE
end
end

if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless)
end
doPlayerSendTextMessage(cid,24, "You have bought all blessings.")
doSendMagicEffect(getPlayerPosition(cid), 28)
else
doPlayerSendCancel(cid, "You don't have enough money.")
end
return TRUE
end

players loose 3 levels when they die.


It's a 8.6 ot.
 
Last edited:
try this one

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, 20000) == 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!')
                else
                        doPlayerSendCancel(cid, "You need 20k to get blessed!")
                end
        end
return TRUE
end

and check deathLostPercent in your config.lua
 
plix

Lua:
	blessings = true
	blessingOnlyPremium = true
	blessingReductionBase = 30
	blessingReductionDecrement = 5
	eachBlessReduction = 8

Try to figure out where that one is
 
plix

Lua:
	blessings = true
	blessingOnlyPremium = true
	blessingReductionBase = 30
	blessingReductionDecrement = 5
	eachBlessReduction = 8

Try to figure out where that one is
Checked that already!
Someone help please
 
Last edited:
Use this in CREATURESCRIPT >
Lua:
function onDeath(cid, corpse, deathList)
function HaveBless(cid)
for i = 1,5 do
if getPlayerBlessing(cid, i) then
return true
end
end
return false
end
if isPlayer(cid) and HaveBless(cid) and getPlayerSkullType(cid) < SKULL_RED then
doCreatureSetDropLoot(cid, false)
end
return true
end
 
I don't know whats the problem, i had 4.0 9.60 , it was working, updated to 9.70 and blessings wasnt working no more, but can't find 4.0 9.60 anymore lol, compiling well i suck at it always gets errors
 
Rev0_4 i forgot what trunk was it, But the only Script i can't get around is bless, and everyonee is complaining because they loose 3+ lvls.
it's a 8.6 ot.
 
Status
Not open for further replies.
Back
Top