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

Paralyze but you can use spell

Erexo

Kage
Premium User
Joined
Mar 27, 2010
Messages
743
Solutions
5
Reaction score
200
Location
Pr0land
GitHub
Erexo
Hello,
someone can fix my paralize script?

I need:
*Player cant move for a 5secs
*Can write message and spells
*Cant use haste to erase paralyse

Someone can fix this script?

LUA:
local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, 65)



local condition = createConditionObject(CONDITION_PARALYZE)

setConditionParam(condition, CONDITION_PARAM_TICKS, 2500)

setConditionParam(condition, CONDITION_PARAM_SPEED, -5000)

setConditionFormula(condition, -0.9, 0, -0.9, 0)

setCombatCondition(combat, condition)



arr = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

}

local area = createCombatArea(arr)

setCombatArea(combat, area)



function onCastSpell(cid, var)

	return doCombat(cid, combat, var)

end

Please :P

Pzdr,
Erexo.
 
would be done with this function: doCreatureSetNoMove
because if you use paralyze it can't write spells betwen sqms and could heal it.

i don't know how to do, just tryin to help.
 
sorry, CAN, I misread
do you want any prz to be not dispellable or just this one?
if any just delete dispell from healing spells and check if player is paralized befor appling positive condition speed else use setnomove with addEvent removing it
 
man. already told you, a paralyze script don't work because.
if player is moving from one sqm to other, he can't say spells, and if he stay stopped and say 'exura' it will cancel it instantly.
i told you the function that only "paralyzes" (stops) the player for x time, and he can heal that it would continue.
 
@VirrageS
its a ranged spell,
when someone hit by this spell, make him not move (ONLY!)
CAN USE SPELLS/TALK ONLY NOT MOVE FOR 5SEC
 
LUA:
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},

Direction
 
LUA:
local area = {
 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
 
}
 
setCombatArea(combat, area)
 
function onCastSpell(cid, var)
 addEvent(doCreatureSetNoMove, 5*1000)
	return doCombat(cid, combat, var)
end

Try it, if dont work post error.
I'm learning, so be patient.
 
I think that can be done more easier btw it works.

LUA:
local config = {
	tiles = 6,
	stopMoveTime = 4000
} 
 
function onCastSpell(cid, var)
	local pos, dir, attPos = getThingPos(cid), getCreatureLookDirection(cid), {}
	
	for i = 1, config.tiles do
		table.insert(attPos, {x=(dir == 1 and pos.x + i or dir == 3 and pos.x - i or pos.x), y=(dir == 0 and pos.y - i or dir == 2 and pos.y + i or pos.y), z=pos.z})
	end

	for _, pPos in ipairs(attPos) do
		if getTileInfo(pPos).protection ~= true then
			local c = getThingfromPos({x=pPos.x, y=pPos.y, z=pPos.z, stackpos=253}).uid
			doSendMagicEffect(pPos, 65)
				if isCreature(c) then
					doCreatureSetNoMove(c, true)
					addEvent(doCreatureSetNoMove, config.stopMoveTime, c, false)
				end
		end
	end
	
	return true
end
 
#up.
starting to think the same.
damn idiot. i did with dosetcreaturenomove.
so good lucky. hope nobody will help you.
BYE.
 
kkkkk plz
use the Call back function to optimize your script

PHP:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 5)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 10)
setCombatFormula(combat1, COMBAT_FORMULA_DAMAGE, -1, 0, -1, 0)

arr1 = { 
{0, 1, 0}, 
{0, 1, 0},
{0, 1, 0}, 
{0, 1, 0}, 
{0, 3, 0},
}

local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)

function onTargetCreature(cid, target)
local t = 5000 
doCreatureSetNoMove(target, true)
addEvent(doCreatureSetNoMove, t, target, false)
end

setCombatCallback(combat1, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")

local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1, parameters.var)
end

function onCastSpell(cid, var) 
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 0, parameters)
end

in the spells.xml
add with

direction ="1"
 
Back
Top