Results 1 to 11 of 11
  1. #1
    xbetim's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    42

    Cool Pet Heal (HP/MP) // only for Owner // New

    Hi, today i will show you the RIGHT pet heal (hp/mp)! (without Pet Attack)


    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using wServer.realm;
    using wServer.logic.attack;
    using wServer.logic.movement;
    using wServer.logic.loot;
    using wServer.logic.taunt;
    using wServer.logic.cond;
    
    namespace wServer.logic
    {
        partial class BehaviorDb
        {
            static _ Pets = Behav()
                .InitMany(0x1600, 0x1641, Behaves("Pet",
                    If.Instance(new PetBehaves(), PetChasing.Instance(9, 5, 1)),
                        Cooldown.Instance(1750, new PetHealHpMp()),
                        Cooldown.Instance(1750, new PetHealHpMp())
                ));
        }
    }

    And now make a new .cs file and rename it to: PetHealHpMp.cs

    Edit the PetHealHpMp.cs to:


    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using wServer.realm;
    using wServer.realm.entities;
    using wServer.svrPackets;
    
    namespace wServer.logic.cond
    {
        class PetHealHpMp : Behavior
        {
            protected override bool TickCore(RealmTime time)
            {
                float dist = 20;
                Player entity = (Host.Self.PlayerOwner) as Player;
                while (entity != null)
                {
                    int mp = entity.MP;
                    int maxMp = entity.Stats[1] + entity.Boost[1];
                    mp = Math.Min(mp + 15, maxMp);
                    if (mp != entity.MP)
                    {
                        int n = mp - entity.MP;
                        entity.MP = mp;
                        entity.UpdateCount++;
                        entity.Owner.BroadcastPacket(new ShowEffectPacket()
                        {
                            EffectType = EffectType.Potion,
                            TargetId = entity.Id,
                            Color = new ARGB(0xffffffff)
                        }, null);
                        entity.Owner.BroadcastPacket(new NotificationPacket()
                        {
                            ObjectId = entity.Id,
                            Text = "+" + n,
                            Color = new ARGB(0xff0000ff)
                        }, null);
                    }
                        int hp = entity.HP;
                        int maxHp = entity.Stats[0] + entity.Boost[0];
                        hp = Math.Min(hp + 35, maxHp);
                        if (hp != entity.HP)
                        {
                            int m = hp - entity.HP;
                            entity.HP = hp;
                            entity.UpdateCount++;
                            entity.Owner.BroadcastPacket(new ShowEffectPacket()
                            {
                                EffectType = EffectType.Potion,
                                TargetId = entity.Id,
                                Color = new ARGB(0xffffffff)
                            }, null);
                            entity.Owner.BroadcastPacket(new ShowEffectPacket()
                            {
    
                                EffectType = EffectType.Trail,
                                TargetId = Host.Self.Id,
                                PosA = new Position() { X = entity.X, Y = entity.Y },
                                Color = new ARGB(0xffffffff)
                            }, null);
                            entity.Owner.BroadcastPacket(new NotificationPacket()
                            {
                                ObjectId = entity.Id,
                                Text = "+" + m,
                                Color = new ARGB(0xffff0000)
                            }, null);
    
                            return true;
                        }
                        entity = null;
                    }
                    return false;
                }
            }
    }
    Save it and open SharpDevelop, go to wServer\logic and move the PetHealHpMp.cs file in the "cond" folder

    And now Rebuild the Solution!


    (U can change the hp and mp! go to: PetHealHpMp.cs and find: mp = Math.Min(mp + 15, maxMp); for MP or:
    hp = Math.Min(hp + 35, maxHp); for hp (change the blue numbers)

    Enjoy!
    Last edited by xbetim; 10-20-2014 at 01:53 PM.

  2. #2
    KieronZeCoder69's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    On my computer
    Posts
    439
    Reputation
    20
    Thanks
    219
    My Mood
    Aggressive
    dude... i already posted this, you have just copied my whole thread
    bump @Lovroman @Raple
    you guys should close this, its a replica of mine :/

  3. #3
    xbetim's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    42
    Quote Originally Posted by KieronZeCoder69 View Post
    dude... i already posted this, you have just copied my whole thread
    bump @Lovroman @Raple
    you guys should close this, its a replica of mine :/
    dude, its from artufe but changed and deleted the errors, its not yours!

  4. #4
    Ahl's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    /modcp
    Posts
    16,599
    Reputation
    3219
    Thanks
    5,383
    My Mood
    Angelic
    Well this has been posted before...

    And if people really needed help, other sources will give them the answer.
    News Force Head Editor from 09/14/2018 - 03/02/2020
    Publicist from 11/23/2017 - 06/07/2019
    Global Moderator since 09/24/2017
    Minion+ from 04/16/2017 - 09/24/2017
    Market Place Minion from 04/16/2017 - 09/24/2017
    Minecraft Minion from 02/23/2017 - 09/24/2017
    Realm of the Mad God Minion from 11/06/2016 - 09/24/2017

    Middleman from 09/14/2016 - 09/24/2017
    News Force Editor from 08/23/2016 - 09/14/2018
    News Force (Section of the Week) from 03/21/2016 - 07/17/2017
    News Force (User News) from 10/18/2015 - 09/14/2018

    Donator since 03/16/2015
    Realm of the Mad God Editor from 05/20/2014 - 07/08/2014
    Member since 12/23/2012


    Rep Power: 82

  5. #5
    KieronZeCoder69's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    On my computer
    Posts
    439
    Reputation
    20
    Thanks
    219
    My Mood
    Aggressive
    Quote Originally Posted by Ahlwong View Post
    Well this has been posted before...

    And if people really needed help, other sources will give them the answer.
    i agree with you ahwlong
    also another thing is that with pethealingmphp you can't get custom pets & all pets will heal the same thing...

  6. #6
    Fucking Moron's Avatar
    Join Date
    Mar 2014
    Gender
    male
    Location
    I need smoke
    Posts
    5,529
    Reputation
    1371
    Thanks
    1,618
    My Mood
    Buzzed
    Quote Originally Posted by KieronZeCoder69 View Post
    dude... i already posted this, you have just copied my whole thread
    bump @Lovroman @Raple
    you guys should close this, its a replica of mine :/
    @KieronZeCoder69 this is true to some extent

    Quote Originally Posted by xbetim View Post
    dude, its from artufe but changed and deleted the errors, its not yours!
    This is also true.

  7. #7
    Ahl's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    /modcp
    Posts
    16,599
    Reputation
    3219
    Thanks
    5,383
    My Mood
    Angelic
    Quote Originally Posted by KieronZeCoder69 View Post
    i agree with you ahwlong
    also another thing is that with pethealingmphp you can't get custom pets & all pets will heal the same thing...
    Well then lets see the community try use this and see how many help requests are needed
    News Force Head Editor from 09/14/2018 - 03/02/2020
    Publicist from 11/23/2017 - 06/07/2019
    Global Moderator since 09/24/2017
    Minion+ from 04/16/2017 - 09/24/2017
    Market Place Minion from 04/16/2017 - 09/24/2017
    Minecraft Minion from 02/23/2017 - 09/24/2017
    Realm of the Mad God Minion from 11/06/2016 - 09/24/2017

    Middleman from 09/14/2016 - 09/24/2017
    News Force Editor from 08/23/2016 - 09/14/2018
    News Force (Section of the Week) from 03/21/2016 - 07/17/2017
    News Force (User News) from 10/18/2015 - 09/14/2018

    Donator since 03/16/2015
    Realm of the Mad God Editor from 05/20/2014 - 07/08/2014
    Member since 12/23/2012


    Rep Power: 82

  8. #8
    filenub's Avatar
    Join Date
    May 2014
    Gender
    female
    Location
    ---
    Posts
    405
    Reputation
    10
    Thanks
    525
    Quote Originally Posted by Sucidial View Post

    @KieronZeCoder69 this is true to some extent
    Honestly I feel if someone has the audacity to steal someone's work without crediting them they have no right to claim their own work they actually made to be their own. If someone steals someone's work and claims it as their own but then makes something that is stolen by another person that would be a situation where I have absolutely no respect for either person.

  9. #9
    Fucking Moron's Avatar
    Join Date
    Mar 2014
    Gender
    male
    Location
    I need smoke
    Posts
    5,529
    Reputation
    1371
    Thanks
    1,618
    My Mood
    Buzzed
    Quote Originally Posted by filenub View Post
    Honestly I feel if someone has the audacity to steal someone's work without crediting them they have no right to claim their own work they actually made to be their own. If someone steals someone's work and claims it as their own but then makes something that is stolen by another person that would be a situation where I have absolutely no respect for either person.
    Do you not know what fucking "to an extent" means you fucking fool?

  10. #10
    Stellar Spark's Avatar
    Join Date
    Jun 2013
    Gender
    female
    Posts
    724
    Reputation
    35
    Thanks
    799
    Quote Originally Posted by Sucidial View Post

    Do you not know what fucking "to an extent" means you fucking fool?
    Calm down, that looks like it could have been typed by Case. I don't think filenub was trying to offend anyone, though I bet he could have worded that statement better. From what I know, a certain person made a nexus fountain pet, then (I think, memory foggy) artufe made an owner-only pet heal behavior that was posted on MPGH.

    (@ original post) I don't exactly know why this is called the "right" pet heal behavior, I'm sure Phoenix 1.9.2 has a more efficient system involving XML tags and such. Though I also believe that in the older Phoenix leak, there was a version that could be easily imported to another source.

    (inb4 this post gets deleted)

  11. #11
    Fucking Moron's Avatar
    Join Date
    Mar 2014
    Gender
    male
    Location
    I need smoke
    Posts
    5,529
    Reputation
    1371
    Thanks
    1,618
    My Mood
    Buzzed
    Quote Originally Posted by ProHackBot999 View Post


    Calm down, that looks like it could have been typed by Case. I don't think filenub was trying to offend anyone, though I bet he could have worded that statement better. From what I know, a certain person made a nexus fountain pet, then (I think, memory foggy) artufe made an owner-only pet heal behavior that was posted on MPGH.

    (@ original post) I don't exactly know why this is called the "right" pet heal behavior, I'm sure Phoenix 1.9.2 has a more efficient system involving XML tags and such. Though I also believe that in the older Phoenix leak, there was a version that could be easily imported to another source.

    (inb4 this post gets deleted)
    It wont :{
    Welcome to MPGH

Similar Threads

  1. New zealand players only for sale bf 3 and 4 pc
    By fishncips4T in forum Coupons, Deals and Discounts
    Replies: 0
    Last Post: 11-23-2013, 10:38 PM
  2. How to make pets heal on the new mmoe
    By Dragonlord3344 in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 31
    Last Post: 11-16-2013, 11:41 PM
  3. Searching for a new Co-Owner"MUST READ FIRST!"...
    By JAYDAH15 in forum Minecraft Discussions
    Replies: 5
    Last Post: 02-15-2013, 08:07 AM
  4. New CA Tele hack with anti kick u.s.w i try only for CA EU
    By elite40 in forum Combat Arms Hacks & Cheats
    Replies: 1
    Last Post: 01-08-2010, 03:09 PM
  5. NEW MAP ONLY FOR CAE
    By x_GAZ_x in forum Combat Arms Hacks & Cheats
    Replies: 3
    Last Post: 04-16-2009, 08:20 AM