• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Rune Create monster "utevo res" only use item

Dorianek

Member
Joined
Nov 29, 2018
Messages
252
Reaction score
10
Location
Poland
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
 
Back
Top