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

Freeze GEM

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
I need a script.
The Freeze GEM.
How it works?
A player X use the freeze GEM on player Y.
player Y cant move, heal, use spell, or say anything for 3 secs (configurable) and each 1 sec apear the efect 41.
after 3 secs he can heal, spell everything again ;P thanks
rep+++
 
Do like this:
take this script, posted by Summ:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not(isPlayer(itemEx.uid)) then return doPlayerSendCancel(cid, "You can only target players." end
		doSendMagicEffect(getThingPos(cid), 41)
		doDisablePlayer(itemEx.uid, 3)
	return true
end

Save it as freeze.lua in actions/scripts

Then in actions.xml add this somewhere:
XML:
<action itemid="XXXXXXXXX" event="script" value="freeze.lua"/>
Change all the Xs to the item id of the rune or whatever it is.

Rep++ for me and Summ? :)
 
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 41)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local speed = createConditionObject(CONDITION_PARALYZE)
setConditionParam(speed, CONDITION_PARAM_TICKS, 3000)
setConditionFormula(speed, -1000, 56, -1100, 56)
setCombatCondition(combat, speed)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 3000)
setCombatCondition(combat, exhaust)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
XML:
	<rune name="Freeze" id="XXXX" allowfaruse="1" charges="1" lvl="50" maglv="1" exhaustion="2000" needtarget="1" event="script" value="freeze.ua"/>
Mayeb this will work?
 
Code:
local time = 0
function onUse(cid, item, fromPosition, itemEx, toPosition)
	[COLOR="red"]time = 1 * 60[/COLOR]
	if isPlayer(itemEx.uid) then
		if getCreatureNoMove(itemEx.uid) then
			return
		else
			doMutePlayer(itemEx.uid, time)
			addEvent(function() doCreatureSetNoMove(itemEx.uid, cannotMove) end, time)
		end
	else
		doPlayerSendCancel(cid, "Sorry, not possible.")
	end
	
	return true
end
 
Try this better and with some effects, this block sd, gfb, uh, etc.. [all attack & healing spells and runes- in spells-]
Lua:
local time = 4


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 onUse(cid, item, fromPosition, itemEx, toPosition)
function doRemove()
doCreatureSetNoMove(itemEx.uid, 0)
setPlayerStorageValue(cid,storage,-1)
doRemoveCondition(itemEx.uid,CONDITION_EXHAUST,1)
doRemoveCondition(itemEx.uid,CONDITION_EXHAUST,2)
end
   doSendAnimatedText(getThingPos(itemEx.uid),"Freezed!", TEXTCOLOR_BLUE)
setPlayerStorageValue(cid,storage,1)
   doCombat(cid, combat, numberToVariant(itemEx.uid))
   doCreatureSetNoMove(itemEx.uid, 1)
   addEvent(doRemove,time * 1000)
local n = time
		for i = 1,time do
		    addEvent(doSendAnimatedText,i * 1000,getThingPos(itemEx.uid), ( i < time and "Melt : "..n..""  or "Melted!") , i< time and TEXTCOLOR_GREEN or TEXTCOLOR_RED)
            addEvent(doSendMagicEffect,i * 1000,getThingPos(itemEx.uid),5)
			n = n-1 
		end
return true
end
for actions i dont think you have more than 10 items that hit and heal in action am i right?
so you can just add a storage check in each of them if you dont want to source edit and if you are that needy for it
so you will add this in every [healing - attacking ] action rune
Lua:
if getPlayerStorageValue(cid,storage) > 0 then
  doPlayerSendCancel(cid,"You cant use that while you are freezed.")
return true
end
 
Last edited:
maybe Cykotitan (pro scripter (think only one will be able to do the whole script;P)) will know how to do a script that block attack & healing spells


BTW REP+++ FOR U :D
~~ btw hm i think i have like 10~manarunes on actions x)
 
as said before cant be dont in lua..
Just telling : so just add this script and add the lines under in every action script. Cause no one will help you.
 
If the player is muted, spells shouldn't work. If you notice in my first script, it mutes player's.



Code:
function onAttack(cid, target)
	if getCreatureNoMove(cid) then
		doPlayerSendCancel(cid, "Sorry, you may not attack while frozen.")
		return false
	end
	
	return
end
Yup but what about uh, sd etc.. That is why i made this script to include runes too
 
This is mindrage's LUA talkaction script that allows Gods to freeze a player. So freezing is possible using LUA. You can reference this script for your script.
Lua:
	local condition1 = createConditionObject(CONDITION_INFIGHT)
	local condition2 = createConditionObject(CONDITION_EXHAUST)
	local condition3 = createConditionObject(CONDITION_MUTED)
	setConditionParam(condition1, CONDITION_PARAM_TICKS, -1)
	setConditionParam(condition2, CONDITION_PARAM_TICKS, -1)
	setConditionParam(condition3, CONDITION_PARAM_TICKS, -1)
 
function onSay(cid, words, param)
	if(param == "") then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Name required.")
		return TRUE
	end
 
	local player = getPlayerByNameWildcard(param)
		local pos = getCreaturePosition(player)
 
		local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255}
		local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255}
		local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255}
		local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255}
		local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255}
		local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255}
		local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255}
		local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255}
if getPlayerGroupId(cid) >= getPlayerGroupId(player) then
if getPlayerStorageValue(player, 12346) < 0 then
	if((doCreatureSetNoMove(player, 1))== LUA_ERROR) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error.")
	end
		setPlayerStorageValue(player, 12346, 1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player can now not move.")
		doSendAnimatedText(getCreaturePosition(player), "Frozen", 64)
			doSendDistanceShoot(nha, pos, 28)
			doSendDistanceShoot(sha, pos, 28)
			doSendDistanceShoot(wha, pos, 28)
			doSendDistanceShoot(eha, pos, 28)
			doSendDistanceShoot(nwa, pos, 28)
			doSendDistanceShoot(nea, pos, 28)
			doSendDistanceShoot(sea, pos, 28)
			doSendDistanceShoot(swa, pos, 28)
				doSendMagicEffect(pos, 52)
        doAddCondition(player, condition1)
        doAddCondition(player, condition2)
        doAddCondition(player, condition3)
elseif getPlayerStorageValue(player, 12346) >= 0 then
	if((doCreatureSetNoMove(player, 0))== LUA_ERROR) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error.")
	end
		setPlayerStorageValue(player, 12346, -1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player can now move again.")
		doSendAnimatedText(getCreaturePosition(player), "Can Move", 168)
			doSendDistanceShoot(pos, nha, 37)
			doSendDistanceShoot(pos, sha, 37)
			doSendDistanceShoot(pos, wha, 37)
			doSendDistanceShoot(pos, eha, 37)
			doSendDistanceShoot(pos, nwa, 37)
			doSendDistanceShoot(pos, nea, 37)
			doSendDistanceShoot(pos, sea, 37)
			doSendDistanceShoot(pos, swa, 37)
				doSendMagicEffect(pos, 49)
        doRemoveCondition(cid, CONDITION_INFIGHT)
        doRemoveCondition(cid, CONDITION_EXHAUST)
        doRemoveCondition(cid, CONDITION_MUTED)
end
end
	return TRUE
end
 
Have you looked on my script ...?/
And i am saying impossible to make freeze for actions in lua source edit must be included .
 
Back
Top