• 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 How to make a forever aol with rs protect help?

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
Hey i need a foreveraol with Redskull protection so you cant drop items when you have Redskull!
i need a script!
 
Code:
<item id="115" article="a" name="Skull Amulet">
		<attribute key="weight" value="660"/>
		<attribute key="slotType" value="necklace"/>
		<attribute key="preventDrop" value="1"/>
	</item>

Code:
        registerCreatureEvent(cid, "skull amulet")

Lua:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if (getCreatureSkullType(cid)  >= 4) then
        if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2131) then
                doCreatureSetDropLoot(cid, false)      
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
                doCreatureSay(cid, "Skull Amulet!", TALKTYPE_ORANGE_1)
                doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
        end
        return true
        end

Code:
	<event type="preparedeath" name="skull amulet" event="script" value="skull amulet.lua"/>


please use search or read the post thats in youre thread.

Credit SpiderOt
AND STOP MAKING 1000 THREADS ABT THE SAME THING...
 
Last edited:
I did! This dosent work! my char got 0hp and still atackabel then after a while he dies! and still loses the damn neckless!
 
what you mean? this dosent work im using 0.4 dev clearly somtign was changed:S but i think this is strange that You can have protection if you have a rs...
 
Lua:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	if(isPlayer(cid) and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 115) then
		for i = 1, 5 do
                doCreatureSetDropLoot(cid, false)
		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
 
Dint work... still the players without the neckless if they die they get 0hp and can kill any monsters they like!
i also try adding crops id
Code:
local corpse_ids = {
	[0] = 3065,
	[1] = 3058
}
 
Last edited:
Back
Top