kaspertje100
Member
- Joined
- May 8, 2008
- Messages
- 236
- Reaction score
- 7
Hey guys,
My script should remove plants when a demon is killed but when i kill the demon nothing happens:S
My scripts:
Creaturescripts XML:
Login luafor the registering)
thanks in advance
My script should remove plants when a demon is killed but when i kill the demon nothing happens:S
My scripts:
Code:
function onDeath(cid, corpse, deathList)
local m = {
["Demon"] = { -- Monster Name
}
}
local monster = m[(getCreatureName(cid))]
if(not monster) then
return true
end
local monster = m[(getCreatureName(cid))]
if(monster) then
DoRemoveItem(2776, 1, {x = 1168, y = 1158, z = 7})
DoRemoveItem(2776, 1, {x = 1169, y = 1158, z = 7})
DoRemoveItem(2774, 1, {x = 1170, y = 1158, z = 7})
DoRemoveItem(2776, 1, {x = 1171, y = 1157, z = 7})
DoRemoveItem(2774, 1, {x = 1171, y = 1154, z = 7})
DoRemoveItem(2776, 1, {x = 1165, y = 1153, z = 7})
DoRemoveItem(2774, 1, {x = 1169, y = 1152, z = 7})
DoRemoveItem(2776, 1, {x = 1165, y = 1157, z = 7})
end
return true
end
Creaturescripts XML:
Code:
<event type="death" name="bossdeath" event="script" value="bossdeath.lua"/>
Login luafor the registering)
Code:
registerCreatureEvent(cid, "bossdeath")
thanks in advance