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

Block Rune

elking

Swev-v2.sytes.net Comming Soon !<>!
Joined
Aug 20, 2012
Messages
445
Reaction score
28
Location
Egypt
Hello People of OTLAND.

Lately I try to look for script to Rune Which can Stop damage on you for 4 second and while this 4 second you can't use any heal [exura vita] spell only attack spell [exevo gran mort]

I hope to anyone can help me :)

BUMP!
 
Last edited by a moderator:
That all i use

spell.xml [I edited it to use on PZ]

Code:
    <rune name="Block Rune" id="12553" allowfaruse="1" charges="3" lvl="20" maglv="2" exhaustion="800" aggressive="0" needtarget="1" blocktype="solid" event="script" value="support/block rune.lua"/>

block rune.lua
Code:
local c = {
  storage = 41523,
  time = 4
}

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)

local function doBlockEffect(cid)
      doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
    doSendAnimatedText(getPlayerPosition(cid), "Blocked", COLOR_RED)
end


function onCastSpell(cid, var)
    local target = getTopCreature(variantToPosition(var)).uid
    if not isPlayer(target) then
        target = cid
    end
    if exhaustion.check(cid, 43534) then
    doPlayerSendCancel(cid, "You need to wait "..exhaustion.get(cid, 43534).." seconds before you can use the rune again.")
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    return false
end
    if exhaustion.check(target, c.storage) then
        local n = target == cid and "You are" or getPlayerName(target).." is"
        doPlayerSendCancel(cid, n.." already blocking attacks.")
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
        return false
    end
    exhaustion.set(cid, 43534, 60)
    exhaustion.set(target, c.storage, c.time)
    doSendAnimatedText(getPlayerPosition(target), "Blocked", COLOR_RED)
      doSendMagicEffect(getPlayerPosition(target), CONST_ME_MAGIC_RED)
    doCombat(cid, combat, var)
    for x = 1, c.time do
        addEvent(doBlockEffect, x * 1000, target)
    end
    return true
end

creaturescripts.lua

Code:
<event type="statschange" name="BlockEffect" event="script" value="blockeffect.lua"/>

blockeffect.lua

Code:
function onStatsChange(cid, attacker, type, combat, value)
    if exhaustion.check(cid, 41523) then
        return false
    end
    return true
end

login.lua

Code:
        registerCreatureEvent(cid, "BlockEffect")
 
To confirm that it doesn't give an error like that, I tested it on the same server with everything you just posted and I don't get this error when I use potions or uh.
 
Last edited:
Well you did something wrong while adding it, you probable changed the wrong script or didn't restart the server.
Maybe you reloaded creaturescripts instead of restarting the server, this reload type doesn't work properly in TFS 0.3.6 so you have to restart the server when you make changes there.
 
Well you did something wrong while adding it, you probable changed the wrong script or didn't restart the server.
Maybe you reloaded creaturescripts instead of restarting the server, this reload type doesn't work properly in TFS 0.3.6 so you have to restart the server when you make changes there.
@Limos I fixed script for my Ot can you add how to remove after 3 using ??
 
its don't work
Code:
instant name="protect me"  words="protect" lvl="20" maglv="6" exhaustion="60000" needtarget="1" event="script" value="blockdamge.lua">
 
If you use the rune on yourself, you will block attacks for 4 seconds, if you use it on someone else, that player will block attacks for 4 seconds. You can't use this on monsters or NPCs.
Made for and tested with TFS 0.3.6, since you said it was based on that, if it's based on an other server and you don't know which one, you can also send me the download link and I can look for myself.
hey @Limos can u give me it but when i use soul token get block?
 
Back
Top