Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] How to display player's location in a broadcasted message? For example if I want to display the play

[DiscordArchive] How to display player's location in a broadcasted message? For example if I want to display the play

[DiscordArchive] How to display player's location in a broadcasted message? For example if I want to display the play

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
01-01-2023, 01:55 PM
#1
Archived author: adm • Posted: 2023-01-01T13:55:02.194000+00:00
Original source

How to display player's location in a broadcasted message? For example if I want to display the player's level it is:
``"..player:GetLevel().."``

How about the map name? The website gives me this command:
``mapName = Map:GetName()`` - Returns the name of the Map e.g. Azeroth, Eastern Kingdoms, the Molten Core, etc.

but how to implement it? Is it simply ``"..player:Map:GetName().."`` ?
rektbyfaith
01-01-2023, 01:55 PM #1

Archived author: adm • Posted: 2023-01-01T13:55:02.194000+00:00
Original source

How to display player's location in a broadcasted message? For example if I want to display the player's level it is:
``"..player:GetLevel().."``

How about the map name? The website gives me this command:
``mapName = Map:GetName()`` - Returns the name of the Map e.g. Azeroth, Eastern Kingdoms, the Molten Core, etc.

but how to implement it? Is it simply ``"..player:Map:GetName().."`` ?

rektbyfaith
Administrator
0
01-01-2023, 03:27 PM
#2
Archived author: Honey • Posted: 2023-01-01T15:27:48.467000+00:00
Original source

Player:GetMap():GetName()
rektbyfaith
01-01-2023, 03:27 PM #2

Archived author: Honey • Posted: 2023-01-01T15:27:48.467000+00:00
Original source

Player:GetMap():GetName()

rektbyfaith
Administrator
0
01-01-2023, 03:43 PM
#3
Archived author: adm • Posted: 2023-01-01T15:43:27.848000+00:00
Original source

Just had to write the 'player' with a lower case, and it worked. Thanks!
rektbyfaith
01-01-2023, 03:43 PM #3

Archived author: adm • Posted: 2023-01-01T15:43:27.848000+00:00
Original source

Just had to write the 'player' with a lower case, and it worked. Thanks!

rektbyfaith
Administrator
0
01-01-2023, 03:44 PM
#4
Archived author: Honey • Posted: 2023-01-01T15:44:04.086000+00:00
Original source

well, ofc you gotta match the variable name exactly
rektbyfaith
01-01-2023, 03:44 PM #4

Archived author: Honey • Posted: 2023-01-01T15:44:04.086000+00:00
Original source

well, ofc you gotta match the variable name exactly

rektbyfaith
Administrator
0
01-01-2023, 03:44 PM
#5
Archived author: Honey • Posted: 2023-01-01T15:44:10.532000+00:00
Original source

Glad you solved it.
rektbyfaith
01-01-2023, 03:44 PM #5

Archived author: Honey • Posted: 2023-01-01T15:44:10.532000+00:00
Original source

Glad you solved it.

rektbyfaith
Administrator
0
01-01-2023, 03:44 PM
#6
Archived author: adm • Posted: 2023-01-01T15:44:27.825000+00:00
Original source

yeah, thanks to you, cheers!
rektbyfaith
01-01-2023, 03:44 PM #6

Archived author: adm • Posted: 2023-01-01T15:44:27.825000+00:00
Original source

yeah, thanks to you, cheers!

rektbyfaith
Administrator
0
01-01-2023, 05:42 PM
#7
Archived author: adm • Posted: 2023-01-01T17:42:42.953000+00:00
Original source

Can I do the same thing with AreaName?
Like:
`"..player:GetAreaId():GetAreaName().."` (doesn't seems to work)

I'm also curious if there is a way to print the Zone. I found only `WorldObject:GetZoneId` but doesn't seems to have ZoneName
rektbyfaith
01-01-2023, 05:42 PM #7

Archived author: adm • Posted: 2023-01-01T17:42:42.953000+00:00
Original source

Can I do the same thing with AreaName?
Like:
`"..player:GetAreaId():GetAreaName().."` (doesn't seems to work)

I'm also curious if there is a way to print the Zone. I found only `WorldObject:GetZoneId` but doesn't seems to have ZoneName

rektbyfaith
Administrator
0
01-01-2023, 05:47 PM
#8
Archived author: Foe • Posted: 2023-01-01T17:47:51.787000+00:00
Original source

http://elunaluaengine.github.io/Global/GetAreaName.html
[Embed: Global:GetAreaName - Eluna]
API documentation for the Global:GetAreaName method in the Eluna engine.
http://elunaluaengine.github.io/Global/GetAreaName.html
rektbyfaith
01-01-2023, 05:47 PM #8

Archived author: Foe • Posted: 2023-01-01T17:47:51.787000+00:00
Original source

http://elunaluaengine.github.io/Global/GetAreaName.html
[Embed: Global:GetAreaName - Eluna]
API documentation for the Global:GetAreaName method in the Eluna engine.
http://elunaluaengine.github.io/Global/GetAreaName.html

rektbyfaith
Administrator
0
01-01-2023, 05:50 PM
#9
Archived author: adm • Posted: 2023-01-01T17:50:16.283000+00:00
Original source

I've seen it already, but it's difficult to comprehend, since I've no experience with coding
rektbyfaith
01-01-2023, 05:50 PM #9

Archived author: adm • Posted: 2023-01-01T17:50:16.283000+00:00
Original source

I've seen it already, but it's difficult to comprehend, since I've no experience with coding

rektbyfaith
Administrator
0
01-01-2023, 05:52 PM
#10
Archived author: Foe • Posted: 2023-01-01T17:52:23.175000+00:00
Original source

The synopsis tells you how to use it, you use GetAreaName() as a global (not called on an object like player) and supply it either a zone or area ID to get the name. So you could do something like GetAreaName(player:GetAreaId())
rektbyfaith
01-01-2023, 05:52 PM #10

Archived author: Foe • Posted: 2023-01-01T17:52:23.175000+00:00
Original source

The synopsis tells you how to use it, you use GetAreaName() as a global (not called on an object like player) and supply it either a zone or area ID to get the name. So you could do something like GetAreaName(player:GetAreaId())

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