I would like to add something to this script that after using runes will invoke a monster with name for example ,, monk ''?,, ,,Rat" TFS 1.3
PHP:
local function f(c)
if isMonster(c) then
doRemoveCreature(c)
end
end
function onCastSpell(cid, var)
local p = getThingPos(cid)
if getTileInfo(p).protection then
doCreatureSay(cid, 'You cannot summon in a Protection Zone!', TALKTYPE_ORANGE_1, false, cid, p)
doSendMagicEffect(p, CONST_ME_POFF)
elseif #getCreatureSummons(cid) ~= 0 then
doPlayerSendCancel(cid, 'You can\'t summon more than one.')
doSendMagicEffect(p, CONST_ME_POFF)
else
local r = doSummonCreature('Nyx Initiate', getPlayerPosition(cid))
if r ~= false then
Monster(r):setMaster(cid)
doSendMagicEffect(p, CONST_ME_MAGIC_BLUE)
addEvent (doCreatureSay, 2, cid, "Come forth! --- !", TALKTYPE_YELL)
doCreatureSetStorage(cid, 21981, 1)
addEvent(f, 5000, getCreatureSummons(cid)[1])
return true
else
doPlayerSendDefaultCancel(cid, r)
end
end
return true
end