• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

need help to add command /m

I guess you are using TFS 1.0 then?

If you do,

Put this in data/talkactions/talkactions.xml

Code:
<talkaction words="/m" separator=" " script="place_monster.lua" />

and in the script folder create a file called "place_monster.lua" and put this:
Code:
function onSay(cid, words, param)
local player = Player(cid)
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
local orig = player:getPosition()
local creatureId = doSummonCreature(param, orig)
if creatureId ~= false then
local monster = Monster(creatureId)
monster:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
orig:sendMagicEffect(CONST_ME_MAGIC_RED)
else
player:sendCancelMessage("There is not enough room.")
orig:sendMagicEffect(CONST_ME_POFF)
end
return false
end
 
Back
Top