How to make the UI *blink*

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

How to make the UI *blink*

Postby Are » Wed Mar 31, 2010 4:03 pm

Hey Guys,

I was recently trying something out at the Pentragon Server an noticed, that in the Tutorial Zone, if you follow the quest, your Mini Stats Window starts blinking. Youtube Link

That attracted my attention and I started the packet Logger.
What I got was this Packet:
Code: Select all
<RECV TCP Time: 00h01m34s162ms Code:0x004C Len: 8>
06 37 08 0B 00 00 00 00 .7......
Which looks in the Logconverter like:
Code: Select all
00:01:34.162 S=>C 0x4C visual effect (oid:0x0637 subcode:8(BlinkPanel) flag:11(MiniInfo_Window) unk1:0)
My question now is, how do I use this information, to make the dolserver doing the same thing? I know that there are many packet manipulations in the PacketLibs, but I have no Idea how to add this new packet to it and make use of it.

Do you have any Idea?
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: How to make the UI *blink*

Postby Tolakram » Wed Mar 31, 2010 4:25 pm

Make a method implemented in ipacketlib and in the packets for SendBlinkPanel and in the implementation send the build the packet and set it to the client.

Check out packetlib186.cs, the last method

public override void SendMinotaurRelicBarUpdate(GamePlayer player, int xp)

uses the visualeffect packet to send an update. Just duplicate this but send the blink codes instead.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: How to make the UI *blink*

Postby Graveen » Wed Mar 31, 2010 4:42 pm

Yay nice ! Please check if stoc 0x4C does not already exist - well if the packet logguer is giving it to you, it is perhaps already defined.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: How to make the UI *blink*

Postby Are » Wed Mar 31, 2010 4:58 pm

Yes it is defined in IPacketLib.cs:
VisualEffect = 0x4C

It is used for many thinks like SendPlayerFreeLevelUpdate, SendNPCsQuestEffect, SendWarlockChamberEffect and so on.

Whoohoo, it worked! :) I have written this little Method...
Code: Select all
public override void SendBlinkPanel(GamePlayer player)
{
GSTCPPacketOut pak = new GSTCPPacketOut(GetPacketCode(ePackets.VisualEffect));

pak.WriteShort((ushort)player.ObjectID);
pak.WriteByte((byte)8);
pak.WriteByte((byte)11);
pak.WriteByte((byte)0);

SendTCP(pak);
}
and calling it via a /blink command.
Code: Select all
namespace DOL.GS.Commands
{
[CmdAttribute(
"&blink",
ePrivLevel.Player,
"make me blink",
"/blink")]
public class BlinkCommandHandler : ICommandHandler
{
public void OnCommand(GameClient client, string[] args)
{
GamePlayer player = client.Player;
player.Out.SendBlinkPanel(player);

client.Out.SendMessage("Starting Blinking!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
}
}
}
And now, when I'm typing /blink, my Status window Starts blinking like in my video :). I'll try some other values now, maybe that will affect other UI Elements.

Thanks to you both. :)
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: How to make the UI *blink*

Postby Tolakram » Wed Mar 31, 2010 5:09 pm

Does it stop after a set amount of time?

This could make a good April fools patch. :mrgreen:
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: How to make the UI *blink*

Postby Are » Wed Mar 31, 2010 5:16 pm

Yes it blinks 5 times and stops after that. I tried out some more FLAG Bytes, look at this Youtube Video :).

It seems, that you can make every single UI Element blink. This is very usefull to get the players attention (GM writes something important to the chat and makes the chatbar blink :P ).
Last edited by Are on Wed Mar 31, 2010 5:25 pm, edited 1 time in total.
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: How to make the UI *blink*

Postby Tolakram » Wed Mar 31, 2010 5:25 pm

I watched it, that's awesome. :)
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: How to make the UI *blink*

Postby Graveen » Wed Mar 31, 2010 5:29 pm

Are, can you define an enum for the knowed flags, and push a command + the packet in contrib section ?
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: How to make the UI *blink*

