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

Custom aol get drops on death why?

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
hey my aol is getting dropt when i get killed and i lose items why?
The neckless have a auto bless and forever aol so you will never lose this neck but in the 8.5 version it works fine but in the 8.55 version it dosent work!
im using 0.4

Code:
	<item id="115" name="Donated necklace V2">
	    <attribute key="description" value="You feel a surging energyflow, it greatly improves allot!"/>
	    <attribute key="weight" value="700"/>
		<attribute key="slotType" value="necklace"/>
		<attribute key="absorbPercentAll" value="25"/>
		<attribute key="magicpoints" value="20"/>
		<attribute key="preventDrop" value="1"/>
		<attribute key="showattributes" value="1"/>
	</item>
 
Last edited:
or not i have added this to movements.xml

Code:
    <movevent event="DeEquip" itemid="115" slot="necklace" function="onDeEquipItem"/>
    <movevent event="Equip" itemid="115" slot="necklace" level="80" function="onEquipItem">
        <vocation name="Knight"/>
        <vocation name="Elite Knight" showInDescription="0"/>    
        <vocation name="Druid"/>
        <vocation name="Elder Druid" showInDescription="0"/>    
        <vocation name="Sorcerer"/>
        <vocation name="Master Sorcerer" showInDescription="0"/>    
        <vocation name="Paladin"/>
        <vocation name="Royal Paladin" showInDescription="0"/>    
    </movevent>
come on i need help and couse player is losing there items when they die how come?:S

Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if(isPlayer(cid) and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 115) then
        for i = 1, 5 do
            doPlayerAddBlessing(cid, i)
        end
        doCreatureSetDropLoot(cid, false)      
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        doCreatureSay(cid, "Forever Aol!!", TALKTYPE_ORANGE_1)
    end
    return true
end
any one?:( i need help...
 
Last edited by a moderator:
That one is stabel for me! And yes the scripts works fine... What are you failing on? maybe not added the custom item i have added:)
 
Should I put the things you have in items.xml?

Here's exactly what I have done:

creaturescripts/scripts/forever aol.lua

LUA:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if(isPlayer(cid) and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
        for i = 1, 5 do
            doPlayerAddBlessing(cid, i)
        end
        doCreatureSetDropLoot(cid, false)      
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        doCreatureSay(cid, "Forever Amulet of Loss", TALKTYPE_ORANGE_1)
    end
    return true
end

creaturescripts.xml

LUA:
<event type="preparedeath" name="onPrepareDeath" event="script" value="forever aol.lua"/>

login.lua

LUA:
registerCreatureEvent(cid, "onPrepareDeath")

movements.xml

LUA:
	<movevent type="Equip" itemid="2196" slot="necklace" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="2196" slot="necklace" event="function" value="onDeEquipItem"/>

?
 
Should I put the things you have in items.xml?

Here's exactly what I have done:

creaturescripts/scripts/forever aol.lua

LUA:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if(isPlayer(cid) and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
        for i = 1, 5 do
            doPlayerAddBlessing(cid, i)
        end
        doCreatureSetDropLoot(cid, false)      
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        doCreatureSay(cid, "Forever Amulet of Loss", TALKTYPE_ORANGE_1)
    end
    return true
end

creaturescripts.xml

LUA:
<event type="preparedeath" name="onPrepareDeath" event="script" value="forever aol.lua"/>

login.lua

LUA:
registerCreatureEvent(cid, "onPrepareDeath")

movements.xml

LUA:
	<movevent type="Equip" itemid="2196" slot="necklace" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="2196" slot="necklace" event="function" value="onDeEquipItem"/>

?
right i think it's the same!
well i works some times for my players and some time it dont...
 
Last edited:
Back
Top