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

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,797
Reaction score
10
Location
Sweden 172
My manarune dont work ? :S
i have search around and found 1 script :

Manarune Script :
C:\ot\data\spells\scripts\attack\manarune.lua
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
    local mana = math.random(200, 300)
    doPlayerAddMana(cid, mana)
    --doSendAnimatedText(getPlayerPosition(cid), '+' .. mana, TEXTCOLOR_GOLD)
    return doCombat(cid, combat, var)

In spells :
Code:
        <rune name="Manarune" id="2266" aggressive="0" charges="1" needtarget="1" maglv="1" exhaustion="1" enabled="1" allowfaruse="1" script="attack/manarune.lua"/>

Error :

[21/12/2008 11:24:22] >> Loading script systems
[21/12/2008 11:24:22] Warning: [Event::loadScript] Can not load script. data/spells/scripts/attack/manarune.lua
[21/12/2008 11:24:22] data/spells/scripts/attack/manarune.lua:10: 'end' expected (to close 'function' at line 6) near '<eof>'
 
Here you are;]

PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
    local mana = math.random(200, 300)
    doPlayerAddMana(cid, mana)
    --doSendAnimatedText(getPlayerPosition(cid), '+' .. mana, TEXTCOLOR_GOLD)
    return doCombat(cid, combat, var)
end
 
No problem;] I don't even mind about rep points ... for me it's stupid and noobish when some1 only says"When I help you, You must give me rep!"
You just have said it in different way, that you are willing to get a rep for help, but still you are asking for rep.
You can say it in few ways:
1 Give rep!
2 I'm willing to get rep.
3 I don't mind rep.
4 If I have helped give rep.
..... (There is lots of ways to say it) Why complicate it just say "If I have helped give rep"-you are not forcing anyone and it sound much nicer than for ex."give rep!"

Topic:
[21/12/2008 11:24:22] data/spells/scripts/attack/manarune.lua:10: 'end' expected (to close 'function' at line 6) near '<eof>'
In here it told you that end expected to close function (which is in line 6), shouldn't that be obvious?
 
Last edited:
Moved to Request and Support.

Post in correct section to get fastest help!
 
You just have said it in different way, that you are willing to get a rep for help, but still you are asking for rep.
You can say it in few ways:
1 Give rep!
2 I'm willing to get rep.
3 I don't mind rep.
4 If I have helped give rep.
..... (There is lots of ways to say it) Why complicate it just say "If I have helped give rep"-you are not forcing anyone and it sound much nicer than for ex."give rep!"

Topic:
[21/12/2008 11:24:22] data/spells/scripts/attack/manarune.lua:10: 'end' expected (to close 'function' at line 6) near '<eof>'
In here it told you that end expected to close function (which is in line 6), shouldn't that be obvious?


You know I don't really mind about that... That's only think for egoists- "I helped you! Give rep!" It's just virtual reputation... as gp in tibia... it's virtual it's not rl money
 
RE

This is a nice script for a level/magic level depending manarune!

It wasn't made by me. Can't remember who made it. I'm just using it too.


PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)

local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local pos = getPlayerPosition(cid)

-- Mana Formula Settings --
-- You can use "level" and "mlevel" --
local mana_minimum = (level * 12.33) + (mlevel * 4) - 50
local mana_maximum = (level * 13.5) + (mlevel * 5)
-- Mana Formula Settings END --
local mana_add = math.random(mana_minimum, mana_maximum)
doPlayerAddMana(cid, mana_add)
doSendAnimatedText(pos, mana_add, TEXTCOLOR_PURPLE)
return doCombat(cid, combat, var)
end
 
this is my manarune

-- New MF rune by Joao Paulo 3.0 version --
function onUse(cid, item, frompos, item2, topos)
playerpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253}
player = getThingfromPos(playerpos)
ml = getPlayerMagLevel(cid)
lvl = getPlayerLevel(cid)
formula = math.random(((lvl+ml)*30)-(lvl-ml))
if item2.itemid == 1 and ml >= 2 then
doSendMagicEffect(playerpos,1)
doPlayerAddMana(player.uid,formula)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-5)
else
doRemoveItem(item.uid,0)
end
end
if item2.itemid == 1 and ml <= 1 then
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You dont Have Magic Level to use this rune.")
end
if item2.itemid >= 2 then
doPlayerSendCancel(cid,"You can only use this rune in you or in players.")
doSendMAgicEffect(frompos,2)
end
return 1
end
 
Back
Top