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

Blessing BUG! HELP

Nofus

New Member
Joined
Jul 16, 2009
Messages
415
Reaction score
1
Hi, on my server when I buy a blessing. Then i die, My char turns to level 1. But the skills are still the same. Help please. Why do i turn level 1 when i die with bless?
 
XML:
<talkaction words="!bless" event="script" value="bless.lua"/>


bless.lua
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_HOLYDAMAGE)
				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
 
Thx, but are you sure this will work ? Some ppl says that I have to run:
LUA:
 UPDATE players SET loss_experience = 100, loss_mana = 100, loss_skills = 100, loss_containers = 100
in my database to fix it but it diddn't work ):

I will test your script, thx anyway :D
 
Back
Top