Skip to content

Instantly share code, notes, and snippets.

@CraftedRO
Created March 15, 2025 19:05
Show Gist options
  • Save CraftedRO/d7f0ed91a5f404bb507781b89d4c9846 to your computer and use it in GitHub Desktop.
Save CraftedRO/d7f0ed91a5f404bb507781b89d4c9846 to your computer and use it in GitHub Desktop.
Sarathstra, Scourge of the North @crafted V1 EDITION
-- Sarathstra, Scourge of the North @CRAFTED V1 EDITION
SET @ROKHAN=26859;
SET @SARATHSTRA=26858;
SET @GOSSIP=9434;
-- Creature Text
DELETE FROM `creature_text` WHERE `CreatureID`=@ROKHAN;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(@ROKHAN, 0, 0, "Don't ya worry, mon. Just leave it to Rokhan. She be comin'.", 12, 0, 100, 1, 0, 0, 26047, 0, 'Rokhan to Player');
-- Gossip
DELETE FROM `gossip_menu_option` WHERE `MenuID`=@GOSSIP AND `OptionID`=0;
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
(@GOSSIP, 0, 0, "Get that frostwyrm on the ground and I'll finish her.", 26046, 1, 1, 0, 0, 0, 0, '', 0, 0);
-- Rokhan gossip conditions
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP AND `SourceEntry`=0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, @GOSSIP, 0, 0, 1, 47, 0, 12097, 8, 0, 0, 0, 0, '', "Rokhan gossip menu only show if player has state_mask 8 in Sarathstra, Scourge of the North"),
(15, @GOSSIP, 0, 0, 1, 2, 0, 36793, 1, 0, 1, 0, 0, '', "Rokhan gossip menu only show if the player doesn't have the Sarathstra's Frozen Heart item");
-- Rokhan SAI
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ROKHAN;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ROKHAN;
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`, `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_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@ROKHAN, 0, 0, 1, 62, 0, 100, 0, @GOSSIP, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Rokhan on gossip selected close invoker gossip"),
(@ROKHAN, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Rokhan On Link Say text"),
(@ROKHAN, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 80, @SARATHSTRA * 100, 0, 0, 0, 0, 0, 10, 112401, @SARATHSTRA, 1, 0, 0, 0, 0, 0, "Rokhan On Link Call Timed Actionlist");
-- Timed Actionlist SAI
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@SARATHSTRA;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@SARATHSTRA * 100;
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`, `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_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@SARATHSTRA * 100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 48, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "set active"),
(@SARATHSTRA * 100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 53, 1, @SARATHSTRA, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "start wp");
-- WP
DELETE FROM `waypoints` WHERE `entry`=@SARATHSTRA;
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES
(@SARATHSTRA, 1, 4400.307, 913.1443, 141.6648, NULL, 0, 'Sarathstra'),
(@SARATHSTRA, 2, 4400.307, 913.1443, 86.03818, NULL, 0, 'Sarathstra'),
(@SARATHSTRA, 3, 4396.26, 917.477, 83.1363, NULL, 0, 'Sarathstra'),
(@SARATHSTRA, 4, 4384.42, 931.647, 81.0272, NULL, 0, 'Sarathstra'),
(@SARATHSTRA, 5, 4374.62, 943.172, 82.6706, NULL, 0, 'Sarathstra'),
(@SARATHSTRA, 6, 4374.62, 943.172, 82.6706, NULL, 0, 'Sarathstra');
@CraftedRO
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment