Jump to content
  • 0

XP FEEDBACK


Question

Posted

I've been thinking, if possible as the item feedback mod, why not have XP as well?
It would be cool

 

When i kill and npc working the message EXP RECEBIDA

Quote

        public static void SendEntityDie(Entity en)
        {
            SendDataToProximity(en.MapId, new EntityDiePacket(en.Id, en.GetEntityType(), en.MapId));
            PacketSender.SendActionMsg(en, "EXP RECEBIDA", CustomColors.Alerts.ModJoined);
        }
 

I just need to get the NPC EXP information to convert it to a string

 

Can someone help me?

2 answers to this question

Recommended Posts

  • 0
Posted
Spoiler

            switch (en)
            {
                case Npc npc:
                    PacketSender.SendActionMsg(en, "XP: " + npc.Base.Experience, CustomColors.Alerts.ModJoined);
                    break;
            }

 

this works. im not sure how to do this without using switch, but you can just add more cases to this for resource/item exp in different string colors i guess :P

 

i also dont like how the XP sometimes overlaps with damage numbers, so id personally try using something other than actionMsg

  • 0
Posted

I tried this

 

https://prnt.sc/tksr7i

 

Can you tell me what format to define the color of the message?

 

I tested it here, XP is low on damage :/

 

 

 

EDIT: What if the message appears on top of the player and not on top of the monster?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...