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

Blessings are not working good?

swordman

Member
Joined
Jun 5, 2011
Messages
394
Reaction score
7
Hello,

Blessings arent working 100%.
Sometimes when a player baught all the blessings saying !bless.
He still lose his backpack sometimes chance is very small but it happend.

Bless.lua on talkactions;
PHP:
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
 
in an onPrepareDeath Event?
Lua:
for i = 1, 5 do 
        if getPlayerBlessing(cid, i) then
        doCreatureSetDropLoot(cid, false)
end

this will work i guess but aren't what u want idk, its 2 at night and im tired as SHT xD
 
@up be aware that setting the drop loot to false can bring some other problems, I used this once and it would automatically remove players corpses when dead!
It depends on the distro and version you got!
 
Back
Top