Forums WoW Modding Support Archives Azerothcore Discord Archives [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

[DiscordArchive] Is there an example to pop up a gossip dialogue out of nowhere, in my case when the player is runnin

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
11-05-2022, 02:27 PM
#1
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> ?
rektbyfaith
11-05-2022, 02:27 PM #1

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> ?

rektbyfaith
Administrator
0
11-05-2022, 02:34 PM
#2
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>
rektbyfaith
11-05-2022, 02:34 PM #2

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>

rektbyfaith
Administrator
0
11-05-2022, 02:36 PM
#3
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)
```
rektbyfaith
11-05-2022, 02:36 PM #3

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)
```

rektbyfaith
Administrator
0
11-05-2022, 02:37 PM
#4
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.
rektbyfaith
11-05-2022, 02:37 PM #4

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.

rektbyfaith
Administrator
0
11-05-2022, 02:38 PM
#5
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.
rektbyfaith
11-05-2022, 02:38 PM #5

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.

rektbyfaith
Administrator
0
11-05-2022, 02:42 PM
#6
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
rektbyfaith
11-05-2022, 02:42 PM #6

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

rektbyfaith
Administrator
0
11-05-2022, 02:44 PM
#7
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.
rektbyfaith
11-05-2022, 02:44 PM #7

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.

rektbyfaith
Administrator
0
11-05-2022, 02:45 PM
#8
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
rektbyfaith
11-05-2022, 02:45 PM #8

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

rektbyfaith
Administrator
0
11-05-2022, 02:45 PM
#9
Archived author: Honey • Posted: 2022-11-05T14:45:16.749000+00:00
Original source

I have that bookmarked, cheers!
rektbyfaith
11-05-2022, 02:45 PM #9

Archived author: Honey • Posted: 2022-11-05T14:45:16.749000+00:00
Original source

I have that bookmarked, cheers!

rektbyfaith
Administrator
0
11-05-2022, 02:45 PM
#10
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
rektbyfaith
11-05-2022, 02:45 PM #10

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

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)