Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1
    Grunt

    Join Date
    Jan 2010
    Location
    USA
    Posts
    47
    Post Thanks / Like
    Rep Power
    15
    Reputation
    6

    Red face Need help with C++ changing stamina health bonus, PLS look


    Register to remove this ad
    Hello again, I need some help... Ok, so I want to make the health bonus from stamina more than just 10hp/STA point I was looking through the scripts in my source and found the C++ file called statsystem.cpp and in it i found the code

    Code:
    float Player::GetHealthBonusFromStamina()
    {
        float stamina = GetStat(STAT_STAMINA);
        float baseStam = stamina < 20 ? stamina : 20;
        float moreStam = stamina - baseStam;
        return baseStam + (moreStam*10.0f);
    I was wondering if it was just a simple edit like

    Code:
    float Player::GetHealthBonusFromStamina()
    {
        float stamina = GetStat(STAT_STAMINA);
        float baseStam = stamina < 20 ? stamina : 20;
        float moreStam = stamina - baseStam;
        return baseStam + (moreStam*500.0f);
    I dont want to have to recompile the core and stuff if i dont have to so if anyone knows please let me know if this is right.

    Also, is there any kind of SQL file i could make to change all of the items at once to have like x20 STA and stuff pls let me know

    Thanks again,
    Kandi




    › See More: Need help with C++ changing stamina health bonus, PLS look
    Last edited by kandi; 19-08-10 at 12:55 AM. Reason: spelling error



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    I believe the "moreStam*500.0f);" is the correct section.
    However, I'm NOT sure if there is a way to change EVERY item to have 20x more stamina than it has, this would probably need to be an Update MySQL with all the items you want changed (which will be used in your server) rather than all the pointless ones that nobody ever needs nor wants.

    Have a look through all the items you'll be using, and try to update them with a SQL file (You may need to make it yourself, however if your having difficulties I'll help)..

  4. #3
    Grunt

    Join Date
    Jan 2010
    Location
    USA
    Posts
    47
    Post Thanks / Like
    Rep Power
    15
    Reputation
    6
    Sorry, lol no way i am letting anyone else go through changine every item that I will be using haha, its gonna suck. But I just tested changing the bonuses in the source and it works beautifully so I will just stick with that rather than trying to change all the files in my items table. Thanks for the help...again

    Kandi ;D

  5. #4
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    No problem Have fun :P

  6. #5
    Grunt

    Join Date
    Jan 2010
    Location
    USA
    Posts
    47
    Post Thanks / Like
    Rep Power
    15
    Reputation
    6
    OK, so I have changed the attack power, stamina and all that sort of stuff. I now need to change the spell power but the values are all wierd and have like ++i and stuff instead of the 0.00f like in the other one, if someone can help with this i would be happy and ill you if i haven't already lol


    <3 Kandi

  7. #6
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    Can you please copy the code you want to change (that being the SP stat) and paste it into a reply.

    Makes it easier for us to help

  8. #7
    Grunt

    Join Date
    Jan 2010
    Location
    USA
    Posts
    47
    Post Thanks / Like
    Rep Power
    15
    Reputation
    6
    OK, well I beleive this is the code

    Code:
    void Player::ApplySpellPowerBonus(int32 amount, bool apply)
    {
        m_baseSpellPower+=apply?amount:-amount;
        // For speed just update for client
        ApplyModUInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS, amount, apply);
        for(int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
            ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, amount, apply);;
    }
    void Player::UpdateSpellDamageAndHealingBonus()
    {
        // Magic damage modifiers implemented in Unit::SpellDamageBonusDone
        // This information for client side use only
        // Get healing bonus for all schools
        SetStatInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS, SpellBaseHealingBonusDone(SPELL_SCHOOL_MASK_ALL));
        // Get damage bonus for all schools
        for(int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
            SetStatInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, SpellBaseDamageBonusDone(SpellSchoolMask(1 << i)));
    }
    I just dont know what i have to do with it... I want to make spell power higher using the necessary stats to do so...sorry when it comes to this i have no idea what is going on...kinda just wingin it and trying to learn while I do it


    Kandi ;D

  9. #8
    Senior Sergeant
    MikExV™'s Avatar
    Join Date
    Feb 2010
    Location
    Ohio
    Posts
    117
    Post Thanks / Like
    Rep Power
    15
    Reputation
    35
    I'd recommend changing the spell power in the config befor chaning in the core.

    Just got my pc back

  10. #9
    Banned

    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    652
    Post Thanks / Like
    Rep Power
    0
    Reputation
    103
    Quote Originally Posted by Core
    SetStatInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS +i, SpellBaseDamageBonusDone(SpellSchoolMask(1 << i)));

    I believe you would edit that line. Could possibly be the "1" that you'd need to change, but I'm not sure. If you dont want to risk it, leave it as it is.

  11. #10
    Grunt

    Join Date
    Jan 2010
    Location
    USA
    Posts
    47
    Post Thanks / Like
    Rep Power
    15
    Reputation
    6

    Register to remove this ad
    OK, well i have decided to just change all of the items because i have found that it is fun and relaxing....hahaha, maybe thats why i wanna shoot myself? lol anyways all I had for now was 1 more question is there a way to make an sql file that would change all items in my database to BoE?

    P.S. I use Mangos

    Kandi;D

    Oh and as for changing the core...NO MORE until i learn more haha something went seriously wrong and now its un fixable lol
    Last edited by kandi; 20-08-10 at 12:13 PM.

 

 
Page 1 of 3 123 LastLast

Visitors found this page by searching for:

arcemu stamina

Arcemu stamina x100

C stamina

arcemu stamina more health

SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 02:28 PM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org