Page 1 of 1

ExShowScreenMessage

Posted: Sun May 24, 2009 7:43 pm
by Mage
Hi boys

How can i put a color in the message that appear with ExShowScreenMessage? Default are Withe...

Code: Select all

 /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. *  * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. *  * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */package net.sf.l2j.gameserver.network.serverpackets; /** * @author Kerberos * */public class ExShowScreenMessage extends L2GameServerPacket{    private int _type;    private int _sysMessageId;    private int _unk1;    private int _unk2;    private int _unk3;    private int _unk4;    private int _size;    private int _position;    private boolean _effect;    private String _text;    private int _time;     public ExShowScreenMessage (String text, int time)    {        _type = 1;        _sysMessageId = -1;        _unk1 = 0;        _unk2 = 0;        _unk3 = 0;        _unk4 = 0;        _position = 0x02;        _text = text;        _time = time;        _size = 0;        _effect = false;    }     public ExShowScreenMessage (int type, int messageId, int position, int unk1, int size, int unk2, int unk3,boolean showEffect, int time,int unk4, String text)    {        _type = type;        _sysMessageId = messageId;        _unk1 = unk1;        _unk2 = unk2;        _unk3 = unk3;        _unk4 = unk4;        _position = position;        _text = text;        _time = time;        _size = size;        _effect = showEffect;    }        @Override    public String getType()    {        return "[S]FE:39 ExShowScreenMessage";    }     @Override    protected void writeImpl()    {        writeC(0xfe);        writeH(0x39);        writeD(_type); // 0 - system messages, 1 - your defined text        writeD(_sysMessageId); // system message id (_type must be 0 otherwise no effect)        writeD(_position); // message position        writeD(_unk1); // ?        writeD(_size); // font size 0 - normal, 1 - small        writeD(_unk2); // ?        writeD(_unk3); // ?         writeD(_effect == true ? 1 : 0); // upper effect (0 - disabled, 1 enabled) - _position must be 2 (center) otherwise no effect        writeD(_time); // time        writeD(_unk4); // ?        writeS(_text); // your text (_type must be 1, otherwise no effect)    }}
Thankz bye

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 6:53 am
by janiii
try to use _unk2 as color.

e.g.:

Code: Select all

private int _unk3 = 0xaadd77;

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 2:16 pm
by Mage
it didn't work.

Any ideas?

Thankz however janii

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 2:37 pm
by janiii
try all _unk variables ^^

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 2:57 pm
by Mage
Oki but...

How do i set?

I put:

Code: Select all

    private int _type;    private int _sysMessageId;    private int _unk1 = 0xff0000;    private int _unk2 = 0xff0000;    private int _unk3 = 0xff0000;    private int _unk4 = 0xff0000;    private int _size;    private int _position;    private boolean _effect;    private String _text;    private int _time; 
And when i put the message:

sendPacket(new ExShowScreenMessage(1, 0, 4, 0, 0, 0,0, false, 2000, 0, " aaa bbb ccc"));

To activate the color, what do i put? 0? 1? color?

Thankz janii =)

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 3:10 pm
by janiii
ah, i didn't realize that the unk variables are overriden in the constructor. so set them there :)

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 3:14 pm
by Mage
Ok! Now i try this...


1. private int _type;
2. private int _sysMessageId;
3. private int _unk1;
4. private int _unk2;
5. private int _unk3;
6. private int _unk4;
7. private int _size;
8. private int _position;
9. private boolean _effect;
10. private String _text;
11. private int _time;
12.



sendPacket(new ExShowScreenMessage(1, 0, 4, 0xff0000, 0, 0xff0000, 0xff0000, false, 2000, 0xff0000, " aaa bbb ccc"));

:D

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 3:18 pm
by janiii
^^ yeah, GL and i hope something will work :) i am curious too :D

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 3:24 pm
by Mage
Nothing

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 4:27 pm
by janiii
then probably not possible :( i tried it now too, various variants of the unk variables, and nothing.. the only thing i got is, that unk4 is probably a shadein/shadeout effect when set to 1.

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 5:04 pm
by momo61
geez ... what'S all this about ^^ ?

Re: ExShowScreenMessage

Posted: Mon May 25, 2009 5:43 pm
by Bloodshed
big white text in the screen that happends with a number of events, raids etc etc

Image

Re: ExShowScreenMessage

Posted: Thu May 28, 2009 10:34 am
by Emanuel01
I think u can change the color only on client side .

Re: ExShowScreenMessage

Posted: Wed Jul 28, 2010 10:38 am
by rychoo84
I was going to write a post concerning this issue. That topic is quite old - can you confirm now that its colour is editable only via client? :(