Postby Are » Wed Mar 31, 2010 5:31 pm

Are, can you define an enum for the knowed flags, and push a command + the packet in contrib section ?
I just asked the same thing myself :P.

The question that now grows is, why did the LogConverter know, that Flag 11 is MiniInfo_Window? Is it somewhere in the code, and I could maybe link that together?

The DolServer has no info like "MiniInfo_Window"


Edit:

See what I have found in the Logconverter Source :D
Code: Select all
public class BlinkPanelUpdate: ASubData
{
public enum ePanel : byte
{
Command_Window = 0,
Journal_Button = 1,
Map_Button = 2,
Sit_Button = 3,
Stats_Index_Window = 4,
Attributes_Button = 5,
Inventory_Button = 6,
Specializations_Button = 7,
CombatStyles_Button = 8,
MagicSpells_Button = 9,
Group_Button = 0x0A,
MiniInfo_Window = 0x0B,
CommandEnter_Window = 0x0C,
QuickBar1_Window = 0x0D,
QBar1_Bank1Button = 0x0E,
QBar1_Bank2Button = 0x0F,
QBar1_Bank3Button = 0x10,
QBar1_Bank4Button = 0x11,
QBar1_Bank5Button = 0x12,
QBar1_Bank6Button = 0x13,
QBar1_Bank7Button = 0x14,
QBar1_Bank8Button = 0x15,
QBar1_Bank9Button = 0x16,
QBar1_Bank10Button = 0x17,
}

public byte flag;
public uint unk1; // unused

public override void Init(StoC_0x4C_VisualEffect pak)
{
flag = pak.ReadByte();
unk1 = pak.ReadInt();
}

public override void MakeString(TextWriter text, bool flagsDescription)
{
text.Write("(BlinkPanel) flag:{0}({1})",
flag, (ePanel)flag);
if (flagsDescription)
text.Write(" unk1:{0}", unk1);
}
}
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: How to make the UI *blink*

Postby bluraven » Wed Mar 31, 2010 7:31 pm

Wow, nice discovery Are, and way to go for figuring it out and implementing it! =) Very useful to those who are re-creating the tutorial stuff.
Image
bluraven
Support Team
 
Posts: 1484
Joined: Mon Mar 19, 2007 8:18 am
Location: Las Vegas, NV

Re: How to make the UI *blink*

Postby Graveen » Wed Mar 31, 2010 8:02 pm

Ah damn i hope the DOL code is not "too much" in late of the PacketLogguer :D
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: How to make the UI *blink*

Postby Are » Wed Mar 31, 2010 8:15 pm

I'll try to figure out, if there are other Flags as mentioned before and create an enum for the Dolserver. I think it would also be usefull to add something like /player blink to the GM commands. Unfortunately I can only continue it next week, too much work to do :P.
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: How to make the UI *blink*

Postby Are » Fri Apr 02, 2010 6:55 am

BTW. is there anyone actively working on the Tutorial Zones?
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: How to make the UI *blink*

Postby Roozzz » Fri Apr 02, 2010 7:16 am

BTW. is there anyone actively working on the Tutorial Zones?
Argo did a lot of work on them, but he is on small break I think :p
Quidquid latine dictum sit, altum videtur
Roozzz
Database Team
 
Posts: 1943
Joined: Wed Dec 06, 2006 11:00 am

Re: How to make the UI *blink*

Postby Argo » Fri Apr 02, 2010 3:30 pm

BTW. is there anyone actively working on the Tutorial Zones?
Argo did a lot of work on them, but he is on small break I think :p
correct, and i really really nead that break :) but don`t worry, i am not lost to DOL :)

kind regards
Argoras
Möge Gott sein zwischen Dir und dem Leid, an allen dunklen und verlassenen Orten, die Du erreichen wirst.
Argo
Server Team
 
Posts: 1760
Joined: Thu Sep 18, 2008 6:21 pm
Location: Berlin, Germany


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 0 guests