[DiscordArchive] Is there an example to pop up a gossip dialogue out of nowhere, in my case when the player is runnin
[DiscordArchive] Is there an example to pop up a gossip dialogue out of nowhere, in my case when the player is runnin
Archived author: Honey • Posted: 2022-11-05T14:27:00.331000+00:00
Original source
Is there an example to pop up a gossip dialogue out of nowhere, in my case when the player is running a command?
I take it there's a value required for `sender` in <https://www.azerothcore.org/pages/eluna/Player/GossipMenuAddItem.html> as well as in <https://www.azerothcore.org/pages/eluna/Player/GossipSendMenu.html> ?
Archived author: Honey • Posted: 2022-11-05T14:34:01.486000+00:00
Original source
I remember you mentioned something about triggering gossips without the object where the gossip originates from nearby <@234784691608092682>
Archived author: jintao41 • Posted: 2022-11-05T14:36:44.073000+00:00
Original source
Do you mean something like this?
```lua
local command = "#test"
function Test(event, player, message, type, language)
if(message == command) then
print(player:GetRace())
return false
end
end
RegisterPlayerEvent(18, Test)
```
Archived author: Honey • Posted: 2022-11-05T14:37:40.733000+00:00
Original source
I'm thinking of actual gossip windows appearing, which would require the commands i have linked.
Archived author: jintao41 • Posted: 2022-11-05T14:38:13.200000+00:00
Original source
Oh of course, I read too fast. Give me a second.
Archived author: jintao41 • Posted: 2022-11-05T14:42:51.584000+00:00
Original source
```lua
local command = "#command"
function OnPlayerCommand(event, player, message, type, language)
if(message == command) then
OnGossipHello(event, player, player)
return false
end
end
```
```lua
local function OnGossipHello(event, player, object)
player:GossipClearMenu() -- required for player gossip
player:GossipMenuAddItem(0, "gossipone", 1, 1)
player:GossipMenuAddItem(0, "gossiptwo", 1, 2)
player:GossipSetText("text above gossip")
player:GossipSendMenu(0x7FFFFFFF, player, MenuId)
end
```
For the text above the gossip I had to drop GossipTextExtension.lua into the extension folder. I think it was by Rochet2
edit: https://github.com/ElunaLuaEngine/Script...ension.lua
[Embed: Scripts/GossipTextExtension.lua at master · ElunaLuaEngine/Scripts]
Lua scripts for Eluna. Contribute to ElunaLuaEngine/Scripts development by creating an account on GitHub.
https://github.com/ElunaLuaEngine/Script...ension.lua
Archived author: Honey • Posted: 2022-11-05T14:44:57.724000+00:00
Original source
Oh player as the object to pass.on the gossip there. Neat, I'll try that.
Archived author: Foe • Posted: 2022-11-05T14:45:01.421000+00:00
Original source
I have a couple scripts that allow player gossip in my pastebin
Archived author: Honey • Posted: 2022-11-05T14:45:16.749000+00:00
Original source
I have that bookmarked, cheers!
Archived author: Foe • Posted: 2022-11-05T14:45:25.363000+00:00
Original source
There's a few things you have to do manually like clearing the menu items yourself