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

Lua [Solved] {0.3.6} Paralyze Rune

Status
Not open for further replies.

frankfarmer

who'r ninja now
Premium User
Joined
Aug 5, 2008
Messages
1,581
Reaction score
80
Right, I hate to start threads when the question is around 55 letters long. (including spaces)

"Why does not the paralyze rune work in the latest 0.3.6"?

Code:
	<rune name="Paralyze" id="2278" allowfaruse="1" charges="1" lvl="54" maglv="18" exhaustion="2000" mana="1400" needtarget="1" blocktype="solid" event="script" value="support/paralyze rune.lua">
		<vocation id="2"/>
		<vocation id="6" showInDescription="0"/>
	</rune>

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

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

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

Players can cast the spell, but nothing affects them, they won't get slowed or anything. HALP?:)
 
Last edited:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

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

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
[B][COLOR="Red"]Q[/COLOR][/B]
xd

#thread
idk
 
Q[/code]
xd

#thread
idk

Hahahaha. Sorry, that was a epic typo.

Code:
  local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 7000)
--setConditionParam(condition, CONDITION_PARAM_SPEED, -90)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
if getPlayerVocation(cid) == 6 then

mana = getPlayerMana(cid)
if (mana > 1199) then
doPlayerAddMana(cid, -1200)
return doCombat(cid, combat, var)
end
else
doPlayerSendCancel(cid, "Only druids may use this rune.")
end
end

This script is working.. BUT.. how do i make the script work with vocation (10) also?

Tried with;
== 6, 10 then
but did not work :(
 
Spells.xml find:
Code:
	<rune name="Paralyze" id="2278" allowfaruse="1" charges="1" lvl="54" maglv="18" exhaustion="2000" mana="1400" needtarget="1" blocktype="solid" event="script" value="support/paralyze rune.lua">
		<vocation id="2"/>
		<vocation id="6" showInDescription="0"/>
	</rune>

change to

Code:
	<rune name="Paralyze" id="2278" allowfaruse="1" charges="1" lvl="54" maglv="18" exhaustion="2000" mana="1400" needtarget="1" blocktype="solid" event="script" value="support/paralyze rune.lua">
		<vocation id="2"/>
		<vocation id="6" showInDescription="0"/>
		<vocation id="10" showInDescription="0"/>
	</rune>
 
Spells.xml find:
Code:
	<rune name="Paralyze" id="2278" allowfaruse="1" charges="1" lvl="54" maglv="18" exhaustion="2000" mana="1400" needtarget="1" blocktype="solid" event="script" value="support/paralyze rune.lua">
		<vocation id="2"/>
		<vocation id="6" showInDescription="0"/>
	</rune>

change to

Code:
	<rune name="Paralyze" id="2278" allowfaruse="1" charges="1" lvl="54" maglv="18" exhaustion="2000" mana="1400" needtarget="1" blocktype="solid" event="script" value="support/paralyze rune.lua">
		<vocation id="2"/>
		<vocation id="6" showInDescription="0"/>
		<vocation id="10" showInDescription="0"/>
	</rune>

Yeah, but what about this?

Code:
function onCastSpell(cid, var)
if getPlayerVocation(cid) == 6 then


EDIT: As i tought, made the changes but still.. vocation 10 can't use the rune
 
Try:

Lua:
function onCastSpell(cid, var)
	if getPlayerVocation(cid) == 6 then
		return doCombat(cid, combat, var)
	else if getPlayerVocation(cid) == 10 then
		return doCombat(cid, combat, var)
	else
		doPlayerSendCancel(cid, "You do not know how to use this rune.")
		return false
	end
end
 
Try:

Lua:
function onCastSpell(cid, var)
	if getPlayerVocation(cid) == 6 then
		return doCombat(cid, combat, var)
	else if getPlayerVocation(cid) == 10 then
		return doCombat(cid, combat, var)
	else
		doPlayerSendCancel(cid, "You do not know how to use this rune.")
		return false
	end
end

Does not work. ;/ And no, i saw your first typo and changed.
 
If I change this

function onCastSpell(cid, var)
if getPlayerVocation(cid) == 6 then
to
function onCastSpell(cid, var)
if getPlayerVocation(cid) == 10 then

Epics Druid can use it.. But normal druids can't use it. So, why can't both vocations use it?:p
 
If I change this


to


Epics Druid can use it.. But normal druids can't use it. So, why can't both vocations use it?:p

why not only change spells.xml?
like they said above:
<rune name="Paralyze" id="2278" allowfaruse="1" charges="1" lvl="54" maglv="18" exhaustion="2000" mana="1400" needtarget="1" blocktype="solid" event="script" value="support/paralyze rune.lua">
<vocation id="2"/>
<vocation id="6" showInDescription="0"/>
<vocation id="10" showInDescription="0"/>
</rune>

just add new rows for new vocatnios
 
Nah. Closing thread.

I fixed it with this script, had to delete some shit.

Thanks everyone for the help!

Code:
  local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 7000)
--setConditionParam(condition, CONDITION_PARAM_SPEED, -90)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
        if getPlayerVocation(cid) == 6 then
                return doCombat(cid, combat, var)
        elseif getPlayerVocation(cid) == 10 then
                return doCombat(cid, combat, var)
        else
                doPlayerSendCancel(cid, "You do not know how to use this rune.")

mana = getPlayerMana(cid)
if (mana > 1199) then
doPlayerAddMana(cid, -1200)
 return doCombat(cid, combat, var)
end
end
end
 
Status
Not open for further replies.
Back
Top