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

Problem with function onDeath

ot flames

New Member
Joined
May 14, 2008
Messages
28
Reaction score
0
hello, I had made a script that when you kill a demon you loot a key from it with actionID 6000. but it doesn't work, I dunno why??

Code:
function onDeath(cid, corpse, killer)
local key = 2089
if corpse == 2916 then 
	doPlayerSendTextMessage(killer, MESSAGE_EVENT_ADVANCE, "Mystic Key is found")	
		doAddContainerItem(uid, key, 1)
		doSetItemActionId(key, 6000)
 
	end
end

I also added the even to the Demon

Code:
 <script>
<event name="MysticKey"/>
 </script>

and to creaturescripts.xml

Code:
<event type="death" name="MysticKey" script="MYSkey.lua"/>

I don't know where is the problem ???!
 
Back
Top