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

Death system [Loss experienc,items,skills Etc]

ugurdrahs

New Member
Joined
May 6, 2010
Messages
555
Reaction score
2
Location
Netherland
Hi,

it seems like the system with deathlostpercent is kinda bugged,

when someone die with aol or bless OR bless + Aol

He still lose his Backpack + He lose Skills & Level like he didnt buy aol...

Does anyone know what the problem is?

At talkactions--> aol.lua
PHP:
function onSay(cid, words, param)
if getPlayerMoney(cid) >= 10000 then
doPlayerRemoveMoney(cid,10000)
doPlayerAddItem(cid,2173,1)
doSendMagicEffect(getPlayerPosition(cid),12)
doPlayerSendTextMessage(cid,22,"You bought an amulet of loss.")
else
doPlayerSendCancel(cid,"You don't have enough money! You need 10000gps")
doSendMagicEffect(getPlayerPosition(cid),2)
end
return TRUE
end


Talkactions--> bless.lua
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


Creaturescript -->aol.lua
PHP:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if (getCreatureSkullType(cid) >= 4) then
	if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2138) then
		doCreatureSetDropLoot(cid, false)      
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
		doCreatureSay(cid, "Forever Aol and No Eq Loose!", TALKTYPE_ORANGE_1)
	end
	return true
	end
	return true
	end


Does someone know how to fix this problem?

repp+
 
Last edited:
Have you check in config.lua?

LUA:
deathLostPercent = 10
	blessings = true
	blessingOnlyPremium = false
	blessingReductionBase = 30
	blessingReductionDecrement = 5
	eachBlessReduction = 8
 
Back
Top