Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local SMSG_NPC_TEXT_UPDATE = 384
- local MAX_GOSSIP_TEXT_OPTIONS = 8
- function Player:GossipSetText(text, textID)
- local data = CreatePacket(SMSG_NPC_TEXT_UPDATE, 100);
- data:WriteULong(textID or 0x7FFFFFFF)
- for i = 1, MAX_GOSSIP_TEXT_OPTIONS do
- data:WriteFloat(0) -- Probability
- data:WriteString(text) -- Text
- data:WriteString(text) -- Text
- data:WriteULong(0) -- language
- data:WriteULong(0) -- emote
- data:WriteULong(0) -- emote
- data:WriteULong(0) -- emote
- data:WriteULong(0) -- emote
- data:WriteULong(0) -- emote
- data:WriteULong(0) -- emote
- end
- self:SendPacket(data)
- end
- local nEntry = 85000;
- local GossipCat = {
- {"|TInterface\\icons\\Inv_misc_runedorb_01:30:30:-20|t|cFF556B2F Auberge|r", 10},
- {"|TInterface\\icons\\Achievement_boss_kickandtrick:30:30:-20|t|cFF7B68EE Donjons & Raids|r", 15},
- {"|TInterface\\icons\\Achievement_dungeon_ulduarraid_misc_04:30:30:-20|t|CFFff00ea Zone Farm|r", 25},
- {"|TInterface\\icons\\Achievement_bg_winwsg:30:30:-20|t|cFFFF4500 Zone PvP|r", 30},
- {"|TInterface\\icons\\Achievement_dungeon_nexus70_normal:30:30:-20|t|cFF1E90FF Transmogrification|r", 35},
- {"|TInterface\\icons\\Achievement_boss_ragnaros:30:30:-20|t|cFFFF0000 WorldBoss|r", 40},
- }
- local GossipTP = {
- -- E, M, X, Y, Z, O, NAME, ID
- {10, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_qiraj_jewelblessed:30:30:-20|t|cFF556B2F Zone Shop|r", 101},
- {10, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_ore_cobalt:30:30:-20|t|cFF556B2F Zone V.I.P", 102},
- {10, 0, 0, 0, 0, 0, "|TInterface\\icons\\Achievement_bg_returnxflags_def_wsg:30:30:-20|t|cFFFFFFE0 Retour|r", 0},
- --
- {15, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_qiraj_jewelblessed:30:30:-20|t|cFF7B68EE T1 (Fort de Durn)|r", 151},
- {15, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_qiraj_jewelblessed:30:30:-20|t|cFF7B68EE T2 (Scholomance)|r", 152},
- {15, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_qiraj_jewelblessed:30:30:-20|t|cFF7B68EE T3 (Uldaman)|r", 151},
- {15, 0, 0, 0, 0, 0, "|TInterface\\icons\\Achievement_bg_returnxflags_def_wsg:30:30:-20|t|cFFFFFFE0 Retour|r", 0},
- --
- {25, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Ability_warlock_backdraft:30:30:-20|t|CFFff00ea Zone Spell|r", 251},
- {25, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_misc_bag_24_netherweave_imbued:30:30:-20|t|CFFff00ea Zone Sac|r", 251},
- {25, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_shirt_guildtabard_01:30:30:-20|t|CFFff00ea Zone Tabard|r", 251},
- {25, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_shirt_01:30:30:-20|t|CFFff00ea Zone Chemise|r", 251},
- {25, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_jewelcrafting_nightseye_03:30:30:-20:-20|t|CFFff00ea Zone Gemmes|r", 251},
- {25, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_enchant_disenchant:30:30:-20|t|CFFff00ea Zone Enchantement|r", 251},
- {25, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_mount_darkphoenixa:30:30:-20|t|CFFff00ea Zone Monture|r", 251},
- {25, 0, 0, 0, 0, 0, "|TInterface\\icons\\Achievement_bg_returnxflags_def_wsg:30:30:-20|t|cFFFFFFE0 Retour|r", 0},
- --
- {30, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_misc_runedorb_01:30:30:-20|t|cFFFF4500 Zone FFA|r", 301},
- {30, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_misc_runedorb_01:30:30:-20|t|cFFFF4500 Zone Arène|r", 301},
- {30, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_misc_runedorb_01:30:30:-20|t|cFFFF4500 Zone Duel|r", 301},
- {30, 0, 0, 0, 0, 0, "|TInterface\\icons\\Achievement_bg_returnxflags_def_wsg:30:30:-20|t|cFFFFFFE0 Retour|r", 0},
- --
- {35, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_misc_runedorb_01:30:30:-20|t|cFF556B2F Transmogrification|r", 351},
- --
- {40, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_misc_runedorb_01:30:30:-20|t|cFFFF0000 0|r", 401},
- {40, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_misc_runedorb_01:30:30:-20|t|cFFFF0000 1|r", 401},
- {40, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_misc_runedorb_01:30:30:-20|t|cFFFF0000 2|r", 401},
- {40, 13, 28.164017, -10.482026, -144.708603, 2.785897, "|TInterface\\icons\\Inv_misc_runedorb_01:30:30:-20|t|cFFFF0000 3|r", 401},
- {40, 0, 0, 0, 0, 0, "|TInterface\\icons\\Achievement_bg_returnxflags_def_wsg:30:30:-20|t|cFFFFFFE0 Retour|r", 0},
- };
- local function onGossipHello(event, player, object)
- for i=1, #GossipCat do
- player:GossipMenuAddItem(9, GossipCat[i][1], 0, GossipCat[i][2])
- end
- player:GossipSetText(" |cFF556B2F [ |cFFFF0000Enchanté |cFF556B2F"..player:GetName().."|cFFFF0000, que puis-je faire pour toi ? |cFF556B2F]")
- player:GossipSendMenu(0x7FFFFFFF, object)
- end
- RegisterCreatureGossipEvent(nEntry, 1, onGossipHello)
- local function onGossipSelect(event, player, object, sender, intid, code)
- for i=1, #GossipCat do
- if intid == GossipCat[i][2] then
- for j=1, #GossipTP do
- if GossipCat[i][2] == GossipTP[j][1] then
- player:GossipMenuAddItem(9, GossipTP[j][7], 0, GossipTP[j][8])
- end
- end
- player:GossipSetText(" ")
- player:GossipSendMenu(0x7FFFFFFF, object)
- end
- end
- for j=1, #GossipTP do
- if intid == GossipTP[j][8] and GossipTP[j][8] == 0 then
- onGossipHello(event, player, object)
- elseif intid == GossipTP[j][8] then
- player:Teleport(GossipTP[j][2], GossipTP[j][3], GossipTP[j][4], GossipTP[j][5], GossipTP[j][6])
- end
- end
- end
- RegisterCreatureGossipEvent(nEntry, 2, onGossipSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement