• 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 error in consol with creature script

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
Hey when im loading my script i get this error:
[18:34:13.880] [Warning - Event::loadScript] Event onDeath not found (data/creat
urescripts/scripts/noaol.lua)

script:
Code:
function onPrepareDeath(cid, deathList)
	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!!", TALKTYPE_ORANGE_1)
	end
	return true
end

xml:
Code:
<event type="death" name="noaol" event="script" value="noaol.lua"/>

login.lua:
Code:
	registerCreatureEvent(cid, "noaol")
 
Okey, but the you cant set two different functions like this:
<event type="death"
function onPrepareDeath

either do like this:
<event type="death"
function onDeath

Or this:
<event type="preparedeath"
function onPrepareDeath
 
Back
Top