(в скрипте каждые 5 сек поставил) тригеры кидали килкредит.
Так как на тринити почему то спеллы дающие килкредит не сработали добавил дополнительное поле с явным указанием килкредита.
кастит не сам игрок а суммон, посему проверку для килкредита сделал ближайшему игроку (21, max дистанция 20)(
Кондишини цели для сканирования данных в базе уже есть.
Код:
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (30313,30315,30316,30317,30318);
DELETE FROM `smart_scripts` WHERE (`entryorguid`=30313 AND `source_type`=0);
DELETE FROM `smart_scripts` WHERE (`entryorguid`=30315 AND `source_type`=0);
DELETE FROM `smart_scripts` WHERE (`entryorguid`=30316 AND `source_type`=0);
DELETE FROM `smart_scripts` WHERE (`entryorguid`=30317 AND `source_type`=0);
DELETE FROM `smart_scripts` WHERE (`entryorguid`=30318 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
(30313, 0, 0, 0, 1, 0, 100, 0, 1000, 2000, 5000, 5000, 11, 56523, 3, 0, 0, 0, 0, 9, 0, 1, 20, 0, 0, 0, 0, 'q12986');
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
(30315, 0, 0, 0, 8, 0, 100, 0, 56523, 1, 1000, 1000, 11, 56532, 3, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0, 0, 'q12986');
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
(30315, 0, 1, 0, 8, 0, 100, 0, 56523, 1, 2000, 2000, 33, 30315, 0, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0, 0, 'q12986');
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
(30316, 0, 0, 0, 8, 0, 100, 0, 56523, 1, 1000, 1000, 11, 56534, 3, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0, 0, 'q12986');
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
(30316, 0, 1, 0, 8, 0, 100, 0, 56523, 1, 2000, 2000, 33, 30316, 0, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0, 0, 'q12986');
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
(30317, 0, 1, 0, 8, 0, 100, 0, 56523, 1, 2000, 2000, 33, 30317, 0, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0, 0, 'q12986');
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
(30317, 0, 0, 0, 8, 0, 100, 0, 56523, 1, 1000, 1000, 11, 56533, 3, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0, 0, 'q12986');
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
(30318, 0, 1, 0, 8, 0, 100, 0, 56523, 1, 2000, 2000, 33, 30318, 0, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0, 0, 'q12986');
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
(30318, 0, 0, 0, 8, 0, 100, 0, 56523, 1, 1000, 1000, 11, 56535, 3, 0, 0, 0, 0, 21, 20, 0, 0, 0, 0, 0, 0, 'q12986');