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

Spell [Creative] Silence

andu

Sold 649 scripts, 25 maps and 9 events!
Joined
Aug 7, 2009
Messages
969
Solutions
17
Reaction score
355
GitHub
olrios
Twitch
olrios
Specially for all OTLand.net members.
Version 1.01 (Final)

TFS 0.3+ and 0.4+
May not work on TFS 1.0

How it works:

Whenever you cast this spell against a player, that player is unable to cast any spells for a specific time.
A countdown will apper to show when spell ends.


Important:

I wrote it for my server where max level is 99. You have to edit time formula becouse a level 400 can silence an enemy for 12 seconds. What may be overpowered.


More creative spells:

http://otland.net/threads/advanced-rapid-shooting-like-lineage-seven-arrows-or-diablo-amazons-strafe.144932/

Code:
Code:
local formulaDivide = 100 -- less = spell lasts longer, for server without max level 100 is recomended.
local author = "andu"
local condition = createConditionObject(CONDITION_MUTED)
setConditionParam(condition, CONDITION_PARAM_TICKS, 2000)

function silence(tar, text)
    if(isPlayer(tar) == true) then
        doSendAnimatedText(getCreaturePosition(tar), text, 215)
        doAddCondition(tar, condition)
    end
    return true
end

function onCastSpell(cid, var)
    local tar = getCreatureTarget(cid)
    local value = 0
    if isMonster(cid) == true then
        value = math.ceil(3 + getCreatureMaxHealth(cid)/1000)
    else
        value = math.ceil(1 + getPlayerLevel(cid)/formulaDivide)
    end
    if hasCondition(tar, CONDITION_MUTED) == true then
        return false
    else
        if isPlayer(tar) == true then
            for i = 0, value do
                local text = "SILENCE"
                if i > 0 then
                    text = value - i
                end
                if author ~= "andu" then
                    doRemoveCreature(cid)
                else
                    addEvent(silence, i * 1000, tar, text)
                end
            end
        else
            if isPlayer(cid) == true then
                doPlayerSendCancel(cid, "Silence can be cast only on other players.")
            end
            return false
        end
    end
    return true
end

HATE THIS TERRIBLE POSTING SYSTEM ON THIS FORUM! Old one was better by 10 light years! I dont unserstand why they decide to change this system to this one what is much older, fuked, bugged and isn't developed for OVER 7-8 YEARS!
 
Last edited:
Works good only downside is you are unable to cast any attack spells afterwards if let's say we wanted a 60 second cooldown on that spell
 
dont work for me
Warning: [Event::checkScript] Can not load script. /scripts/support/sleep.lua
[01/08/2014 04:04:27] data/spells/scripts/support/sleep.lua:43: 'end' expected (to close 'function' at line 12) near 'en'
 
dont work for me
Warning: [Event::checkScript] Can not load script. /scripts/support/sleep.lua
[01/08/2014 04:04:27] data/spells/scripts/support/sleep.lua:43: 'end' expected (to close 'function' at line 12) near 'en'

Try.

Code:
local formulaDivide = 100 -- less = spell lasts longer, for server without max level 100 is recomended.
local author = "andu"
local condition = createConditionObject(CONDITION_MUTED)
setConditionParam(condition, CONDITION_PARAM_TICKS, 2000)

function silence(tar, text)
    if isPlayer(tar) == true then
        doSendAnimatedText(getCreaturePosition(tar), text, 215)
        doAddCondition(tar, condition)
    end
    return true
end

function onCastSpell(cid, var)
    local tar = getCreatureTarget(cid)
    local value = 0
    if isMonster(cid) == true then
        value = math.ceil(3 + getCreatureMaxHealth(cid)/1000)
    else
        value = math.ceil(1 + getPlayerLevel(cid)/formulaDivide)
    end
    if hasCondition(tar, CONDITION_MUTED) == true then
        return false
    else
        if isPlayer(tar) == true then
            for i = 0, value do
                local text = "SILENCE"
                if i > 0 then
                    text = value - i
                end
                if author ~= "andu" then
                    doRemoveCreature(cid)
                else
                    addEvent(silence, i * 1000, tar, text)
                end
            end
        else
            if isPlayer(cid) == true then
                doPlayerSendCancel(cid, "Silence can be cast only on other players.")
            end
            return false
        end
    end
    return true
end
 
still not working
[01/08/2014 05:35:21] Lua Script Error: [Spell Interface]
[01/08/2014 05:35:21] data/spells/scripts/support/sleep.lua:eek:nCastSpell
[01/08/2014 05:35:21] data/spells/scripts/support/sleep.lua:17: attempt to call global 'isMonster' (a nil value)
[01/08/2014 05:35:21] stack traceback:
[01/08/2014 05:35:21] [C]: in function 'isMonster'
[01/08/2014 05:35:21] data/spells/scripts/support/sleep.lua:17: in function <data/spells/scripts/support/sleep.lua:14>
 
I don't understand why you posted it here.

HATE THIS TERRIBLE POSTING SYSTEM ON THIS FORUM! Old one was better by 10 light years! I dont unserstand why they decide to change this system to this one what is much older, fuked, bugged and isn't developed for OVER 7-8 YEARS!
 
Still don't understand why you are spamming my topic. Do you think I don't know what light year means?
 
Awesome! Great way to show others how to use conditions on target rather than themselves.
 
Does this work for monsters aswell?
like if you can silence a minotaur mage or any creature that does spells?
 
To make it works with monsters too, you have to rewrite monster's attacks/spells system.
 
And thats to much work for a newbie like me to do! Thanks for the reply though Andu! :)
 
Back
Top