{"action":"created","issue":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/15737","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/15737/labels{/name}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/15737/comments","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/15737/events","html_url":"https://github.com/TrinityCore/TrinityCore/issues/15737","id":112148578,"number":15737,"title":"DB/Gossip: Orbaz Bloodbane, gossip option too early","user":{"login":"tkrokli","id":4903600,"avatar_url":"https://avatars.githubusercontent.com/u/4903600?v=3","gravatar_id":"","url":"https://api.github.com/users/tkrokli","html_url":"https://github.com/tkrokli","followers_url":"https://api.github.com/users/tkrokli/followers","following_url":"https://api.github.com/users/tkrokli/following{/other_user}","gists_url":"https://api.github.com/users/tkrokli/gists{/gist_id}","starred_url":"https://api.github.com/users/tkrokli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkrokli/subscriptions","organizations_url":"https://api.github.com/users/tkrokli/orgs","repos_url":"https://api.github.com/users/tkrokli/repos","events_url":"https://api.github.com/users/tkrokli/events{/privacy}","received_events_url":"https://api.github.com/users/tkrokli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Branch-3.3.5a","name":"Branch-3.3.5a","color":"188846"},{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Branch-6.x","name":"Branch-6.x","color":"188846"},{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Comp-Database","name":"Comp-Database","color":"FF6600"},{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Feedback-PatchFix","name":"Feedback-PatchFix","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-19T13:50:42Z","updated_at":"2015-10-20T07:45:06Z","closed_at":null,"body":"TrinityCore rev. 5c449b50aadc 2015-10-18 18:46:28 +0200 (3.3.5 branch) (Win64, Release)\r\nTDB 335.59 + all updates up to and including 2015_10_17_02_world.sql\r\n\r\n![orbaz bloodbane gossip](https://cloud.githubusercontent.com/assets/4903600/10577115/a0807e54-7668-11e5-8a23-cfc18528e40b.png)\r\n\r\nhttp://www.wowhead.com/npc=28914/orbaz-bloodbane\r\nhttp://www.wowhead.com/quest=12723/behind-scarlet-lines\r\nhttp://www.wowhead.com/quest=12724/the-path-of-the-righteous-crusader\r\nhttp://www.wowhead.com/quest=12754/ambush-at-the-overlook\r\nhttp://www.wowhead.com/quest=12755/a-meeting-with-fate\r\nhttp://www.wowhead.com/quest=12756/the-scarlet-onslaught-emerges\r\nhttp://www.wowhead.com/quest=12757/scarlet-armies-approach\r\n\r\nThe option should not be shown before player has accepted quest 12757, [[Scarlet Armies Approach...]](http://www.wowhead.com/quest=12757/scarlet-armies-approach) where Orbaz Bloodbane says:\r\n\"We must prepare for the encroaching armies, `<name>`. You will take what you have discovered to Highlord Mograine at once! I will open a portal directly to Acherus. Step inside and it will transport you.\"\r\n\r\nAlso, if you try to click the option before you have got the quest, nothing happens, but you have to close the gossip window and open it again to access the actual quest in the window, because clicking the option disables the quest link feature in the active window.\r\n```sql\r\nSELECT * FROM `gossip_menu_option` WHERE `option_text` LIKE '%Orbaz%';\r\n```\r\n```\r\nmenu_id      id  option_icon  option_text                                                          OptionBroadcastTextID  option_id  npc_option_npcflag  action_menu_id  action_poi_id  box_coded  box_money  box_text  BoxBroadcastTextID\r\n-------  ------  -----------  -------------------------------------------------------------------  ---------------------  ---------  ------------------  --------------  -------------  ---------  ---------  --------  ------------------\r\n   9769       0            0  I missed the gate to Acherus, Orbaz. Could you please open another?                  29445          1                   1               0              0          0          0                             0\r\n```\r\nTherefore, we need a condition to make it visible only when quest 12757 is taken:\r\n```sql\r\n-- \r\n-- Orbaz Bloodbane (NPC 28914) condition for the gossip_menu_option to be shown for Scarlet Armies Approach...\r\nDELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9769 AND `ConditionValue1`=12757;\r\nINSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES\r\n(15,9769,0,0,0,9,0,12757,0,0,0,0,0,'','Orbaz Bloodbane - Show gossip option only if player has accepted quest 12757, but not completed it.');\r\n```\r\nEdit: Looks like I forgot to check the condition against another condition where the quest is not completed yet, although I based this condition on the Salanar the Horseman's condition (#15603) for his gossip_menu_option. The gossip option is not displayed at all now, but perhaps I need to delete the game Cache and try again from the start of the quest line. (Nope, that was not enough. Need to do some more condition checking.)"},"comment":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/comments/149465158","html_url":"https://github.com/TrinityCore/TrinityCore/issues/15737#issuecomment-149465158","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/15737","id":149465158,"user":{"login":"tkrokli","id":4903600,"avatar_url":"https://avatars.githubusercontent.com/u/4903600?v=3","gravatar_id":"","url":"https://api.github.com/users/tkrokli","html_url":"https://github.com/tkrokli","followers_url":"https://api.github.com/users/tkrokli/followers","following_url":"https://api.github.com/users/tkrokli/following{/other_user}","gists_url":"https://api.github.com/users/tkrokli/gists{/gist_id}","starred_url":"https://api.github.com/users/tkrokli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkrokli/subscriptions","organizations_url":"https://api.github.com/users/tkrokli/orgs","repos_url":"https://api.github.com/users/tkrokli/repos","events_url":"https://api.github.com/users/tkrokli/events{/privacy}","received_events_url":"https://api.github.com/users/tkrokli/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T07:45:06Z","updated_at":"2015-10-20T07:45:06Z","body":"As I mentioned above, I have now tested the existing SAI script lines for creature 28914, like this:\r\n```sql\r\n-- Update SmartAI script of Creature entry 28914 (Orbaz Bloodbane)\r\n\r\n-- Update table `creature_template`\r\nUPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`= 28914;\r\n\r\n-- Update table `smart_scripts`\r\nDELETE FROM `smart_scripts` WHERE `entryorguid`= 28914 AND `action_param1`= 2891400;\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`,`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(28914, 0, 0, 0, 19, 0, 100, 0,12757, 0, 0, 0, 80, 2891400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orbaz Bloodbane - On Quest \"Scarlet Armies Approach...\" Taken - Run Script 2891400'),\r\n(28914, 0, 1, 0, 62, 0, 100, 0, 9769, 0, 0, 0, 80, 2891400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orbaz Bloodbane - On gossip_menu_option.menu_id 9769 Selected - Run Script 2891400'),\r\n(28914, 0, 2, 0, 62, 0, 100, 0, 9769, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Orbaz Bloodbane - On gossip_menu_option.menu_id 9769 Selected - Close Gossip');\r\n```\r\nThe script works almost as intended, to the extent that Orbaz says Line 0 and casts Portal: Acherus, but there is where it stops. The gossip window will not close, no matter in which order the 2 last `VALUES` lines are arranged. Maybe I need to create a separate action script (2891401) for Orbaz for the gossip option?"}}