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

Lua Aol with rs protect Need help with my script! Players without the aol 0hp...

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
Hey now i got my rs forevel aol to work but players without the aol they get when you kill them 0hp and dosent die!
using 0.4 dev!

my script:

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)
		doCreatureSetDropLoot(cid, false)      
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
		doCreatureSay(cid, "Forever Aol I WILL NOT DIE!!!", TALKTYPE_ORANGE_1)
	end
	return true
    end
end
 
Last edited:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Red Skull Amulet" version="1.0" author="--" contact="--" enabled="yes">
        <description><![CDATA[
                This Is Will Protect Your Items Even If You Have Red Skull.
        ]]></description>

        <item id="2196" article="a" name="Red Skull Amulet" override="yes"/>

        <event type="login" name="RedSkullAmulet_Login" event="buffer"><![CDATA[
                registerCreatureEvent(cid, "RedSkullAmulet_Login")
        ]]></event>

        <event type="death" name="RedSkullAmulet_Login" event="script"><![CDATA[
                function onDeath(cid, corpse, deathList)
                        if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
                                if (getCreatureSkullType(cid) == SKULL_RED) then
                                        doCreatureSetDropLoot(cid, false)
                                end
                        end
                        return true
                end


Repp++ Thanks ^_^
 
1, Its not his script I think..
2, just add the thing u had.

Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Red Skull Amulet" version="1.0" author="--" contact="--" enabled="yes">
        <description><![CDATA[
                This Is Will Protect Your Items Even If You Have Red Skull.
        ]]></description>
        <item id="2196" article="a" name="Red Skull Amulet" override="yes"/>
        <event type="login" name="RedSkullAmulet_Login" event="buffer"><![CDATA[
                registerCreatureEvent(cid, "RedSkullAmulet_Login")
        ]]></event>
        <event type="death" name="RedSkullAmulet_Login" event="script"><![CDATA[
                function onDeath(cid, corpse, deathList)
                        if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
                                if (getCreatureSkullType(cid) == SKULL_RED) then
			for blessings = 1,5 do
                   	return	doCreatureSetDropLoot(cid, false) and doCreatureAddBlessings(cid, blessings)
				   end
 
Last edited:
i keep failing dosent work i cant load it

error:

Code:
mods/v2 neck.xml:16: parser error : CData section not finished

                function onDeath(cid, corpse, dea
                                   end
                                       ^
mods/v2 neck.xml:16: parser error : Premature end of data in tag event line 10
                                   end
                                       ^
mods/v2 neck.xml:16: parser error : Premature end of data in tag mod line 2
                                   end
                                       ^
[16:23:43.079] > Loading v2 neck.xml...[Error - ScriptManager::loadFromXml] Cann
ot load mod mods/v2 neck.xml
[16:23:43.079] Line: 16, Info: Premature end of data in tag mod line 2


[16:23:43.079]  failed!
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Red Skull Amulet" version="1.0" author="--" contact="--" enabled="yes">
        <description><![CDATA[
                This Is Will Protect Your Items Even If You Have Red Skull.
        ]]></description>
        <item id="2196" article="a" name="Red Skull Amulet" override="yes"/>
        <event type="login" name="RedSkullAmulet_Login" event="buffer"><![CDATA[
                registerCreatureEvent(cid, "RedSkullAmulet_Login")
        ]]></event>
        <event type="death" name="RedSkullAmulet_Login" event="script"><![CDATA[
                function onDeath(cid, deathList)
                        if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
                                if (getCreatureSkullType(cid) == SKULL_RED) then
                        for blessings = 1,5 do
                        return  doCreatureSetDropLoot(cid, false) and doCreatureAddBlessings(cid, blessings)
                        end
						end
						end
						return true
						end
		]]></event>
		</mod>


??
 
hmm ;) try this script

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == true then
if (getPlayerSlotItem(cid, 2).itemid == 2196) and getPlayerSkullType(cid) <= 4 then
doPlayerRemoveItem(cid, 2196, 1)
doCreatureSetDropLoot(cid, false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
return true
end
end
 
Back
Top