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

Manarune 0.3.6 reo++

Dalale

GX
Joined
Jun 13, 2008
Messages
718
Reaction score
2
Location
Sweden
Hello
I have been searching after a manarune for tfs 0.3.5 ~ versions but i cant find any good one..


I would like to have one manarune wich is based on magic lvl
The script can be in Actions and Spell. Please help me out

rep++
 
http://otland.net/f16/help-manarune-62193/#post638873 is a good topic on it.

But I decided to take a whack at it. It's not tested. but here is what I came up with.
add to data/actions/actions.xml
Code:
<action itemid="manaruneid here" event="script" value="custom/mana rune.lua" allowfaruse="1"/>

data/actions/custom/mana rune.lua
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level = getPlayerLevel(cid)
	local mlevel = getPlayerMagLevel(cid)
	local mana_minimum = (level * 1) + (mlevel * 1) - 50
	local mana_maximum = (level * 1.2) + (mlevel * 1)
	local mana_add = math.random(mana_minimum, mana_maximum)
	
	doPlayerAddMana(cid, mana_add)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	doremoveitem(item.uid)
	return TRUE
end

If this helps you at all please Rep++
 
thanks gonna try it ill respond here if it worked or not


edit: It worked rep++ for you thanks for your script!!


edit2: Its bug when u use the manarune here is the bug log
2zp74o3.jpg
 
Last edited:
on the line
doremoveitem(item.uid)
put in try putting in the runes id example with a random id
doremoveitem(1342, 1) or maybe doremoveitem(1342)
 
on the line
doremoveitem(item.uid)
put in try putting in the runes id example with a random id
doremoveitem(1342, 1) or maybe doremoveitem(1342)

tried both, same problem, the charges of the rune aint being lowered

ex: You use the rune you got 100x it aint downgraiding to 99x;)
 
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 100)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
	local mana_minimum = level * 1 + mlevel * 1 - 50
	local mana_maximum = level * 1.2 + mlevel * 1
	doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum))
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	doRemoveItem(item.uid, 1)
	return TRUE
end
 
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 100)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
	local mana_minimum = level * 1 + mlevel * 1 - 50
	local mana_maximum = level * 1.2 + mlevel * 1
	doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum))
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	doRemoveItem(item.uid, 1)
	return TRUE
end

Hi Cykotitan
When i use this script i got 100x of manarune hole manarune dissapear :/ i i only want 1x to get moved if you understand you use 1 time you get 99x 2 times you get 98x


Error is the same as before
 
Try this one:

Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 100)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
	local mana_minimum = level * 1 + mlevel * 1 - 50
	local mana_maximum = level * 1.2 + mlevel * 1
	doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum))
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
if item.type > 1 then
	doTransformItem(item.uid, item.id, item.type -1)
else
	doRemoveItem(item.uid)
end
	return TRUE
end


If that doesn't work, then try this one:

Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 100)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
	local mana_minimum = level * 1 + mlevel * 1 - 50
	local mana_maximum = level * 1.2 + mlevel * 1
	doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum))
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
if item.type > 1 then
	doChangeTypeItem(item.uid, item.type - 1)
else
	doRemoveItem(item.uid)
end
	return TRUE
end
 
Try this one:

Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 100)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
	local mana_minimum = level * 1 + mlevel * 1 - 50
	local mana_maximum = level * 1.2 + mlevel * 1
	doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum))
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
if item.type > 1 then
	doTransformItem(item.uid, item.id, item.type -1)
else
	doRemoveItem(item.uid)
end
	return TRUE
end


If that doesn't work, then try this one:

Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 100)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
	local mana_minimum = level * 1 + mlevel * 1 - 50
	local mana_maximum = level * 1.2 + mlevel * 1
	doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum))
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
if item.type > 1 then
	doChangeTypeItem(item.uid, item.type - 1)
else
	doRemoveItem(item.uid)
end
	return TRUE
end

Ill try it after school, thanks
 
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 100)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
	local mana_minimum = level * 1 + mlevel * 1 - 50
	local mana_maximum = level * 1.2 + mlevel * 1
	doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum))
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
if item.type > 1 then
	doChangeTypeItem(item.uid, item.type - 1)
else
	doRemoveItem(item.uid)
end
	return TRUE
end
rep++ this one worked
 
Back
Top