Jump to content

[MaNGOS University][Let's Fix]Quest 9531 - Tree's Company on TBC


shlainn

Recommended Posts

This is supposed to be a first attempt/test/whatever to make fixing a bug an educational experience. Comments welcome!

Bug Report

Quest: 9531 - Tree's Company

Core: [testserver - must check]

DB: [testserver - must check]

Script: [testserver - must check]

Using the tree disguise should spawn a scripted scene between Geezle and Engineer "Spark" Overgrind. No scripting exists, no quest complete is rewarded. Impossible to complete the quest chain as a result.

30.08.2012 22:34:31 by mark

Researching the Problem

WoWHead has a copy of the conversation that is supposed to take place:

From: http://old.wowhead.com/quest=9531#comments:id=796302

Engineer "Spark" Overgrind picks up the naga flag.

Geezle: What's the big idea, Spark? Why'd you call for this meeting?

Engineer "Spark" Overgrind: What's the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover.

Engineer "Spark" Overgrind: The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside.

Geezle: Relax, Spark! I have it all under control. We'll strip mine the Exodar right out from under 'em - making both you and I very, very rich in the process.

Engineer "Spark" Overgrind: Relax? Do you know what Kael'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool.

Engineer "Spark" Overgrind: Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you...

Geezle: Yes, sir. It won't happen again...

This is a good start. Unfortunately, everything else (emotes, timing, positions) is missing. A quick search on youtube reveals

(interesting part starts around 4:50). Nice.

What's next? MaNGOS has been around for a while, so it is a safe bet that most problems have been solved at least once somewhere already. In this case, as [email protected] pointed out, UDB 404 has data for this quest - we just need to understand how they did it.

The fix from UDB 404

one has to applaud UDB for their clear and well-commented code

-- Geezle - spawn with event_script
DELETE FROM creature WHERE id=17318;

-- Script Event 10675
DELETE FROM event_scripts WHERE id=10675;
INSERT INTO event_scripts (id,delay,command,datalong,datalong2,datalong3,datalong4,data_flags,dataint,dataint2,dataint3,dataint4,x,y,z,o,comments) VALUES 
(10675,0,10,17318,100000,0,0,0,0,0,0,0,-5116.128,-11263.03,0.961,0,'Summon Geezle'),
(10675,0,10,17243,100000,0,0,0,0,0,0,0,-5040.419,-11260.58,13.647,0,'Summon Engineer "Spark" Overgrind'),
(10675,1,29,1,17243,200,0,0x02,0,0,0,0,0,0,0,0,'remove npc_flag'),
(10675,20,0,2,17243,50,0,0,2000000297,0,0,0,0,0,0,0,'text_emote Spark'),
(10675,21,0,0,17318,50,0,0,2000000298,0,0,0,0,0,0,0,'Geezle say 1'),
(10675,21,1,1,17318,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,26,1,5,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotExclamation'),
(10675,26,0,0,17243,50,0,0,2000000299,0,0,0,0,0,0,0,'Spark say 1'),
(10675,28,1,1,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,23,1,1,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,33,0,0,17243,50,0,0,2000000300,0,0,0,0,0,0,0,'Spark say 2'),
(10675,44,1,1,17318,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,44,0,0,17318,50,0,0,2000000301,0,0,0,0,0,0,0,'Geezle say 2'),
(10675,50,1,1,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,50,0,0,17243,50,0,0,2000000302,0,0,0,0,0,0,0,'Spark say 3'),
(10675,53,1,5,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotExclamation'),
(10675,57,1,1,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,57,0,0,17243,50,0,0,2000000303,0,0,0,0,0,0,0,'Spark say 4'),
(10675,60,1,25,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotPoint'),
(10675,65,1,1,17318,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,65,0,0,17318,50,0,0,2000000304,0,0,0,0,0,0,0,'Geezle say 2'),
(10675,65,8,17243,1,0,0,0,0,0,0,0,0,0,0,0,'Kill Credit for quest 9531');


DELETE FROM db_script_string WHERE entry BETWEEN 2000000297 AND 2000000304;
INSERT INTO db_script_string (entry,content_default) VALUES
(2000000297,'%s picks up the naga flag.'),
(2000000298,'What\\'s the big idea, Spark? Why\\'d you call for this meeting?'),
(2000000299,'What\\'s the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover.'),
(2000000300,'The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside.'),
(2000000301,'Relax, Spark! I have it all under control. We\\'ll strip mine the Exodar right out from under \\'em - making both you and I very, very rich in the process.'),
(2000000302,'Relax? Do you know what Kael\\'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool.'),
(2000000303,'Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you...'),
(2000000304,'Yes, sir. It won\\'t happen again...');

DELETE FROM creature_movement_template WHERE entry=17318;
INSERT INTO creature_movement_template (entry, point, position_x, position_y, position_z, waittime, script_id, textid1, textid2, textid3, textid4, textid5, emote, spell, wpguid, orientation, model1, model2) VALUES
(17318,1,-5093.294,-11254.67,0.2400,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,2,-5091.673,-11253.76,0.51914,65000,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,3,-5097.712,-11257.97,0.8819,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,4,-5100.406,-11253.42,0.0595,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,5,-5108.406,-11250.42,-0.4404,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,6,-5115.156,-11248.17,0.0595,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,7,-5118.698,-11250.37,0.4533,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,8,-5120.282,-11250.83,1.1859,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,9,-5122.282,-11250.33,0.6859,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,10,-5126.282,-11249.83,-0.0640,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,11,-5128.282,-11249.58,0.4359,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,12,-5130.282,-11249.33,1.1859,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,13,-5132.032,-11249.08,2.1859,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,14,-5133.032,-11248.83,2.9359,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,15,-5135.032,-11248.83,3.4359,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,16,-5137.032,-11248.58,4.1859,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,17,-5143.782,-11247.58,4.9359,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,18,-5146.408,-11246.36,5.2825,0,1,0,0,0,0,0,0,0,0,0,0,0);

DELETE FROM creature_movement_template WHERE entry=17243;
INSERT INTO creature_movement_template (entry, point, position_x, position_y, position_z, waittime, script_id, textid1, textid2, textid3, textid4, textid5, emote, spell, wpguid, orientation, model1, model2) VALUES
(17243,1,-5063.434,-11256.43,0.9326,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,2,-5078.62,-11254.58,0.5082,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,3,-5081.806,-11253.73,0.5838,60000,0,0,0,0,0,0,0,0,0,3.0200,0,0),
(17243,4,-5081.806,-11253.73,0.5838,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,5,-5067.804,-11258.46,0.5815,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,6,-5064.747,-11259.5,0.5810,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,7,-5064.858,-11261.34,0.2768,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,8,-5060.358,-11265.34,0.7768,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,9,-5050.608,-11273.59,1.0268,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,10,-5047.413,-11274.72,1.4722,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,11,-5046.759,-11276.35,2.3970,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,12,-5045.509,-11277.85,3.1470,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,13,-5044.009,-11279.35,3.8970,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,14,-5042.759,-11280.85,5.1470,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,15,-5041.009,-11283.1,6.6470,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,16,-5039.759,-11284.35,7.3970,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,17,-5033.259,-11292.1,7.8970,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,18,-5031.403,-11293.48,8.2005,0,1,0,0,0,0,0,0,0,0,0,0,0);

UPDATE creature_template SET MovementType=2 WHERE entry=17318;
UPDATE creature_template SET MovementType=2 WHERE entry=17243;

So, what's happening here? UDB implements this as an Event Script. Event Scripts, according to the wiki are

scripts activated whenever an event is activated, be it by an object or as the spell effect SPELL_EFFECT_SEND_EVENT (61).

Checking the database, Item 23792 "Tree Disguise Kit" (provided for the quest) casts Spell 30298 "Tree Disguise" which has three effects (See Spell.dbc).

[effect_1_id] => 6
[effect_2_id] => 6
[effect_3_id] => 61
...
[effect_3_misc_value] => 10675

The third of these is SPELL_EFFECT_SEND_EVENT(61) with a misc_value of 10675. So that is the event ID used in event_scripts.

Next we will look at the script in detail and see what it does.

[Will be continued]

Link to comment
Share on other sites

What I do remember about this quest...

Once you use the quest item to disguise yourself as a tree, you must stand as close as melee distance (~2 yards) by the flag sticking up in the sand to trigger the meeting of the two scoundrels. Also, you are effectively invisible to those guys while you wear the tree disguise. They never noticed me sneaking around them while they talked.

Emotes consisted of the usual hand-waving and evil laughter while plotting villainous schemes in secret.

If your disguise failed or you did not use it, the two NPCs react with surprise and say things like "Hey, you! You're not supposed to be here!" and "Time to silence this spy!" Combat works as usual with any hostile mob. If you are discovered at any time during their meeting, the quest is immediately failed and you must go back to the quest giver and do it over.

It's been ages, so don't take the NPC quotes from me as completely accurate.

Link to comment
Share on other sites

Please continue with the educational exercise, it might create a few valuable insights.

That being said, I just like to mention that I think UDB 404 has data for this event/quest (so it could be backported). I'm guessing it's not a coincidence that you've chose this quest/event and that you know this, but just in case then :P

Link to comment
Share on other sites

I was not aware of the udb data - thanks for pointing - now things got much easier and I learned a new thing about spells: SPELL_EFFECT_SEND_EVENT :D

You're most welcome :P

The prime reason why mentioned it is that I believe sites like wowhead and wowwiki, combined with videos, only give us a starting point. They give you an idea of what's required, so you can write a skeleton version of the script/queries. Good enough for some basic testing, asking for comments/review, etc. But the real data usually has to come from sniffs, and that's often the tricky part. Hence me pointing to "the real data" :)

Link to comment
Share on other sites

Opening post updated.

I am aware of the need for sniffs for these things - I bet most of us would be having a hard time recognizing all of the emotes on the video and get correct timings from there... :) And I am not even starting on movement, waypoints, and all of the other things. But as you said, before starting into coding, it is very good to get an idea of what we are trying to accomplish (especially those of us who never played on retail) - hence the youtube link. (and it was a low hanging fruit ;) )

Btw, if you (or anyone!) want to contribute anything to this, please do! This is not a "shlainn shows you how it's done"-type of thread. Contribution is most welcome!!!

Link to comment
Share on other sites

Good Morning Students,

here is your assignment for today:

  • After I showed you in detail WHY the UDB team decided to use an event script, it is now your task to take the script apart line by line and explain what happens.
  • There are obviously 3 tables involved in this: event_scripts, db_script_string and creature_movement_template. Explain how they work together.

After you are done we will discuss backporting

Link to comment
Share on other sites

  • 1 month later...

Okay, ye lazy landlubbers, let's finish this. Going through the code line by line for you sorry creatures. *ARRRR*

-- Geezle - spawn with event_script
DELETE FROM creature WHERE id=17318;

The event script will spawn Geezle when the Event starts. So, Geezle may not be spawned. Deleting him from the creature table makes sure of that.

-- Script Event 10675
DELETE FROM event_scripts WHERE id=10675;

This is cleanup and good code practice. If this update is applied multiple times, the data inserted on previous occasions is removed before inserting new data. Also very good if you are testing the script...

Now, here comes the juicy part. The actual script. Line by line, as promised. But first some general things about scripts:

INSERT INTO event_scripts (id,delay,command,datalong,datalong2,datalong3,datalong4,data_flags,dataint,dataint2,dataint3,dataint4,x,y,z,o,comments) VALUES 

The ID of the script serves as unique identifier. In this case it comes from the SPELL_EFFECT_SEND_EVENT Spell effect.

The delay is in seconds, counted from the start of the event.

The command field tells you what happens at that time. A full list is at http://udbwiki.no-ip.org/index.php/Event_scripts

And that's it. The meaning of all the other fields depend on the command.

And there is "comments". Self-explanatory, no? ;)

(10675,0,10,17318,100000,0,0,0,0,0,0,0,-5116.128,-11263.03,0.961,0,'Summon Geezle'),

Command 10: TEMP_SUMMON_CREATURE

Summary: Summons Creature 17318 (Geezle) for 100 seconds at coordinates (-5116.128,-11263.03,0.961)

(10675,0,10,17243,100000,0,0,0,0,0,0,0,-5040.419,-11260.58,13.647,0,'Summon Engineer "Spark" Overgrind'),

Command 10: TEMP_SUMMON_CREATURE

Summary: Summons Creature 17243 (Engineer "Spark" Overgrind) for 100 seconds at coordinates (-5040.419,-11260.58,13.647)

(10675,1,29,1,17243,200,0,0x02,0,0,0,0,0,0,0,0,'remove npc_flag'),

Command 29: COMMAND_MODIFY_NPC_FLAG

Summary: Remove (0x02) flag 1 in 200 units radius around Engineer "Spark" Overgrind.

Wow, cryptic. What is flag 1? It's Gossip. http://udbwiki.no-ip.org/index.php/Creature_template#npcflag. No gossip menu for these guys.

(10675,20,0,2,17243,50,0,0,2000000297,0,0,0,0,0,0,0,'text_emote Spark'),

Command 0: SCRIPT_COMMAND_TALK

Summary: Creature 17243 (Spark) execute text emote 2000000297 (see below)

(10675,21,0,0,17318,50,0,0,2000000298,0,0,0,0,0,0,0,'Geezle say 1'),

Command 0: SCRIPT_COMMAND_TALK

Summary: Creature 17318 (Geezle) says text string 2000000298 in language 0 (see below)

(10675,21,1,1,17318,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),

Command 1: SCRIPT_COMMAND_EMOTE

Summary: Creature 17318 (Geezle) emotes emote ID 1 (OneShotTalk)

(10675,26,1,5,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotExclamation'),
(10675,26,0,0,17243,50,0,0,2000000299,0,0,0,0,0,0,0,'Spark say 1'),
(10675,28,1,1,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,23,1,1,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,33,0,0,17243,50,0,0,2000000300,0,0,0,0,0,0,0,'Spark say 2'),
(10675,44,1,1,17318,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,44,0,0,17318,50,0,0,2000000301,0,0,0,0,0,0,0,'Geezle say 2'),
(10675,50,1,1,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,50,0,0,17243,50,0,0,2000000302,0,0,0,0,0,0,0,'Spark say 3'),
(10675,53,1,5,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotExclamation'),
(10675,57,1,1,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,57,0,0,17243,50,0,0,2000000303,0,0,0,0,0,0,0,'Spark say 4'),
(10675,60,1,25,17243,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotPoint'),
(10675,65,1,1,17318,50,0,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),
(10675,65,0,0,17318,50,0,0,2000000304,0,0,0,0,0,0,0,'Geezle say 2'),

Okay, maybe not totally line by line. Repeat the above two things a couple of times, with changing actors.

(10675,65,8,17243,1,0,0,0,0,0,0,0,0,0,0,0,'Kill Credit for quest 9531');

Command 8: SCRIPT_COMMAND_KILL_CREDIT

Summary: Give the whole group the credit for the quest.

So that was that. Easy, no? Now, the texts for the dialog are saved in db_script_string and referenced above. Nothing to see here. It's just very basic ID --> Text.

DELETE FROM db_script_string WHERE entry BETWEEN 2000000297 AND 2000000304;
INSERT INTO db_script_string (entry,content_default) VALUES
(2000000297,'%s picks up the naga flag.'),
(2000000298,'What\\'s the big idea, Spark? Why\\'d you call for this meeting?'),
(2000000299,'What\\'s the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover.'),
(2000000300,'The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside.'),
(2000000301,'Relax, Spark! I have it all under control. We\\'ll strip mine the Exodar right out from under \\'em - making both you and I very, very rich in the process.'),
(2000000302,'Relax? Do you know what Kael\\'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool.'),
(2000000303,'Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you...'),
(2000000304,'Yes, sir. It won\\'t happen again...');

All of the code below specifies the movement waypoints. Basicly, this is a list of points. Stuff can happen at each point, but in our case, we just walk to the meeting point, wait 60-65 seconds (notice how long the talking took...) and then move away.

DELETE FROM creature_movement_template WHERE entry=17318;
INSERT INTO creature_movement_template (entry, point, position_x, position_y, position_z, waittime, script_id, textid1, textid2, textid3, textid4, textid5, emote, spell, wpguid, orientation, model1, model2) VALUES
(17318,1,-5093.294,-11254.67,0.2400,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,2,-5091.673,-11253.76,0.51914,65000,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,3,-5097.712,-11257.97,0.8819,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,4,-5100.406,-11253.42,0.0595,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,5,-5108.406,-11250.42,-0.4404,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,6,-5115.156,-11248.17,0.0595,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,7,-5118.698,-11250.37,0.4533,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,8,-5120.282,-11250.83,1.1859,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,9,-5122.282,-11250.33,0.6859,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,10,-5126.282,-11249.83,-0.0640,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,11,-5128.282,-11249.58,0.4359,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,12,-5130.282,-11249.33,1.1859,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,13,-5132.032,-11249.08,2.1859,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,14,-5133.032,-11248.83,2.9359,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,15,-5135.032,-11248.83,3.4359,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,16,-5137.032,-11248.58,4.1859,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,17,-5143.782,-11247.58,4.9359,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17318,18,-5146.408,-11246.36,5.2825,0,1,0,0,0,0,0,0,0,0,0,0,0);

DELETE FROM creature_movement_template WHERE entry=17243;
INSERT INTO creature_movement_template (entry, point, position_x, position_y, position_z, waittime, script_id, textid1, textid2, textid3, textid4, textid5, emote, spell, wpguid, orientation, model1, model2) VALUES
(17243,1,-5063.434,-11256.43,0.9326,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,2,-5078.62,-11254.58,0.5082,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,3,-5081.806,-11253.73,0.5838,60000,0,0,0,0,0,0,0,0,0,3.0200,0,0),
(17243,4,-5081.806,-11253.73,0.5838,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,5,-5067.804,-11258.46,0.5815,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,6,-5064.747,-11259.5,0.5810,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,7,-5064.858,-11261.34,0.2768,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,8,-5060.358,-11265.34,0.7768,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,9,-5050.608,-11273.59,1.0268,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,10,-5047.413,-11274.72,1.4722,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,11,-5046.759,-11276.35,2.3970,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,12,-5045.509,-11277.85,3.1470,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,13,-5044.009,-11279.35,3.8970,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,14,-5042.759,-11280.85,5.1470,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,15,-5041.009,-11283.1,6.6470,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,16,-5039.759,-11284.35,7.3970,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,17,-5033.259,-11292.1,7.8970,0,0,0,0,0,0,0,0,0,0,0,0,0),
(17243,18,-5031.403,-11293.48,8.2005,0,1,0,0,0,0,0,0,0,0,0,0,0);

Okay, maybe the last waypoint in each case is worth mentioning. It references creature_movement_scripts entry 1. A quick lookup shows that this is "despawn self, this script is used by many creatures" - Also clear due to command 18 as the only command in that script.

And finally these two lines are a technical requirement. They say: These guys have WAYPOINTS!!!

UPDATE creature_template SET MovementType=2 WHERE entry=17318;
UPDATE creature_template SET MovementType=2 WHERE entry=17243;

Next time we will talk about how to port this to TBC.

Link to comment
Share on other sites

  • 2 weeks later...
Checking the database, Item 23792 "Tree Disguise Kit" (provided for the quest) casts Spell 30298 "Tree Disguise" which has three effects (See Spell.dbc).

I was initially very confused by this line but through some google-fu i found a program called Mydbceditor which lets me view the .dbc file. I can now see the spelleffects associated with the spell 30298, which is 6, 6 and 61. You mention that 61 is SPELL_EFFECT_SEND_EVENT but how should i identify other spelleffects?

EDIT: Also, is there a smarter way of viewing DBC files i should be using?

Link to comment
Share on other sites

Hi kritzkrieg - There are various ways of viewing DBC files. google-fu helps finding all of these :) I personally use a small php script I wrote for precisely this purpose. It reads dbc files according to documentation here or here. There are DBC viewers/editors all over the place. Just find one that suits you and whatever OS you are using.

Spelleffects: normally i would point you to udbwiki - but they seem to have a technical problem right now. so check out https://github.com/mangos-one/server/blob/master/src/game/SpellEffects.cpp (this is for TBC - but you can find it for any core you are interested in)

Link to comment
Share on other sites

As for checking spell effects and a few other spell related things, I often tend to use QSW (Qt SpellWork) by sidsukana (and others). I don't know if there are binaries for Windows though, I just grabbed the source and managed to build a Linux version that still works with my TBC data :)

It's not perfect, but quite useful nevertheless. Especially compared to reading DBC files for spell related stuff :)

For many other things... DBC reading it is though ;)

Link to comment
Share on other sites

  • 1 month later...

I'll check that out. The summoning part will probably work wonders.

Currently Geezle is already there but invisible and he is supposed to turn visible and begin the RP when he sees the tree disguise debuff. I considered having the kit also activate a trap that does the summoning. I have a lot I'm doing on my server currently so this quest hasn't been on the top of my priority :)

Link to comment
Share on other sites

  • 3 months later...
Next time we will talk about how to port this to TBC.

What's about... now?

The difference between UDB 404 and TBC lies on the table event_scripts. All other queries can be executed without changes.

-- UDB 404
INSERT INTO event_scripts (id,delay,command,datalong,datalong2,datalong3,datalong4,data_flags,dataint,dataint2,dataint3,dataint4,x,y,z,o,comments) VALUES

-- TBC
INSERT INTO event_scripts (id,delay,command,datalong,datalong2,buddy_entry,search_radius,data_flags,dataint,dataint2,dataint3,dataint4,x,y,z,o,comments) 
VALUES

As you can see TBC has buddy_entry and search_radius instead of datalong3 and datalong4.

But these are not the only differences because in UDB 404 are datalong2 = buddy_entry and datalong3 = search_radius. Therefore we need to adjust the positions of the data in the query.

DELETE FROM event_scripts WHERE id=10675;

INSERT INTO event_scripts (id,delay,command,datalong,datalong2,buddy_entry,search_radius,data_flags,dataint,dataint2,dataint3,dataint4,x,y,z,o,comments)

VALUES

(10675,0,10,17318,100000,0,0,0,0,0,0,0,-5116.128,-11263.03,0.961,0,'Summon Geezle'),

(10675,0,10,17243,100000,0,0,0,0,0,0,0,-5040.419,-11260.58,13.647,0,'Summon Engineer "Spark" Overgrind'),

(10675,1,29,1,0,17243,200,0x03,0,0,0,0,0,0,0,0,'remove npc_flag'),

(10675,20,0,2,0,17243,50,0,2000000297,0,0,0,0,0,0,0,'text_emote Spark'),

(10675,21,0,0,0,17318,50,0,2000000298,0,0,0,0,0,0,0,'Geezle say 1'),

(10675,21,1,1,0,17318,50,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),

(10675,26,1,5,0,17243,50,0,0,0,0,0,0,0,0,0,'emote OneShotExclamation'),

(10675,26,0,0,0,17243,50,0,2000000299,0,0,0,0,0,0,0,'Spark say 1'),

(10675,28,1,1,0,17243,50,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),

(10675,23,1,1,0,17243,50,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),

(10675,33,0,0,0,17243,50,0,2000000300,0,0,0,0,0,0,0,'Spark say 2'),

(10675,44,1,1,0,17318,50,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),

(10675,44,0,0,0,17318,50,0,2000000301,0,0,0,0,0,0,0,'Geezle say 2'),

(10675,50,1,1,0,17243,50,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),

(10675,50,0,0,0,17243,50,0,2000000302,0,0,0,0,0,0,0,'Spark say 3'),

(10675,53,1,5,0,17243,50,0,0,0,0,0,0,0,0,0,'emote OneShotExclamation'),

(10675,57,1,1,0,17243,50,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),

(10675,57,0,0,0,17243,50,0,2000000303,0,0,0,0,0,0,0,'Spark say 4'),

(10675,60,1,25,0,17243,50,0,0,0,0,0,0,0,0,0,'emote OneShotPoint'),

(10675,65,1,1,0,17318,50,0,0,0,0,0,0,0,0,0,'emote OneShotTalk'),

(10675,65,0,0,0,17318,50,0,2000000304,0,0,0,0,0,0,0,'Geezle say 2'),

(10675,65,8,17243,1,0,0,0,0,0,0,0,0,0,0,0,'Kill Credit for quest 9531');

The green font indicates where I modified the query to make sure the data goes to the correct column.

As you can see. I had to use the data_flags of 0x03 (SCRIPT_FLAG_BUDDY_AS_TARGET and SCRIPT_FLAG_REVERSE_DIRECTION) instead of 0x02. With SCRIPT_FLAG_REVERSE_DIRECTION alone I couldn't remove the gossips on the NPCs.

A supplement for Geezle

UPDATE creature_template SET MovementType=2, faction_A = 736, faction_H = 736, unit_flags = 384 WHERE entry=17318;

This will fix the faction and makes him immune to direct and aoe attacks.

After these changes the quest will work on TBC.

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