Unforuinatly I cannot test but this script is for TFS 3.4 (8.54).
In talkaction.xml
in talkaction scripts make monstercreate.lua file. put this.
In talkaction.xml
Code:
<talkaction log="yes" words="!create;!remove" access="4" event="script" value="monscreate.lua"
in talkaction scripts make monstercreate.lua file. put this.
Code:
local monsters = {
"demon",
"orshabaal", -- monsters that can be created --
"morgaroth"
}
local posTeleport = getPlayerPosition(cid)
local specMonsStorage = 1000 -- storage value of the special monster --
local checkMap = getArea(pos, mapX, mapY)
local mapX = {x = 1000, y = 1000, z = 7, stackpos = 1} -- top left of map --
local mapY = {x = 1000, y = 1000, z = 7, stackpos = 1} -- bottom right of map --
local useMagicEffect = false -- use a magic effect when creating monster? --
local magicEffect = 10 -- use this magic effect --
local onSay(cid, word, param)
if (param == remove) then
if t[1] == true then
if checkMap and getCreatureName(monsters.name) then
if getCreatureStorageValue(monsters.name) == specMonsStorage then
doRemoveCreature(monsters.name)
else
doPlayerSendCancel(cid, "There are no special monsters on the map.")
return false
end
else
doPlayerSencCancel(cid, "This is not a special monster!")
return false
end
else
doPlayerSendCancel(cid, "You need to type the monsters name.")
elseif (param == create) then
if t[1] == true then
doCreateMonster(t[1], posTeleport)
if (useMagicEffect) == true then
doSendMagicEffect(posTeleport, magicEffect)
else
doPlayerSendCancel(cid, "You must type a monster!")
return false
end
end