Jump to content
  • 0

[Two] Quest Scripts...


Guest wolverine79936_

Question

Sorry, I'm starting to feel like a both with all these questions. :/

Where are the scripts for the quests? I tried looking for lua scripts in the source and in the final product after compiling, but did not find anything. I even tried poking around the source directory for files that had quest names or quest id numbers, but again, found none.

I've also tried poking around the database itself and have not found any actual scripts for the quests. I am now and officially confused. I would have assumed that they would be there somewhere where they might be easy to locate. :(

Link to comment
Share on other sites

Recommended Posts

Believe me, Antz, once I get it all figured out and can put it in step-by-step instructions, I will be more than happy to add to the wiki again. :)

It's starting to look like you needed some determined fresh blood in the forums. ;)

Absolutely :D

Link to comment
Share on other sites

Okay i went through half of this and then something came up. Hikari mentioned something about '1' indicates that it applies to everyone in the party.

I do recall the Kessel Run quest shouldn't - otherwise only one party member needs to do the running and speaking to the three NPC's. (It's not the same as the quests where they ask you to kill x amount of y) I know those count towards everyone in the current party.

Any feedback?

Link to comment
Share on other sites

I have no clue, whether the objectives counts for all party members or not, since I've never done this quest in a group. Always alone.

Replace 1 with 0 and it counts only for the player.

Hope anybody has more information about the behaviour in a group for this quest.

Link to comment
Share on other sites

Well, like I mentioned above. I love playing Draenei and I do recall being in parties many times and all the party members had to march with their Kessels across Azuremyst Isle to warn the NPCs. So I'm sure an '0' is more appropriate.

Link to comment
Share on other sites

For each repository there is a area called scripts. In this area there are scripts for instances, bosses, creatures and also quests scripts.

Quest scripts are located in the file of the area you finish off the quest. For example redridge_mountains.cpp holds scripts for quests in redridge mountains.

On top of each file in the ScriptData section you can see which quest will be handled by this script.

Scripts are be written in c++ not lua.

Link to comment
Share on other sites

No offense, Hikari, but definitely an LOL on my part. All I know is C++, and not very well at that. I thought I might be able to try and help debug quests for WotLK as I find broken ones and learn more about C++ along the way. :)

Thank you very much for the information, Hikari.

Link to comment
Share on other sites

If you knew, wolverine79936. I'm also on the beginning stage with mangos.

For a few month I try to understand the architecture of the core and i'm still confused.

When I face a problem I still haven't a clue where to start with the search.

The project is just overwhelming, especially for people who aren't familiar with the core from the scratch.

There are so many functions that already exist. You have to use them only. If one would be aware of those.

Link to comment
Share on other sites

Thank you, Hikari. Do you have any suggestions on where to actually start studying the core? My C++ is still limited. To me, the main() function is where the whole universe starts. ;) And I'm finding that to be a rather illusive philosophy of C++ right now. Especially on such a large scale.

I assumed, originally, that Mangos used LUA same as the blizzard servers do. So, I was rather astonished when I found out the quest scripts were in C++. I also assumed that something simple like a quest would be a good place to start, but again, I think I might have been wrong.

I was told earlier that the quests are organized by ending area, so I looked in Bloodmyst Isle for the end of the Kessel Run quest in hopes I might be able to help there, and could not find anything that pertained to the quest. So, that's where I got totally lost on that concept. :(

Link to comment
Share on other sites

There are thoughts about LUA in mangos. See http://getmangos.eu/bb/topic/530/making-mangos-more-beginnerfriendly/

Not sure, but I think the Quest "The Kessel Run" can be fixed only through the database. No C + + script is required.

I haven't in mind whether on live servers the objective is completed by clicking on the NPC or by clicking on a gossip menu.

If the latter you could add gossip menu to each of the three NPCs with the condition Quest 9663 active and status in progress to display the menu to the player.

Just my thoughts. I haven't done such a fix by myself yet. Good luck.

Link to comment
Share on other sites

Perhaps I should just continue to work on the stupid news thingy some more. Mine broke and I can't figure out how to enable gossip on any of the three chars for Kessel. All I've found so far were the npcs, the quest itself and the gossip menu, but nothing in the gossip menu even pertains to warning them. :(

I am so lost. Been at this for an hour and no revelations yet.

Link to comment
Share on other sites

I looked on youtube and there are both possibilities - with and without gossip menu options. I guess one thing ist live the other from private servers or blizzard had changed it after a while.

You've WotLK, right? So I decided without further ado to set up the latest WotLK database.

I looked through many rows with different sql queries to figure out how the quest, NPCs and the gossip menu plays together. I found out there are no gossip scripts behind it, so no action will take affect by clicking on a NPC.

Here are my database adjustments. They are untested, because I haven't a WotLK server. Maybe I will later backport the queries to TBC and testing it by myself. Please make a backup of your database before you execute the queries.

First of all, we need to prepare the NPCs for using scripts:

-- Prepare gossip menu for Exarch Manelaous
UPDATE gossip_menu SET script_id = entry, cond_1 = 9, cond_1_val_1 = 9663, cond_1_val_2 = 1 where entry = 7370 and text_id = 9040;

-- Prepare gossip menu for Admiral Odesyus
UPDATE gossip_menu SET script_id = entry, cond_1 = 9, cond_1_val_1 = 9663, cond_1_val_2 = 1 where entry = 7399 and text_id = 9038;

-- Prepare gossip menu for High Chief Stillpine
UPDATE gossip_menu SET script_id = entry, cond_1 = 9, cond_1_val_1 = 9663, cond_1_val_2 = 1 where entry = 7434 and text_id = 9039;

Now we need the gossip scripts which are fired by GossipHello, which should be happend by clicking on the NPC:

-- GossipScript for Exarch Manelaous
DELETE FROM dbscripts_on_gossip WHERE id = 7370 and command = 8 and datalong = 17116;
INSERT INTO dbscripts_on_gossip (id, delay, command, datalong, datalong2, buddy_entry, search_radius, data_flags, dataint, dataint2, dataint3, dataint4, x, y, z , o, comments)
VALUES
(7370, 0, 8, 17116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'kill credit for npc 17116 for quest 9663');

-- GossipScript for Admiral Odesyus
DELETE FROM dbscripts_on_gossip WHERE id = 7399 and command = 8 and datalong = 17240;
INSERT INTO dbscripts_on_gossip (id, delay, command, datalong, datalong2, buddy_entry, search_radius, data_flags, dataint, dataint2, dataint3, dataint4, x, y, z , o, comments)
VALUES
(7399, 0, 8, 17240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'kill credit for npc 17240 for quest 9663');

-- GossipScript for High Chief Stillpine
DELETE FROM dbscripts_on_gossip WHERE id = 7434 and command = 8 and datalong = 17440;
INSERT INTO dbscripts_on_gossip (id, delay, command, datalong, datalong2, buddy_entry, search_radius, data_flags, dataint, dataint2, dataint3, dataint4, x, y, z , o, comments)
VALUES
(7434, 0, 8, 17440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'kill credit for npc 17440 for quest 9663');

To bracking down the query:

ID: The ID we set it in our first query in gossip_menu.

Command: 8 stands for SCRIPT_COMMAND_KILL_CREDIT and should update our questopjective to done. In our case "warned 1/1".

Datalong: The NPC which should count in the questopjective.

Datalong2: 0 stands for: It counts only for the player, not for all party member.

After you executed these queries use the reload command in mangos for the tables gossip_menu and dbscripts_on_gossip or just restart your server.

Lot of work, but I hope it helps you. Let me know about the result.

Link to comment
Share on other sites

Alrighty. Hikari, I'm finally getting around to working on my database some more. I think that we might have two entirely different versions of the same database. As usual. ;)

In mine, the datalongs and the commands are entirely different from what you have to be deleted. Outside of that, it looks like my database is ready to go, it's just not going. I'm going to manually modify the database right after I back it up and see how it goes from there.

I'll let you all know shortly, in an edit to this post, whether or not anything happens. :)

------------------------------------------------------------------------------------------------------------------------------------------------------

Well, that was fast. I think I might have found the problem already. gossip_menu, entry 7370 has two entries, somehow. I have yet to figure out how this one happened. Anyway, I have 7370 with text_id of 8806 and then another 7370 with text_id of 9040. I didn't know that a table could have two entries with the same ID. Hence the little key icon next to the column for id. Noting that it is an identifying identifier which must be unique at all costs. That might explain why some of my stuff does not work. Looking further...

Actually, this is quite freaky. There are many duplicate IDs all over the gossip_menu table. It's not just 9663 which has them, but a lot of others do that I have never touched. Hrm. I'm going to backup, of course, and clean up the table very slowly. :(

------------------------------------------------------------------------------------------------------------------------------------------------------

Alright. Thank you very much. Now I pray it works. Just one question:

Are there any plans to make the .server restart 0 0 command work under windows? All it does for me is shut the server down like normal. Or is this something to be worked on? Perhaps I can help in that area as well. :)

For datalon2, you said set it to 1 for it to count for the whole party. This will definitely be something new for me to research. Perhaps I can eventually write a guide on how to make your own quests from scratch which actually makes sense to people. ;)

