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

2 Requests - Exori paralyze - /demotelvl, Name

GOD Wille

Excellent OT User
Joined
Jan 11, 2010
Messages
2,826
Solutions
2
Reaction score
815
Location
Sweden
Exori paralyze:
druid spell - its is dmging as a exori gran but makes the guys who is getting hited by the exori paralyzed for 5 secs
 
Last edited:
LUA:
function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
		return true
	end

	local t = string.explode(param, ",")
	if(not t[2]) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough params.")
		return true
	end

	local pid = getPlayerByNameWildcard(t[1])
	if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not found.")
		return true
	end

	t[2] = t[2]:lower()
	local skill = SKILL_IDS[t[2]]
	if(not skill) then
		local tmp = t[2]:sub(1, 1)
		if(tmp == 'l' or tmp == 'e') then
			skill = SKILL__LEVEL
		elseif(tmp == 'm') then
			skill = SKILL__MAGLEVEL
		else
			skill = tonumber(t[2])
			if(not skill or skill < SKILL_FIRST or SKILL > SKILL__LAST) then
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such skill does not exists.")
				return true
			end
		end
	end

	local amount = tonumber(t[3])
	if(not amount or amount == 0) then
		amount = 1
	end

	doPlayerAddSkill(pid, skill, -amount, true)
	return true

LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)

local condition1 = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition1, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition1, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition1)

local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

function onGetFormulaValues(cid, level, skill, attack, factor)
	local skillTotal, levelTotal = skill + attack * 2, level / 5
	return -(skillTotal * 1.1 + levelTotal), -(skillTotal * 3 + levelTotal)
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
EDIT: Sorry this was a talkaction from him I see, I then got the script fixed from my friend as a spell & not talkaction. However I do not have the script on this pc, sorry.
 
Oh I'm sorry, I did misread it.

Create paralyzeue.lua in your spells scripts folder.

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)

local condition1 = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition1, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition1, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition1)

local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack * 2, level / 5
return -(skillTotal * 1.1 + levelTotal), -(skillTotal * 3 + levelTotal)
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

Add this line to spells.xml

Code:
<instant name="Paralyze ue" words="Exori paralyze" lvl="100000" mana="1000" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="paralyzeue.lua">
    <vocation id="2"/>
    <vocation id="6"/>
 
Oh I'm sorry, I did misread it.

Create paralyzeue.lua in your spells scripts folder.

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)

local condition1 = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition1, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition1, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition1)

local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack * 2, level / 5
return -(skillTotal * 1.1 + levelTotal), -(skillTotal * 3 + levelTotal)
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

Add this line to spells.xml

Code:
<instant name="Paralyze ue" words="Exori paralyze" lvl="100000" mana="1000" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="paralyzeue.lua">
    <vocation id="2"/>
    <vocation id="6"/>
nono i won't spell i want demote script
 
Code:
 <talkaction log="yes" words="/lvlplayer" access="6" event="script" value="demotelvl.lua"/>

Code:
function onSay(cid, words, param)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Command param required.")
        return true
    end

    local pid = getPlayerByNameWildcard(param)
    if(not pid) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " not found.")
        return true
    end
    local id = getPlayerGUID(pid)
if getCreatureStorage(pid, 90901) == -1 then
    db.query("UPDATE `players` SET `blessings` = 0, `level` = 8, `mana` = 35, `health` = 185, `experience` = 4200, `healthmax` = 185, `manamax` = 35 WHERE `id` ='"..id.."';")
    doPlayerAddExperience(pid, -getPlayerExperience(pid)+4200)
    setCreatureMaxHealth(pid, 185)
    setCreatureMaxMana(pid, 35)
    setPlayerStorageValue(pid, 85989, 0)
    setPlayerStorageValue(pid, 90901, getCreatureStorage(pid, 90901) + 2)
    setPlayerStorageValue(pid, 88953, 1)
    doCreatureAddMana(pid, -getCreatureMana(pid))
    doCreatureAddHealth(pid, -getCreatureHealth(pid))
    doCreatureSetDropLoot(pid, false)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " has been demoted.")
elseif getCreatureStorage(pid, 90901) >= 1 then
    db.query("UPDATE `players` SET `blessings` = 0, `level` = 8, `mana` = 35, `health` = 185, `experience` = 4200, `healthmax` = 185, `manamax` = 35 WHERE `id` ='"..id.."';")
    doPlayerAddExperience(pid, -getPlayerExperience(pid)+4200)
    setCreatureMaxHealth(pid, 185)
    setCreatureMaxMana(pid, 35)
    setPlayerStorageValue(pid, 85989, 0)
    setPlayerStorageValue(pid, 90901, getCreatureStorage(pid, 90901) + 1)
    setPlayerStorageValue(pid, 88953, 1)
    doCreatureAddMana(pid, -getCreatureMana(pid))
    doCreatureAddHealth(pid, -getCreatureHealth(pid))
    doCreatureSetDropLoot(pid, false)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " has been demoted.")
    end
    return true
end

that u need?
 
Code:
 <talkaction log="yes" words="/lvlplayer" access="6" event="script" value="demotelvl.lua"/>

Code:
function onSay(cid, words, param)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Command param required.")
        return true
    end

    local pid = getPlayerByNameWildcard(param)
    if(not pid) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " not found.")
        return true
    end
    local id = getPlayerGUID(pid)
if getCreatureStorage(pid, 90901) == -1 then
    db.query("UPDATE `players` SET `blessings` = 0, `level` = 8, `mana` = 35, `health` = 185, `experience` = 4200, `healthmax` = 185, `manamax` = 35 WHERE `id` ='"..id.."';")
    doPlayerAddExperience(pid, -getPlayerExperience(pid)+4200)
    setCreatureMaxHealth(pid, 185)
    setCreatureMaxMana(pid, 35)
    setPlayerStorageValue(pid, 85989, 0)
    setPlayerStorageValue(pid, 90901, getCreatureStorage(pid, 90901) + 2)
    setPlayerStorageValue(pid, 88953, 1)
    doCreatureAddMana(pid, -getCreatureMana(pid))
    doCreatureAddHealth(pid, -getCreatureHealth(pid))
    doCreatureSetDropLoot(pid, false)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " has been demoted.")
elseif getCreatureStorage(pid, 90901) >= 1 then
    db.query("UPDATE `players` SET `blessings` = 0, `level` = 8, `mana` = 35, `health` = 185, `experience` = 4200, `healthmax` = 185, `manamax` = 35 WHERE `id` ='"..id.."';")
    doPlayerAddExperience(pid, -getPlayerExperience(pid)+4200)
    setCreatureMaxHealth(pid, 185)
    setCreatureMaxMana(pid, 35)
    setPlayerStorageValue(pid, 85989, 0)
    setPlayerStorageValue(pid, 90901, getCreatureStorage(pid, 90901) + 1)
    setPlayerStorageValue(pid, 88953, 1)
    doCreatureAddMana(pid, -getCreatureMana(pid))
    doCreatureAddHealth(pid, -getCreatureHealth(pid))
    doCreatureSetDropLoot(pid, false)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " has been demoted.")
    end
    return true
end

that u need?
i want when i say /demote player,level he will demote to level 8 and all player see message player name have been demoted on level 200 to level 1 example
@heba
 
Last edited:
now its work /demotelvl player
will make brodcast
Code:
 <talkaction log="yes" words="/demotelvl" access="6" event="script" value="demotelvl.lua"/>
Code:
function onSay(cid, words, param)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Command param required.")
        return true
    end

    local pid = getPlayerByNameWildcard(param)
    if(not pid) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " not found.")
        return true
    end
    local id = getPlayerGUID(pid)
if getCreatureStorage(pid, 90901) == -1 then
    db.query("UPDATE `players` SET `blessings` = 0, `level` = 8, `mana` = 35, `health` = 185, `experience` = 4200, `healthmax` = 185, `manamax` = 35 WHERE `id` ='"..id.."';")
    doPlayerAddExperience(pid, -getPlayerExperience(pid)+4200)
    setCreatureMaxHealth(pid, 185)
    setCreatureMaxMana(pid, 35)
    setPlayerStorageValue(pid, 85989, 0)
    setPlayerStorageValue(pid, 90901, getCreatureStorage(pid, 90901) + 2)
    setPlayerStorageValue(pid, 88953, 1)
    doCreatureAddMana(pid, -getCreatureMana(pid))
    doCreatureAddHealth(pid, -getCreatureHealth(pid))
    doCreatureSetDropLoot(pid, false)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " has been demoted.")
