Hello Everybody !
I am writing to ask for help in explaining to me what is missing this script.
This is a problem that I encountered as I want to create a MONSTER no NPC. Can anyone help? I do not know what I am doing wrong ... ;/
I am writing to ask for help in explaining to me what is missing this script.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = getPlayerPosition(cid)
local summom = getCreatureSummons(cid)
if(fromPosition.x ~= CONTAINER_POSITION) and item.itemid == 2122 then
spawnEffect = math.random(6, 7)
doRemoveItem(item.uid, 1)
doSummonCreature(Djinn, pos)
doSendMagicEffect(fromPosition, spawnEffect)
elseif(fromPosition.x ~= CONTAINER_POSITION) == false and item.itemid == 2122 then
doPlayerSendCancel(cid,"You may open this only on the ground.")
end
return true
end
This is a problem that I encountered as I want to create a MONSTER no NPC. Can anyone help? I do not know what I am doing wrong ... ;/
Code:
[02/03/2012 15:38:37] [Error - Action Interface]
[02/03/2012 15:38:37] data/actions/scripts/aladin.lua:onUse
[02/03/2012 15:38:37] Description:
[02/03/2012 15:38:37] (luaDoCreateNpc) Npc with name '' not found