Well, here goes nothing, and sorry if the blow by blow descriptions of my plights gets on anyone's nerves. It's a bad habit of mine when treading in new territory. ;)

Link to comment
Share on other sites

Alright. Now I'm lost. I fixed the database...? Then I reloaded the two tables and nothing changed ingame. So I restarted the server after turning on full logging. Tried again and went back to the log. The only time anything seems to trigger is when my GM tries to get in on the quest. IE triggering the NPCs in the quest.

But still it does not count. :( What gives? I'm about to start crying in sheer frustration now. All day and no closer...

Got a snippet out of the log finally. Had to time it just right and remember "when" to look. ;)

2013-03-07 15:13:17 WORLD: Received opcode CMSG_GOSSIP_HELLO
2013-03-07 15:13:17 WORLD: Sent SMSG_GOSSIP_MESSAGE from Creature (Entry: 17440 Guid: 62915)

But it doesn't record it as complete. I just had an idea, though. I don't think I like this idea... But...

GRRR! I remember once that I took my GM who had a negative alignment with the furbolgs and killed stillpine and it counted finally.

Perhaps we have the command set wrong? I'm definitely playing with this now. I think it triggers, but the command could be wrong. We're not killing him, we're warning him.

Time to make a chart of the commands and what they appear to do.

Link to comment
Share on other sites

Let us try an experiment. I'm going to create a orc GM and set his level max and then port him to stillpine and the admiral and exarch and have him kill them and see if that counts. Then perhaps we will be making some progress. At least then we will know how to complete the quest, all be it not the right way... Yet. ;)

Alright. My theory was right. For whatever oddball reason, you have to kill the high chief, the exarch and the admiral for it to count. I just completed the quest by killing everyone I was suppose to warn. How sick is that. ;)

Anyway, now to figure out how to do this without killing everyone. DUH, right? ;)

Alright. Went through all of the commands that showed up in dbscripts_on_gossip and nothing helped. The exarch remains incomplete, as does the high chief. The Admiral was the only one it worked on. This is terribly frustrating. And the admiral only completed after I took another tree costume.

Link to comment
Share on other sites

I think I finally figured this all out. Stillpine has to have a gossip menu. It needs to read something along the lines of "Give Warning". You click that and it is suppose to trigger everything.

The same for the Exarch. His is a lot more wordy, though. I can't read it all since I am viewing a very low-rez video.

And finally the same for Odyseus. They all need a special gossip menu which triggers the warning functions.

Link to comment
Share on other sites

I have just applied the sql queries on my TBC server and voilà: The quest works just fine for me. Who is interested can use the queries from above to test it since the WotLK and TBC databases have the same structure.

After execute the queries you must reload the dbscripts_on_gossip-table first, otherwise you will get an error like this:

ERROR:Table gossip_menu for menu 7370, text-id 9040 have script_id 7370 that does not exist in `dbscripts_on_gossip`, ignoring
I think that we might have two entirely different versions of the same database.

I'm using the latest database of the mangostwo (WotLK) repository which has the version TwoDatabase 1.0.0 for MaNGOSTwo 12348+ and ScriptDev2 z2784+

gossip_menu, entry 7370 has two entries, somehow. I have yet to figure out how this one happened. Anyway, I have 7370 with text_id of 8806 and then another 7370 with text_id of 9040. I didn't know that a table could have two entries with the same ID.

The primary key of the table is built with the columns entry, text_id and script_id. Even if there are multible entries with the same number, it's still unique, because of the other two columns. Together they are unique.

Some NPCs have serveral gossip menus like the text_id of 8806 indicates. Exarch Manelaous and Admiral Odesyus have an additional gossip menu for another quest or purpose. So don't touch it.

I'm going to create a orc GM [...] you have to kill the high chief, the exarch and the admiral for it to count. I just completed the quest by killing everyone I was suppose to warn.

Of course it counts. Your horde character have met the condition of the quest objective. This have nothing to do with our gossip script. The script (Incidentally, the quest also) is only available for alliance, becaus they can talk to them.

And the admiral only completed after I took another tree costume.

Interesting. This shouln't happend. The gossip with the tree is for another quest and shouldn't affect our quest.

Stillpine has to have a gossip menu. It needs to read something along the lines of "Give Warning". You click that and it is suppose to trigger everything. The same for the Exarch.

No. When you talk to them (just right clicking), they already thanks you for the warning. It wouldn't make sense if you have to click on a menu option to warn them "again".

