Trinitycore: DB/SAI: improvements to Prospector Anvilward's script

Created on 21 Jun 2020  路  3Comments  路  Source: TrinityCore/TrinityCore

Description:

Apply the following improvements to Prospector Anvilward's script:

  • There's a 6 second delay between Prospector Anvilward's text and Ley-Keeper Caidanis' reply (changed from 10 seconds).
  • The OOC event happens every ~5 minutes (changed from 2 minutes).
  • Don't allow to start the OOC event after a player starts the quest-related event.
  • The "Very well. Let's see what you have to show me, $n." text is fired when the player selects the gossip option, not when the NPC reaches the first waypoint.
  • The pathing at the end was a bit off. Prospector Anvilward walks toward the green crystal inside the tower, instead of walking past it.
  • If you start the event right after Prospector Anvilward said his OOC text, but before Caidanis replies, Caidanis will still reply.

Everything was verified from tte 8.3 PTR.

Branch(es): 3.3.5

TC rev. hash/commit: 05025d79f3cb34fa135cb820badeef32883f7eb4

DELETE FROM `smart_scripts` WHERE `entryorguid`=15420 AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=1542000 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`, `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
(15420, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - On Respawn - Set Event Phase 1"),
(15420, 0, 1, 0, 1, 1, 100, 0, 10000, 10000, 270000, 330000, 0, 80, 1542000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - Out of Combat - Run Script (Phase 1)"),
(15420, 0, 2, 3, 62, 0, 100, 0, 21311, 0, 0, 0, 0, 53, 0, 15420, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - On Gossip Option 0 Selected - Start Waypoint"),
(15420, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - On Gossip Option 0 Selected - Close Gossip"),
(15420, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - On Gossip Option 0 Selected - Remove Npc Flag Gossip"),
(15420, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - On Gossip Option 0 Selected - Set Event Phase 0"),
(15420, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - On Gossip Option 0 Selected - Say Line 0"),
(15420, 0, 7, 8, 40, 0, 100, 0, 8, 15420, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - On Waypoint 8 Reached - Say Line 1"),
(15420, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 2, 24, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - On Waypoint 8 Reached - Set Faction 24"),
(1542000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - Out Of Combat - Say Line 2"),
(1542000, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 15405, 50, 0, 0, 0, 0, 0, 0, "Prospector Anvilward - Out Of Combat - Say Line 0 (Ley-Keeper Caidanis)");

DELETE FROM `waypoints` WHERE `entry`=15420 AND `pointid` IN (7, 8);
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
(15420, 7, 9289.319336, -6657.801270, 31.828445, "Prospector Anvilward"),
(15420, 8, 9289.892578, -6657.924316, 31.827124, "Prospector Anvilward");


Branch-3.3.5a Comp-Database Feedback-PatchFix

Most helpful comment

I'm not familiar with vehicles and didn't checked them yet but it must be used for few charmed quest creatures otherwise their scripts will not work
I guess in all other cases this flag just makes DB dirty and (probably)creates bugs(enslaved demons)

All 3 comments

Don't get me wrong, I just found this issue perfect opportunity to share my thoughts with the community about this thing :)

Dear devs, please stop using even_flags 512 for creatures which even cannot be charmed. In 99.9% creatures must not have this flag.

Guardians are not charmed.
It has absolutely no impact to creatures which are mind-controlable. Their default AI is blocked during mind-control as intended.
I haven't tested yet with enslave demon, but I'm pretty sure they should not use SAI script if enslaved since enslaved demons must cast spells from pet bar and not from SAI script.

If it will be confirmed one day that this flag must be removed from 99.9% of scripts, it will require manual checking of 11k rows with this flag.

Never thougt about it that way, it's probably only used for vehicles controlled by players then (assuming they still run SAI?). Removed.

I'm not familiar with vehicles and didn't checked them yet but it must be used for few charmed quest creatures otherwise their scripts will not work
I guess in all other cases this flag just makes DB dirty and (probably)creates bugs(enslaved demons)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rushor picture Rushor  路  3Comments

Rochet2 picture Rochet2  路  3Comments

Teppic1 picture Teppic1  路  3Comments

ZenoX92 picture ZenoX92  路  3Comments

Blasphemous picture Blasphemous  路  3Comments