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

HELP SCRIPT FRezze

tanii

Empire-war.com
Joined
Jan 16, 2015
Messages
383
Solutions
1
Reaction score
12
hello guys i got freeze rune script but i have 1 problem i cant fix it!

the problem is when i freeze to people with rune they can still suing manarune or great manapotions

here is this script
Code:
local freezetime = 5  
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 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
  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 by a moderator:
Add an exhaust condition without subid, so like the 2 you already have but then without "setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1)" and to remove it without a 1 "doRemoveCondition(cid,CONDITION_EXHAUST,1)".
This way it uses the same condition as potions, so the person with that condition won't be able to use potions till the condition is removed.
 
Add an exhaust condition without subid, so like the 2 you already have but then without "setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1)" and to remove it without a 1 "doRemoveCondition(cid,CONDITION_EXHAUST,1)".
This way it uses the same condition as potions, so the person with that condition won't be able to use potions till the condition is removed.
I dont understand sorry bro can u make changes and put the script here pls.
 
There is this.
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, -1)
setCombatCondition(combat, exhaust)
This is an exhaust condition which is added to the combat.
You can just add another one with a different name and without setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1).
Then remove it same as the other exhaust conditions, but then without subid.
Code:
doRemoveCondition(cid, CONDITION_EXHAUST)
 
There is this.
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, -1)
setCombatCondition(combat, exhaust)
This is an exhaust condition which is added to the combat.
You can just add another one with a different name and without setConditionParam(exhaust, CONDITION_PARAM_SUBID, 1).
Then remove it same as the other exhaust conditions, but then without subid.
Code:
doRemoveCondition(cid, CONDITION_EXHAUST)

Looks like @tanii is a little too fresh to really understand any of the above.
But you still put the effort in to answer it anyways... keep on rockin' man.
 
Looks like @tanii is a little too fresh to really understand any of the above.
But you still put the effort in to answer it anyways... keep on rockin' man.
i added this its good or not?

local exhausttt = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, -1)
setCombatCondition(combat, exhausttt)
doRemoveCondition(cid, CONDITION_EXHAUST)

my english is so bad can u make full script inc loud that pls
 
Back
Top