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

100% bless

Scooty

Enemia.EU
Joined
Jul 24, 2010
Messages
564
Reaction score
14
Location
Kraków
Hi, on my server players with all 5 blessings sometimes dropping items after death.

Is it possible to do blessings with 100% chance to save all player items after death?

Thanks for help.
 
script name.lua
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == true then
for a = 1,5 do
if getPlayerBlessing(cid, a) then
doCreatureSetDropLoot(cid, false)
return true
end
end
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
end
return TRUE
end

creaturescript.xml
Code:
<event type="preparedeath" name="BlessDrop" event="script" value="script name.lua"/>

login.lua add:
Code:
registerCreatureEvent(cid, "BlessDrop")
 
Apapapapaapap, stoppp!

Lua:
doCreatureSetDropLoot(cid, false)
Means that the player will have 0 droploot chance even if he haven't got bless after using this first time.

You could do:
put this in login.lua
Lua:
	for i = 1,5 do
		if(getPlayerBlessing(cid, i)) then
			doCreatureSetDropLoot(cid, false)
		else
			doCreatureSetDropLoot(cid, true)
		end
	end
 
http://otland.net/f81/basic-talkactions-very-useful-132989/
Blessings
Perfect script no more complain of players.
Lua:
<talkaction words="!buybless;/buybless;!bless;/bless" script="bless.lua" />
Lua:
-- [( Made by LucasOlzon from otland.net )] --
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
doCreatureSay(cid, "You do not have enough money to buy all the blessings or cap/slot to get the rest of money!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
				break
			end
		end
	end
	if fail == 5 then
		doPlayerSendCancel(cid, "You already have all the blessings!")
	end
return TRUE
end

Config.lua
Lua:
deathLostPercent = 10
 
Back
Top