-- Saronite Mine Slave SAI
SET @ENTRY := 31397;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT 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
(@ENTRY,0,0,1,62,0,100,1,10137,0,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Saronite Mine Slave - On Gossip Option 0 Selected - Run Script (No Repeat)");
-- Actionlist SAI
SET @ENTRY := 3139700;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=9;
INSERT 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
(@ENTRY,9,0,0,0,0,100,1,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Saronite Mine Slave - On Script - Close Gossip (No Repeat)"),
(@ENTRY,9,1,0,0,0,100,1,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Saronite Mine Slave - On Script - Say Line 0 (No Repeat)"),
(@ENTRY,9,2,0,0,0,40,1,0,0,0,0,33,31866,0,0,0,0,0,7,0,0,0,0,0,0,0,"Saronite Mine Slave - On Script - Quest Credit 'Slaves to Saronite' (No Repeat)"),
(@ENTRY,9,3,0,0,0,100,1,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,6975.907227,1970.998657,524.090027,2.227127,"Saronite Mine Slave - On Script - Move To Position (No Repeat)"),
(@ENTRY,9,4,0,0,0,100,0,5000,5000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Saronite Mine Slave - On Script - Despawn Instant");
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10137;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, 10137, 0, 0, 1, 9, 0, 13302, 0, 0, 0, 0, 0, '', 'Only show first gossip if player is on quest Slaves to Saronite Horde'),
(15, 10137, 0, 0, 0, 9, 0, 13300, 0, 0, 0, 0, 0, '', 'Only show first gossip if player is on quest Slaves to Saronite Alliance'),
(15, 10137, 0, 0, 2, 28, 0, 13300, 0, 0, 0, 0, 0, '', 'Only show first gossip if player has quest Slaves to Saronite Alliance completed'),
(15, 10137, 0, 0, 3, 28, 0, 13302, 0, 0, 0, 0, 0, '', 'Only show first gossip if player has quest Slaves to Saronite Horde completed');
ser re