• 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!

TFS 0.X summon one monster cd and tp

vexler222

Active Member
Joined
Apr 22, 2012
Messages
714
Solutions
15
Reaction score
47
Hi, someone can add to this script

Code:
local max = 1

function onCastSpell(cid, var)

local dir = getPlayerLookDir(cid)
local ppos = getPlayerPosition(cid)

if(dir==1)then
    ppos.x = ppos.x + 1
elseif(dir==2)then
    ppos.y = ppos.y + 1
elseif(dir==3)then
    ppos.x = ppos.x - 1
elseif(dir==0)then
    ppos.y = ppos.y - 1
end
    local count, pos = #getCreatureSummons(cid), getThingPos(cid)
    if count == max then
        doPlayerSendCancel(cid, 'You cannot summon any more monsters.')
        doSendMagicEffect(pos, CONST_ME_POFF)
        return false
    end

        local v = doConvinceCreature(cid, doCreateMonster("Skullfrost", ppos))
    doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
    return true
end

- Teleport if summon not see summoner
- And cooldown for this summon (he is on rl, after 15 min summon was dead and summoner get cd for spell, if its to difficulty, only cooldown for summon life)
 
Okay, i have all from first post but now i need "tutorial" how to enable summons in protections zone?
1. Player can use summon spell in pz
2. Summon can move in pz
 
Back
Top