PDA

View Full Version : Client popup window (like in the tutorial zone)


Derision
08-25-2008, 12:06 PM
I just noticed that when you click OK on the popup, the client sends an opcode:

[Debug] [CLIENT__NET_ERR] Dsfvxcbcx: Unhandled incoming opcode: [OpCode OP_Unknown (0x3816) Size=8]
0: 00 00 00 00 FF FF FF FF | ........


The second 4 bytes are the contents of unknown4232 from the struct.

KLS
08-25-2008, 05:51 PM
unknown4232 sounds like a unique identifier. There are several quests where when you click ok on the popup an entirely new window comes up. It also does function as the level up message, as on live these popup every other level or so giving you tips, reminding you to train certain spells/skills etc.

Derision
08-25-2008, 06:18 PM
Yeah, I'm also guessing the size of the text field is probably 4096 (4 * 1024), rather than 4100 and there is another unknown 4 byte field following which has been 0x00000000 in the packets I have seen.

Andrew80k
08-25-2008, 10:12 PM
unknown4232 sounds like a unique identifier. There are several quests where when you click ok on the popup an entirely new window comes up. It also does function as the level up message, as on live these popup every other level or so giving you tips, reminding you to train certain spells/skills etc.

Currently these pop up on every level and indicate a zone that your new level pertains to. It used to actually point at the "hot zones", but I think has changed to just random zones where the level range of the mobs matches the level you just dinged. It may only apply to lower level toons though. I just dinged my ranger to 71 on live and don't recall seeing the pop up but I could be wrong on that one. This is cool though. I love to see stuff like this getting figured out.

trevius
08-25-2008, 11:35 PM
Ya, that is definitely some cool stuff! Sounds like a great way to set a starter messages for new players or maybe for other info for players new to the game/server. Derision and KLS never cease to amaze me :D It's like Christmas every day!

KLS
08-26-2008, 09:49 PM
Mmm... that actually opens up a lot of possibilities. I know there are people out there that have wanted confirmation boxes for various things. Not to mention what custom quest writers could do with a confirmation system.

trevius
08-26-2008, 10:18 PM
*clasps hands* Ya, I am already starting to think up some possibilities :D Is there any way to add item links into the text? If so, it could possibly be used along with the task system to make a setup similar to WoW explaining the task/quest and have an item link to show the rewards ahead of time if wanted. And if you can put $variables in the text as well, you could even have ways for the box to show totals for collects/kills and how many are left.

I love thinking of ways to use things in ways that wasn't originally intended to make something new and cool. I already setup a new Credits system in my latest zone that is basically a new type of currency similar to LDoN points. And in that same zone I also have experience credits so I can adjust the leveling rate to anything I want it to be without making the zone into a crazy AE zone for getting quick AAs zone. I even added in an anti-AE check to make sure people only get 1 credit max per every 10 seconds. This was all done pretty simply using quest globals, and once I have the zone completed, I will post the quest in the custom quest section in case others want to use it for something similar.

I can't wait to get my hands on the task system and this confirmation box. I am eager to see what can be done with them :D

So_1337
08-26-2008, 11:36 PM
Mmm... that actually opens up a lot of possibilities. I know there are people out there that have wanted confirmation boxes for various things. Not to mention what custom quest writers could do with a confirmation system.
Reply With Quote
That mean rezzes might offer yes/no boxes in the future? Seems to be what you're thinking, I'd imagine.

KLS
08-27-2008, 12:30 AM
Yes possible.

Derision
08-28-2008, 02:46 PM
That mean rezzes might offer yes/no boxes in the future? Seems to be what you're thinking, I'd imagine.

I found the three Rez related opcodes for Titanium, along with the correct struct. I have reworked the current code and have the proper Rez popup box appearing and zone to corpse when accepting the rez, but there are still a few kinks to work out (like currently being able to Rez a corpse twice for double XP). I'll work on it some more tomorrow/at the weekend.

So_1337
08-28-2008, 03:24 PM
Yeah, there's also the issue that once you rez a corpse, that's the only one it ever gets. Seems they should only become flagged that way if someone clicks the "yes" box and their XP is refunded. If they click no, or it expires without ever getting a response, then the corpse should be eligible for a rez still.

I figured it's a ways off for being able to be applied in that manner, since it would more than likely require some work to the way corpses are currently handled (as you mentioned), so I won't get excited just yet. But still nice to see it on the horizon =) Great work as always!

Derision
08-28-2008, 03:33 PM
I figured the bug I mentioned was introduced by me in my hurry to stitch the code together to get the confirmation box working. Corpses (and the worldserver part of the code which is used during Rez) is not an area of the code I have looked at before. I don't think it should be difficult to get it working like it should (famous last words!) :)

Derision
10-23-2008, 05:42 PM
I just discovered that you can embed links to websites in these popups, e.g.


quest::popup("Visit out forums!", "Visit our forums at <a href=\"http://www.eqemulator.net/\">EQEmu!</a>");


