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

0.4 Freeze Rune with small but cool effect

Marko999x

999x era
Premium User
Joined
Dec 14, 2017
Messages
2,751
Solutions
80
Reaction score
1,889
Location
Germany
This script have been edited for my ot befor
I dont need it anymore so
TFS 0.4
here we go:

Lua:
local freezetime = 3
local cooldown = 10 -- time to use again

local storage = 19002

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, -1)
setCombatCondition(combat, exhaust)

local exhaustt = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaustt, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaustt, CONDITION_PARAM_TICKS, -1)
setCombatCondition(combat, exhaustt)

function countDown(number, pos, effect, msgonend, effectonend)
    local n = number
    for i = 1, number do
        addEvent(doSendAnimatedText,i* 1000, pos, n > 1 and n.."" or msgonend .."", n < 6 and TEXTCOLOR_YELLOW or TEXTCOLOR_YELLOW)
        addEvent(doSendMagicEffect,i* 1000, pos, n > 1 and effect or effectonend )
        n = n -1
    end
    n = number
    return true
end

function removed(cid)
    doCreatureSetNoMove(cid, 0)
    doRemoveCondition(cid,CONDITION_EXHAUST,1)
    doRemoveCondition(cid,CONDITION_EXHAUST,2)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if exhaustion.get(cid,storage) then
        return doPlayerSendCancel(cid,"You can't use this yet.")
    end
    
    if getTilePzInfo(toPosition) == true then
        return doPlayerSendCancel(cid, "You cant use in pz.")
    end
            
    if not isPlayer(itemEx.uid) or cid == itemEx.uid then
        return doPlayerSendCancel(cid,"You can only use this on another players.")
    end
    
    local pos = getThingPos(itemEx.uid)
    doSendAnimatedText(getThingPos(itemEx.uid),"Frozen!", TEXTCOLOR_YELLOW)
    doSendDistanceShoot({x=pos.x+2,y=pos.y+2,z=pos.z},pos, CONST_ANI_HOLY)
    doSendDistanceShoot({x=pos.x+2,y=pos.y-2,z=pos.z},pos, CONST_ANI_HOLY)
    doSendDistanceShoot({x=pos.x-2,y=pos.y-2,z=pos.z},pos, CONST_ANI_HOLY)
    doSendDistanceShoot({x=pos.x-2,y=pos.y+2,z=pos.z},pos, CONST_ANI_HOLY)
    exhaustion.set(cid,storage,cooldown)
    doCombat(cid, combat, numberToVariant(itemEx.uid))
    doCreatureSetNoMove(itemEx.uid, 1)
    exhaustion.set(itemEx.uid,4905,3)
    countDown(freezetime , toPosition, 0, "Melted!", 5)
    addEvent(removed,freezetime*1000,itemEx.uid)
    doSetCreatureOutfit(itemEx.uid, {lookType = 0, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 7309, lookAddons = 0}, 3000)
    return true
end

GIF:

TESTED on TFS 0.4 3884
Should work without any problem
 
Last edited:
Back
Top