+ Reply to Thread
  1. #1
    Senior Member
    Join Date
    Jul 2009
    Posts
    383
    Reputation
    Nofus is on a distinguished road
    Status
    Nofus is online now

    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

    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

    <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.

  2. #2
    Vivere militare est Backy's Avatar
    Join Date
    Feb 2009
    Location
    P(r)oland/Sanok
    Posts
    158
    Reputation
    Backy is on a distinguished road
    Status
    Backy is offline
    This content is only visible to registered users.

    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 :
    This content is only visible to registered users.

    @edit
    Now ?
    Last edited by Backy; 4th February 2010 at 17:59.

  3. #3
    Senior Member
    Join Date
    Jul 2009
    Posts
    383
    Reputation
    Nofus is on a distinguished road
    Status
    Nofus is online now
    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?

  4. #4
    Vivere militare est Backy's Avatar
    Join Date
    Feb 2009
    Location
    P(r)oland/Sanok
    Posts
    158
    Reputation
    Backy is on a distinguished road
    Status
    Backy is offline
    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

  5. #5
    I herrd u liek mudkipz Cykotitan's Avatar
    Join Date
    Nov 2008
    Posts
    10,043
    Reputation
    Cykotitan is a jewel in the rough Cykotitan is a jewel in the rough Cykotitan is a jewel in the rough
    Status
    Cykotitan is offline
    still no.

  6. #6
    Senior Member
    Join Date
    Jul 2009
    Posts
    383
    Reputation
    Nofus is on a distinguished road
    Status
    Nofus is online now
    Cykotitan, what should i do?

  7. #7
    ...has super panda powers bogart's Avatar
    Join Date
    Jun 2009
    Location
    open the door of ur house..
    Posts
    1,960
    Reputation
    bogart is on a distinguished road
    Status
    bogart is offline
    cry =/

  8. #8
    I herrd u liek mudkipz Cykotitan's Avatar
    Join Date
    Nov 2008
    Posts
    10,043
    Reputation
    Cykotitan is a jewel in the rough Cykotitan is a jewel in the rough Cykotitan is a jewel in the rough
    Status
    Cykotitan is offline

  9. #9
    Senior Member
    Join Date
    Jul 2009
    Posts
    383
    Reputation
    Nofus is on a distinguished road
    Status
    Nofus is online now
    thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts