• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Aol problem

ameer

New Member
Joined
Dec 31, 2010
Messages
83
Reaction score
0
Why my char loose all items when wearing aol. and aol doesnt dissapear why. please take a look someone.


<item id="2173" article="an" name="amulet of loss">
<attribute key="weight" value="420" />
<attribute key="slotType" value="necklace" />
<attribute key="charges" value="1" />
<attribute key="preventDrop" value="1" />
</item>




function onDeath(cid, corpse, deathList)

local strings = {""}
local t, position = 1, 1

local deathType = "killed"
local toSlain, toCrushed, toEliminated = 3, 9, 15

if #deathList >= toSlain and #deathList < toCrushed then
deathType = "slain"
elseif #deathList >= toCrushed and #deathList < toEliminated then
deathType = "crushed"
elseif #deathList >= toEliminated then
deathType = "eliminated"
end

for _, pid in ipairs(deathList) do
if isCreature(pid) == true then
strings[position] = t == 1 and "" or strings[position] .. ", "
strings[position] = strings[position] .. getCreatureName(pid) .. ""
t = t + 1
else
strings[position] = t == 1 and "" or strings[position] .. ", "
strings[position] = strings[position] .."a field item"
t = t + 1
end
end

if getPlayerSlotItem(cid, 2).itemid == 2173 then
doPlayerRemoveItem(cid, 2173, 1)
end

for i, str in ipairs(strings) do
if(str:sub(str:len()) ~= ",") then
str = str .. "."
end

msg = getCreatureName(cid) .. " was " .. deathType .. " at level " .. getPlayerLevel(cid) .. " by " .. str
end

for _, oid in ipairs(getPlayersOnline()) do
doPlayerSendChannelMessage(oid, "Death channel", msg, TALKTYPE_CHANNEL_O, CHANNEL_DEATH)
end
return true
end
 
Try this one:

Code:
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
 
i imported this codes to sql in database
UPDATE `players` SET `loss_items` = 0;
UPDATE `players` SET `loss_containers` = 0;


and now i am not loosing anything even if i am not wearing aol ..:/
 
I dont know but i want my server enforced.
when i put pvp the player gets buged when a monster kills him he dont die.
 
Back
Top