{"action":"closed","issue":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/22240","repository_url":"https://api.github.com/repos/TrinityCore/TrinityCore","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/22240/labels{/name}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/22240/comments","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/22240/events","html_url":"https://github.com/TrinityCore/TrinityCore/issues/22240","id":348858264,"node_id":"MDU6SXNzdWUzNDg4NTgyNjQ=","number":22240,"title":"DB/Quest: The Missing Diplomat (Part 11)","user":{"login":"ZenoX92","id":29895726,"node_id":"MDQ6VXNlcjI5ODk1NzI2","avatar_url":"https://avatars0.githubusercontent.com/u/29895726?v=4","gravatar_id":"","url":"https://api.github.com/users/ZenoX92","html_url":"https://github.com/ZenoX92","followers_url":"https://api.github.com/users/ZenoX92/followers","following_url":"https://api.github.com/users/ZenoX92/following{/other_user}","gists_url":"https://api.github.com/users/ZenoX92/gists{/gist_id}","starred_url":"https://api.github.com/users/ZenoX92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZenoX92/subscriptions","organizations_url":"https://api.github.com/users/ZenoX92/orgs","repos_url":"https://api.github.com/users/ZenoX92/repos","events_url":"https://api.github.com/users/ZenoX92/events{/privacy}","received_events_url":"https://api.github.com/users/ZenoX92/received_events","type":"User","site_admin":false},"labels":[{"id":36087725,"node_id":"MDU6TGFiZWwzNjA4NzcyNQ==","url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Branch-3.3.5a","name":"Branch-3.3.5a","color":"188846","default":false},{"id":26232887,"node_id":"MDU6TGFiZWwyNjIzMjg4Nw==","url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Comp-C++Script","name":"Comp-C++Script","color":"FF6600","default":false},{"id":26232657,"node_id":"MDU6TGFiZWwyNjIzMjY1Nw==","url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Comp-Database","name":"Comp-Database","color":"FF6600","default":false},{"id":124090,"node_id":"MDU6TGFiZWwxMjQwOTA=","url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Feedback-PatchFix","name":"Feedback-PatchFix","color":"d7e102","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-08T19:21:15Z","updated_at":"2018-08-11T14:28:33Z","closed_at":"2018-08-11T14:28:33Z","author_association":"NONE","body":"<!--- (**********************************)\r\n      (** Fill in the following fields **)\r\n      (**********************************) --->\r\n\r\n**Description:**\r\n\r\nQuest event is already scripted in core side, but has some issues:\r\n* All texts are missing\r\n* Mikhail should remove questgiver flag during the event\r\n* Mikhail's gossip text should only be visible during the event\r\n* Tapoke \"Slim\" Jahn should not remove unit flag 'Immune to NPC'\r\n* Tapoke \"Slim\" Jahn should summon only 1 friend, not 3\r\n* Tapoke \"Slim\" Jahn should despawn when quest is completed and respawn a few seconds later in the inn\r\n* Quest should fail if Tapoke \"Slim\" Jahn manages to reach the end of his waypoint\r\n\r\nI scripted this properly using SAI, and again someone has to remove the cpp (if the fix is finally accepted).\r\n\r\n**Branch(es):**\r\n\r\n3.3.5\r\n\r\n**TC rev. hash/commit:** \r\n\r\nTrinityCore rev. 1cc3d33 2018-02-19 20:21:57 +0100 (3.3.5 branch) (Win64, RelWithDebInfo, Static)\r\n\r\n**TDB version:**  335.64\r\n\r\n**Operating system:** Windows 7\r\n\r\n**Suggested Fix:**\r\n```sql\r\n-- Texts\r\nDELETE FROM `creature_text` WHERE `CreatureID` IN (4962,4971,4963);\r\nINSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES\r\n(4962,0,0,\"Oh, it's on now! Bet you thought I'd be alone too, huh?!\",12,7,100,0,0,0,5827,0,\"Tapoke \\\"Slim\\\" Jahn\"),\r\n(4962,1,0,\"Okay, okay! No need to get all violent. I'll talk. I'll talk!\",12,7,100,0,0,0,1743,0,\"Tapoke \\\"Slim\\\" Jahn\"),\r\n(4962,2,0,\"I have a few notes from the job back at my place. I'll get them and then meet you back in the inn.\",12,7,100,0,0,0,1744,0,\"Tapoke \\\"Slim\\\" Jahn\"),\r\n(4971,0,0,\"Whoa! This is way more than what I bargained for, you're on your own, Slim!\",12,7,100,0,0,0,5828,0,\"Slim's Friend\"),\r\n(4963,0,0,\"I'm glad the commotions died down some around here. The last thing this place needs is another brawl.\",12,7,100,0,0,0,4169,0,\"Mikhail\");\r\n\r\n-- Waypoint\r\nDELETE FROM `script_waypoint` WHERE `entry`=4962;\r\nDELETE FROM `waypoints` WHERE `entry`=4962;\r\nINSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES\r\n(4962,1,-3804.44,-828.048,10.0931,\"\"),\r\n(4962,2,-3803.93,-835.772,10.0777,\"\"),\r\n(4962,3,-3792.63,-835.671,9.65566,\"\"),\r\n(4962,4,-3772.43,-835.346,10.869,\"\"),\r\n(4962,5,-3765.94,-840.129,10.8856,\"\"),\r\n(4962,6,-3738.63,-830.997,11.0574,\"\"),\r\n(4962,7,-3690.22,-862.262,9.96045,\"\");\r\n\r\n-- Mikhail\r\nUPDATE `creature_template` SET `AIName`=\"SmartAI\", `ScriptName`=\"\" WHERE `entry`=4963;\r\nDELETE FROM `smart_scripts` WHERE `entryorguid`=4963 AND `source_type`=0;\r\nDELETE FROM `smart_scripts` WHERE `entryorguid`=496300 AND `source_type`=9;\r\nINSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES\r\n(4963,0,0,0,11,0,100,0,0,0,0,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Mikhail - On Respawn - Set Npc Flag Questgiver\"),\r\n(4963,0,1,0,19,0,100,0,1249,0,0,0,0,81,1,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Mikhail - On Quest 'The Missing Diplomat (Part 11)' Taken - Set Npc Flag Gossip\"),\r\n(4963,0,2,0,19,0,100,0,1249,0,0,0,0,45,1,1,0,0,0,0,10,10873,0,0,0,0,0,0,\"Mikhail - On Quest 'The Missing Diplomat (Part 11)' Taken - Set Data to Tapoke \\\"Slim\\\" Jahn\"),\r\n(4963,0,3,0,19,0,100,0,1249,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,\"Mikhail - On Quest 'The Missing Diplomat (Part 11)' Taken - Store Target\"),\r\n(4963,0,4,0,19,0,100,0,1249,0,0,0,0,100,1,0,0,0,0,0,10,10873,0,0,0,0,0,0,\"Mikhail - On Quest 'The Missing Diplomat (Part 11)' Taken - Send Target to Tapoke \\\"Slim\\\" Jahn\"),\r\n(4963,0,5,0,38,0,100,0,1,1,0,0,0,80,496300,2,0,0,0,0,1,0,0,0,0,0,0,0,\"Mikhail - On Data Set - Run Script\"),\r\n(496300,9,0,0,0,0,100,0,10000,10000,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Mikhail - On Script - Say Line 0\"),\r\n(496300,9,1,0,0,0,100,0,0,0,0,0,0,81,2,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Mikhail - On Script - Set Npc Flag Questgiver\");\r\n\r\n-- Tapoke \"Slim\" Jahn\r\nUPDATE `creature` SET `spawntimesecs`=10 WHERE `guid`=10873;\r\nUPDATE `creature_template` SET `AIName`=\"SmartAI\", `ScriptName`=\"\" WHERE `entry`=4962;\r\nDELETE FROM `smart_scripts` WHERE `entryorguid`=4962 AND `source_type`=0;\r\nDELETE FROM `smart_scripts` WHERE `entryorguid`=496200 AND `source_type`=9;\r\nINSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES\r\n(4962,0,0,0,38,0,100,1,1,1,0,0,0,11,1785,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Data Set - Cast 'Stealth'\"),\r\n(4962,0,1,0,38,0,100,1,1,1,0,0,0,53,0,4962,0,0,0,2,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Data Set - Start Waypoint\"),\r\n(4962,0,2,0,38,0,100,1,1,1,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Data Set - Set Invincibility at 1 HP\"),\r\n(4962,0,3,0,40,0,100,0,3,4962,0,0,0,28,1785,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Waypoint 3 Reached - Remove Aura 'Stealth'\"),\r\n(4962,0,4,0,40,0,100,0,3,4962,0,0,0,2,168,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Waypoint 3 Reached - Set Faction 168\"),\r\n(4962,0,5,0,40,0,100,0,7,4962,0,0,0,6,1249,0,0,0,0,0,12,1,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Waypoint 7 Reached - Fail Quest 'The Missing Diplomat (Part 11)'\"),\r\n(4962,0,6,0,40,0,100,0,7,4962,0,0,0,45,1,1,0,0,0,0,10,9432,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Waypoint 7 Reached - Set Data to Mikhail\"),\r\n(4962,0,7,0,40,0,100,0,7,4962,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Waypoint 7 Reached - Despawn\"),\r\n(4962,0,8,0,4,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Aggro - Say Line 0\"),\r\n(4962,0,9,0,4,0,100,0,0,0,0,0,0,11,16457,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Aggro - Cast 'Call Friends'\"),\r\n(4962,0,10,0,2,0,100,1,0,20,0,0,0,80,496200,2,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - Between 0-20% Health - Run Script\"),\r\n(496200,9,0,0,0,0,100,0,0,0,0,0,0,45,1,1,0,0,0,0,19,4971,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Script - Set Data to Slim's Friend\"),\r\n(496200,9,1,0,0,0,100,0,0,0,0,0,0,2,123,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Script - Set Faction 123\"),\r\n(496200,9,2,0,0,0,100,0,0,0,0,0,0,27,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Script - Stop Combat\"),\r\n(496200,9,3,0,0,0,100,0,5000,5000,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Script - Say Line 1\"),\r\n(496200,9,4,0,0,0,100,0,5000,5000,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Script - Say Line 2\"),\r\n(496200,9,5,0,0,0,100,0,6000,6000,0,0,0,15,1249,0,0,0,0,0,12,1,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Script - Complete Quest 'The Missing Diplomat (Part 11)'\"),\r\n(496200,9,6,0,0,0,100,0,1000,1000,0,0,0,45,1,1,0,0,0,0,10,9432,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Script - Set Data to Mikhail\"),\r\n(496200,9,7,0,0,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Tapoke \\\"Slim\\\" Jahn - On Script - Despawn\");\r\n\r\n-- Slim's Friend\r\nDELETE FROM `smart_scripts` WHERE `entryorguid`=4971 AND `source_type`=0;\r\nDELETE FROM `smart_scripts` WHERE `entryorguid`=497100 AND `source_type`=9;\r\nINSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES\r\n(4971,0,0,0,25,0,100,0,0,0,0,0,0,11,3616,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Slim's Friend - On Reset - Cast 'Poison Proc'\"),\r\n(4971,0,1,0,25,0,100,0,0,0,0,0,0,11,8601,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Slim's Friend - On Reset - Cast 'Slowing Poison'\"),\r\n(4971,0,2,0,67,0,100,0,3000,6000,0,0,0,11,2589,0,0,0,0,0,2,0,0,0,0,0,0,0,\"Slim's Friend - On Behind Target - Cast Backstab\"),\r\n(4971,0,3,0,38,0,100,1,1,1,0,0,0,80,497100,2,0,0,0,0,1,0,0,0,0,0,0,0,\"Slim's Friend - On Data Set - Run Script\"),\r\n(497100,9,0,0,0,0,100,0,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Slim's Friend - On Script - Evade\"),\r\n(497100,9,1,0,0,0,100,0,0,0,0,0,0,2,123,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Slim's Friend - On Script - Set Faction 123\"),\r\n(497100,9,2,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Slim's Friend - On Script - Say Line 0\"),\r\n(497100,9,3,0,0,0,100,0,6000,6000,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\"Slim's Friend - On Script - Despawn\");"}}
{"actor":{"display_login":"TrinityCoreBot"}}