Jump to content

Recommended Posts

Posted (edited)

Hello i have question about cancel msg on display , in my systemmsg now when someone cancel me , its show only last buff wich is canceled , my question is it posible to show all buffs there like this on my pic? 

 

http://prikachi.com/images.php?images/343/9036343E.jpg

Edited by as0ka
Posted

Hello i have question about cancel msg on display , in my systemmsg now when someone cancel me , its show only last buff wich is canceled , my question is it posible to show all buffs there like this on my pic? 

 

http://prikachi.com/images.php?images/343/9036343E.jpg

no

Posted

Do you mean to show multiple cancelled buffs in those big letters message, that shows currently - Song of Storm Guard ?

Yes, it can be done. There are 3 ways: 1. Server Side, 2. Interface.u, 3. Dll files

 

Server side is easiest:

In my H5 pack there is class EffectDispelEffects, it manages Cancels, Cleanses, Banes. After buffs are cancelled, you need to call new method:

private static void showCancelOnScreenMsg(Player effected, Collection<Effect> cancelledBuffs)
{
String msg = getCancelOnSreenMsg(cancelledBuffs);
showCancelOnScreenMsg(effected, msg);
}

private static string getCancelOnScreenMsg(Collection<Effect> cancelledBuffs)
{
StringBuilder builder = new StringBuilder();
boolean firstBuffAdded = false;
for(Effect e : cancelledBuffs)
{
if(firstBuffAdded)
builder.append("\n");
else
firstBuffAdded = true;
String effectName = e.getSkill().getName();
builder.append("- ").append(effectName);
}

return builder.toString();
}

private static void showCancelOnScreenMsg(Player player, String message)
{
player.sendPacket(new ExShowScreenMessage(message, 5000, ExShowScreenMessage.ScreenMessageAlign.MIDDLE_RIGHT, false);
}

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

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..