• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Manarune(*CykoTittian*)

husam

Member
Joined
Aug 23, 2008
Messages
2,216
Reaction score
10
Location
Iraq-Baghdad
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(itemEx.uid) then
		local lvl, mag = getPlayerLevel(cid), getPlayerMagLevel(cid)
		local min = lvl * 2 + mag * 3
		local max = lvl * 2.5 + mag * 4
		local rand = math.random(min, max)
		doPlayerAddMana(itemEx.uid, rand)
		doCreatureAddHealth(itemEx.uid, rand)
		doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
	else
		doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
		doPlayerSendCancel(cid, "You can only use this rune on players.")
	end
	return true
end
As i stated, Cykotitan made this script, so rep him not me!
 
Whats wrong with this 1 \/ ?
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0.7, -10, 0.9, 0)

function onCastSpell(cid, var)
  return doCombat(cid, combat, var)
end
 
Whats wrong with this 1 \/ ?
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0.7, -10, 0.9, 0)

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

Cykotitan didn't make that, that's whats wrong with it.
Cyko is a beast, he goes home and sings "Ima B."

:)
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(itemEx.uid) then
		local lvl, mag = getPlayerLevel(cid), getPlayerMagLevel(cid)
		local min = lvl * 2 + mag * 3
		local max = lvl * 2.5 + mag * 4
		local rand = math.random(min, max)
		doPlayerAddMana(itemEx.uid, rand)
		doCreatureAddHealth(itemEx.uid, rand)
		doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
	else
		doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
		doPlayerSendCancel(cid, "You can only use this rune on players.")
	end
	return true
end

And manarune that's adding health, too? oO name should be spirit rune or something like that
 
@Winnerandy
Lua:
  function onUse(cid, item, fromPosition, itemEx, toPosition)
        if isPlayer(itemEx.uid) then
	    if isKnight(cid then
                local lvl, mag = getPlayerLevel(cid), getPlayerMagLevel(cid)
                local min = lvl * 2 + mag * 3
                local max = lvl * 2.5 + mag * 4
                local rand = math.random(min, max)
                doPlayerAddMana(itemEx.uid, rand)
                doCreatureAddHealth(itemEx.uid, rand)
                doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
        else
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
                doPlayerSendCancel(cid, "You can only use this rune on players.")
	    end
        end
        return true
end

(I think xD)
 
Last edited:
Code:
	if getPlayerVocation(cid)  == 4 or getPlayerVocation(cid) ==  8 then
=
Code:
	if isKnight(cid) then
 
Actually it's very simple and I'm sure scripts like this have been reposted alot in the past.
 
Back
Top