place_npc.lua

main 17 lines · 397 bytes Raw
Alex Alex Commit Server upload 18/10/2026 23:38
1function onSay(player, words, param)
2 if player:getGroup():getId() < 3 then
3 return false
4 end
5
6 local position = player:getPosition()
7 local npc = Game.createNpc(param, position)
8 if npc then
9 npc:setMasterPos(position)
10 position:sendMagicEffect(CONST_ME_MAGIC_RED)
11 else
12 player:sendCancelMessage("There is not enough room.")
13 position:sendMagicEffect(CONST_ME_POFF)
14 end
15 return false
16end
17
Top