• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Freez Rune

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,768
Solutions
5
Reaction score
769
I found this on pc, i didnt make it, and i dont know how made it so i wont take any credit!
AFAIK credit goes to Ranyo13
Credits to me

it works perfext on 0.3.6
1problem and its freez in pz 2, if someone can fix so it dont work in pz :)

Lua:
local freezetime = 4    
 
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_RED or TEXTCOLOR_GREEN)
		   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 not isPlayer(itemEx.uid) or cid == itemEx.uid then
		return doPlayerSendCancel(cid,"You can only use this on another players.")
	end
 
	doSendAnimatedText(getThingPos(itemEx.uid),"Freezed!", TEXTCOLOR_BLUE)
	exhaustion.set(cid,storage,cooldown)
	doCombat(cid, combat, numberToVariant(itemEx.uid))
	doCreatureSetNoMove(itemEx.uid, 1)
	countDown(freezetime , toPosition, 0, "melted", 5)
	addEvent(removed,freezetime*1000,itemEx.uid)
	return true
end

to not work in a pz
Lua:
local freezetime = 4    
 
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_RED or TEXTCOLOR_GREEN)
		   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 not isPlayer(itemEx.uid) or cid == itemEx.uid then
		return doPlayerSendCancel(cid,"You can only use this on another players.")
	end

       if getTilePzInfo(toPosition) == true then
	       return doPlayerSendCancel(cid, "You cannot use this in a PZ!.")
       end
 
	doSendAnimatedText(getThingPos(itemEx.uid),"Freezed!", TEXTCOLOR_BLUE)
	exhaustion.set(cid,storage,cooldown)
	doCombat(cid, combat, numberToVariant(itemEx.uid))
	doCreatureSetNoMove(itemEx.uid, 1)
	countDown(freezetime , toPosition, 0, "melted", 5)
	addEvent(removed,freezetime*1000,itemEx.uid)
	return true
end
 
Last edited:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if exhaustion.get(cid,storage) then
return doPlayerSendCancel(cid,"You can't use this yet.")
end

if not isPlayer(itemEx.uid) or cid == itemEx.uid then
return doPlayerSendCancel(cid,"You can only use this on another players.")
end

if getTilePzInfo(toPosition) == true then
return doPlayerSendCancel(cid, "You cannot use this in a PZ!.")
end

doSendAnimatedText(getThingPos(itemEx.uid),"Freezed!", TEXTCOLOR_BLUE)
exhaustion.set(cid,storage,cooldown)
doCombat(cid, combat, numberToVariant(itemEx.uid))
doCreatureSetNoMove(itemEx.uid, 1)
countDown(freezetime , toPosition, 0, "melted", 5)
addEvent(removed,freezetime*1000,itemEx.uid)
return true
end

Lol fail eng :D
Freezed!! < thats just wrong xD

Irregular Verbs: freeze, froze and frozen

The right word is Frozen xD

But nice script (y) ^^,
 
:p
sorry, i aint got the 100% grama on english, im from norway and i can arabic so it kinda hard to learn 3 languages with fully grama and such :p
will fix ty for that
 
Lua:
doCreatureSetNoMove(itemEx.uid, 1)
Doesn't work when someone is following the target using the client.
 
I found this on pc, i didnt make it, and i dont know how made it so i wont take any credit!
AFAIK credit goes to Ranyo13


it works perfext on 0.3.6
1problem and its freez in pz 2, if someone can fix so it dont work in pz :)

Lua:
local freezetime = 4    
 
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_RED or TEXTCOLOR_GREEN)
		   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 not isPlayer(itemEx.uid) or cid == itemEx.uid then
		return doPlayerSendCancel(cid,"You can only use this on another players.")
	end
 
	doSendAnimatedText(getThingPos(itemEx.uid),"Freezed!", TEXTCOLOR_BLUE)
	exhaustion.set(cid,storage,cooldown)
	doCombat(cid, combat, numberToVariant(itemEx.uid))
	doCreatureSetNoMove(itemEx.uid, 1)
	countDown(freezetime , toPosition, 0, "melted", 5)
	addEvent(removed,freezetime*1000,itemEx.uid)
	return true
end

to not work in a pz
Lua:
local freezetime = 4    
 
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_RED or TEXTCOLOR_GREEN)
		   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 not isPlayer(itemEx.uid) or cid == itemEx.uid then
		return doPlayerSendCancel(cid,"You can only use this on another players.")
	end

       if getTilePzInfo(toPosition) == true then
	       return doPlayerSendCancel(cid, "You cannot use this in a PZ!.")
       end
 
	doSendAnimatedText(getThingPos(itemEx.uid),"Freezed!", TEXTCOLOR_BLUE)
	exhaustion.set(cid,storage,cooldown)
	doCombat(cid, combat, numberToVariant(itemEx.uid))
	doCreatureSetNoMove(itemEx.uid, 1)
	countDown(freezetime , toPosition, 0, "melted", 5)
	addEvent(removed,freezetime*1000,itemEx.uid)
	return true
end

Cant walk after "melted" have to relogg first?
 
Lua:
doCreatureSetNoMove(itemEx.uid, 1)
Doesn't work when someone is following the target using the client.
Lua:
doCreatureSetNoMove()
Can easily be remade to negate that error. I don't know why haven't the TFS devs done this yet... (Unless they already did on revs newer than 0.36pl1.)
I personally use that function for much more than a "Freeze Rune"...
 
Lua:
doCreatureSetNoMove()
Can easily be remade to negate that error. I don't know why haven't the TFS devs done this yet... (Unless they already did on revs newer than 0.36pl1.)
I personally use that function for much more than a "Freeze Rune"...

It can easily be fixed in lua aswell. I believe there is a creatureevent called onFollow. :)
 
Back
Top