[Completed][Quest] Sleeping Giants (11432 And 11433)

I’m trying to fix the quest Sleeping Giants with SAI but I can’t find a way to trigger the event when the spell cast is done.

Now it triggers the moment you cast the spell instead of when the spell channeling is completed (3sec), I’m currently using:

[CODE]
UPDATE creature_template SET AIName = ‘SmartAI’ WHERE entry = 24669;

DELETE FROM smart_scripts WHERE (entryorguid=24669 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
(24669, 0, 0, 1, 8, 0, 100, 0, 44261, 1, 0, 0, 33, 24669, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, ‘Dormant Vrykul - Sleeping Giants quest credit’),
(24669, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ‘Dormant Vrykul - Sleeping Giants despawn’);

DELETE FROM conditions WHERE (SourceTypeOrReferenceId=17 AND (SourceEntry=50165 OR SourceEntry=44261));
INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, ElseGroup, ConditionTypeOrReference, ConditionValue1, ConditionValue2, ConditionValue3, ErrorTextId, ScriptName, Comment) VALUES
(17, 0, 50165, 0, 19, 24669, 0, 0, 63, ‘’, ‘Awakening Rod target limit to Dormant Vrykul’),
(17, 0, 44261, 0, 19, 24669, 0, 0, 63, ‘’, ‘Awakening Rod aura target limit to Dormant Vrykul’);
[/SQL][/CODE]

use spell 44261 to trigger the event

ID - 50165 Bâtonnet d’éveil=================================================

Description: Permet à l’utilisateur de perturber préventivement le rituel d’éveil, en tuant le vrykul dormant le plus proche. La portée du bâtonnet est de $r mètres.

ToolTip: Un réveil prématuré aux conséquences désatreuses.

Category = 0, SpellIconID = 2529, activeIconID = 0, SpellVisual = (9913,0)

Family SPELLFAMILY_GENERIC, flag 0x00000000 00000000 00000000

SpellSchoolMask = 1 (SPELL_SCHOOL_MASK_NORMAL)

DamageClass = 0 (SPELL_DAMAGE_CLASS_NONE)

PreventionType = 0 (SPELL_PREVENTION_TYPE_NONE)

=================================================

AttributesEx1: 0x20004404 (SPELL_ATTR1_CHANNELED_1, SPELL_ATTR1_NO_THREAT, SPELL_ATTR1_CHANNEL_TRACK_TARGET, SPELL_ATTR1_CHANNEL_DISPLAY_SPELL_NAME)

AttributesEx2: 0x00000004 (SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS)

AttributesEx5: 0x00200000 (SPELL_ATTR5_UNK21)

=================================================

Spell Level = 0, base 0, max 0, maxTarget 0

Category = 0

DispelType = 0 (DISPEL_NONE)

Mechanic = 0 (MECHANIC_NONE)

SpellRange: (Id 7) “Portée très courte”:

MinRange = 0, MinRangeFriendly = 0

MaxRange = 10, MaxRangeFriendly = 10

CastingTime (Id 1) = 0,00

Duration: ID (27) 3000, 0, 3000

Interrupt Flags: 0x0000000F, AuraIF 0x00000000, ChannelIF 0x0000180B

Chance = 101, charges - 0

=================================================

Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA)

BasePoints = 0

Targets (25, 0) (TARGET_UNIT_TARGET_ANY, NO_TARGET)

Aura Id 23 (SPELL_AURA_PERIODIC_TRIGGER_SPELL), value = 0, misc = 0 (0), miscB = 0, periodic = 3000

Trigger spell (44261) Sleeping Giants: Awakening Rod Effect. Chance = 101

Warpten, 10z for the help.

Problem is solved, pls move to completed.

and

DELETE FROM creature_ai_scripts WHERE (creature_id=24669);

@PantadeDogmen, not needed because the creature doesn’t have EAI by default.

DELETE is always needed. What happens if you try to reinstall the SAI? SQL error.

hm malcrom why u dont use the sql check like mangos ? every sql file thats already aplied incerease the db nmber and the next sql file checks the revision number. if the version is too old or already up to date a sql error appears /emoticons/default_biggrin.png

Delete for SAI is there and since the creature didn’t have EAI script I did not include delete string for EAI.

What’s really crazy about that is we actually came up with that idea before mangos, but, never implemented it…

Tested on TDB335.11.46. Its working fine. Someone appears to have sneak fixed it in the background.