Go Back   OtLand > OpenTibia > Support

Reply
Old 4th February 2010, 17:38   #1 (permalink)
Nofus
Member
 
Join Date: Jul 2009
Posts: 64
Reputation: Nofus is on a distinguished road



Mana rune problem.

Hey guys i've got a pro mana rune but when i heals, the amount of healing doesnt change because of what your mana level is, It heals 1500 all the time, even if you're lvl 1 or lvl 900. I want it to heal because of what Magic level you have. Here is the lua

Quote:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, 1500) ---- how much it heal .
return doCombat(cid, combat, var)
end

and here it is in the spells.xml

Quote:
<rune name="Pro Mana Rune" id="2284" allowfaruse="1" charges="5" lvl="100" exhaustion="800" maglv="15" aggressive="0" needtarget="1" blocktype="solid" script="promanarune.lua"/
So please help me people, How do I do Explain detailed and please with an example. Thank you.
Nofus is offline   Reply With Quote
Old 4th February 2010, 17:43   #2 (permalink)
Backy
Vivere militare est
 
Backy's Avatar
 
Join Date: Feb 2009
Location: P(r)oland/Sanok
Posts: 154
Reputation: Backy will become famous soon enough



becouse you dont have option math.random

or local config MIN and MAX.

You still need help? If you dont know how to make it post here.

@edit

Try this :
@edit
Now ?
__________________

Last edited by Backy; 4th February 2010 at 17:59.
Backy is online now   Reply With Quote
Old 4th February 2010, 18:52   #3 (permalink)
Nofus
Member
 
Join Date: Jul 2009
Posts: 64
Reputation: Nofus is on a distinguished road



Quote:
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 getCombatFormulas(cid, level, magicLevel)
local min = (level * 1) + (mlevel * 4) * 2.5
local max = (level * 1) + (mlevel * 4) * 3.0
local mana_add = math.random(min, max)
if min < 350 then
min = 350
end
return min, max
end

function onCastSpell(cid, var)
doPlayerAddMana(cid, mana_add)
return doCombat(cid, combat, var)
end
If i copy this in the .lua it will work? it will heal by what magic lvl u have?
Nofus is offline   Reply With Quote
Old 4th February 2010, 19:57   #4 (permalink)
Backy
Vivere militare est
 
Backy's Avatar
 
Join Date: Feb 2009
Location: P(r)oland/Sanok
Posts: 154
Reputation: Backy will become famous soon enough



Quote:
Originally Posted by Nofus View Post
If i copy this in the .lua it will work? it will heal by what magic lvl u have?
Try if dont work post here
__________________
Backy is online now   Reply With Quote
Old 4th February 2010, 21:31   #5 (permalink)
Cykotitan
˙
 
Cykotitan's Avatar
 
Join Date: Nov 2008
Posts: 5,774
Reputation: Cykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond repute



still no.
__________________
Cykotitan is online now   Reply With Quote
Old 4th February 2010, 21:34   #6 (permalink)
Nofus
Member
 
Join Date: Jul 2009
Posts: 64
Reputation: Nofus is on a distinguished road



Cykotitan, what should i do?
Nofus is offline   Reply With Quote
Old 4th February 2010, 21:38   #7 (permalink)
bogart
no u
 
bogart's Avatar
 
Join Date: Jun 2009
Location: back the keyboard
Posts: 772
Reputation: bogart is a jewel in the roughbogart is a jewel in the roughbogart is a jewel in the rough



Send a message via MSN to bogart
cry =/
__________________
<<<< click for rep++ LOL
bogart is offline   Reply With Quote
Old 4th February 2010, 21:39   #8 (permalink)
Cykotitan
˙
 
Cykotitan's Avatar
 
Join Date: Nov 2008
Posts: 5,774
Reputation: Cykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond reputeCykotitan has a reputation beyond repute



__________________
Cykotitan is online now   Reply With Quote
Old 5th February 2010, 19:57   #9 (permalink)
Nofus
Member
 
Join Date: Jul 2009
Posts: 64
Reputation: Nofus is on a distinguished road



thanks
Nofus is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 15:06.
Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO
Copyright ©2007 - 2010, OtLand.net.