elseif getCreatureStorage(pid, 90901) >= 1 then
    db.query("UPDATE `players` SET `blessings` = 0, `level` = 8, `mana` = 35, `health` = 185, `experience` = 4200, `healthmax` = 185, `manamax` = 35 WHERE `id` ='"..id.."';")
    doPlayerAddExperience(pid, -getPlayerExperience(pid)+4200)
    setCreatureMaxHealth(pid, 185)
    setCreatureMaxMana(pid, 35)
    setPlayerStorageValue(pid, 85989, 0)
    setPlayerStorageValue(pid, 90901, getCreatureStorage(pid, 90901) + 1)
    setPlayerStorageValue(pid, 88953, 1)
    doCreatureAddMana(pid, -getCreatureMana(pid))
    doCreatureAddHealth(pid, -getCreatureHealth(pid))
    doCreatureSetDropLoot(pid, false)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " has been demoted.")
     doBroadcastMessage("player " .. param .. " got demot from level " .. getPlayerLevel(cid) .. " to level 7!", MESSAGE_STATUS_CONSOLE_RED)
    end
    return true
end
i tested it work 100%
02:58 player bosa got demot from level 600000 to level 7!
 
your script work but how i demote player /demotelvl player name?

scripts i want.

1-i want script like /attr aid but /action this for cm only
2-/ghost script when gm make he get effect like utana vid
@heba
 
Last edited:
use this script i edite it now work 100% like you need
to demote player say
/demotelvl playername
Code:
function onSay(cid, words, param)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Command param required.")
        return true
    end

    local pid = getPlayerByNameWildcard(param)
    if(not pid) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " not found.")
        return true
    end
    local id = getPlayerGUID(pid)
if getCreatureStorage(pid, 90901) == -1 then
    db.query("UPDATE `players` SET `blessings` = 0, `level` = 8, `mana` = 35, `health` = 185, `experience` = 4200, `healthmax` = 185, `manamax` = 35 WHERE `id` ='"..id.."';")
    doPlayerAddExperience(pid, -getPlayerExperience(pid)+4200)
    setCreatureMaxHealth(pid, 185)
    setCreatureMaxMana(pid, 35)
    setPlayerStorageValue(pid, 85989, 0)
    setPlayerStorageValue(pid, 90901, getCreatureStorage(pid, 90901) + 2)
    setPlayerStorageValue(pid, 88953, 1)
    doCreatureAddMana(pid, -getCreatureMana(pid))
    doCreatureAddHealth(pid, -getCreatureHealth(pid))
    doCreatureSetDropLoot(pid, false)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " has been demoted.")
elseif getCreatureStorage(pid, 90901) >= 1 then
     doBroadcastMessage("player " .. param .. " got demot from level " ..  getPlayerLevel(pid) .. " to level 7!", MESSAGE_STATUS_WARNING)
    db.query("UPDATE `players` SET `blessings` = 0, `level` = 8, `mana` = 35, `health` = 185, `experience` = 4200, `healthmax` = 185, `manamax` = 35 WHERE `id` ='"..id.."';")
    doPlayerAddExperience(pid, -getPlayerExperience(pid)+4200)
    setCreatureMaxHealth(pid, 185)
    setCreatureMaxMana(pid, 35)
    setPlayerStorageValue(pid, 85989, 0)
    setPlayerStorageValue(pid, 90901, getCreatureStorage(pid, 90901) + 1)
    setPlayerStorageValue(pid, 88953, 1)
    doCreatureAddMana(pid, -getCreatureMana(pid))
    doCreatureAddHealth(pid, -getCreatureHealth(pid))
    doCreatureSetDropLoot(pid, false)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Player " .. param .. " has been demoted.")
    end
    return true
end
for ghost effect try to make in in config
ghostModeInvisibleEffect = true
 
Last edited:
Back
Top