[DiscordArchive] I could whip you up an example if you clarify a little more what you want to acheive? You want to sh
[DiscordArchive] I could whip you up an example if you clarify a little more what you want to acheive? You want to sh
Archived author: Michael Crilly • Posted: 2025-02-23T04:49:15.375000+00:00
Original source
damn you're getting serious now
Archived author: metallinos • Posted: 2025-02-23T04:51:45.075000+00:00
Original source
I think we're in luck... ETA 5 minutes
Archived author: metallinos • Posted: 2025-02-23T05:01:47.928000+00:00
Original source
```
local bookGO = 175689 -- Uldaman Relief test object
local function ReadGO(event, packet, player)
local packetGuid = packet:ReadGUID()
-- Enter the gameobject_template entry of the item
-- you want to check for interaction with, here
local nearestBookGO = player:GetNearestGameObject(5, bookGO) -- The core checks for max 5 yds dist from GO on read
if nearestBookGO then
local bookGUID = nearestBookGO:GetGUID()
if bookGUID == packetGuid then
player:SendUnitSay("I am reading the correct object", 0)
-- Insert actions here
end
end
end
RegisterPacketEvent(0x481, 5, ReadGO)
```
Archived author: Michael Crilly • Posted: 2025-02-23T05:02:51.256000+00:00
Original source
Jesus lol
Archived author: Michael Crilly • Posted: 2025-02-23T05:03:01.174000+00:00
Original source
That's amazing work, well done
Archived author: metallinos • Posted: 2025-02-23T05:04:06.460000+00:00
Original source
Yea that one threw me off a bit haha, there is no server-side use associated with type 9 game objects, only a client-side packet saying "I'm now reading this object" (0x481). On initial use, the client queries the server for all page-related information and caches it indefinitely. So the only server-side action is taken on initial use
Archived author: metallinos • Posted: 2025-02-23T05:04:36.700000+00:00
Original source
After that, the only thing that happens is the client tells the server "I'm now reading this gameobject with this GUID"
Archived author: Michael Crilly • Posted: 2025-02-23T05:05:46.312000+00:00
Original source
Damn
Archived author: Michael Crilly • Posted: 2025-02-23T05:05:57.396000+00:00
Original source
I think I'll switch to a GO
Archived author: metallinos • Posted: 2025-02-23T05:06:00.359000+00:00
Original source
I looked into whether it can fire on closing the book but the client doesn't communicate with the server on close, only on read. So to give the reward on closing the book you'd be best off with an addon sending a command or addon msg