Creature Guids

Hi, i have one question about creature’s guids. I can use method “SendListInvetory” and she uses creature guid, she don’t needs ‘lowguid’ , which is stored in the databse, but uint64 guid like ‘highguid’ which works with the server, how can I find this 64-bit hexadecimal guid number?

Sorry for my bad English and thank you in advance for your answer.

Object::GetGUID()

Ok, guid for my npc is 4211160902, but when i use ‘player->GetSession()->SendListInventory(4211160902);’, but if i select in gossip menu, server shows to me “That merchant doesn’t like you”.

The npc whose that guid belongs to must be near to the player in order to work

They are.

try with another npc

It’s proven on more npc, it das not work

4211160902 is not valid NPC GUID. It’s only 32 bits.

It’s 0xFB013746

For NPCs it should be 0xF130****FB013746 where **** is NPC’s entry in hex.

tl;dr you are using GUID_LOPART

Then it would 0xF1304FBFB013746, which also does not work

Make a query to return the guidlow of the creature you want (from creature table), then you use this to get the highguid

SendListInventory(MAKE_NEW_GUID(guidlow, 0, HIGHGUID_UNIT))

Still does not work, I really do not know how to break in this script: http://www.trinitycore.org/f/topic/5242-gossip-vendor

if your npcs are in an instanced map you have to use the instance script to store the whole uint64 guid of them at creature creation.

[FONT=arial]MAKE_NEW_GUID(low,entry,high); is only valid in noninstanced zones![/FONT]

I have these npc in noninstance zones like Stormwind and Orgrimmar.
EDIT : Now I have the script works, thanks to all guys /emoticons/default_smile.png

Will you tell what fixed it?