• 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 !bless no Work, Item drop after dead

Jeovani

New Member
Joined
Aug 5, 2009
Messages
88
Reaction score
0
Location
Americana, SP, Brazil
when using the !bless the character shines and removes the value of the blessing, but when it dies, drop to bag

my ot version TFS 0.3.6

talkactions.xml
<talkaction words="!bless" event="script" value="bless.lua"/>


bless.lua
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 > 20000 then
cost = 20000
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), CONST_ME_MAGIC_RED)
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

Config.lua
-- Blessings
blessingsOnlyPremium = "no"
blessingReductionBase = 30
blessingReductionDecreament = 5
eachBlessReduction = 8

plss help me
 
Try this

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, 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!')
        else
            doPlayerSendCancel(cid, "You need 5 crystal coin to get blessed!")
        end
    end    
    return 1
end
 
Try This is.

you will put that in talkactions.xml
Code:
<talkaction words="!buybless;/buybless;!bless;/bless" script="bless.lua" />

and that at scripts bless.lua
Code:
-- [(  Script edited by: Al Massiva )] --
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, 120000) == TRUE then
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doSendMagicEffect(getPlayerPosition(cid), 28)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You have been blessed by the gods!')
else
doPlayerSendCancel(cid, "You need 120.000 gold coins to get blessed!")
end
end
return TRUE
end
if its worked rep me:)
 
Code:
function onSay(cid, words, param, channel)
	if getPlayerBlessing(cid, 5) == FALSE then
		if getPlayerMoney(cid) >= 50000 then
			for i = 1,5 do
				doPlayerAddBlessing(cid, i)
			end
				doPlayerRemoveMoney(cid, 50000)
				doPlayerSendTextMessage(cid, 22, "You have been blessed by the gods!")
				doSendAnimatedText(getCreaturePosition(cid), "Blessed", TEXTCOLOR_YELLOW)
			else
				doPlayerSendCancel(cid, "You need 50k to be blessed.")
				doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
			end
			else
				doPlayerSendCancel(cid, "You have already been blessed.")
				doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
			end
	return true
end
?
 
none of the above codes in the past worked, is because the char is free account?

because premium account only (vips) buy premium account on website. but config.lua is correct

-- Blessings
blessingsOnlyPremium = "no"
blessingReductionBase = 30
blessingReductionDecreament = 5
eachBlessReduction = 8

blessing to work more items drop =/


TFS 0.3.6pl1 <
 
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)) 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)
end
doCreatureSay(cid, "You are now blessed by the GOD Apsivaflines!" ,19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "You don\'t have enough money.")
end
return TRUE
end


My script, from 0.3.6pl1.
 
I discovered the problem the system of blessing, just do not know address.


Ex. All characters are free account. Even changing the config.lua only premium account is blessed.

My Server premium account = vip, has some way to fix this?
 
Back
Top