Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Hey, so I'm writing a module that would add a gossip option to all known barber NPC hello-gossip win

[DiscordArchive] Hey, so I'm writing a module that would add a gossip option to all known barber NPC hello-gossip win

[DiscordArchive] Hey, so I'm writing a module that would add a gossip option to all known barber NPC hello-gossip win

rektbyfaith
Administrator
0
08-05-2025, 11:35 AM
#1
Archived author: Dioxain • Posted: 2025-08-05T11:35:05.241000+00:00
Original source

Hey, so I'm writing a module that would add a gossip option to all known barber NPC hello-gossip windows, which would let players flag themselves for customisation. I don't mean barbershop customisation but full on character customisation.

But I can't find a way to do this that isn't... possessive? I know I can update those NPC's `creature_template` entries to include a ScriptName, and create a script with that name, etc, etc, but this presumably prevents any other script being assigned to that NPC. And while a conflict is unlikely to happen in this scenario... I'd prefer to use a different tactic.

Essentially, I want to insert gossip options into the database which then has a script callback which I define in code. Is there a way to do this?
rektbyfaith
08-05-2025, 11:35 AM #1

Archived author: Dioxain • Posted: 2025-08-05T11:35:05.241000+00:00
Original source

Hey, so I'm writing a module that would add a gossip option to all known barber NPC hello-gossip windows, which would let players flag themselves for customisation. I don't mean barbershop customisation but full on character customisation.

But I can't find a way to do this that isn't... possessive? I know I can update those NPC's `creature_template` entries to include a ScriptName, and create a script with that name, etc, etc, but this presumably prevents any other script being assigned to that NPC. And while a conflict is unlikely to happen in this scenario... I'd prefer to use a different tactic.

Essentially, I want to insert gossip options into the database which then has a script callback which I define in code. Is there a way to do this?

rektbyfaith
Administrator
0
08-05-2025, 12:17 PM
#2
Archived author: Mithria • Posted: 2025-08-05T12:17:57.633000+00:00
Original source

idk if theres a more elegant or proper way to do it, but off the top of my head you could add a gossip menu option, then a smart script for smart_event_gossip_select for your option, and set the action to cast spell on invoker then a spell script that just does target->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE)
rektbyfaith
08-05-2025, 12:17 PM #2

Archived author: Mithria • Posted: 2025-08-05T12:17:57.633000+00:00
Original source

idk if theres a more elegant or proper way to do it, but off the top of my head you could add a gossip menu option, then a smart script for smart_event_gossip_select for your option, and set the action to cast spell on invoker then a spell script that just does target->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE)

rektbyfaith
Administrator
0
08-05-2025, 12:18 PM
#3
Archived author: Mithria • Posted: 2025-08-05T12:18:39.536000+00:00
Original source

~~unless smart_action_set_data lets you directly set that flag on the player~~
rektbyfaith
08-05-2025, 12:18 PM #3

Archived author: Mithria • Posted: 2025-08-05T12:18:39.536000+00:00
Original source

~~unless smart_action_set_data lets you directly set that flag on the player~~

rektbyfaith
Administrator
0
08-05-2025, 12:19 PM
#4
Archived author: Mithria • Posted: 2025-08-05T12:19:19.007000+00:00
Original source

idk if that would actually work i havent tried it lmao
rektbyfaith
08-05-2025, 12:19 PM #4

Archived author: Mithria • Posted: 2025-08-05T12:19:19.007000+00:00
Original source

idk if that would actually work i havent tried it lmao

rektbyfaith
Administrator
0
08-05-2025, 12:23 PM
#5
Archived author: Tereneckla • Posted: 2025-08-05T12:23:55.846000+00:00
Original source

no, that smart action just is a bunch of variables that can be used for changes in smart scripts
rektbyfaith
08-05-2025, 12:23 PM #5

Archived author: Tereneckla • Posted: 2025-08-05T12:23:55.846000+00:00
Original source

no, that smart action just is a bunch of variables that can be used for changes in smart scripts

rektbyfaith
Administrator
0
08-05-2025, 12:24 PM
#6
Archived author: Mithria • Posted: 2025-08-05T12:24:14.646000+00:00
Original source

okay figured as much, wasn't sure how it worked
rektbyfaith
08-05-2025, 12:24 PM #6

Archived author: Mithria • Posted: 2025-08-05T12:24:14.646000+00:00
Original source

okay figured as much, wasn't sure how it worked

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)