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

Red Skull AOL

Sebasbe

New Member
Joined
May 14, 2008
Messages
84
Reaction score
0
Hello, After alot of tests i cannot let working that.

preparedeath.lua

Code:
function onPrepareDeath(cid, deathList)
	if isPlayer(cid) then
		if getPlayerSlotItem(cid, 2).itemid == 11387 then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getPlayerExperience(cid))
			doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
			doCreatureAddHealth(cid, getCreatureMaxHealth(cid), true)
			doCreatureAddMana(cid, (getCreatureMaxMana(cid) - getCreatureMana(cid)))
			doRemoveConditions(cid, FALSE)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
			doPlayerPopupFYI(cid, "You are dead.")
			doRemoveCreature(cid)
			
		end
	end
	return true
end

creaturescripts.xml

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

on login.lua i added

Code:
	registerCreatureEvent(cid, "onPrepareDeath")


but it doesn't work for me, I'm using TFS 3.6pl thank you
 
Wow.. Thats a good messy script and sucks ;s

Use a normal aol and make it to youre type if you dont know how to make youre own.
 
normal aol DOESNT USE LUA SCRIPT but whatever...
sources>search for the preventLoss(orpreventDrop? check aol in items.xml) part in playerdeath and remove skullcheck?

try changing
Code:
else if(skull < SKULL_RED && g_game.getWorldType() != WORLD_TYPE_PVP_ENFORCED)
to
Code:
else if(skull < SKULL_BLACK && g_game.getWorldType() != WORLD_TYPE_PVP_ENFORCED)
in player.cpp
 
Last edited:
Yes, i tested all, but doesn't work for normal players/skulleds/etc.

I want an aol working on red, black and normal , and infinite.

thanks

(sorry for the delay, i was on holidays, but back to my server again. )
 
Last edited:
LUA:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if isPlayer(cid) == true then
        if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
                doCreatureSetDropLoot(cid, false)      
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        return true
        end
    end
    return true
end
 
LUA:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if isPlayer(cid) == true then
        if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
                doCreatureSetDropLoot(cid, false)      
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        return true
        end
    end
    return true
end

What is the creaturescript.xml code for this?
 
LUA:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if isPlayer(cid) == true then
        if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then
                doCreatureSetDropLoot(cid, false)      
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        return true
        end
    end
    return true
end

Yes, i tried that, but the frags doesn't count :(
 
Easy, just go to items.xml, search itemID 2173, then add a key="showCharges" value="1" and then, just do /i 2173, 50 and it will have 50 charges XD
 
do aol not forever by nicekid:
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
    if isPlayer(cid) == true then
        if (getPlayerSlotItem(cid, 2).itemid == 2196) then
        doPlayerRemoveItem(cid, 2196, 1)
                doCreatureSetDropLoot(cid, false)       
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
        return true
        end
    end
    return true
end
 
Last edited:
Back
Top