place_monster.lua

main 20 lines · 503 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 monster = Game.createMonster(param, position)
8 if monster then
9 if param == "Soldier" then
10 monster:setMaster(player)
11 end
12 monster:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
13 position:sendMagicEffect(CONST_ME_MAGIC_RED)
14 else
15 player:sendCancelMessage("There is not enough room.")
16 position:sendMagicEffect(CONST_ME_POFF)
17 end
18 return false
19end
20
Top