Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Is ```player:GetQuest():GetName()``` correct, if I want to broadcast the player's current quest?

[DiscordArchive] Is ```player:GetQuest():GetName()``` correct, if I want to broadcast the player's current quest?

[DiscordArchive] Is ```player:GetQuest():GetName()``` correct, if I want to broadcast the player's current quest?

Pages (5): Previous 1 2 3 4 5 Next
rektbyfaith
Administrator
0
02-07-2023, 07:24 PM
#11
Archived author: adm • Posted: 2023-02-07T19:24:49.303000+00:00
Original source

not the quest's name
rektbyfaith
02-07-2023, 07:24 PM #11

Archived author: adm • Posted: 2023-02-07T19:24:49.303000+00:00
Original source

not the quest's name

rektbyfaith
Administrator
0
02-07-2023, 07:30 PM
#12
Archived author: Honey • Posted: 2023-02-07T19:30:34.051000+00:00
Original source

I'm not aware of a function to fetch the name. Can always do a query though
rektbyfaith
02-07-2023, 07:30 PM #12

Archived author: Honey • Posted: 2023-02-07T19:30:34.051000+00:00
Original source

I'm not aware of a function to fetch the name. Can always do a query though

rektbyfaith
Administrator
0
02-07-2023, 07:57 PM
#13
Archived author: adm • Posted: 2023-02-07T19:57:37.551000+00:00
Original source

okay, i made a query:

```
local questId = quest:GetId()
local questName = WorldDBQuery("SELECT LogTitle FROM quest_template WHERE ID = " .. questId):GetString(0)
SendWorldMessage("Quest Finished: " .. questName .. " by " .. player:GetName())
```
and it worked. Thanks for the idea.

Is there any way to make the quest name shown as a link, showing it's description when clicked?
rektbyfaith
02-07-2023, 07:57 PM #13

Archived author: adm • Posted: 2023-02-07T19:57:37.551000+00:00
Original source

okay, i made a query:

```
local questId = quest:GetId()
local questName = WorldDBQuery("SELECT LogTitle FROM quest_template WHERE ID = " .. questId):GetString(0)
SendWorldMessage("Quest Finished: " .. questName .. " by " .. player:GetName())
```
and it worked. Thanks for the idea.

Is there any way to make the quest name shown as a link, showing it's description when clicked?

rektbyfaith
Administrator
0
02-07-2023, 08:13 PM
#14
Archived author: Honey • Posted: 2023-02-07T20:13:59.551000+00:00
Original source

I'm sure there is a way, but i don't know the syntax for that.
rektbyfaith
02-07-2023, 08:13 PM #14

Archived author: Honey • Posted: 2023-02-07T20:13:59.551000+00:00
Original source

I'm sure there is a way, but i don't know the syntax for that.

rektbyfaith
Administrator
0
02-07-2023, 08:14 PM
#15
Archived author: Foe • Posted: 2023-02-07T20:14:18.067000+00:00
Original source

https://wowwiki-archive.fandom.com/wiki/QuestLink
[Embed: QuestLink]
← API types In essence, quest links are questStrings with additional formatting to make in-game text controls display them as clickable hyperlinks. |cff808080|Hquest:99:15|h[Arugal's Folly]|h|r Broken up in its components: "|cff808080" – Colorizes the link with a gray color The first two characters after pipe-c may be the alpha level, where ff i...
https://wowwiki-archive.fandom.com/wiki/QuestLink
rektbyfaith
02-07-2023, 08:14 PM #15

Archived author: Foe • Posted: 2023-02-07T20:14:18.067000+00:00
Original source

https://wowwiki-archive.fandom.com/wiki/QuestLink
[Embed: QuestLink]
← API types In essence, quest links are questStrings with additional formatting to make in-game text controls display them as clickable hyperlinks. |cff808080|Hquest:99:15|h[Arugal's Folly]|h|r Broken up in its components: "|cff808080" – Colorizes the link with a gray color The first two characters after pipe-c may be the alpha level, where ff i...
https://wowwiki-archive.fandom.com/wiki/QuestLink

rektbyfaith
Administrator
0
02-07-2023, 08:32 PM
#16
Archived author: adm • Posted: 2023-02-07T20:32:54.735000+00:00
Original source

Thanks!
rektbyfaith
02-07-2023, 08:32 PM #16

Archived author: adm • Posted: 2023-02-07T20:32:54.735000+00:00
Original source

Thanks!

rektbyfaith
Administrator
0
02-07-2023, 08:44 PM
#17
Archived author: adm • Posted: 2023-02-07T20:44:08.464000+00:00
Original source

Success.

```
local questId = quest:GetId()
local questName = WorldDBQuery("SELECT LogTitle FROM quest_template WHERE ID = " .. questId):GetString(0)
local questLevel = WorldDBQuery("SELECT QuestLevel FROM quest_template WHERE ID = " .. questId):GetString(0)
```

And that goes in the message:

```|Hquest:"..quest:GetId()..":"..questLevel.."|h["..questName.."]|h```
rektbyfaith
02-07-2023, 08:44 PM #17

Archived author: adm • Posted: 2023-02-07T20:44:08.464000+00:00
Original source

Success.

```
local questId = quest:GetId()
local questName = WorldDBQuery("SELECT LogTitle FROM quest_template WHERE ID = " .. questId):GetString(0)
local questLevel = WorldDBQuery("SELECT QuestLevel FROM quest_template WHERE ID = " .. questId):GetString(0)
```

And that goes in the message:

```|Hquest:"..quest:GetId()..":"..questLevel.."|h["..questName.."]|h```

rektbyfaith
Administrator
0
02-07-2023, 08:44 PM
#18
Archived author: adm • Posted: 2023-02-07T20:44:34.079000+00:00
Original source

Thank you both!
rektbyfaith
02-07-2023, 08:44 PM #18

Archived author: adm • Posted: 2023-02-07T20:44:34.079000+00:00
Original source

Thank you both!

rektbyfaith
Administrator
0
02-07-2023, 08:46 PM
#19
Archived author: Foe • Posted: 2023-02-07T20:46:49.943000+00:00
Original source

You really shouldn't be running two queries for every single quest turn-in btw
rektbyfaith
02-07-2023, 08:46 PM #19

Archived author: Foe • Posted: 2023-02-07T20:46:49.943000+00:00
Original source

You really shouldn't be running two queries for every single quest turn-in btw

rektbyfaith
Administrator
0
02-07-2023, 08:54 PM
#20
Archived author: adm • Posted: 2023-02-07T20:54:25.575000+00:00
Original source

Is this better?

```
local result = WorldDBQuery("SELECT LogTitle, QuestLevel FROM quest_template WHERE ID = " .. questId)
local questName = result:GetString(0)
local questLevel = result:GetString(1)
```
rektbyfaith
02-07-2023, 08:54 PM #20

Archived author: adm • Posted: 2023-02-07T20:54:25.575000+00:00
Original source

Is this better?

```
local result = WorldDBQuery("SELECT LogTitle, QuestLevel FROM quest_template WHERE ID = " .. questId)
local questName = result:GetString(0)
local questLevel = result:GetString(1)
```

Pages (5): Previous 1 2 3 4 5 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)