• 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:
	<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>
 
i got this error now...

[20:43:10.934] [Error - CreatureEvent::configureEvent] No valid type for creatu
e event.onPrepareDeath
[20:43:10.935] [Warning - BaseEvents::loadFromXml] Cannot configure an event
 
Code:
<event type="preparedeath" name="rsAol" event="script" value="script.lua"/>
Code:
function onPrepareDeath(cid, deathList)
	if(getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == ID_OF_AMULET) then
		doCreatureSetDropLoot(cid, false)
	end
	return true
end
 
now i got a script that works but makes the player without the aol have 0hp when they "die" or how can you say but they get atackt until the should die!
 
Hey now i got my rs forevel aol to work but players without the aol they get 0hp and dosent die!

my script:

Lua:
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


Why did you set a walls ItemID in necklace slot? And why are you using Code tags instead of lua tags?.. >.>
 
Yea im on the left;) :D Old pic but rocks;)
Help me out with the damn script:D:D

Lua:
local config = {
		Aol = 2173, -- ItemID of Aol
	}

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
 if isPlayer(cid),
 if getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == config.Aol
	doCreatureSetDropLoot(cid, false)
	        end
        return true
		end
end

Propably won't work but you could give it a try<_<
 
Tauku The things is i have custom ID with items and that is not a wall! The things is the players Get 0 hp if they dont have the neckless If they die!
 
Back
Top