My posted solution works without menu options. Just talk to them and the quest objectives will be updated to complete the quest.

Link to comment
Share on other sites

Thank you very much, Hikari. I shall try restoring the database to the backup I made before all this madness. Then I shall run your queries on my database and we shall see. I must not let my mind wander right now or I will wind up carrying on about possibilities which are not or can not be confirmed at this time. :)

Again, thank you very much, Hikari.

Link to comment
Share on other sites

Alright. I have one last question:

Is there any way to stop the timer once everyone has been warned? For me, it's just a personal thing. I hate quests where you have to run all over creation under a timer and then run back to the beginning under a timer. It never felt fair. If there's no way to turn it off at the end, then there isn't, but I was definitely curious. :)

By the way, forgot to confess to everyone that the quest now functions properly. :) YAY!

Link to comment
Share on other sites

Alright, as an attempt to wrap this issue up finally, I wish to thank Hikari for his research and Antz for his support.

Without further ado, fixing this quest turns out to be most simple. First, we need to update the NPCs, as Hikari said, to accept scripts:

-- Prepare gossip menu for Exarch Manelaous
UPDATE gossip_menu SET script_id = entry where entry = 7370 and text_id = 9040;

-- Prepare gossip menu for Admiral Odesyus
UPDATE gossip_menu SET script_id = entry where entry = 7399 and text_id = 9038;

-- Prepare gossip menu for High Chief Stillpine
UPDATE gossip_menu SET script_id = entry where entry = 7434 and text_id = 9039;

Once we have copied the previous query into something like Heidi SQL, and run the query, we need the gossip scripts which are fired by GossipHello, which should be happend by clicking on the NPC:

-- GossipScript for Exarch Manelaous
DELETE FROM dbscripts_on_gossip WHERE id = 7370 and command = 8 and datalong = 17116;
INSERT INTO dbscripts_on_gossip (id, delay, command, datalong, datalong2, buddy_entry, search_radius, data_flags, dataint, dataint2, dataint3, dataint4, x, y, z , o, comments)
VALUES
(7370, 0, 8, 17116, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'kill credit for npc 17116 for quest 9663');

-- GossipScript for Admiral Odesyus
DELETE FROM dbscripts_on_gossip WHERE id = 7399 and command = 8 and datalong = 17240;
INSERT INTO dbscripts_on_gossip (id, delay, command, datalong, datalong2, buddy_entry, search_radius, data_flags, dataint, dataint2, dataint3, dataint4, x, y, z , o, comments)
VALUES
(7399, 0, 8, 17240, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'kill credit for npc 17240 for quest 9663');

-- GossipScript for High Chief Stillpine
DELETE FROM dbscripts_on_gossip WHERE id = 7434 and command = 8 and datalong = 17440;
INSERT INTO dbscripts_on_gossip (id, delay, command, datalong, datalong2, buddy_entry, search_radius, data_flags, dataint, dataint2, dataint3, dataint4, x, y, z , o, comments)
VALUES
(7434, 0, 8, 17440, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'kill credit for npc 17440 for quest 9663');

Once that is done, you must either restart your server or follow the following instructions to reload the two pieces of the database we just modified:

1. Type .reload dbscripts_on_gossip and press enter.

2. Type .reload gossip_menu and press enter.

That's it. The Kessel Run (9663) is now good to go.

BTW, again, a great big, gigantic thanks to Antz and Hikari for their support and assistance. :)

Link to comment
Share on other sites

By the way, forgot to confess to everyone that the quest now functions properly. :) YAY!

I'm glad to heard that. By the way, I forgot to mention that this was my very first fix for mangos. :D

One last addendum to clear this up:

And the admiral only completed after I took another tree costume.

This happend, because they have the same script ID. All scripts with the same ID will be executed together.

7399  0  15  30353  0  0  0  0  0  0  0  0  0  0  0  0  cast Summon Tree Disguise Kit
7399  0  8   17240  1  0  0  0  0  0  0  0  0  0  0  0  kill credit for npc 17240 for quest 9663

Ever since all scripts have their ID = menu ID this happened by accident.

To prevent this behaviour, we have to breaking the "rule" and choose another ID for the script. At the risk of choosing an ID which will be used later by another script.

Is there any way to stop the timer once everyone has been warned?

The timer is not to be taken seriously. One have way to much time for this quest.

The simplest way is to set the LimitTime to 0 in the quest_template, which disables the timer.

Your prefered way, that it turns off the timer, once you've spoken to all NPCs... unfortunately I've no clue.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use