[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
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?
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)
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~~
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
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
Archived author: Mithria • Posted: 2025-08-05T12:24:14.646000+00:00
Original source
okay figured as much, wasn't sure how it worked