[DiscordArchive] Does using `.npc add` correctly trigger SAI scripts that trigger on summoning?
[DiscordArchive] Does using `.npc add` correctly trigger SAI scripts that trigger on summoning?
Archived author: Michael Crilly • Posted: 2023-10-27T06:47:19.010000+00:00
Original source
Does using `.npc add` correctly trigger SAI scripts that trigger on summoning?
![[Image: WindowsTerminal_eJ3lJc7LFE.png?ex=690c45...6acf6c17e&]](https://cdn.discordapp.com/attachments/284406375495368704/1167354495206961172/WindowsTerminal_eJ3lJc7LFE.png?ex=690c4518&is=690af398&hm=2d3f34ee3bf3fc9e8298f34a2a63c68cb8c9cbae5cd983580b602d76acf6c17e&)
Archived author: Michael Crilly • Posted: 2023-10-27T06:50:00.141000+00:00
Original source
For example, if I want to summon The Lich King and have him go through the usual phases, is it enough to use `.npc add`? And which incarnation of him would be the correct one? I've found the following with a SQL join:
```sql
SELECT
sai.comment,
sai.id,
ct.entry,
ct.name,
ct.subname
FROM creature_template as ct
INNER JOIN smart_scripts as sai ON
sai.entryorguid = ct.entry
WHERE
sai.source_type = 0 AND
ct.name LIKE '%the lich king%'
;```
![[Image: WindowsTerminal_eJ3lJc7LFE.png?ex=690c45...6acf6c17e&]](https://cdn.discordapp.com/attachments/284406375495368704/1167354495206961172/WindowsTerminal_eJ3lJc7LFE.png?ex=690c4518&is=690af398&hm=2d3f34ee3bf3fc9e8298f34a2a63c68cb8c9cbae5cd983580b602d76acf6c17e&)
Archived author: Tereneckla • Posted: 2023-10-27T07:01:46.571000+00:00
Original source
the ICC lich king is 36597
he does not use SAI though, his script is in c++ (as is usual for raid bosses)
Archived author: Tereneckla • Posted: 2023-10-27T07:02:08.665000+00:00
Original source
I severely doubt it will run when he is added somewhere else
Archived author: Michael Crilly • Posted: 2023-10-27T07:03:25.673000+00:00
Original source
Thanks for that. It won't work outside of ICC, no - he's likely got waypoints to walk to and go through various phases and stages. I'm happy to spawn him in ICC, but I want to spawn him without having to go through everything else.
Archived author: Honey • Posted: 2023-10-27T07:13:26.051000+00:00
Original source
If you want him to not use his script for a custom implementation, you can just duplicate the row in `creature_template` with a new entry and change the script name to SAI or whatever you want the custom LK to script in.
Archived author: Honey • Posted: 2023-10-27T07:13:54.937000+00:00
Original source
Lua is the master's way for that. <:kek:1065379143887372398>
Archived author: Michael Crilly • Posted: 2023-10-27T07:14:40.113000+00:00
Original source
Yeah, that's right. I know that much. I guess I'm not being very clear (with my self, to be honest lol). And yeah, I _want_ use Lua, eventually.
All I want to do now is spawn him as if going through ICC as a raid group, then add in NPCs as I see fit.
Archived author: Honey • Posted: 2023-10-27T07:18:24.679000+00:00
Original source
You could set the previous encounters to be complete using GM commands.
Archived author: Michael Crilly • Posted: 2023-10-27T07:19:18.254000+00:00
Original source
`.npc set phase`?