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, 08:54 PM
#21
Archived author: Foe • Posted: 2023-02-07T20:54:38.935000+00:00
Original source

I'm writing an extension for you
rektbyfaith
02-07-2023, 08:54 PM #21

Archived author: Foe • Posted: 2023-02-07T20:54:38.935000+00:00
Original source

I'm writing an extension for you

rektbyfaith
Administrator
0
02-07-2023, 08:54 PM
#22
Archived author: Foe • Posted: 2023-02-07T20:54:41.255000+00:00
Original source

gimme a few min
rektbyfaith
02-07-2023, 08:54 PM #22

Archived author: Foe • Posted: 2023-02-07T20:54:41.255000+00:00
Original source

gimme a few min

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

cheers!
rektbyfaith
02-07-2023, 08:54 PM #23

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

cheers!

rektbyfaith
Administrator
0
02-07-2023, 08:56 PM
#24
Archived author: Foe • Posted: 2023-02-07T20:56:29.115000+00:00
Original source

```Lua
local questInfo = {}

function questInfo.OnLoad()
questInfo.Cache = {}
local query = WorldDBQuery("SELECT ID, LogTitle, QuestLevel FROM quest_template;");
if(query) then
repeat
questInfo.Cache[query:GetUInt32(0)] = {
title = query:GetString(1),
level = query:GetUInt32(2)
}
until not query:NextRow()
end
end

function Quest:GetInfo()
local title, level = nil, nil
local cache = questInfo.Cache[self:GetId()]

if(cache) then
title = cache.title
level = cache.level
end

return title, level
end

questInfo.OnLoad()```
rektbyfaith
02-07-2023, 08:56 PM #24

Archived author: Foe • Posted: 2023-02-07T20:56:29.115000+00:00
Original source

```Lua
local questInfo = {}

function questInfo.OnLoad()
questInfo.Cache = {}
local query = WorldDBQuery("SELECT ID, LogTitle, QuestLevel FROM quest_template;");
if(query) then
repeat
questInfo.Cache[query:GetUInt32(0)] = {
title = query:GetString(1),
level = query:GetUInt32(2)
}
until not query:NextRow()
end
end

function Quest:GetInfo()
local title, level = nil, nil
local cache = questInfo.Cache[self:GetId()]

if(cache) then
title = cache.title
level = cache.level
end

return title, level
end

questInfo.OnLoad()```

rektbyfaith
Administrator
0
02-07-2023, 08:56 PM
#25
Archived author: Foe • Posted: 2023-02-07T20:56:49.094000+00:00
Original source

Save that as questInfo.ext
rektbyfaith
02-07-2023, 08:56 PM #25

Archived author: Foe • Posted: 2023-02-07T20:56:49.094000+00:00
Original source

Save that as questInfo.ext

rektbyfaith
Administrator
0
02-07-2023, 08:57 PM
#26
Archived author: Foe • Posted: 2023-02-07T20:57:13.207000+00:00
Original source

then at the top of your script, add ```require("questInfo")```
rektbyfaith
02-07-2023, 08:57 PM #26

Archived author: Foe • Posted: 2023-02-07T20:57:13.207000+00:00
Original source

then at the top of your script, add ```require("questInfo")```

rektbyfaith
Administrator
0
02-07-2023, 08:57 PM
#27
Archived author: Foe • Posted: 2023-02-07T20:57:43.419000+00:00
Original source

then you can use ```local title, level = quest:GetInfo()```
rektbyfaith
02-07-2023, 08:57 PM #27

Archived author: Foe • Posted: 2023-02-07T20:57:43.419000+00:00
Original source

then you can use ```local title, level = quest:GetInfo()```

rektbyfaith
Administrator
0
02-07-2023, 08:59 PM
#28
Archived author: adm • Posted: 2023-02-07T20:59:06.867000+00:00
Original source

Wow, super!
rektbyfaith
02-07-2023, 08:59 PM #28

Archived author: adm • Posted: 2023-02-07T20:59:06.867000+00:00
Original source

Wow, super!

rektbyfaith
Administrator
0
02-07-2023, 08:59 PM
#29
Archived author: adm • Posted: 2023-02-07T20:59:21.759000+00:00
Original source

Thanks a lot! Much appreciated!
rektbyfaith
02-07-2023, 08:59 PM #29

Archived author: adm • Posted: 2023-02-07T20:59:21.759000+00:00
Original source

Thanks a lot! Much appreciated!

rektbyfaith
Administrator
0
02-07-2023, 09:03 PM
#30
Archived author: Foe • Posted: 2023-02-07T21:03:06.006000+00:00
Original source

np
rektbyfaith
02-07-2023, 09:03 PM #30

Archived author: Foe • Posted: 2023-02-07T21:03:06.006000+00:00
Original source

np

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