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

Request! Spell that makes target Freeze!

vics

New Member
Joined
Mar 6, 2009
Messages
56
Reaction score
0
Hello i really need this script. Its a spells that makes the target freeze for maybe 3 seconds.
If you can do this it would be great:
-This spell make target freeze for 3 seconds.
-And it should only work on Hydra, Warlock.


Hope you can fix this for me since im a big noob!

Ill give you rep+

Maybe this can help
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) thenif 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)endend return TRUEend

<talkaction log="yes" access="3" words="/stop" event="script" value="stop.lua"/>
 
Last edited:
Lua:
local paralyze = 180 --time of paralyze. default = 3 seconds

function onCastSpell(cid, var)
	if getCreatureTarget(cid) == "Hydra" or getCreatureTarget(cid) == "Warlock" then
	addEvent(doCreatureSetNoMove, 0, cid, TRUE)
	addEvent(doCreatureSetNoMove, paralyze, cid, FALSE)
end
end

Note: this probably wont work because the function getCreatureTarget doesnt work yet I dont think, if you take it out it should work, but for every creature :S
 
Okey thanks.
so if i do like this?



Lua:
local paralyze = 180 --time of paralyze. default = 3 seconds

function onCastSpell(cid, var)
                addEvent(doCreatureSetNoMove, 0, cid, TRUE)
        addEvent(doCreatureSetNoMove, paralyze, cid, FALSE)
end
end
 
add this to spells.xml

Code:
	<instant name="SPELL NAME" words="CASTING WORDS" lvl="20" mana="115" prem="0" exhaustion="2000" needlearn="0" event="script" value="attack/SCRIPTNAME.lua"/>
 
Back
Top