PDA

View Full Version : Titanium OP_Sound for quest::ding


Derision
08-18-2008, 04:53 PM
Wasn't sure where to put this, as it's not really 'server code'. I wanted to have the Task system play the quest fanfare sound on completion, but found it doesn't work with Titanium. After a bit of digging with IDA, the Titanium Opcode is


OP_Sound=0x541e

trevius
08-18-2008, 05:27 PM
Very nice! I love seeing your updates! I only wish I could help as much as you do!

Derision
08-18-2008, 05:36 PM
I only wish I could help as much as you do!

To be fair Trevius, if you had never made this post:

http://eqemulator.net/forums/showthread.php?t=25603

Then a lot of the work I have done finding Opcodes would never have happened, including this one, as that is what sparked my interest in finding Opcodes using IDA, so you deserve credit too :)

trevius
08-18-2008, 05:52 PM
LOL, well I just figured it was time to try to get something rolling on them since they were a fairly major holdup on making further progress in the emu. I still definitely plan to get back into working on them again soon, but I think I might want to learn a little more C code first so I can understand how to get packet structures set up. It is hard to learn to code only by example from reading the emu source lol. I am going to try a few online tutorials and see if they can't help to get me up to speed. This summer has just been extra busy for me :P

I don't have the 6.2 client, so I can't really use that to expand our known Titanium Opcodes. But I am more interested in trying to get the emulator updated to a newer version of EQ eventually. I have been waiting for another EQ expansion to come out that has a full install of all previous expansions included in the installation. Once it does, I plan to see if I can get some packet collects from live using wireshark. And I also can then use the steps you mentioned in the opcode thread to compare the IDA output from Titanium with the IDA output from the newer version and find opcodes that way 1 by 1. I imagine that would take a while, but once I got the hang of it, it might not be too bad. I think the hard part will be updating the packet structures. I know this is quite a high goal to set, but I would love to make an effort to get this rolling if it is possible for the next expansion release. I would have been fine to just use Anniversary, but even now it is almost as hard to get a copy of as Titanium is, and we need a version that is easily available for all to get.

ChaosSlayer
08-19-2008, 04:31 PM
the DING was prabobly one of the most important parts in entire EQ =)
good to see its finaly been found =)

image
09-18-2015, 10:39 AM
I hate to revive a dead topic, but in this case it seemed warranted I wanted to provide my analysis through assembly this morning of this opcode. This is based on the Titanium client.

http://www.eqpvp.com/testing/testsound.png

Note: The 'Issued Sound' text is from issuing the # command, all the 'You receive..' comes from the OP_Sound packet, entity_id specifying the entity_id in the zone (client is building a list).

struct QuestSound_Struct {
int16 entity_id;
uint8 unknown[18]; // not sure what this is used for honestly, I could be wrong, but in assembly this data looks completely glossed over
uint32 copper;
uint32 silver;
uint32 gold;
uint32 platinum;
};


client.cpp:
// Updated 9/18/2015 with updated structure + discovered values
void Client::SendQuestSound(uint16 entity_id, uint32 copper, uint32 silver, uint32 gold, uint32 platinum){
EQApplicationPacket* outapp = new EQApplicationPacket(OP_Sound,sizeof(QuestSound_Str uct));
QuestSound_Struct* qss=(QuestSound_Struct*)outapp->pBuffer;
qss->entity_id = entity_id;
qss->copper = copper;
qss->silver = silver;
qss->gold = gold;
qss->platinum = platinum;
QueuePacket(outapp);
DumpPacket(outapp);
safe_delete(outapp);
}

client.h:
void SendSound() { SendQuestSound(0,0,0,0,0); }
void SendQuestSound(uint16 entity_id, uint32 copper, uint32 silver, uint32 gold, uint32 platinum);

demonstar55
09-18-2015, 12:15 PM
I'm pretty sure cavedude figured that stuff out for eqmac and someone ported it over.

image
09-18-2015, 12:31 PM
yea I was thrown off by void Client::SendSound. No biggy.