carlinhous1996
New Member
TFS 0.4 8.6
can someone please help me with an item that can only be used indoors
and when using this item creates an npc ?
I've tried in different ways and no
I always get this error the item disappears but the npc does not appear
can someone please help me with an item that can only be used indoors
and when using this item creates an npc ?
I've tried in different ways and no
I always get this error the item disappears but the npc does not appear
[Erro - Interface de ação]
data/actions/scripts/npcnahouse.luanUse
Descrição:
(luaDoCreateNpc) Não é possível criar npc: Alice
id local = 6507 -- ItemId da Estatua
local npc = "Alice" -- Nome do npc
função onUse(cid, item, fromPosition, itemEx, toPosition)
se getTileHouseInfo(fromPosition) == FALSE então
doPlayerSendCancel(cid,"Voce so pode criar o npc dentro da casa.")
elseif fromPosition.x == CONTAINER_POSITION then
doPlayerSendCancel(cid, "Coloque o item no primeiro chão.")
elseif id ~= nil then
doRemoveItem(item.uid, 1)
doCreateNpc(npc, toPosition)
doSendMagicEffect(fromPosition, CONST_ME_POFF)
senão
retorna falso
fim
retornar VERDADEIRO
fim
Last edited: