TrinityCore/TrinityCore — Issue #3925: [DB/FIX] Behaviour of Scarlet Peasant (entry 28557)
Author: Valcorb
Created: 2011-11-11 20:34:08+00:00
State: open

```sql

-- [NPC] Fix behaviour of Scarlet Peasant
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=28557;
DELETE FROM `smart_scripts` WHERE `entryorguid`=28557 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
(28557, 0, 0, 0, 2, 0, 20, 1, 0, 20, 1, 1, 1, 0, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'At 0-20% hp- say text'),
(28557, 0, 1, 0, 2, 0, 20, 1, 0, 20, 1, 1, 1, 1, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'At 0-20% hp- say text'),
(28557, 0, 2, 0, 2, 0, 20, 1, 0, 20, 1, 1, 1, 2, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'At 0-20% hp- say text'),
(28557, 0, 3, 0, 2, 0, 20, 1, 0, 20, 1, 1, 1, 3, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'At 0-20% hp- say text'),
(28557, 0, 4, 0, 2, 0, 20, 1, 0, 20, 1, 1, 1, 4, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'At 0-20% hp- say text');

DELETE FROM `creature_text` WHERE `entry`=28557 AND `type`=12;
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`)
VALUES
(28557, 0, 0, 'Ungh! I ... I think I pooped...', 12, 0, 100, 0, 0, 0, 'Scarlet Peasant'),
(28557, 0, 1, 'I... I have a sick grandmother at home... I--I\'m all she\'s got.', 12, 0, 100, 0, 0, 0, 'Scarlet Peasant'),
(28557, 0, 2, 'I picked the wrong week to quit drinkin\'!', 12, 0, 100, 0, 0, 0, 'Scarlet Peasant'),
(28557, 0, 3, 'I\'ve got five kids lady, they\'ll die without me!', 12, 0, 100, 0, 0, 0, 'Scarlet Peasant'),
(28557, 0, 4, 'You don\'t have to do this! Nobody has to die!', 12, 0, 100, 0, 0, 0, 'Scarlet Peasant');

```sql