• 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:
Then you can explain how you did it? are you using 0.4?
in the 0.3.6 dev before it workt fine noting wrong with it...
But when i changed to 0.4 i fuckt!
 
I'm not entirely sure what you want the necklace to do... But you must always return TRUE in an "onDeath" or "onPrepareDeath" script for the player to actually "die", or they'll be "zombies" with 0 HP who cannot die.

Try putting the "return TRUE" before the end.


Also, just a suggestion; Instead of having all that bullshit with "setdrop false", "set blessings +1" and whatever else, just plop the player away to the temple and heal their HP/Mana to full instead of letting them die.
 
well this script workt on the 0.3.6 dev workt fine the script is suppost to be a forever aol with red skulle preoction and bless!
why should it return TRUE at the end?

Wibben he aint explain that much! i know it's c++ but what do i edit? not much for a explanation!
 
well i wrote i need help with my script then he can tell me here how to fix my script to get it working-.-
This is support! and im not requesting any script i need help to get my SCRIPT to work you idiot!
 
Lua:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	if(isPlayer(cid) and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 115) then
		doPlayerAddBlessing(cid, 1)
		doPlayerAddBlessing(cid, 2)
		doPlayerAddBlessing(cid, 3)
		doPlayerAddBlessing(cid, 4)
		doPlayerAddBlessing(cid, 5)
		doCreatureSetDropLoot(cid, false)      
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
		doCreatureSay(cid, "This soul has been granted immortality by the Forever AoL Necklace!", TALKTYPE_ORANGE_1)
		return true
	end
end

Try this.
 
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

then just put that return true one end down ;x

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
    end
    return true
end
@offtopic
are u still hosting an Ot? if yes can I have the link .. I wanna see how things are going ;)
 
the neckelss works some times some tiems he dies and he gets a body and some times no body and he dosent dropp any...
How come he is dropping his neck some times?
and bless dosent work....
 
Might be because the source code is made so that if a player dies, and has a red/black skull, an AOL will not work and thus the whole "Set drop: false" thing is reset and he drops.
 
TFS (and OTServ in general) is modeled to be identical to tibia functionality wise.

Thus I wouldn't be surprised if they also included the function to cancel out AOL when having a red/black skull.


The best way really would be to put the deathloss to zero, and then make an ondeath or onpreparedeath script that works in reverse;
If player does not have an AOL, set his deathloss to 10 or whatever and let him die. If he does have an AOL, then let him just die (thus zero deathloss).
 
then just put that return true one end down ;x

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
    end
    return true
end

and there's one more thing wrong in this code...
u shouldnt setdrop 5 times u know
and other things also

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 I WILL NOT DIE!!!",   TALKTYPE_ORANGE_1)    
    end
    return true
end
dunno if it will work either..
 
Last edited:
Rexxar it work in the 0.3.6 dev before fine no problems at all... now in 0.4 it dosent work...

Babalow i will test it tomorrow:)
 
Stop failing, this whole thread is just complete FAIL.
You must use onStatsChange not onPrepareDeath.

It works for me, good luck.

Can you read what he says Ive said it like 10 times?....
 
Back
Top