source: CMangos
http://wotlk.openwow.com/npc=18384
Malukaz should channel a spell every few seconds.
Branch(es): 3.3.5 / master (Tell us which branch(es) this issue affects.)
3.3.5
TC rev. hash/commit: https://github.com/TrinityCore/TrinityCore/commit/fe999bcf78f201788fe3ca2556b73fd955444150
Operating system: win 10
Malukaz should channel a spell every few seconds.
This is not a part of the event for his quest?
i only found the channel and the talk emote, it was unrelated to the questscript
hm i will script the questevent then and remove the out of combat channel
Spells:
34312 Summon Terokkar Wolf Spirit
34313 Transform into Humanoid
34317 Transform Malukaz (Used at the start of the event)
34319 Transform Malukaz Back (Used at the end of the event)
hm if i see this mess we need a script that add setdata to event_scripts
SMART_SCRIPT_TYPE_EVENT is NYI?
noone will ever work on this, i need to hackfix it with the invisible Terokkar Wolf
alright. no db errors + no startup errors. That's the best we can do currently with this fucking poor db script engine
noone will ever work on this, i need to hackfix it with the invisible Terokkar Wolf
Sadly. Currently SD2 uses this for the events like this.
we can also write a c++ script which handles the setdata or scriptstart after spellcast, but that's all a big pile of shit. If there is no way to script such easy things that exists in wow like 10 years now with db scripts only then... we know db devs are fucked
You forgot to change his npc flags to 0 :)
no we cannot do that, if the player leaves the zone before the event get's finished, the script9 get's stucked and the npc flag will never be readded, so new player can no longer take quests from the questgiver
i could fix this if we set the creature active - but again this is a hack and will not be accepted from tc member. and there is absolutely no other way to fix it.
another big pile of shitengine
if has no other way and you document it, will be accept.
@Keader thanks i will add it then :)
The issue i mentioned is documented here https://github.com/TrinityCore/TrinityCore/issues/16455
@dr-j wrote:
any script which uses a timed action list can become bugged if players leave grid while action list is running and if a npc with a timed action list dies while script is running the remainder of script will run on respawn or when grid is loaded after respawn.
@Rushor has others scripts in core, with setActive(true)... to "solve" this issue with grid
alright (i added setactive(true) and (false)). if the event starts, the creature is active. after script9 is finished, the creature is unactive again. That allowed us to change the npcflags and it works fine.
fix:
-- [Q] Welcoming the Wolf Spirit -- http://wotlk.openwow.com/quest=10791
DELETE FROM `event_scripts` WHERE `id`=12650;
INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES
(12650, 0, 10, 19616, 300000, 0, -2645.3957, 4402.211, 35.6738, 3.9440),
(12650, 43, 8, 18384, 30, 0, 0, 0, 0, 0);
-- Malukaz SAI
SET @ENTRY := 18384;
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,0,38,0,100,0,1,1,0,0,80,@ENTRY*100+00,2,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Data Set 1 1 - Run Script"),
(@ENTRY,0,1,0,38,0,100,0,2,2,0,0,80,@ENTRY*100+01,2,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Data Set 2 2 - Run Script");
-- Terokkar Wolf Spirit SAI
SET @ENTRY := 19616;
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,63,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Terokkar Wolf Spirit - On Just Created - Set Visibility Off"),
(@ENTRY,0,1,5,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,10,65789,18384,0,0,0,0,0,"Terokkar Wolf Spirit - On Just Created - Set Data 1 1"),
(@ENTRY,0,2,4,38,0,100,0,1,1,0,0,53,1,19616,0,0,0,0,1,0,0,0,0,0,0,0,"Terokkar Wolf Spirit - On Data Set 1 1 - Start Waypoint"),
(@ENTRY,0,3,0,40,0,100,0,2,19616,0,0,45,2,2,0,0,0,0,10,65789,18384,0,0,0,0,0,"Terokkar Wolf Spirit - On Waypoint 2 Reached - Set Data 2 2"),
(@ENTRY,0,4,0,61,0,100,0,1,1,0,0,47,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Terokkar Wolf Spirit - On Data Set 1 1 - Set Visibility On"),
(@ENTRY,0,5,0,61,0,100,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Terokkar Wolf Spirit - On Just Created - Set Active On");
DELETE FROM `waypoints` WHERE `entry`=19616;
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
(19616, 1, -2655.9, 4391.12, 36.1316, 'Terokkar Wolf Spirit'),
(19616, 2, -2668.96, 4376.09, 35.9556, 'Terokkar Wolf Spirit');
-- Actionlist SAI
SET @ENTRY := 1838400;
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,0,0,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Set Active On"),
(@ENTRY,9,1,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Set Npc Flag 0"),
(@ENTRY,9,2,0,0,0,100,0,1000,1000,0,0,11,34317,2,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Cast 'Transform Malukaz'"),
(@ENTRY,9,3,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Say Line 0"),
(@ENTRY,9,4,0,0,0,100,0,1000,1000,0,0,11,28892,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Cast 'Nature Channeling'"),
(@ENTRY,9,5,0,0,0,100,0,4000,4000,0,0,1,1,8000,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Say Line 1"),
(@ENTRY,9,6,0,0,0,100,0,4000,4000,0,0,1,2,5000,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Say Line 2"),
(@ENTRY,9,7,0,0,0,100,0,6000,6000,0,0,1,3,5000,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Say Line 3"),
(@ENTRY,9,8,0,0,0,100,0,500,500,0,0,28,28892,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Remove Aura 'Nature Channeling'"),
(@ENTRY,9,9,0,0,0,100,0,1000,1000,0,0,11,34312,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Cast 'Summon Terokkar Wolf Spirit'"),
(@ENTRY,9,10,0,0,0,100,0,2000,2000,0,0,45,1,1,0,0,0,0,19,19616,100,0,0,0,0,0,"Malukaz - On Script - Set Data 1 1");
-- Actionlist SAI
SET @ENTRY := 1838401;
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,0,3000,3000,0,0,5,393,0,0,0,0,0,19,19616,20,0,0,0,0,0,"Malukaz - On Script - Play Emote 393"),
(@ENTRY,9,1,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,19,19616,20,0,0,0,0,0,"Malukaz - On Script - Say Line 0"),
(@ENTRY,9,2,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,19,19616,20,0,0,0,0,0,"Malukaz - On Script - Say Line 1"),
(@ENTRY,9,3,0,0,0,100,0,4000,4000,0,0,5,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Play Emote 2"),
(@ENTRY,9,4,0,0,0,100,0,3000,3000,0,0,1,4,5000,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Say Line 4"),
(@ENTRY,9,5,0,0,0,100,0,5000,5000,0,0,41,1,0,0,0,0,0,19,19616,20,0,0,0,0,0,"Malukaz - On Script - Despawn Instant"),
(@ENTRY,9,6,0,0,0,100,0,2000,2000,0,0,1,5,5000,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Say Line 5"),
(@ENTRY,9,7,0,0,0,100,0,0,0,0,0,11,34319,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Cast 'Transform Malukaz Back'"),
(@ENTRY,9,8,0,0,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Set Npc Flag 3"),
(@ENTRY,9,9,0,0,0,100,0,0,0,0,0,48,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Malukaz - On Script - Set Active Off");
DELETE FROM `creature_text` WHERE `entry` IN (18384, 19616);
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextId`, `comment`) VALUES
-- Malukaz
(18384, 0, 0, '%s dons his wolf-fur vestments.', 16, 0, 100, 0, 0, 0, 17039, 'Malukaz'),
(18384, 1, 0, 'Wolf spirit of the forest, hear me!', 12, 0, 100, 0, 0, 0, 17044, 'Malukaz'),
(18384, 2, 0, 'Long ago, you were a companion to my people. We gave ourselves to evil and you were forgotten.', 12, 0, 100, 0, 0, 0, 17046, 'Malukaz'),
(18384, 3, 0, 'But we have returned, spirit! We have returned to honor you again. Favor us with your presence once more.', 12, 0, 100, 0, 0, 0, 17047, 'Malukaz'),
(18384, 4, 0, 'May our bond with you never be broken again, spirit.', 12, 0, 100, 0, 0, 0, 17055, 'Malukaz'),
(18384, 5, 0, 'We have done it! Thrall would be proud.', 12, 0, 100, 0, 0, 0, 17066, 'Malukaz'),
-- Terokkar Wolf Spirit
(19616, 0, 0, '%s howls in response to Malukaz''s call.', 16, 0, 100, 0, 0, 0, 17051, 'Terokkar Wolf Spirit'),
(19616, 1, 0, '%s expresses its approval.', 16, 0, 100, 0, 0, 0, 17086, 'Terokkar Wolf Spirit');
thanks for cherry pick :D
Most helpful comment
we can also write a c++ script which handles the setdata or scriptstart after spellcast, but that's all a big pile of shit. If there is no way to script such easy things that exists in wow like 10 years now with db scripts only then... we know db devs are fucked