I may be the noobiest of them all in LUA, but here's another one.
When you kill the rat, it is supposed to decay/remove the object on the ground (wall).
Everything else works, it summons the rat, it says "KILL!", but it just doesn't remove that freakin' little object!
Lua:
function onKill(cid, target, lastHit)
monsterPos = getCreaturePosition(target)
newMonsterPos = {x= 828, y= 1024, z= 7}
wall_pos = {x= 828, y= 1024, z= 7, stackpos= 1}
wall = getThingfromPos(wall_pos)
if isPlayer(cid) and (getCreatureName(target):lower() == "rat") and wall.itemid == 8291 then
doSendAnimatedText(monsterPos, "KILL!", TEXTCOLOR_ORANGE)
doDecayItem(wall)
doSummonCreature("Rat", newMonsterPos)
end
return TRUE
end
When you kill the rat, it is supposed to decay/remove the object on the ground (wall).
Everything else works, it summons the rat, it says "KILL!", but it just doesn't remove that freakin' little object!
[12:35:11.411] [Error - CreatureScript Interface]
[12:35:11.412] data/creaturescripts/scripts/demonoak.luanKill
[12:35:11.414] Description:
[12:35:11.415] (luaDoDecayItem) Item not found