• 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) Need this rune script please

Ralfegor

New Member
Joined
Apr 6, 2008
Messages
297
Reaction score
1
I need a rune that can only be created by druids. This rune its like Ultimate Healing Rune but better, when the druid put a blank rune and say the spell words to create the rune they will create a "rune" that heal depending on the magic level of the druid who create the rune. Then people will buy this rune to the druid of higher magic level.

And if you can :D when people look on the rune, the rune will say the name of the druid who create the rune and his magic level.

Its that posible? xD
 
Conjure (talkaction):
Code:
function onSay(cid, words, param, channel)
	local reqItem = xxxx
	local reqCount = 1
	local reqMag = 50
	local reqMana = 50
	local newItemId = xxxx

	if (getPlayerItemCount(cid, reqItem) < reqCount) then
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need to have ".. getItemNameById(reqItem) ..".")
		return TRUE
	end
	
	if (not (isDruid(cid))) then
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Pff, you\'re not druid!")
		return TRUE
	end

	if (getPlayerMagLevel(cid, TRUE) < reqMag) then
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need ".. reqMag .." magic level.")
		return TRUE
	end

	if (getPlayerMana(cid) < reqMana) then
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need ".. reqMana .." magic points.")
		return TRUE
	end
	
	doPlayerRemoveItem(cid, reqItem, 1)
	local newItem = doPlayerAddItem(cid, newItemId, 1)
	doSetItemActionId(newItem, getPlayerMagLevel(cid, TRUE))	-- Second param of getPlayerMagLevel() - Ignore Buff
	doCreatureAddMana(cid, -reqMana)

	return FALSE
end

Rune (action):
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions'))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local power = item.actionid
	local formula = (power * 3) * 0.75 -- it's formula, based on item's aid (mag lv. of druid)

	if (isPlayer(itemEx.uid) == FALSE) then
		return FALSE
	end

	if (hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE) then
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You\'re exhausted.")
		return TRUE
	end

	doAddCondition(cid, exhaust)
	doSendMagicEffect(getCreaturePosition(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureAddHealth(itemEx.uid, formula)
	doRemoveItem(item.uid, 1)

	return TRUE
end

:)
 
Last edited:
Here :D

Go and create a Lua File with name ultrahealingrune.lua
data/spells/scripts/healing/ultrahealingrune.lua


Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onGetFormulaValues(cid, level, maglevel)
	min = (level * 1 + maglevel * 4) * 6.20
	max = (level * 1 + maglevel * 4) * 8.70
	if min < 250 then
		min = 250
	end
	return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
__________________________________________________
Code:
function onGetFormulaValues(cid, level, maglevel)
	min = (level * 1 + maglevel * 4) * 6.20
	max = (level * 1 + maglevel * 4) * 8.70
	if min < 250 then
		min = 250
	end
	return min, max
end
Here...
Code:
min = (level * 1 + maglevel * 4) * 6.20
	max = (level * 1 + maglevel * 4) * 8.70
Just change them - Numbers!
__________________________________________________
Code:
	if min < 250 then
		min = 250
The Minimum Health u can get!
Heres minumum = 250 Hp
__________________________________________________

Now lets go to the Spells.xml!
Just add this
PHP:
	<rune name="Ultra Healing Rune" id="2306" allowfaruse="1" charges="1" lvl="20" maglv="3" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/ultrahealingrune.lua"/>
		<vocation name="Druid"/>
		<vocation name="Elder Druid" showInDescription="0"/>

under,
PHP:
	<!-- Healing Runes -->

Just Change this
PHP:
         <vocation name="Druid"/>
        <vocation name="Elder Druid" showInDescription="0"/>
To a Vocation who can Create this rune!


__________________________________________________
id="2306" The ID or your Rune!
__________________________________________________

Now go to your items.xml and search The ID 2306

and change the Block to this one
PHP:
	<item id="2306" article="a" name="Ultra healing rune">
		<attribute key="runeSpellName" value="adevo ultrah"/>
		<attribute key="weight" value="120"/>
		<attribute key="charges" value="5"/>
	</item>

----------------
Now playing: Papa Roach - Forever
via FoxyTunes
 
but i want "Minimum Health and Maximum Health i can get" depends on the player magic level, if a druid make this rune with magic level 20 the rune will heal bad and if a druid with magic level 100 make the rune the rune will heal really good and sry for my bad english tell me if u understand it
 
Use my script but change formula to:

Code:
local min = (power * 3) * 0.75
local max = (power * 3) * 1.5
local formula = math.random(min, max)

My script is based on druid's mag level :p
 
ok i will try it :D

tnx ir work :D, but how i put instead of doRemoveItem(item.uid, 1) to remove rune charges?
 
Last edited by a moderator:
Open items.xml, Go to the rune you chose and add charges as a parameter.
Code:
<item id="xxxx" article="an" name="ultimate healing rune">
		<attribute key="runeSpellName" value="adura ultra"/>
		<attribute key="weight" value="120"/>
		<attribute key="charges" value="1"/>
	           </item>
 
Chojrak u there? xD how i put ur script to work when Use with to a player or monster or in battle cus it only work when i use it on myself
 
still cant use on the monster or player :( i added allowfaruse="1"

i think the problem is here
Code:
	if (isPlayer(itemEx.uid) == FALSE) then
		return FALSE
	end
 
ok yes its working with player :D and with battle, but with monsters no xD

EDIT: work now :D changed
Code:
	if (isPlayer(itemEx.uid) == FALSE) then
		return FALSE
	end

to

Code:
	if (isCreature(itemEx.uid) == FALSE) then
		return FALSE
	end
 
Last edited:
Back
Top