If you click on the word EQEmu!, it will launch your default browser and go to www.eqemulator.net.

Angelox
10-23-2008, 06:15 PM
Derision; On that great pop up window you made for Bot tracking; I'm wondering if might be proper to use it as a GM command too? Probably would have some use like that.

AndMetal
10-23-2008, 06:55 PM
Is there any way to add item links into the text?

I remember seeing this posted on the EQItems forums while looking into the rest of the ItemLink stuff.

Posted (http://eqitems.13th-floor.org/phpBB2/viewtopic.php?p=510#510) by Nilwean on Sat Jun 25, 2005 11:17 pm:

Task window uses:
<a WndNotify="27,038415-00001-00001-00001-00001-00001BD0735FF">Master's Book of Wood Elven Culture</a>

However, that doesn't make a valid link when put in the story or help window.

Now, the format for the link changed in DoD, so we should be able to replace the blue text from above with something like this:
<a WndNotify="27,00960F000000000000000000000000000000000000000">Master's Book of Wood Elven Culture</a>
and it should give us a usable link so we can see what's needed/rewarded, etc.

Derision; On that great pop up window you made for Bot tracking; I'm wondering if might be proper to use it as a GM command too? Probably would have some use like that.

Do you mean something like a #popup command that allows you to send a custom popup to someone? Or do you mean specifically for something with bots (like a list of bots or something)?

The former would be pretty easy, we just need a command to wrap to Client::SendPopupToClient.

Angelox
10-23-2008, 08:27 PM
The pop-up that is used for Bot tracking was made by Derision, since it was impossible to pull up the Ranger-Bot window (blocked by client). Currently, it just displays the mobs in the zone; haven't figured out how to track what you see yet, but I have thought of a few things - one is manipulating the 'Find NPC' window (if it's not client blocked too).
Anyways, I find just seeing whats in the zone usefull, thought it might help a GM.

Anybody figured out how to downsize a ship? if you do, we can make a running, ridable ship from BB > OTT > FP and back for PEQ. I can't now because the only one I can use is too big for OOT piers and won't even fit near the FP piers.

Angelox
10-23-2008, 08:28 PM
Dang! THREE first page posts in a row! who will top that?

AndMetal
10-27-2008, 03:07 PM
Currently, it just displays the mobs in the zone
...
Anyways, I find just seeing whats in the zone usefull, thought it might help a GM.


I agree, using #listnpcs is somewhat painful, and a window would be much nicer.

If we put this somewhere else (outside of the #ifdef EQBOTS section in zone/botAI.cpp (http://code.google.com/p/projecteqemu/source/browse/trunk/EQEmuServer/zone/botAI.cpp#1129)), we can very easily call it from zone/command.cpp (http://code.google.com/p/projecteqemu/source/browse/trunk/EQEmuServer/zone/command.cpp):


void EntityList::ShowSpawnWindow(Client* client, int Distance, bool NamedOnly) {

const char *WindowTitle = "Bot Tracking Window";

string WindowText;
int LastCon = -1;
int CurrentCon = 0;

int32 array_counter = 0;

LinkedListIterator<Mob*> iterator(mob_list);
iterator.Reset();

while(iterator.MoreElements())
{
if (iterator.GetData() && (iterator.GetData()->DistNoZ(*client)<=Distance))
{
if(iterator.GetData()->IsTrackable()) {
Mob* cur_entity = iterator.GetData();

if(NamedOnly) {
if(!strncasecmp(cur_entity->GetName(), "a_", 2) ||
!strncasecmp(cur_entity->GetName(), "an_", 3)) {

iterator.Advance();
continue;
}
}


CurrentCon = client->GetLevelCon(cur_entity->GetLevel());

if(CurrentCon != LastCon) {

if(LastCon != -1)
WindowText += "</c>";

LastCon = CurrentCon;

switch(CurrentCon) {

case CON_GREEN: {
WindowText += "<c \"#00FF00\">";
break;
}

case CON_LIGHTBLUE: {
WindowText += "<c \"#8080FF\">";
break;
}
case CON_BLUE: {
WindowText += "<c \"#2020FF\">";
break;
}

case CON_YELLOW: {
WindowText += "<c \"#FFFF00\">";
break;
}
case CON_RED: {
WindowText += "<c \"#FF0000\">";
break;
}
default: {
WindowText += "<c \"#FFFFFF\">";
break;
}
}
}

WindowText += cur_entity->GetCleanName();
WindowText += "<br>";

if(strlen(WindowText.c_str()) > 4000) {
// Popup window is limited to 4096 characters.
WindowText += "</c><br><br>List truncated ... too many mobs to display";
break;
}
}
}

iterator.Advance();
}
WindowText += "</c>";

client->SendPopupToClient(WindowTitle, WindowText.c_str());

return;
}

However, I think it might be better to make it a new function so that we can utilize a search string if we want to filter results.

Congdar
10-27-2008, 03:37 PM
I havn't tried this new bot tracking yet, but a player on my server said that it just lists npc, doesn't give tracking direction. is this the case?